Skip to main content

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

  1. 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
  1. 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
  1. With npm v18+ install frontend and start dev server
npm install
npm run dev
  1. 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's requirements.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:

  • Tailwind CSS
  • flowbite component library, see docs
  • svelvet (nodes/connections engine), see docs
  • flowbite-icons-svelte for icons, see catalog

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

telebot_constructor-0.1.6.tar.gz (459.9 kB view details)

Uploaded Source

Built Distribution

telebot_constructor-0.1.6-py3-none-any.whl (480.1 kB view details)

Uploaded Python 3

File details

Details for the file telebot_constructor-0.1.6.tar.gz.

File metadata

  • Download URL: telebot_constructor-0.1.6.tar.gz
  • Upload date:
  • Size: 459.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for telebot_constructor-0.1.6.tar.gz
Algorithm Hash digest
SHA256 e224bf5a93846692ca5ec89194951537fce10e62b8d9681f3e38e49a139de8eb
MD5 8d5554dcdfbd2b42f0afd27ff41f20ce
BLAKE2b-256 546dbea0735c25eadacdf997592fd896725d2fefa4cc9de329400b1185dab17a

See more details on using hashes here.

File details

Details for the file telebot_constructor-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for telebot_constructor-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 245edf60e446ca55c010e5964a5418c80af48d341c0b648c5a03ae38ffc201f4
MD5 85cc8c6fc48084ea02ec25252b6a9a79
BLAKE2b-256 d6d57d8f368cc5851be035e40a5cc571e613c6d6e1025ba92366c32e71307554

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page