Python library containing utils for telegram bots
Project description
Advanced Telegram Bot
Python library containing utils for telegram bots
Available utils
- Locale-dependent data storage
- Logger
- Role system
- State system
- User meta data storage
Dependencies
pymongo >= 3.0
Usage
Just import the class and you're good to go
from telegramutilsservice import TelegramUtilsService
Ways of storing your data
MongoDB
To use mongo as a storage you have to provide its data for authorization to the class like so:
TelegramUtilsService(
roles = { roles dict here },
states = [ states list here ],
users_collection_name="users-collection-name-here",
logs_collection_name="logs-collection-name-here",
state_with_params=False/True,
locales_folder="locales-folder-here",
db_address="db-ip-address-here",
db_port="db-port-here",
db_username="db-username-here",
db_password="db-password-here",
db_name="db-name-here")
Also you should create collections in mongo by youserlf, according to col. names you provide in constructor
Local Storage (JSONs)
To use local storage based on jsons you have to provide the folder path to the class like so:
TelegramUtilsService(
roles = { roles dict here },
states = [ states list here ],
users_collection_name="users-collection-name-here",
logs_collection_name="logs-collection-name-here",
state_with_params=False/True,
locales_folder="locales-folder-here",
"storage_folder"="storage-folder-path-here")
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
Built Distributions
Close
Hashes for advanced-telegram-bot-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cd81a5348996aeac9762ac10534a4eb3cbe2b4ba42734a4d8dfbf9ad783b426 |
|
MD5 | 4b2e8ad69e586caa10cdb5cf43b7bf96 |
|
BLAKE2b-256 | 450a77f411968cb4341a83e52bbe642db49f291194ba307a611fcb0d5950a6fa |
Close
Hashes for advanced_telegram_bot-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d36eb5fdb4e8b7ed0501218eafcf6b0dad682c101e4289b30e86696c144ae15 |
|
MD5 | 11bb7a8f6b00f78dc6a1432d74f04fe1 |
|
BLAKE2b-256 | 596a858b231ff221bbd0e0d4b5eb65a7d3c504531d031f7f39faf7f9c211c4a3 |
Close
Hashes for advanced_telegram_bot-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd0f762fcdadb088187bc399a64967d00f37691f45ce863cca26506981a31b67 |
|
MD5 | c5b035c2656ec75086d19fe731c47e9d |
|
BLAKE2b-256 | 9dd57c5a1a10ac138f99e6fd378624fee1e567569367e848b4205c5e7bbb7dab |