Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mortafix/redispersistence

A python module to make your Telegram bot persistent using Redis
https://github.com/mortafix/redispersistence

Last synced: 2 days ago
JSON representation

A python module to make your Telegram bot persistent using Redis

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)
```