MongoDB backend for Telethon session storage
Project description
Telethon MongoDB Session
This is a Telethon session backend which uses MongoDB.
Installing
pip3 install telemongo
Upgrading
pip3 install -U telemongo mongoengine
Usage
from mongoengine import connect
from telemongo import MongoSession
from telethon import TelegramClient
api_id = 12345
api_hash = "0123456789abcdef0123456789abcdef"
host = "mongo://username:pass@mongo_host/dbname"
connect('dbname', host=host)
session = MongoSession('dbname', host=host)
client = TelegramClient(session, api_id, api_hash)
client.start()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
telemongo-0.2.2.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for telemongo-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef4a383b8c25c62a3b3f640fe4cd9a4d3c1fa0ab0b22d51e047f9f6c924c6795 |
|
MD5 | 529aad3479312d4e4bb16af2a5c5e141 |
|
BLAKE2b-256 | 48c62260ab26427b3b653e0db2561adec7a487f593e526b8be507646be39e24a |