python-telegram-bot-django-persistence
Do you use python-telegram-bot or aiogram with Django
and want storing FSM info without additional infrastructure?
We've got you covered!
Originally, this package supported only PTB, but we added aiogram, because it is awesome!
Quickstart
📥 Install package
If you are using poetry (and if not, please, consider using it 😉):
# For python-telegram-bot
poetry add "python-telegram-bot-django-persistence[ptb]"
# For aiogram
poetry add "python-telegram-bot-django-persistence[aiogram]"
Elif you are using pip, then just enter:
pip install python-telegram-bot-django-persistence
🔌 Add the app to your Django project
Then add python_telegram_bot_django_persistence into your INSTALLED_APPS in your settings file, like so:
INSTALLED_APPS = [
...
"python_telegram_bot_django_persistence", # For python-telegram-bot
"aiogram_djpersistence", # For aiogram
]
☢ Migrate your database
python manage migrate
🌟 Awesome! Now use it in your bot!
python-telegram-bot
updater = Updater(bot=bot, use_context=True, persistence=DjangoPersistence())
aiogram
dp = Dispatcher(storage=DjangoStorage())
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Alexander Shishenko 💻 📖 |
Raman Hutkovich 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Metadata
Release files for python-telegram-bot-django-persistence 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_telegram_bot_django_persistence-0.2.1.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_telegram_bot_django_persistence-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.4 kB
Release files / python_telegram_bot_django_persistence-0.2.1.tar.gz
| Download URL | python_telegram_bot_django_persistence-0.2.1.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27d5b0e54e2f61c0b1094f88a35fcaa275bc8c40e51bcb7b2562505ae3c46045
|
|
BLAKE2b-256 checksum How to use checksums |
f8ef5a48d4aa7707b39461f8c317c764576c09c338a63e16ab175f44bf0bc5ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.10.12 Linux/6.5.0-1025-azure
|
Release files / python_telegram_bot_django_persistence-0.2.1-py3-none-any.whl
| Download URL | python_telegram_bot_django_persistence-0.2.1-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e1ff8238c159aee1b270a62c4bb988449f0bd8125c07285986b14ccceb1937c
|
|
BLAKE2b-256 checksum How to use checksums |
e713d7031da8bb8ff590fadf30b5a9b7ab87c0f12710c46a73c8a37d7762571f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.10.12 Linux/6.5.0-1025-azure
|