Skip to main content

CI status: cistatus

pyhll can be used to compute cardinality, i.e. the unique number of elements in some set using HyperLogLog. This library is a thin python wrapper around HyperLogLog implementation in https://raw.github.com/armon/hlld

Installing

pyhll can be installed via pypi:

pip install pyhll

Building

Get the source:

git clone https://github.com/blackwithwhite666/pyhll.git

Compile extension:

python setup.py build_ext --inplace

Usage

from pyhll import Cardinality
c = Cardinality()
c.add(b'foo')
assert 1 == len(c)
c.add(b'bar')
assert 2 == len(c)
c.add(b'bar')
assert 2 == len(c)
c.update([b'bar', b'buzz'])
assert 3 == len(c)

Running the test suite

Use Tox to run the test suite:

tox

References

Here are some related works which we make use of:

Changelog

0.2.4

  • Add dump and load support;

0.2.3

  • Add support for fluent iface;

0.2.1-0.2.2

  • Fix build on CentOS;

0.2.0

  • Add ability to union sets;

  • Add serialization support;

0.1.1

  • Exclude autoconf artifacts from sdist.

0.1.0 (initial release)

  • Prototype.

Release files for pyhll 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhll 0.2.4
File Size Uploaded
pyhll-0.2.4.tar.gz 166.5 kB Details

Release files / pyhll-0.2.4.tar.gz

Download URL pyhll-0.2.4.tar.gz
Size 166.5 kB
Tags Source
SHA-256 checksum
How to use checksums
70b3788e40840102dc4fa0ab450ac4e9214b5efc15cb8b93a21453431668e157
BLAKE2b-256 checksum
How to use checksums
ac9ec658e22f5cef1a8ab2dd7578f9cf94d455178f43c7d44c47871b8c338520
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.4 This release

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page