Skip to main content

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:

  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bot_engine-0.2.1.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

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

bot_engine-0.2.1-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file bot_engine-0.2.1.tar.gz.

File metadata

  • Download URL: bot_engine-0.2.1.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for bot_engine-0.2.1.tar.gz
Algorithm Hash digest
SHA256 94517c40b8cdc06d05feca319c71b53f89a6135c15ac86b1d7cd04c1c5eb0f9a
MD5 d14f9fbb3c46f42ed38aebfee51493a1
BLAKE2b-256 6cc63a64aff34e566e7f122eb34c69ebe9d8c7f7a1cec239e20f001a4e543188

See more details on using hashes here.

File details

Details for the file bot_engine-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: bot_engine-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 31.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for bot_engine-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b9c6eb6f65519ebf0a3b40cf2ee1050be63dffe1d04d550b4f81e3d6c069e062
MD5 7c3dd115ca76546f9914e2dbcddfce97
BLAKE2b-256 77435f05e1a37cba9847eb3131438d3ec349a6b40643cc78a201f0174b5f7fd3

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