TeleBee library provided by Mohammed Ghanam.
TeleBee is a Python library designed to simplify the management and organization of code in bot projects using the Telebot library. This library allows you to load code from Python files located in specific directories without interfering with the polling or infinity_polling processes. You can write your code normally, and the library will automatically load and organize it.
Features
- Load code from Python files in specified directories.
- Does not interfere with
pollingorinfinity_pollingprocesses. - A flexible and easy-to-use library that allows developers to write code normally in separate files.
- Supports organizing code in different directories.
Installation
- First, install the
pyTelegramBotAPIlibrary (if not installed already):
pip install pyTelegramBotAPI
Usage
-
- Setting up TeleBee:
At the beginning of your Python file, import the library, create a TeleBee object, and pass in your bot's token.
from telebot import TeleBot
from telebee import TeleBee
# Set up the bot using your bot's token
bot = TeleBot('YOUR_BOT_TOKEN')
# Set up TeleBee and load code from specified directories
telebee_bot = TeleBee(function_dirs=['start', 'functions'])
telebee_bot.load_functions()
# The developer controls polling separately
bot.infinity_polling()
-
- Adding code:
The developer writes their code in Python files within the specified directories. For example, the developer can add files like start.py or functions/another_function.py.
Example of start.py:
@bot.message_handler(commands=['start'])
def start_message(message):
bot.reply_to(message, "Welcome to the bot!")
Example of functions/another_function.py:
@bot.message_handler(commands=['hello'])
def hello_message(message):
bot.reply_to(message, "Hello, how are you?")
-
- Customizing directories:
You can customize the directories containing the code by passing them to TeleBee in the function_dirs argument.
telebee_bot = TeleBee(function_dirs=['your_custom_folder', 'another_folder'])
telebee_bot.load_functions()
For Contact:
- My telegram Account: @midoghanam
- My Channel: @mido_ghanam
Best Regards ♡
Metadata
Release files for TeleBee 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| telebee-1.1.tar.gz | 3.8 kB | Without provenance | Details for telebee-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| telebee-1.1-py3-none-any.whl | Python 3 | none | any | Details for telebee-1.1-py3-none-any.whl |
Total release size: 7.4 kB
Release files / telebee-1.1.tar.gz
| Download URL | telebee-1.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfdd2661ec0e37c849f0fed2645e56ac1c6b698b7276c6f34c56e4d9cd36fea1
|
|
BLAKE2b-256 checksum How to use checksums |
d63e254e8d254323354fd80ab92b2063f7f4dee824701baba67a0472e96accaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / telebee-1.1-py3-none-any.whl
| Download URL | telebee-1.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2411c0ec874178a5f858503b4f683d77bd6cf92b7c79096e2e9eaad3ab83f5f0
|
|
BLAKE2b-256 checksum How to use checksums |
67d2c6cce01e9960f51089494f9c652327a166907072f5603b0f869b59454ab5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for TeleBee 1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.