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.24.tar.gz
(2.2 kB
view details)
Built Distribution
File details
Details for the file chainspotter-0.0.24.tar.gz
.
File metadata
- Download URL: chainspotter-0.0.24.tar.gz
- Upload date:
- Size: 2.2 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 | 7c778bbbcde77cd36cc2db6bfda6b71e29cbcffa6b1ed9ad5a07b7f7d25bf526 |
|
MD5 | f9551085b537edb493b3168e9c8b783d |
|
BLAKE2b-256 | ee73d5cbef184f44e44621e1b7ba9dab0742d82848bab93949c90b9ec32e7fb2 |
File details
Details for the file chainspotter-0.0.24-py3-none-any.whl
.
File metadata
- Download URL: chainspotter-0.0.24-py3-none-any.whl
- Upload date:
- Size: 3.7 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 | 7e6ea4599f74c4cd495bc926cc364f45bfb80db544a81453307a2751c939c65c |
|
MD5 | 8d35ece9eadb2004c8fe83cb82a9775f |
|
BLAKE2b-256 | 6c4e1d3fcde9581c35132200a2cd4a1f592b4e37e3f91fb9dc40aab6bf3b9603 |