{"id":22109018,"url":"https://github.com/npodlozhniy/telebot-tutorial","last_synced_at":"2026-03-04T15:31:51.749Z","repository":{"id":186508655,"uuid":"407118126","full_name":"NPodlozhniy/telebot-tutorial","owner":"NPodlozhniy","description":"Building a telegram bot from simple to complex","archived":false,"fork":false,"pushed_at":"2023-01-16T23:08:15.000Z","size":49,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T02:36:47.747Z","etag":null,"topics":["datadog","flask","github-actions","heroku-ci","heroku-deployment","pytelegrambotapi","telegram-bot","threading","travis-ci"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NPodlozhniy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-09-16T10:19:06.000Z","updated_at":"2025-01-13T16:49:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"320196e2-eb6f-4fcc-a5d8-a122ee99988d","html_url":"https://github.com/NPodlozhniy/telebot-tutorial","commit_stats":null,"previous_names":["npodlozhniy/telebot-tutorial"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/NPodlozhniy/telebot-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPodlozhniy%2Ftelebot-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPodlozhniy%2Ftelebot-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPodlozhniy%2Ftelebot-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPodlozhniy%2Ftelebot-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NPodlozhniy","download_url":"https://codeload.github.com/NPodlozhniy/telebot-tutorial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NPodlozhniy%2Ftelebot-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30084967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datadog","flask","github-actions","heroku-ci","heroku-deployment","pytelegrambotapi","telegram-bot","threading","travis-ci"],"created_at":"2024-12-01T09:27:57.823Z","updated_at":"2026-03-04T15:31:51.702Z","avatar_url":"https://github.com/NPodlozhniy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telebot-tutorial\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/NPodlozhniy/telebot-tutorial\u0026env[SECRETNAME]=YOUR+SECRET+CODE\u0026env[TOKEN]=YOUR+TELEGRAM+BOT+TOKEN)\n\nThe project is organized in such a way that it consistently improves from a simple echo bot working locally to a complex tool in the hands of a business team for daily monitoring of the required indicators.\n\n[![Python application](https://github.com/NPodlozhniy/telebot-tutorial/actions/workflows/python-app.yml/badge.svg)](https://github.com/NPodlozhniy/telebot-tutorial/actions/workflows/python-app.yml)\n![Build Status](https://app.travis-ci.com/NPodlozhniy/telebot-tutorial.svg?token=QqdGuvQuDTwHxcNPfezP\u0026branch=master)\n[![Heroku CI Status](https://generate-heroku-badge.herokuapp.com/last.svg)](https://dashboard.heroku.com/pipelines/6fd30bbc-6323-478e-8221-aff8dd2a93d8/tests)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Contents\n\n1. [Getting started](#Getting-started)\n    - [How to get secrets](#How-to-get-secrets)\n    - [How to run](#How-to-run)\n2. [Early versions](#Early-versions)\n    - [Your first telegram bot](#Your-first-telegram-bot)\n    - [Second telegram bot](#Second-telegram-bot)\n    - [Third telegram bot](#Third-telegram-bot)\n3. [See also](#See-also)\n\n## Getting started\n\nThe project `@ZelfAlertBot` is a telegram bot, which is part of the analytical infrastructure at [ZELF](https://zelf.co/) and allows the startup team to monitor important business indicators on a daily basis.\n\n### How to get secrets\n\nYou just need to create a bot using the `@BotFather` interface, you need to give it a name and save the received token. This value must be set to an environment variable `TOKEN`.\nAlso you need to specify `SECRETNAME` which is used as login password, you can choose any safe string you like.\n\n### How to run\n\nIt is enough to download the latest version of the repository to your local computer, set the `TOKEN` and `SECRETNAME` environment variables, and modify the [stats](https://github.com/NPodlozhniy/telebot-tutorial/blob/master/dataloader.py#:~:text=def%20stats(credentials%2C%20button)%3A) function in [dataloader.py](https://github.com/NPodlozhniy/telebot-tutorial/blob/master/dataloader.py) file accordance with your goals, this function will not work by default.\n\n[:arrow_up:Contents](#Contents)\n___\n## Early versions\n\nThis is the following sandbox for exploring telebot\n\n### Your first telegram bot\n\nTo start the `Your first telegram bot` run the following commands:\n```\n$ pip install pytelegrambotapi\n$ set TOKEN=\u003cYOUR TOKEN\u003e\n$ python main.py\n```\n[Browse the repository at this point in the history](https://github.com/NPodlozhniy/telebot-tutorial/tree/65fd22f75f7b0fd6b6476f6ced9b408b1e69ebfc)\n\n[:arrow_up:Contents](#Contents)\n___\n### Second telegram bot\n\n`Second telegram bot` starts on the Heroku by default, but to run locally you should just add one line to the beginning of the code above and modify the launch command:\n\n```\n$ pip install flask\n$ python main.py --local\n```\n[Browse the repository at this point in the history](https://github.com/NPodlozhniy/telebot-tutorial/tree/c350dfa2f0484c2435bf99389d0eaa5c9f919c25)\n\n[:arrow_up:Contents](#Contents)\n___\n### Third telegram bot\n\nIs the first intelligent version of `@ZelfAlertBot` bot with simple authentication through a security question, which, for instance, can send statistics on the main metrics for yesterday. In order to run locally, you need to run a few more commands:\n\n```\n$ pip install gspread\n$ pip install oauth2client\n$ pip install df2gspread\n$ set SECRETNAME=\u003cYOUR NAME\u003e\n```\n[Browse the repository at this point in the history](https://github.com/NPodlozhniy/telebot-tutorial/tree/ffedf21b202aefdd4784b364d5c98ea6d5c669e2)\n\n[:arrow_up:Contents](#Contents)\n___\n## See also\n\n1. [PyTelegramBotAPI library source code](https://github.com/eternnoir/pyTelegramBotAPI)\n2. [How to add Heroku CI badge](https://github.com/gregsadetsky/heroku-ci-badge)\n\n[:arrow_up:Contents](#Contents)\n___\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpodlozhniy%2Ftelebot-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpodlozhniy%2Ftelebot-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpodlozhniy%2Ftelebot-tutorial/lists"}