No-code Telegram bot constructor
Project description
telebot-constructor
Free & open-source Telegram bot constructor with no-code web UI, using telebot-components as backend .
Development
Basic dev setup
- Install Poetry (tested with versions 1.5 - 1.7). Then, install backend dependencies with
poetry install
# start new shell with poetry-created virtual env activated
poetry shell
If you have problems with poetry, you can manually create everything and install dependencies using pip
from requirements.txt generated from poetry dependencies:
# example of virtual env creation and activation for unix systems
python3.12 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- Start backend/API
# set environment variables (example for unix-like systems)
export TELEBOT_CONSTRUCTOR_USE_REDIS_EMULATION=1
export SECRETS_ENCRYPTION_KEY=if-wLoSw7gEbQgY1xLHrEgI4E357PRUAeGfZudnaYu0= # dummy value
# run the web app
python run_polling.py
- With
npmv18+ install frontend and start dev server
npm install
npm run dev
- Visit
http://localhost:8081in the browser.
Generate TS interfaces from backend data model
On any update to Pydantic data types on backend, run
npm run pydantic:to:ts
Check that JSON schema and Typescript types are updated accordingly.
Backend
Running tests with coverage check
coverage run -m pytest tests -vv
coverage html
Then you can review htmlcov/index.html in browser.
Running linters and code checks
black .
isort .
flake8
mypy
Adding/updating backend dependencies
We keep two versions of the same dependency list:
poetryformat (pyproject.toml+poetry.lock)- regular
pip'srequirements.txt
To modify dependency list, use
poetry add depdendency@contraint.
Then, re-generate requirements.txt with (there is a github action to check it)
poetry export -f requirements.txt --output requirements.txt
Frontend
We use:
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
Hashes for telebot_constructor-0.1.5.tar.gz
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | e5ddc04bfb257092f32f6296b4c0f3b35fbf7afc0891e8ec0a51ccd7531afab6 |
|
| MD5 | 5cbbfde66f299cb983dfcc015a96248b |
|
| BLAKE2b-256 | 14b89172884621dabf374eee1ad37cffea915402e60674805e2faf0144afcdc4 |
Hashes for telebot_constructor-0.1.5-py3-none-any.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | f886013559a67591f761d6438293deb466979033c553b46ce178ef5e7ac9db8b |
|
| MD5 | 31835f59f6e0240b292ea0eea183555a |
|
| BLAKE2b-256 | f6094073084981f3bed0fc90a60dca0a38c51877209e508afe2276f95e40b19d |