The universal bot engine framework. Made on top of pytelegrambotapi
Project description
The universal bot engine framework. Made on top of pytelegrambotapi
Starting your development journey
Step 1. .env file example
Example of ready-to-work .env file:
ENVIRONMENT=development
PORT=8000
BOT_TOKEN=your_token
MONGODB_TOKEN=your_token
ADMIN_IDS=1,2
SUPER_ADMIN_ID=1
Accessing .env data
You can import all this variables from bot_engine.data.env file. There you will see ready-to-use constants loaded right from your .env file.
Step 2. First users! (optional)
You can easily create initial users in your DB by doing this:
- Create folder "data" with a file "initials_users.py". Place an array of initial users with dictionaries:
INITIAL_USERS = [ { "real_name": "Valeriy", "id": 123, "access_level": "user" or "admin", "any_other_data": any, }, ... ]
Then call method Database().add_users(INITIAL_USERS) to fill your DB with initial users. This is an optional one-time operation for setting up your first users in DB. That's simple!
A data security minute
You can leave the file "initials_users.py" in your project. Just add it to .gitignore to prevent the leakout of the data.
Step 3. Run the bot
Call Bot().start() to start bot. It handles all .env file data automatically using data/env.py file - no need to import / load your .env data
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 bot_engine-0.1.9.tar.gz.
File metadata
- Download URL: bot_engine-0.1.9.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5813a8092412eccbf9a251a925ccb8d5497f92ea0e8a5b92a47341572b69fb84
|
|
| MD5 |
d37380377e29232c93915849d8d377da
|
|
| BLAKE2b-256 |
1479e72105b5b27939a343f93dbcb04c067fe61ce5cc4bd8313b9921ef691ec4
|
File details
Details for the file bot_engine-0.1.9-py3-none-any.whl.
File metadata
- Download URL: bot_engine-0.1.9-py3-none-any.whl
- Upload date:
- Size: 30.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
192a0887fa0c4f8f5d9e93cc67b9e63185dda46537d000f0bc2cf5bb7103877a
|
|
| MD5 |
f88059ef3f2f8399cc225da4d2d44033
|
|
| BLAKE2b-256 |
51bbdafa9b95680fe8ff40defe4e1275ba1d608c3df02621cdf9e0b336806999
|