Skip to main content

Light-weight tools to implement high-level features in Redis

Project description

# redis-gadgets

This is a collection of helper tools built on top of redis.

# Note On Testing

Most of the code here is a thin wrapper over a few redis calls. Testing it without connecting to redis is pretty useless, as such. To that end, the tests make (default) redis connections to pass into the barious tools. These tests are destructive. If you’re running the tests, either override the redis connection or run it on a machine where you don’t mind clobbering a redis db.

Pull requests with a better way to do this are welcome.

# Unique tracker

This tool uses redis bit sets to track unique events per day. The tool maps between arbitrary string ids and bit offsets, within a namespace (i.e. a given id-namespace pair maps to a unique bit offset). This allows for a relatively compact offset space while still enabling tracking of multiple things, e.g. unique users viewing pages and unique pages viewed. There is a default namespace ‘global’ if you don’t need this feature.

Events are tracked on day granularity, so the same id-event pairing will only be counted once per day. Counts can then be prodouced for arbitrary date ranges, using bitwise logical operators. These rollups are cached with a redis expiration timer.

Project details


Download files

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

Source Distributions

redis_gadgets-0.1.7.tar.gz (3.8 kB view details)

Uploaded Source

redis_gadgets-0.1.4.tar.gz (3.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

redis_gadgets-0.1.7-py2-none-any.whl (5.9 kB view details)

Uploaded Python 2

redis_gadgets-0.1.4-py2-none-any.whl (5.6 kB view details)

Uploaded Python 2

File details

Details for the file redis_gadgets-0.1.7.tar.gz.

File metadata

  • Download URL: redis_gadgets-0.1.7.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for redis_gadgets-0.1.7.tar.gz
Algorithm Hash digest
SHA256 9f559eb1420ab9681de623eafef62dc86bb4fd1c31acbbed27c1efacaebf4995
MD5 e76a1b48290efa0accc287e7756754b5
BLAKE2b-256 bd5adf91dd2540754d74c0fafad7e3ff383a4839dc7015fec7ee79f4b8b1d058

See more details on using hashes here.

File details

Details for the file redis_gadgets-0.1.4.tar.gz.

File metadata

  • Download URL: redis_gadgets-0.1.4.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for redis_gadgets-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a8cb480fd25a1fe3c9fcc42d45d25779bc84e2cf30128a57fede90fcb663d3eb
MD5 6c9014cb0633445808e71e7b5514b413
BLAKE2b-256 5aa21b0a0a5bd8e2b4290f39c76369c681bdc3fe6e1d6841f84fae552f4d4371

See more details on using hashes here.

File details

Details for the file redis_gadgets-0.1.7-py2-none-any.whl.

File metadata

File hashes

Hashes for redis_gadgets-0.1.7-py2-none-any.whl
Algorithm Hash digest
SHA256 362e14cf9fe62b9b76ab794e7b9b0165b1fb27c0e3c76a8aa4052cd93e8f1060
MD5 153d5cd9bda515b270ec711d7293ccaa
BLAKE2b-256 3e3fe04d32d06be105fb4a16d4e6749d797b2299b7f6a9803819c000eab01017

See more details on using hashes here.

File details

Details for the file redis_gadgets-0.1.4-py2-none-any.whl.

File metadata

File hashes

Hashes for redis_gadgets-0.1.4-py2-none-any.whl
Algorithm Hash digest
SHA256 c98648bca79092d0080624befaf9b69af25fce6e63743afc337ac1aa12be4026
MD5 580eb2b597e0b614a2cfa89b3466d422
BLAKE2b-256 6c4a2d98e6e008437d54d27cb599300ff2fdeea4d56bb547f55e0aae182bb6f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page