Skip to main content

python-telegram-bot-django-persistence

PyPI - Downloads All Contributors

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
Alexander Shishenko

💻 📖
Raman Hutkovich
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)

Source distribution for python-telegram-bot-django-persistence 0.2.1
File Size Uploaded
python_telegram_bot_django_persistence-0.2.1.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-telegram-bot-django-persistence 0.2.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page