Skip to main content

Telethon Session

Project description

!alt text alt text

Django Telethon Session

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-session

Usage example

Usage is very simple, just follow three simple steps below

Add Django-Telethon-Session to your installed apps

First add django telethon session to your installed apps in your django project settings:

INSTALLED_APPS = [
    ...,
    'django_telethon_session',
    ...
]

Migrate the database

Then run migrate command to create migrations in database.

python manage.py migrate

Use custom session

Use the session in django_telethon_session.sessions to initialize telegram client:

from django_telethon_session.sessions import DjangoSession
client = TelegramClient(DjangoSession())

Feel free to send pull requests or report issues!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-telethon-session, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size django_telethon_session-0.3-py3-none-any.whl (9.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size django_telethon_session-0.3.tar.gz (7.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page