chainspotter-0.0.25
توضیحات
Redis Streams wrapper for user-item interaction tracking and fetching
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | chainspotter-0.0.25 |
| نام | chainspotter |
| نسخه کتابخانه | 0.0.25 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Alexander Dmitriev |
| ایمیل نویسنده | sasha.engineer@gmail.com |
| آدرس صفحه اصلی | https://github.com/uSasha/chainspotter |
| آدرس اینترنتی | https://pypi.org/project/chainspotter/ |
| مجوز | - |
# chainspotter
Redis Streams wrapper to track, store and query user-item interactions history by item count or time.
#### Usage example
Producer:
```python
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:
```python
import redis
import chainspotter
chain = chainspotter.ClickChain('user_history', redis.Redis())
chain.last_n_pcs(2)
> [0, 1, 2, 3, 4]
```
نحوه نصب
نصب پکیج whl chainspotter-0.0.25:
pip install chainspotter-0.0.25.whl
نصب پکیج tar.gz chainspotter-0.0.25:
pip install chainspotter-0.0.25.tar.gz