{"id":34086520,"url":"https://github.com/artembakhanov/python-telegram-bot-calendar","last_synced_at":"2026-04-01T20:45:19.163Z","repository":{"id":46068872,"uuid":"280502733","full_name":"artembakhanov/python-telegram-bot-calendar","owner":"artembakhanov","description":"Python inline calendar for Telegram bots","archived":false,"fork":false,"pushed_at":"2024-08-07T18:00:17.000Z","size":102,"stargazers_count":137,"open_issues_count":12,"forks_count":27,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-16T16:19:56.845Z","etag":null,"topics":["calendar","python","telegram-bot","telegram-bot-api"],"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/artembakhanov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-17T18:55:11.000Z","updated_at":"2025-11-04T10:34:09.000Z","dependencies_parsed_at":"2024-06-19T00:23:09.728Z","dependency_job_id":null,"html_url":"https://github.com/artembakhanov/python-telegram-bot-calendar","commit_stats":{"total_commits":23,"total_committers":4,"mean_commits":5.75,"dds":"0.13043478260869568","last_synced_commit":"00cb20d566565d7bd1602e006eb300b27279c112"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/artembakhanov/python-telegram-bot-calendar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artembakhanov%2Fpython-telegram-bot-calendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artembakhanov%2Fpython-telegram-bot-calendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artembakhanov%2Fpython-telegram-bot-calendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artembakhanov%2Fpython-telegram-bot-calendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artembakhanov","download_url":"https://codeload.github.com/artembakhanov/python-telegram-bot-calendar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artembakhanov%2Fpython-telegram-bot-calendar/sbom","scorecard":{"id":209021,"data":{"date":"2025-08-11","repo":{"name":"github.com/artembakhanov/python-telegram-bot-calendar","commit":"00cb20d566565d7bd1602e006eb300b27279c112"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 2/11 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test_library.yml:1","Warn: no topLevel permission defined: .github/workflows/upload_package.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_library.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/artembakhanov/python-telegram-bot-calendar/test_library.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_library.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/artembakhanov/python-telegram-bot-calendar/test_library.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/upload_package.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/artembakhanov/python-telegram-bot-calendar/upload_package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/upload_package.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/artembakhanov/python-telegram-bot-calendar/upload_package.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/test_library.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/test_library.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/test_library.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/upload_package.yml:18","Warn: pipCommand not pinned by hash: .github/workflows/upload_package.yml:19","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v_1.0.5 not signed: https://api.github.com/repos/artembakhanov/python-telegram-bot-calendar/releases/36338429","Warn: release artifact v_1.0.2 not signed: https://api.github.com/repos/artembakhanov/python-telegram-bot-calendar/releases/28758917","Warn: release artifact v_1.0.1 not signed: https://api.github.com/repos/artembakhanov/python-telegram-bot-calendar/releases/28691321","Warn: release artifact v_1.0.5 does not have provenance: https://api.github.com/repos/artembakhanov/python-telegram-bot-calendar/releases/36338429","Warn: release artifact v_1.0.2 does not have provenance: https://api.github.com/repos/artembakhanov/python-telegram-bot-calendar/releases/28758917","Warn: release artifact v_1.0.1 does not have provenance: https://api.github.com/repos/artembakhanov/python-telegram-bot-calendar/releases/28691321"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T00:22:55.385Z","repository_id":46068872,"created_at":"2025-08-17T00:22:55.385Z","updated_at":"2025-08-17T00:22:55.385Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"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":["calendar","python","telegram-bot","telegram-bot-api"],"created_at":"2025-12-14T13:29:35.034Z","updated_at":"2026-04-01T20:45:19.155Z","avatar_url":"https://github.com/artembakhanov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-telegram-bot-calendar\n\n[![PyPI version](https://badge.fury.io/py/python-telegram-bot-calendar.svg)](https://badge.fury.io/py/python-telegram-bot-calendar)\n[![CodeFactor](https://www.codefactor.io/repository/github/artembakhanov/python-telegram-bot-calendar/badge)](https://www.codefactor.io/repository/github/artembakhanov/python-telegram-bot-calendar)\n![cock](https://github.com/artembakhanov/python-telegram-bot-calendar/workflows/Tests/badge.svg)\n\nVery simple inline calendar for your bot.\n\n\u003cimg src=\"https://i.gyazo.com/21d553c25481827b55174acfcf45259b.gif\" style=\"zoom:67%;\" /\u003e\n\n# Getting Started\n\nThis library is tested on Python 3.6 and 3.7.\n\n### Installation\n\n```bash\npip install python-telegram-bot-calendar\n```\n\n### Usage\n\nThere is one main class - DetailedTelegramCalendar that can be used as follows. This is the example for [pyTelegramBotAPI](https://github.com/eternnoir/pyTelegramBotAPI) library. Other libraries are also supported.\n\n```python\nfrom telegram_bot_calendar import DetailedTelegramCalendar, LSTEP\n\n...\n@bot.message_handler(commands=['start'])\ndef start(m):\n    calendar, step = DetailedTelegramCalendar().build()\n    bot.send_message(m.chat.id,\n                     f\"Select {LSTEP[step]}\",\n                     reply_markup=calendar)\n\n\n@bot.callback_query_handler(func=DetailedTelegramCalendar.func())\ndef cal(c):\n    result, key, step = DetailedTelegramCalendar().process(c.data)\n    if not result and key:\n        bot.edit_message_text(f\"Select {LSTEP[step]}\",\n                              c.message.chat.id,\n                              c.message.message_id,\n                              reply_markup=key)\n    elif result:\n        bot.edit_message_text(f\"You selected {result}\",\n                              c.message.chat.id,\n                              c.message.message_id)\n```\n\nIn start handler the calendar is created. Several arguments can be passed:\n\n* `calendar_id` - small integer or string, used for calendar identification. It used when you need several different calendars (default - 0)\n* `current_date` - `datetime.date`  object, initial date value (default - today date)\n* `additional_buttons` - 1D list of buttons that will be added to the bottom of the calendar\n* `locale` - either `en`, `ru`, or `eo`, can be added more\n* `min_date` and `max_date` - both are used as min and max values for the calendar\n\nAs you can see, special function that is provided should be passed to callback query handler. It will automatically work. The function takes only one argument - `calendar_id` that is 0 by default.\n\nIn the body of the handler function you need to call process function on callback data. **WARNING!** You need to create the calendar object again if it was not saved before.\n\nThe function `process` return tuple of size 3 - `result`, `keyboard`, `step`.\n\n* `result` - `datetime.date` object if user finished selecting. Otherwise `None`\n* `keyboard` - inline keyboard markup if the result is not ready. Otherwise `None`\n* `step` - `YEAR`, `MONTH`,  or `DAY` if not ready. `None` is also possible if there is no change in keyboard.\n\n# Advanced use\n\n### Several calendars\n\nYou can create as many calendars as you want. However, in order to handle them properly set different `calendar_id's` when  you want to distinguish them. Take a look at examples.\n\n### Date ranges\n\nIn the class constructor `min_date` and `max_date` - both are used as min and max values for the calendar. If you add them, the calendar will not show undesired dates. Example:\n\u003cimg src=\"https://github.com/artembakhanov/python-telegram-bot-calendar/raw/master/examples/images/5.png?raw=true\" alt=\"3\" style=\"zoom:67%;\" /\u003e\n\n### Custom style\n\nYou can also write your own code. One of the examples is redefining the steps order.\n\nIn the package you can find `WMonthTelegramCalendar` and `WYearTelegramCalendar` that start from day and month selecting, not from year.\n\nYou can also redefine style parameters. Example:\n\n```python\nclass MyStyleCalendar(DetailedTelegramCalendar):\n    # previous and next buttons style. they are emoji now!\n    prev_button = \"⬅️\"\n    next_button = \"➡️\"\n    # you do not want empty cells when month and year are being selected\n    empty_month_button = \"\"\n    empty_year_button = \"\"\n```\n\nYou will get:\n\n ![4](https://github.com/artembakhanov/python-telegram-bot-calendar/raw/master/examples/images/3.png)\n\n### Custom Translation\n\n```python\nyour_translation_months = list('abcdefghijkl')\nyour_translation_days_of_week = list('yourtra')\n\nclass MyTranslationCalendar(DetailedTelegramCalendar):\n    def __init__(self, **kwargs):\n        super().__init__(**kwargs)\n        self.days_of_week['yourtransl'] = your_translation_days_of_week\n        self.months['yourtransl'] = your_translation_months\n```\n\n![5](https://github.com/artembakhanov/python-telegram-bot-calendar/raw/master/examples/images/4.png)\n\n# Examples\n\n* [simple_pytelegrambotapi.py](/examples/simple_pytelegrambotapi.py) - simple example with [pyTelegramBotAPI](https://github.com/eternnoir/pyTelegramBotAPI)\n* [simple_aiogram.py](/examples/simple_aiogram.py) - simple example with [aiogram](https://github.com/aiogram/aiogram)\n* [simple_telethon.py](/examples/simple_telethon.py) - simple example with [telethon](https://github.com/LonamiWebs/Telethon)\n* [custom_translation.py](examples/custom_translation.py) - custom translation of calendar\n* [date_ranges.py](/examples/date_ranges.py) - define date ranges for the bot\n* [redefine_style.py](/examples/redefine_style.py) - simple example of redefining styles\n* [several_calendars.py](/examples/several_calendars.py) - several calendars in one bot\n\n# Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/yourFeature`)\n3. Commit your Changes (`git commit -m 'Add some yourFeature'`)\n4. Push to the Branch (`git push origin feature/yourFeature`)\n5. Open a Pull Request\n\n# Authors\n\n* **Artem Bakhanov** - [@artembakhanov](https://github.com/artembakhanov)\n\n# License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE.txt) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartembakhanov%2Fpython-telegram-bot-calendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartembakhanov%2Fpython-telegram-bot-calendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartembakhanov%2Fpython-telegram-bot-calendar/lists"}