No-code Telegram bot constructor
Project description
telebot-constructor
Free & open-source no-code constructor of Telegram bots for grass-roots activist initiatives and human rights organizations. Focused on privacy both for bot users and admins. Developed by bots against war team.
How to use
:warning: Under construction
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
npm
v18+ install frontend and start dev server
npm install
npm run dev
- Visit
http://localhost:8081
in 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:
poetry
format (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
File details
Details for the file telebot_constructor-0.1.9.tar.gz
.
File metadata
- Download URL: telebot_constructor-0.1.9.tar.gz
- Upload date:
- Size: 460.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bec910f9d9241cfbb243995b38111cb4f3d757467431df590a01f95299b6d66 |
|
MD5 | 3c954c8300cffc813067131612d86c15 |
|
BLAKE2b-256 | 3a037e6d95a384a185fc24fa9326b1cffc67780b1b747e155e4d1bb6dbe5bf3c |
File details
Details for the file telebot_constructor-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: telebot_constructor-0.1.9-py3-none-any.whl
- Upload date:
- Size: 481.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b8f386ad0255d75668e8bf9d1dbd8414a6bd4442860a35c21620cb118621819 |
|
MD5 | 34b854bfe0421fb2cb55534ad96c936e |
|
BLAKE2b-256 | 1d92c96688e4dea23389e3f4ba6a29f40dbf0e45c4f02ff375d03ef0268fe7a1 |