Skip to main content

Redis Streams wrapper for user-item interaction tracking and fetching

Project description

chainspotter

Redis Streams wrapper to track, store and query user-item interactions history by item count or time.

Usage example

Producer:

import redis
import chainspotter


@chainspotter.to_chain('user_history', redis.Redis(), limit=20)
def show_item_to_user(user_id, item_id):
    print('item_id')

for i in range(5):
    show_item_to_user(2, i)

Consumer:

import redis
import chainspotter

chain = chainspotter.ClickChain('user_history', redis.Redis())
chain.last_n_pcs(2)

> [0, 1, 2, 3, 4]

Project details


Download files

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

Source Distribution

chainspotter-0.0.25.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

chainspotter-0.0.25-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file chainspotter-0.0.25.tar.gz.

File metadata

  • Download URL: chainspotter-0.0.25.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.6.8

File hashes

Hashes for chainspotter-0.0.25.tar.gz
Algorithm Hash digest
SHA256 04a6927253bdabf2db55a5ccb63877ff8818303b270dc90c802a075c31c45b94
MD5 bf254de4bf5ead52da97e2f85ddc7c2d
BLAKE2b-256 7d689f9ae7f71428c7914060ec43d4954408dd7e6974ad35c0ee89218a66a82c

See more details on using hashes here.

File details

Details for the file chainspotter-0.0.25-py3-none-any.whl.

File metadata

  • Download URL: chainspotter-0.0.25-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.6.8

File hashes

Hashes for chainspotter-0.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 4e0a8c40306c3c275f1e7049899164a8a482b6b722ab5958e13bd065231db6f3
MD5 d5395531181b00351e28b0d3f3b16904
BLAKE2b-256 9d8a9e79b266423d4f5bcb4b59abf809ebbe09c1c04ba117954a5d5a60262970

See more details on using hashes here.

Supported by

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