A telethon
Project description
Telethon Cosmos DB SQL API Sesion
This is a Telethon session backend which uses Cosmos DB (SQL API).
In short, it allows Telethon to store session in Cosmos DB via SQL API.
Installing
pip3 install telethon-cosmosdb-sqlsession
Upgrading
pip3 install -U telethon-cosmosdb-sqlsession
Usage
from telethon import TelegramClient
from telethoncosmosdb import CosmosDBSQLSession
api_id = 123456
api_hash = "0123456789abcdef0123456789abcdef"
COSMOS_ENDPOINT = 'https://database-endpoint.documents.azure.com:443/'
COSMOS_KEY = 'Cosmos DB key here=='
COSMOS_DBNAME = 'database'
# The first parameter 'user' means the session will create containers with suffix
# '_user' in the names to avoid any possible name collision (What would happen will happen).
session = CosmosDBSQLSession('user', COSMOS_ENDPOINT, COSMOS_KEY, COSMOS_DBNAME)
client = TelegramClient(session, api_id, api_hash)
Disclaimer
This packages assumes your data is well-encrypted in Cosmos DB, and therefore does not encrypt your session data.
This package comes with no warranty. I am not responsible for any damages resulted from using this package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file telethon-cosmosdb-sqlsession-0.1.0.tar.gz.
File metadata
- Download URL: telethon-cosmosdb-sqlsession-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f0adbed4818f3e5630d9d27991f6fc0a4a2e303850f29e99868526800296a72
|
|
| MD5 |
81404952b7eb14f8d9afe35e9d4adfec
|
|
| BLAKE2b-256 |
23de8c545e8af364cb3e662ecf73dde022237026d3306fef2ac7786909772a41
|
File details
Details for the file telethon_cosmosdb_sqlsession-0.1.0-py3-none-any.whl.
File metadata
- Download URL: telethon_cosmosdb_sqlsession-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73d8184d760dc39ebb80eb4528064e2c9fd4be0fd5938f40b073ff987c704233
|
|
| MD5 |
78c51ac8d6da7126300dd44c43aaa411
|
|
| BLAKE2b-256 |
65f684b6072a8ab0e9d4686ba5a9549d70d5ec3c57b6fde6148fdd90f40bf2c1
|