telegrinder 0.4.0__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of telegrinder might be problematic. Click here for more details.
- telegrinder-0.4.2/.github/ISSUE_TEMPLATE/bug.md +30 -0
- telegrinder-0.4.2/.github/ISSUE_TEMPLATE/config.yml +5 -0
- telegrinder-0.4.2/.github/ISSUE_TEMPLATE/new_feat.md +24 -0
- telegrinder-0.4.2/.github/actions/setup/action.yaml +9 -0
- telegrinder-0.4.2/.github/dependabot.yaml +11 -0
- telegrinder-0.4.2/.github/pull_request_template.md +18 -0
- telegrinder-0.4.2/.github/workflows/lint_and_test.yml +46 -0
- telegrinder-0.4.2/.github/workflows/typegen.yml +41 -0
- telegrinder-0.4.2/.gitignore +148 -0
- telegrinder-0.4.2/.pre-commit-config.yaml +65 -0
- telegrinder-0.4.2/.readthedocs.yaml +13 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/PKG-INFO +57 -50
- telegrinder-0.4.2/contributing.md +5 -0
- telegrinder-0.4.2/docs/api.md +58 -0
- telegrinder-0.4.2/docs/guide/code_separation.md +76 -0
- telegrinder-0.4.2/docs/guide/index.md +6 -0
- telegrinder-0.4.2/docs/guide/optional_dependencies.md +59 -0
- telegrinder-0.4.2/docs/index.md +9 -0
- telegrinder-0.4.2/docs/tools/checkbox.md +93 -0
- telegrinder-0.4.2/docs/tools/error_handler.md +72 -0
- telegrinder-0.4.2/docs/tools/formatting.md +100 -0
- telegrinder-0.4.2/docs/tools/global_context.md +157 -0
- telegrinder-0.4.2/docs/tools/index.md +8 -0
- telegrinder-0.4.2/examples/assets/cat.jpg +0 -0
- telegrinder-0.4.2/examples/assets/i18n/en/LC_MESSAGES/messages.po +32 -0
- telegrinder-0.4.2/examples/assets/i18n/pl/LC_MESSAGES/messages.po +32 -0
- telegrinder-0.4.2/examples/assets/i18n/ru/LC_MESSAGES/messages.po +33 -0
- telegrinder-0.4.2/examples/assets/kaktovik.txt +1 -0
- telegrinder-0.4.2/examples/assets/kb_set_config.yaml +24 -0
- telegrinder-0.4.2/examples/assets/kitten.jpg +0 -0
- telegrinder-0.4.2/examples/assets/satie.jpeg +0 -0
- telegrinder-0.4.2/examples/assistant.py +54 -0
- telegrinder-0.4.2/examples/blueprint_bot/__main__.py +7 -0
- telegrinder-0.4.2/examples/blueprint_bot/client.py +5 -0
- telegrinder-0.4.2/examples/blueprint_bot/handlers/admin.py +19 -0
- telegrinder-0.4.2/examples/blueprint_bot/handlers/start.py +27 -0
- telegrinder-0.4.2/examples/blueprint_bot/handlers/with_enum.py +63 -0
- telegrinder-0.4.2/examples/callback_data_map.py +23 -0
- telegrinder-0.4.2/examples/callback_query.py +79 -0
- telegrinder-0.4.2/examples/chaotic.py +136 -0
- telegrinder-0.4.2/examples/chat_join_request.py +27 -0
- telegrinder-0.4.2/examples/checkbox.py +28 -0
- telegrinder-0.4.2/examples/choice.py +25 -0
- telegrinder-0.4.2/examples/command.py +65 -0
- telegrinder-0.4.2/examples/custom_api.py +50 -0
- telegrinder-0.4.2/examples/custom_rule.py +50 -0
- telegrinder-0.4.2/examples/download_photo.py +29 -0
- telegrinder-0.4.2/examples/error_handler.py +35 -0
- telegrinder-0.4.2/examples/event_node.py +23 -0
- telegrinder-0.4.2/examples/formatting.py +31 -0
- telegrinder-0.4.2/examples/forward_message.py +37 -0
- telegrinder-0.4.2/examples/global_context.py +73 -0
- telegrinder-0.4.2/examples/i18n_simple.py +28 -0
- telegrinder-0.4.2/examples/inline_bot.py +34 -0
- telegrinder-0.4.2/examples/invoice.py +13 -0
- telegrinder-0.4.2/examples/kaktovik.py +36 -0
- telegrinder-0.4.2/examples/keyboard.py +52 -0
- telegrinder-0.4.2/examples/long_states.py +46 -0
- telegrinder-0.4.2/examples/loop_wrapper.py +38 -0
- telegrinder-0.4.2/examples/message_entities.py +43 -0
- telegrinder-0.4.2/examples/middleware.py +35 -0
- telegrinder-0.4.2/examples/nodes.py +24 -0
- telegrinder-0.4.2/examples/pingpong.py +15 -0
- telegrinder-0.4.2/examples/ravioli.py +72 -0
- telegrinder-0.4.2/examples/raw_event.py +69 -0
- telegrinder-0.4.2/examples/reply_handler.py +18 -0
- telegrinder-0.4.2/examples/result_error_log.py +60 -0
- telegrinder-0.4.2/examples/return_manager.py +69 -0
- telegrinder-0.4.2/examples/rule_enum.py +25 -0
- telegrinder-0.4.2/examples/start_command.py +25 -0
- telegrinder-0.4.2/examples/upload.py +24 -0
- telegrinder-0.4.2/examples/user_by_username.py +158 -0
- telegrinder-0.4.2/examples/wait_many.py +35 -0
- telegrinder-0.4.2/examples/webhook_bot/app.py +51 -0
- telegrinder-0.4.2/examples/webhook_bot/bot.py +130 -0
- telegrinder-0.4.2/examples/with_nodes.py +108 -0
- telegrinder-0.4.2/examples/yes_or_no.py +52 -0
- telegrinder-0.4.2/mkdocs.yml +90 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/pyproject.toml +55 -64
- {telegrinder-0.4.0 → telegrinder-0.4.2}/readme.md +12 -2
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/__init__.py +1 -1
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/cute_types/base.py +1 -1
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/handler/func.py +1 -1
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/scenario/choice.py +1 -1
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/msgspec_utils.py +2 -2
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/polymorphic.py +2 -2
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/__init__.py +2 -2
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/adapter/event.py +1 -3
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/magic.py +76 -50
- telegrinder-0.4.2/tests/__init__.py +0 -0
- telegrinder-0.4.2/tests/conftest.py +5 -0
- telegrinder-0.4.2/tests/fixtures/__init__.py +0 -0
- telegrinder-0.4.2/tests/fixtures/api_instance.py +10 -0
- telegrinder-0.4.2/tests/fixtures/callback_query_update.py +51 -0
- telegrinder-0.4.2/tests/fixtures/message_update.py +37 -0
- telegrinder-0.4.2/tests/test_adapters.py +84 -0
- telegrinder-0.4.2/tests/test_api.py +96 -0
- telegrinder-0.4.2/tests/test_bot.py +0 -0
- telegrinder-0.4.2/tests/test_http.py +70 -0
- telegrinder-0.4.2/tests/test_nodes.py +190 -0
- telegrinder-0.4.2/tests/test_rules.py +79 -0
- telegrinder-0.4.2/tests/test_utils.py +77 -0
- telegrinder-0.4.2/tests/test_views.py +155 -0
- telegrinder-0.4.2/tests/tools/__init__.py +0 -0
- telegrinder-0.4.2/tests/tools/test_global_context.py +151 -0
- telegrinder-0.4.2/tests/tools/test_html_formatter.py +0 -0
- telegrinder-0.4.2/tests/tools/test_keyboard.py +0 -0
- telegrinder-0.4.2/tests/tools/test_loop_wrapper.py +0 -0
- telegrinder-0.4.2/tests/tools/test_waiter_machine.py +0 -0
- telegrinder-0.4.2/typegen/__init__.py +43 -0
- telegrinder-0.4.2/typegen/__main__.py +4 -0
- telegrinder-0.4.2/typegen/config_default_api_params.json +16 -0
- telegrinder-0.4.2/typegen/config_generation_id_by_default.json +84 -0
- telegrinder-0.4.2/typegen/config_literal_types.json +1277 -0
- telegrinder-0.4.2/typegen/generator.py +751 -0
- telegrinder-0.4.2/typegen/merge_shortcuts.py +279 -0
- telegrinder-0.4.2/typegen/models.py +103 -0
- telegrinder-0.4.2/typegen/nicifications.py +152 -0
- telegrinder-0.4.2/uv.lock +866 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/LICENSE +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/api/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/api/api.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/api/error.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/api/response.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/api/token.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/bot.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/cute_types/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/cute_types/callback_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/cute_types/chat_join_request.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/cute_types/chat_member_updated.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/cute_types/inline_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/cute_types/message.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/cute_types/pre_checkout_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/cute_types/update.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/cute_types/utils.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/context.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/dispatch.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/handler/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/handler/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/handler/audio_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/handler/base.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/handler/document_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/handler/media_group_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/handler/message_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/handler/photo_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/handler/sticker_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/handler/video_reply.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/middleware/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/middleware/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/middleware/global_middleware.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/process.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/return_manager/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/return_manager/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/return_manager/callback_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/return_manager/inline_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/return_manager/message.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/return_manager/pre_checkout_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/view/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/view/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/view/base.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/view/box.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/view/callback_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/view/chat_join_request.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/view/chat_member.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/view/inline_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/view/message.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/view/pre_checkout_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/view/raw.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/waiter_machine/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/waiter_machine/actions.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/waiter_machine/hasher/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/waiter_machine/hasher/callback.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/waiter_machine/hasher/hasher.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/waiter_machine/hasher/message.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/waiter_machine/hasher/state.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/waiter_machine/machine.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/waiter_machine/middleware.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/dispatch/waiter_machine/short_state.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/polling/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/polling/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/polling/polling.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/callback_data.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/chat_join.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/command.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/enum_text.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/func.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/fuzzy.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/id.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/inline.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/integer.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/is_from.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/logic.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/markup.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/mention.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/message.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/message_entities.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/node.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/payload.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/payment_invoice.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/regex.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/rule_enum.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/start.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/state.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/text.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/rules/update.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/scenario/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/scenario/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/bot/scenario/checkbox.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/client/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/client/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/client/aiohttp.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/client/form_data.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/client/sonic.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/model.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/modules.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/msgspec_json.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/attachment.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/base.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/callback_query.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/command.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/composer.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/container.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/either.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/event.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/file.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/me.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/payload.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/rule.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/scope.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/source.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/text.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/tools/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/node/tools/generator.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/py.typed +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/rules.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/adapter/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/adapter/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/adapter/dataclass.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/adapter/errors.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/adapter/node.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/adapter/raw_event.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/adapter/raw_update.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/buttons.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/callback_data_serilization/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/callback_data_serilization/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/callback_data_serilization/json_ser.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/callback_data_serilization/msgpack_ser.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/error_handler/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/error_handler/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/error_handler/error.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/error_handler/error_handler.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/formatting/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/formatting/deep_links.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/formatting/html_formatter.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/formatting/spec_html_formats.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/functional.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/global_context/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/global_context/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/global_context/global_context.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/global_context/telegrinder_ctx.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/i18n/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/i18n/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/i18n/middleware/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/i18n/middleware/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/i18n/simple.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/input_file_directory.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/keyboard.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/lifespan.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/limited_dict.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/loop_wrapper/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/loop_wrapper/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/loop_wrapper/loop_wrapper.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/parse_mode.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/state_storage/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/state_storage/abc.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/state_storage/memory.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/tools/strings.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/types/__init__.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/types/enums.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/types/input_file.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/types/methods.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/types/objects.py +0 -0
- {telegrinder-0.4.0 → telegrinder-0.4.2}/telegrinder/verification_utils.py +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "\U0001F41B Bug report \U0001F41B"
|
|
3
|
+
about: "\U0001F41B Reporting a bug. \U0001F41B"
|
|
4
|
+
title: ""
|
|
5
|
+
labels: ["bug"]
|
|
6
|
+
assignees: "luwqz1"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### ⚪️ Checklist ⚪️
|
|
10
|
+
* [ ] ❕ I'm sure this is a **bug** in the **framework** ❕
|
|
11
|
+
* [ ] 🔎 I have searched for **similar** *bugs* in `issues/PRs` 🔍
|
|
12
|
+
* [ ] 🟢 I have the **latest** version of the **framework** installed 🟢
|
|
13
|
+
|
|
14
|
+
### ✏️ Description ✏️
|
|
15
|
+
<!-- Describe the bug. -->
|
|
16
|
+
_No response_
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 🪄 Code example 🪄
|
|
20
|
+
<!-- Provide a minimal example. -->
|
|
21
|
+
```python
|
|
22
|
+
from telegrinder import ...
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 📝 Logs 📝
|
|
26
|
+
<!-- Provide logs/errors to review the issue. -->
|
|
27
|
+
```console
|
|
28
|
+
Traceback (most recent call last):
|
|
29
|
+
File "main.py", line 1, in <module>
|
|
30
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "\U0001F680 New feature \U0001F680"
|
|
3
|
+
about: "\U0001F680 I want to propose a new feature. \U0001F680"
|
|
4
|
+
title: ""
|
|
5
|
+
labels: ["new_feature"]
|
|
6
|
+
assignees: []
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🚀 Feature Request 🚀
|
|
10
|
+
|
|
11
|
+
**✏️ New feature description ✏️**
|
|
12
|
+
<!-- A clear and concise description. -->
|
|
13
|
+
_No response_
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
**🪄 Provide a minimal example 🪄**
|
|
17
|
+
<!-- A small code sample that will demonstrate your feature. -->
|
|
18
|
+
```python
|
|
19
|
+
from telegrinder import ...
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**✨ Teachability, Documentation, Adoption ✨**
|
|
23
|
+
<!-- If you can, explain how users will be able to use this and possibly write out a version the docs. -->
|
|
24
|
+
_No response_
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
### ✏️ Description ✏️
|
|
2
|
+
<!--
|
|
3
|
+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
|
|
4
|
+
-->
|
|
5
|
+
_No response_
|
|
6
|
+
|
|
7
|
+
`🐛 Fixes # (issue)`
|
|
8
|
+
|
|
9
|
+
### 📍 Type of change 📍
|
|
10
|
+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue) 🐛
|
|
11
|
+
- [ ] 🚀 New feature (non-breaking change which adds functionality) 🚀
|
|
12
|
+
- [ ] ⚡ Breaking change (fix or feature that would cause existing functionality not to work as expected) ⚡
|
|
13
|
+
- [ ] 📝 This change requires a documentation update 📝
|
|
14
|
+
|
|
15
|
+
### ⚪️ Checklist ⚪️
|
|
16
|
+
* [ ] 📝 Your code has documentation 📝
|
|
17
|
+
* [ ] 🔧 Your code has tests 🔧
|
|
18
|
+
* [ ] 🪄 Your code has example usage in `/examples` 🪄
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Lint and test
|
|
2
|
+
on: [push]
|
|
3
|
+
jobs:
|
|
4
|
+
lock_file:
|
|
5
|
+
runs-on: ubuntu-22.04
|
|
6
|
+
steps:
|
|
7
|
+
- uses: actions/checkout@v4
|
|
8
|
+
- uses: ./.github/actions/setup
|
|
9
|
+
- run: uv lock --locked
|
|
10
|
+
|
|
11
|
+
linting:
|
|
12
|
+
runs-on: ubuntu-22.04
|
|
13
|
+
needs: [lock_file]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: ./.github/actions/setup
|
|
17
|
+
- run: uvx ruff check .
|
|
18
|
+
|
|
19
|
+
type_checking:
|
|
20
|
+
runs-on: ubuntu-22.04
|
|
21
|
+
needs: [lock_file]
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
- uses: ./.github/actions/setup
|
|
25
|
+
- run: uv run basedpyright --level ERROR
|
|
26
|
+
|
|
27
|
+
tests:
|
|
28
|
+
runs-on: ubuntu-22.04
|
|
29
|
+
needs: [lock_file]
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: ./.github/actions/setup
|
|
33
|
+
- run: uv run pytest --cov
|
|
34
|
+
|
|
35
|
+
build:
|
|
36
|
+
runs-on: [ubuntu-22.04]
|
|
37
|
+
needs: [linting, type_checking, tests]
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- uses: ./.github/actions/setup
|
|
41
|
+
- run: uv build
|
|
42
|
+
- name: Upload build artifacts
|
|
43
|
+
uses: actions/upload-artifact@v4
|
|
44
|
+
with:
|
|
45
|
+
name: build-artifacts
|
|
46
|
+
path: dist/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Generating Telegram Bot API types
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch: {}
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: "0 13 * * *"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
lock_file:
|
|
10
|
+
runs-on: ubuntu-22.04
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: ./.github/actions/setup
|
|
14
|
+
- run: uv lock --locked
|
|
15
|
+
|
|
16
|
+
type_generation:
|
|
17
|
+
runs-on: ubuntu-22.04
|
|
18
|
+
needs: [lock_file]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- uses: ./.github/actions/setup
|
|
22
|
+
- run: uv run typegen
|
|
23
|
+
|
|
24
|
+
open_pr:
|
|
25
|
+
runs-on: ubuntu-22.04
|
|
26
|
+
needs: [type_generation]
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- uses: peter-evans/create-pull-request@v7
|
|
30
|
+
with:
|
|
31
|
+
commit-message: >
|
|
32
|
+
Update Bot API types based on the latest schema changes
|
|
33
|
+
title: >
|
|
34
|
+
Update Bot API types based on the latest schema changes
|
|
35
|
+
body: >
|
|
36
|
+
This is an automated PR. Please check the diff, and the action logs, to check for any funky behavior.
|
|
37
|
+
branch: automated/types
|
|
38
|
+
reviewers: luwqz1
|
|
39
|
+
assignees: luwqz1
|
|
40
|
+
labels: automated, types
|
|
41
|
+
delete-branch: true
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
.idea
|
|
40
|
+
*.iml
|
|
41
|
+
|
|
42
|
+
# Unit test / coverage reports
|
|
43
|
+
htmlcov/
|
|
44
|
+
.tox/
|
|
45
|
+
.nox/
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
.cache
|
|
49
|
+
nosetests.xml
|
|
50
|
+
coverage.xml
|
|
51
|
+
*.cover
|
|
52
|
+
.hypothesis/
|
|
53
|
+
.pytest_cache/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# celery beat schedule file
|
|
95
|
+
celerybeat-schedule
|
|
96
|
+
|
|
97
|
+
# SageMath parsed files
|
|
98
|
+
*.sage.py
|
|
99
|
+
|
|
100
|
+
# Environments
|
|
101
|
+
.env
|
|
102
|
+
.venv
|
|
103
|
+
venv/*
|
|
104
|
+
env/
|
|
105
|
+
venv/
|
|
106
|
+
ENV/
|
|
107
|
+
env.bak/
|
|
108
|
+
venv.bak/
|
|
109
|
+
|
|
110
|
+
# Spyder project settings
|
|
111
|
+
.spyderproject
|
|
112
|
+
.spyproject
|
|
113
|
+
|
|
114
|
+
# Rope project settings
|
|
115
|
+
.ropeproject
|
|
116
|
+
|
|
117
|
+
# mkdocs documentation
|
|
118
|
+
/site
|
|
119
|
+
|
|
120
|
+
# mypy
|
|
121
|
+
.mypy_cache/
|
|
122
|
+
.dmypy.json
|
|
123
|
+
dmypy.json
|
|
124
|
+
|
|
125
|
+
# Pyre type checker
|
|
126
|
+
.pyre/
|
|
127
|
+
|
|
128
|
+
# Mac OS trash
|
|
129
|
+
.DS_Store
|
|
130
|
+
|
|
131
|
+
# Test databases
|
|
132
|
+
*.db
|
|
133
|
+
.db
|
|
134
|
+
*.db-shm
|
|
135
|
+
*.db-wal
|
|
136
|
+
|
|
137
|
+
# pytest
|
|
138
|
+
.pytest_cache
|
|
139
|
+
|
|
140
|
+
# ruff
|
|
141
|
+
.ruff_cache
|
|
142
|
+
|
|
143
|
+
.vscode
|
|
144
|
+
local
|
|
145
|
+
|
|
146
|
+
pyvenv.cfg
|
|
147
|
+
|
|
148
|
+
.basedpyright
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.6.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-merge-conflict
|
|
6
|
+
stages: [ pre-commit, pre-push ]
|
|
7
|
+
- id: check-ast
|
|
8
|
+
stages: [ pre-commit ]
|
|
9
|
+
- id: trailing-whitespace
|
|
10
|
+
stages: [ pre-commit ]
|
|
11
|
+
- id: end-of-file-fixer
|
|
12
|
+
stages: [ pre-commit ]
|
|
13
|
+
|
|
14
|
+
- repo: local
|
|
15
|
+
hooks:
|
|
16
|
+
- id: lock
|
|
17
|
+
name: lock
|
|
18
|
+
description: "Run uv lock"
|
|
19
|
+
entry: uv lock --locked
|
|
20
|
+
language: system
|
|
21
|
+
pass_filenames: false
|
|
22
|
+
types: [ python ]
|
|
23
|
+
stages: [ pre-commit ]
|
|
24
|
+
|
|
25
|
+
#- id: basedpyright
|
|
26
|
+
# name: basedpyright
|
|
27
|
+
# description: "Run 'basedpyright' for Python type checking"
|
|
28
|
+
# entry: uv run basedpyright --level ERROR
|
|
29
|
+
# pass_filenames: false
|
|
30
|
+
# language: system
|
|
31
|
+
# types: [ python ]
|
|
32
|
+
# stages: [ pre-commit ]
|
|
33
|
+
|
|
34
|
+
- id: pytest
|
|
35
|
+
name: pytest
|
|
36
|
+
description: "Run tests for testing code"
|
|
37
|
+
entry: uv run pytest
|
|
38
|
+
language: system
|
|
39
|
+
pass_filenames: false
|
|
40
|
+
types: [ python ]
|
|
41
|
+
stages: [ pre-commit ]
|
|
42
|
+
|
|
43
|
+
- id: ruff
|
|
44
|
+
name: ruff-format
|
|
45
|
+
description: "Run 'ruff format' for extremely fast Python formatting"
|
|
46
|
+
entry: uv run ruff format
|
|
47
|
+
language: system
|
|
48
|
+
types: [ python ]
|
|
49
|
+
stages: [ pre-commit ]
|
|
50
|
+
|
|
51
|
+
- id: ruff
|
|
52
|
+
name: ruff-isort
|
|
53
|
+
description: "Run 'ruff --select I --select F401 --fix' for extremely fast Python sorting imports"
|
|
54
|
+
entry: uv run ruff check --select I --select F401 --fix
|
|
55
|
+
language: system
|
|
56
|
+
types: [ python ]
|
|
57
|
+
stages: [ pre-commit ]
|
|
58
|
+
|
|
59
|
+
- id: ruff
|
|
60
|
+
name: ruff-check
|
|
61
|
+
description: "Run 'ruff-format' for extremely fast Python linting"
|
|
62
|
+
entry: uv run ruff check --fix
|
|
63
|
+
language: system
|
|
64
|
+
types: [ python ]
|
|
65
|
+
stages: [ pre-commit ]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-22.04
|
|
5
|
+
tools:
|
|
6
|
+
python: "3.9"
|
|
7
|
+
commands:
|
|
8
|
+
- pip install mkdocs mkdocs-material mkdocs-redirects
|
|
9
|
+
- cat mkdocs.yml
|
|
10
|
+
- mkdocs build --clean --site-dir $READTHEDOCS_OUTPUT/html --config-file mkdocs.yml
|
|
11
|
+
|
|
12
|
+
mkdocs:
|
|
13
|
+
configuration: mkdocs.yml
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: telegrinder
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Modern visionary telegram bot framework.
|
|
5
|
+
Project-URL: Source, https://github.com/timoniq/telegrinder
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/timoniq/telegrinder/issues
|
|
7
|
+
Project-URL: Documentation, https://telegrinder.readthedocs.io/en/latest/
|
|
8
|
+
Author-email: timoniq <tesseradecades@mail.ru>
|
|
9
|
+
Maintainer-email: luwqz1 <howluwqz1@gmail.com>
|
|
5
10
|
License: MIT License
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Author-email: tesseradecades@mail.ru
|
|
30
|
-
Maintainer: luwqz1
|
|
31
|
-
Maintainer-email: howluwqz1@gmail.com
|
|
32
|
-
Requires-Python: >=3.12,<4.0
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2022-2025 timoniq
|
|
13
|
+
Copyright (c) 2024-2025 luwqz1
|
|
14
|
+
|
|
15
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
16
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
17
|
+
in the Software without restriction, including without limitation the rights
|
|
18
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
19
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
20
|
+
furnished to do so, subject to the following conditions:
|
|
21
|
+
|
|
22
|
+
The above copyright notice and this permission notice shall be included in all
|
|
23
|
+
copies or substantial portions of the Software.
|
|
24
|
+
|
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
26
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
28
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
29
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
30
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
31
|
+
SOFTWARE.
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Keywords: api schema,async,asyncio,bot api,bot building,composition,custom rules,framework,middleware,telegram,telegram bot api framework,telegrinder,telegrinder framework,waiter machine
|
|
33
34
|
Classifier: Environment :: Console
|
|
34
35
|
Classifier: Intended Audience :: Developers
|
|
35
36
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -38,28 +39,25 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
38
39
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
39
40
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
40
41
|
Classifier: Typing :: Typed
|
|
42
|
+
Requires-Python: <4.0,>=3.12
|
|
43
|
+
Requires-Dist: aiohttp<4.0.0,>=3.11.14
|
|
44
|
+
Requires-Dist: certifi>=2025.1.31
|
|
45
|
+
Requires-Dist: choicelib<0.2.0,>=0.1.5
|
|
46
|
+
Requires-Dist: colorama<0.5.0,>=0.4.6
|
|
47
|
+
Requires-Dist: envparse<0.3.0,>=0.2.0
|
|
48
|
+
Requires-Dist: fntypes<0.2.0,>=0.1.4.post3
|
|
49
|
+
Requires-Dist: msgspec<0.20.0,>=0.19.0
|
|
50
|
+
Requires-Dist: typing-extensions<5.0.0,>=4.12.2
|
|
51
|
+
Requires-Dist: vbml<2.0,>=1.1.post1
|
|
41
52
|
Provides-Extra: all
|
|
53
|
+
Requires-Dist: loguru>=0.7.0; extra == 'all'
|
|
54
|
+
Requires-Dist: uvloop>=0.21.0; extra == 'all'
|
|
42
55
|
Provides-Extra: fast
|
|
56
|
+
Requires-Dist: uvloop>=0.21.0; extra == 'fast'
|
|
43
57
|
Provides-Extra: loguru
|
|
58
|
+
Requires-Dist: loguru>=0.7.0; extra == 'loguru'
|
|
44
59
|
Provides-Extra: uvloop
|
|
45
|
-
Requires-Dist:
|
|
46
|
-
Requires-Dist: certifi (>=2025.1.31)
|
|
47
|
-
Requires-Dist: choicelib (>=0.1.5,<0.2.0)
|
|
48
|
-
Requires-Dist: colorama (>=0.4.6,<0.5.0)
|
|
49
|
-
Requires-Dist: envparse (>=0.2.0,<0.3.0)
|
|
50
|
-
Requires-Dist: fntypes (>=0.1.4.post3,<0.2.0)
|
|
51
|
-
Requires-Dist: loguru (>=0.7.0) ; extra == "all"
|
|
52
|
-
Requires-Dist: loguru (>=0.7.0) ; extra == "loguru"
|
|
53
|
-
Requires-Dist: msgspec (>=0.19.0,<0.20.0)
|
|
54
|
-
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
|
55
|
-
Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
|
|
56
|
-
Requires-Dist: uvloop (>=0.21.0) ; extra == "all"
|
|
57
|
-
Requires-Dist: uvloop (>=0.21.0) ; extra == "fast"
|
|
58
|
-
Requires-Dist: uvloop (>=0.21.0) ; extra == "uvloop"
|
|
59
|
-
Requires-Dist: vbml (>=1.1.post1,<2.0)
|
|
60
|
-
Project-URL: Bug Tracker, https://github.com/timoniq/telegrinder/issues
|
|
61
|
-
Project-URL: Documentation, https://telegrinder.readthedocs.io/en/latest/
|
|
62
|
-
Project-URL: Source, https://github.com/timoniq/telegrinder
|
|
60
|
+
Requires-Dist: uvloop>=0.21.0; extra == 'uvloop'
|
|
63
61
|
Description-Content-Type: text/markdown
|
|
64
62
|
|
|
65
63
|
# Telegrinder
|
|
@@ -84,17 +82,26 @@ pip install telegrinder
|
|
|
84
82
|
```
|
|
85
83
|
|
|
86
84
|
Using poetry:
|
|
87
|
-
|
|
88
85
|
```console
|
|
89
86
|
poetry add telegrinder
|
|
90
87
|
```
|
|
91
88
|
|
|
89
|
+
Using uv:
|
|
90
|
+
|
|
91
|
+
```console
|
|
92
|
+
uv add telegrinder
|
|
93
|
+
```
|
|
94
|
+
|
|
92
95
|
Install from github:
|
|
93
96
|
|
|
94
97
|
```console
|
|
95
98
|
pip install -U https://github.com/timoniq/telegrinder/archive/dev.zip
|
|
96
99
|
```
|
|
97
100
|
|
|
101
|
+
```console
|
|
102
|
+
uv add "telegrinder @ git+https://github.com/timoniq/telegrinder.git@dev"
|
|
103
|
+
```
|
|
104
|
+
|
|
98
105
|
```console
|
|
99
106
|
poetry add git+https://github.com/timoniq/telegrinder.git#dev
|
|
100
107
|
```
|
|
@@ -112,7 +119,7 @@ logger.set_level("INFO")
|
|
|
112
119
|
|
|
113
120
|
|
|
114
121
|
@bot.on.message(Text("/start"))
|
|
115
|
-
async def start(message: Message):
|
|
122
|
+
async def start(message: Message) -> None:
|
|
116
123
|
me = (await api.get_me()).unwrap()
|
|
117
124
|
await message.answer(f"Hello, {message.from_user.full_name}! I'm {me.full_name}.")
|
|
118
125
|
|
|
@@ -138,7 +145,7 @@ Copyright © 2024-2025 [luwqz1](https://github.com/luwqz1)
|
|
|
138
145
|
|
|
139
146
|
# Contributors
|
|
140
147
|
|
|
148
|
+
|
|
141
149
|
<a href="https://github.com/timoniq/telegrinder/graphs/contributors">
|
|
142
150
|
<img src="https://contributors-img.web.app/image?repo=timoniq/telegrinder" />
|
|
143
151
|
</a>
|
|
144
|
-
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# API
|
|
2
|
+
|
|
3
|
+
API instance is used to make telegram bot api requests.
|
|
4
|
+
|
|
5
|
+
It is derived from API which guarantees implementation of `request` and `request_raw` methods.
|
|
6
|
+
|
|
7
|
+
`telegrinder.API` instance is fully typed and implements all the methods provided by telegram bot api.
|
|
8
|
+
|
|
9
|
+
Initialization:
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
from telegrinder import API, Token
|
|
13
|
+
api = API(Token("token"))
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Using typed methods
|
|
17
|
+
|
|
18
|
+
All methods are in snake case and return a result of model or APIError.
|
|
19
|
+
|
|
20
|
+
More about results [here](tools/result.md).
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
user = (await api.get_me()).unwrap()
|
|
24
|
+
user.first_name
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## `.request`
|
|
28
|
+
|
|
29
|
+
Makes a request with `request_raw`, returns result with parsed data (list, dict or boolean) or APIError.
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
result = await api.request("getMe", {})
|
|
33
|
+
result.unwrap()["first_name"]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## `.request_raw`
|
|
37
|
+
|
|
38
|
+
Makes a request to telegram instance serving at `.request_url`.
|
|
39
|
+
|
|
40
|
+
Returns result with `msgspec.Raw` data or `APIError`.
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
result = await api.request_raw("getMe", {})
|
|
44
|
+
json.loads(result.unwrap())["first_name"]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## APIError
|
|
48
|
+
|
|
49
|
+
`telegrinder.APIError` contains `code` and `error`
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from telegrinder import Result, APIError, Error
|
|
53
|
+
result: Result[bool, APIError] = get_result()
|
|
54
|
+
|
|
55
|
+
match result:
|
|
56
|
+
case Error(err):
|
|
57
|
+
print(err.code, err.error)
|
|
58
|
+
```
|