A Telethon session storage implementation backed for Django ORM to use telethon in django projects.
Tested with:
- Python 3.7+
- Django 2.2+
Use the following command to install using pip:
pip install django-telethon-multisession
Usage is very simple, just follow three simple steps below
First add django telethon session to your installed apps in your django project settings:
INSTALLED_APPS = [
...,
'django_telethon_multisession',
...
]Then run migrate command to create migrations in database.
python manage.py migrateUse the session in django_telethon_multisession.sessions to initialize telegram client:
from django_telethon_multisession.sessions import DjangoMultiSession
client = TelegramClient(DjangoMultiSession("session_name"))Feel free to send pull requests or report issues!