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.2.tar.gz
(1.3 kB
view details)
Built Distribution
File details
Details for the file chainspotter-0.0.2.tar.gz
.
File metadata
- Download URL: chainspotter-0.0.2.tar.gz
- Upload date:
- Size: 1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d9c857ecaefff88eb17b1a77f21b19718668c1101e5131b19a64d65be54f555 |
|
MD5 | 333f67d05aa0e14cf489e335b941f826 |
|
BLAKE2b-256 | 87c798458e52a0072991d2b72c48940affabc5b84b2120805943fb0fd50e34fa |
File details
Details for the file chainspotter-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: chainspotter-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.3 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3c81530060277f52750f26d605973823f65fcc9ba096364bf61b1c670cf7da2 |
|
MD5 | 5200cb81f4f0c21790ad7fdb6075626f |
|
BLAKE2b-256 | ac59a34047d2ff44deaed1fb1f0839d2d49ab60d52f4912250d7a4988f740925 |