Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Small library for in-memory cardinality computing.

Project Description

CI status:

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 History

Release History

This version
History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyhll-0.2.4.tar.gz (166.5 kB) Copy SHA256 Checksum SHA256 Source Dec 6, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting