Skip to main content

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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

telemongo-0.2.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file telemongo-0.2.2.tar.gz.

File metadata

  • Download URL: telemongo-0.2.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.5.7-arch1-1

File hashes

Hashes for telemongo-0.2.2.tar.gz
Algorithm Hash digest
SHA256 02dce5c4918a305f6b75766107382fd2af4a477d05ddb512e617eacac8130a48
MD5 847296e1af27cfaa3744d462251e3b6b
BLAKE2b-256 8ef3af8d7a2d30688d1ca1188d4def8530ebfc000088b27d997135bb31a1c2f3

See more details on using hashes here.

File details

Details for the file telemongo-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: telemongo-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.5.7-arch1-1

File hashes

Hashes for telemongo-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ef4a383b8c25c62a3b3f640fe4cd9a4d3c1fa0ab0b22d51e047f9f6c924c6795
MD5 529aad3479312d4e4bb16af2a5c5e141
BLAKE2b-256 48c62260ab26427b3b653e0db2561adec7a487f593e526b8be507646be39e24a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page