Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Package to use Django ORM as persistence engine in Python Telegram Bot

License

NotificationsYou must be signed in to change notification settings

GamePad64/python-telegram-bot-django-persistence

Repository files navigation

PyPI - DownloadsAll Contributors

Do you usepython-telegram-bot oraiogram with Djangoand 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 usingpoetry (and if not, please, consider using it 😉):

# For python-telegram-botpoetry add"python-telegram-bot-django-persistence[ptb]"# For aiogrampoetry add"python-telegram-bot-django-persistence[aiogram]"

Elif you are usingpip, then just enter:

pip install python-telegram-bot-django-persistence

🔌 Add the app to your Django project

Then addpython_telegram_bot_django_persistence into yourINSTALLED_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 theall-contributors specification. Contributions of any kind welcome!

About

Package to use Django ORM as persistence engine in Python Telegram Bot

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors5

Languages


[8]ページ先頭

©2009-2025 Movatter.jp