https://github.com/mortafix/redispersistence
A python module to make your Telegram bot persistent using Redis
https://github.com/mortafix/redispersistence
Last synced: 3 months ago
JSON representation
A python module to make your Telegram bot persistent using Redis
- Host: GitHub
- URL: https://github.com/mortafix/redispersistence
- Owner: Mortafix
- License: mit
- Created: 2021-01-05T08:30:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-23T07:35:23.000Z (over 2 years ago)
- Last Synced: 2025-04-10T00:42:42.763Z (3 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 9
- Watchers: 1
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Setup
You can find the package, [here](https://pypi.org/project/redis-persistence/).
```
pip3 install redis-persistence
```# Requirements
* Python 3.8
* Redis 3.5# Import
```python
from redispersistence.persistence import RedisPersistence
```# Usage
You need to use this persistence with [pyton-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) module.
```python
redis_instance = Redis(host='localhost', port=6379, db=0)
persistence = RedisPersistence(redis_instance)
updater = Updater(BOT_TOKEN, persistence=persistence)
```