{"id":17989360,"url":"https://github.com/gamepad64/python-telegram-bot-django-persistence","last_synced_at":"2025-03-25T23:30:38.954Z","repository":{"id":38867318,"uuid":"387613608","full_name":"GamePad64/python-telegram-bot-django-persistence","owner":"GamePad64","description":"Package to use Django ORM as persistence engine in Python Telegram Bot","archived":false,"fork":false,"pushed_at":"2025-03-03T02:47:49.000Z","size":351,"stargazers_count":25,"open_issues_count":8,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T22:09:00.433Z","etag":null,"topics":["aiogram","django","django-orm","python","python-telegram-bot"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/python-telegram-bot-django-persistence/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GamePad64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-19T22:58:02.000Z","updated_at":"2025-03-10T08:08:18.000Z","dependencies_parsed_at":"2024-01-04T17:29:43.578Z","dependency_job_id":"cbf39bd0-c8c8-4df2-a236-7987563b58fd","html_url":"https://github.com/GamePad64/python-telegram-bot-django-persistence","commit_stats":{"total_commits":38,"total_committers":4,"mean_commits":9.5,"dds":0.5,"last_synced_commit":"1d06bbaf786918190c1513a06a601f5545a98f55"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GamePad64%2Fpython-telegram-bot-django-persistence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GamePad64%2Fpython-telegram-bot-django-persistence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GamePad64%2Fpython-telegram-bot-django-persistence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GamePad64%2Fpython-telegram-bot-django-persistence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GamePad64","download_url":"https://codeload.github.com/GamePad64/python-telegram-bot-django-persistence/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245561094,"owners_count":20635673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiogram","django","django-orm","python","python-telegram-bot"],"created_at":"2024-10-29T19:14:24.169Z","updated_at":"2025-03-25T23:30:38.578Z","avatar_url":"https://github.com/GamePad64.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-telegram-bot-django-persistence\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/python-telegram-bot-django-persistence?style=flat-square)](https://pypi.org/project/python-telegram-bot-django-persistence/)\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n\nDo you use [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) or [aiogram](https://github.com/aiogram/aiogram) with Django\nand want storing FSM info without additional infrastructure?  \nWe've got you covered!\n\nOriginally, this package supported only PTB, but we added aiogram, because it is awesome!\n\n## Quickstart\n\n### 📥 Install package\nIf you are using [poetry](https://python-poetry.org) (and if not, please, consider using it 😉):\n```shell\n# For python-telegram-bot\npoetry add \"python-telegram-bot-django-persistence[ptb]\"\n# For aiogram\npoetry add \"python-telegram-bot-django-persistence[aiogram]\"\n```\n\nElif you are using `pip`, then just enter:\n```shell\npip install python-telegram-bot-django-persistence\n```\n\n### 🔌 Add the app to your Django project\nThen add `python_telegram_bot_django_persistence` into your `INSTALLED_APPS` in your settings file, like so:\n\n```python\nINSTALLED_APPS = [\n    ...\n    \"python_telegram_bot_django_persistence\",  # For python-telegram-bot\n    \"aiogram_djpersistence\",  # For aiogram\n]\n```\n\n### ☢ Migrate your database\n```shell\npython manage migrate\n```\n\n### 🌟 Awesome! Now use it in your bot!\n\n#### python-telegram-bot\n```python\nupdater = Updater(bot=bot, use_context=True, persistence=DjangoPersistence())\n```\n#### aiogram\n```python\ndp = Dispatcher(storage=DjangoStorage())\n```\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://shishenko.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/837953?v=4?s=100\" width=\"100px;\" alt=\"Alexander Shishenko\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAlexander Shishenko\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/GamePad64/python-telegram-bot-django-persistence/commits?author=GamePad64\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/GamePad64/python-telegram-bot-django-persistence/commits?author=GamePad64\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/rhutkovich\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/9265526?v=4?s=100\" width=\"100px;\" alt=\"Raman Hutkovich\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRaman Hutkovich\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/GamePad64/python-telegram-bot-django-persistence/commits?author=rhutkovich\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamepad64%2Fpython-telegram-bot-django-persistence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgamepad64%2Fpython-telegram-bot-django-persistence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamepad64%2Fpython-telegram-bot-django-persistence/lists"}