python-telegram-bot-django-persistence

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


Keywords
django, django-orm, python, python-telegram-bot
License
MIT
Install
pip install python-telegram-bot-django-persistence==0.1.7

Documentation

python-telegram-bot-django-persistence

PyPI - Downloads All Contributors

Do you use python-telegram-bot with Django and want persistence without additional infrastructure? We've got you covered!

Quickstart

📥 Install package

If you are using poetry (and if not, please, consider using it 😉):

poetry add python-telegram-bot-django-persistence

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",
]

☢ Migrate your database

python manage migrate

🌟 Awesome! Use DjangoPersistence in python-telegram-bot

updater = Updater(bot=bot, use_context=True, persistence=DjangoPersistence())

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Alexander Shishenko

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!