telegrinder 0.4.2__tar.gz → 0.5.1__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.

Files changed (434) hide show
  1. telegrinder-0.5.1/.gitattributes +1 -0
  2. telegrinder-0.5.1/.github/ISSUE_TEMPLATE/bug.md +23 -0
  3. {telegrinder-0.4.2 → telegrinder-0.5.1}/.github/ISSUE_TEMPLATE/config.yml +1 -1
  4. telegrinder-0.5.1/.github/ISSUE_TEMPLATE/feat_request.md +16 -0
  5. telegrinder-0.5.1/.github/actions/install-dependencies/action.yml +21 -0
  6. {telegrinder-0.4.2 → telegrinder-0.5.1}/.github/dependabot.yaml +0 -0
  7. {telegrinder-0.4.2 → telegrinder-0.5.1}/.github/pull_request_template.md +0 -0
  8. telegrinder-0.5.1/.github/workflows/ci.yml +85 -0
  9. telegrinder-0.5.1/.github/workflows/pull_request.yml +40 -0
  10. telegrinder-0.5.1/.github/workflows/push.yml +28 -0
  11. telegrinder-0.5.1/.github/workflows/release.yml +53 -0
  12. telegrinder-0.5.1/.github/workflows/typegen.yml +49 -0
  13. {telegrinder-0.4.2 → telegrinder-0.5.1}/.gitignore +0 -0
  14. {telegrinder-0.4.2 → telegrinder-0.5.1}/.pre-commit-config.yaml +26 -18
  15. {telegrinder-0.4.2 → telegrinder-0.5.1}/.readthedocs.yaml +0 -0
  16. {telegrinder-0.4.2 → telegrinder-0.5.1}/LICENSE +2 -2
  17. telegrinder-0.5.1/PKG-INFO +162 -0
  18. {telegrinder-0.4.2 → telegrinder-0.5.1}/contributing.md +0 -0
  19. {telegrinder-0.4.2 → telegrinder-0.5.1}/docs/api.md +0 -0
  20. telegrinder-0.5.1/docs/community_links.md +11 -0
  21. {telegrinder-0.4.2 → telegrinder-0.5.1}/docs/index.md +0 -0
  22. telegrinder-0.5.1/docs/logo.jpg +0 -0
  23. {telegrinder-0.4.2 → telegrinder-0.5.1}/docs/tools/checkbox.md +0 -0
  24. telegrinder-0.5.1/docs/tools/formatting.md +90 -0
  25. telegrinder-0.5.1/docs/tools/global_context.md +129 -0
  26. {telegrinder-0.4.2 → telegrinder-0.5.1}/docs/tools/index.md +1 -1
  27. telegrinder-0.5.1/docs/tools/loop_wrapper.md +202 -0
  28. telegrinder-0.5.1/docs/tutorial/en/0_tutorial.md +22 -0
  29. telegrinder-0.4.2/telegrinder/py.typed → telegrinder-0.5.1/docs/tutorial/en/10_media.md +0 -0
  30. telegrinder-0.4.2/tests/__init__.py → telegrinder-0.5.1/docs/tutorial/en/11_handling_errors.md +0 -0
  31. telegrinder-0.4.2/tests/fixtures/__init__.py → telegrinder-0.5.1/docs/tutorial/en/12_out-of-box_scenarios.md +0 -0
  32. telegrinder-0.5.1/docs/tutorial/en/1_setting_up.md +69 -0
  33. telegrinder-0.5.1/docs/tutorial/en/2_rules.md +115 -0
  34. telegrinder-0.5.1/docs/tutorial/en/3_functional_bits.md +70 -0
  35. telegrinder-0.5.1/docs/tutorial/en/4_api.md +78 -0
  36. telegrinder-0.5.1/docs/tutorial/en/5_nodes.md +165 -0
  37. telegrinder-0.5.1/docs/tutorial/en/6_dispatch.md +70 -0
  38. telegrinder-0.4.2/tests/test_bot.py → telegrinder-0.5.1/docs/tutorial/en/7_keyboard.md +0 -0
  39. telegrinder-0.4.2/tests/tools/__init__.py → telegrinder-0.5.1/docs/tutorial/en/8_text.md +0 -0
  40. telegrinder-0.4.2/tests/tools/test_html_formatter.py → telegrinder-0.5.1/docs/tutorial/en/9_states.md +0 -0
  41. telegrinder-0.5.1/docs/tutorial/ru/0_tutorial.md +22 -0
  42. telegrinder-0.4.2/tests/tools/test_keyboard.py → telegrinder-0.5.1/docs/tutorial/ru/10_media.md +0 -0
  43. telegrinder-0.4.2/tests/tools/test_loop_wrapper.py → telegrinder-0.5.1/docs/tutorial/ru/11_handling_errors.md +0 -0
  44. telegrinder-0.4.2/tests/tools/test_waiter_machine.py → telegrinder-0.5.1/docs/tutorial/ru/12_out-of-box_scenarios.md +0 -0
  45. telegrinder-0.5.1/docs/tutorial/ru/1_setting_up.md +68 -0
  46. telegrinder-0.5.1/docs/tutorial/ru/2_rules.md +116 -0
  47. telegrinder-0.5.1/docs/tutorial/ru/3_functional_bits.md +70 -0
  48. telegrinder-0.5.1/docs/tutorial/ru/4_api.md +81 -0
  49. telegrinder-0.5.1/docs/tutorial/ru/5_nodes.md +166 -0
  50. telegrinder-0.5.1/docs/tutorial/ru/6_dispatch.md +70 -0
  51. telegrinder-0.5.1/docs/tutorial/ru/7_keyboard.md +0 -0
  52. telegrinder-0.5.1/docs/tutorial/ru/8_text.md +0 -0
  53. telegrinder-0.5.1/docs/tutorial/ru/9_states.md +0 -0
  54. telegrinder-0.5.1/examples/action.py +41 -0
  55. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/assets/cat.jpg +0 -0
  56. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/assets/i18n/en/LC_MESSAGES/messages.po +3 -0
  57. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/assets/i18n/pl/LC_MESSAGES/messages.po +3 -0
  58. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/assets/i18n/ru/LC_MESSAGES/messages.po +3 -0
  59. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/assets/kaktovik.txt +0 -0
  60. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/assets/kb_set_config.yaml +0 -0
  61. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/assets/kitten.jpg +0 -0
  62. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/assets/satie.jpeg +0 -0
  63. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/assistant.py +6 -7
  64. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/blueprint_bot/__main__.py +0 -0
  65. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/blueprint_bot/client.py +0 -0
  66. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/blueprint_bot/handlers/admin.py +3 -3
  67. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/blueprint_bot/handlers/start.py +1 -2
  68. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/blueprint_bot/handlers/with_enum.py +3 -5
  69. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/callback_data_map.py +2 -2
  70. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/callback_query.py +7 -7
  71. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/chaotic.py +24 -31
  72. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/chat_join_request.py +0 -0
  73. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/checkbox.py +0 -0
  74. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/choice.py +0 -0
  75. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/command.py +0 -0
  76. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/custom_api.py +4 -5
  77. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/custom_rule.py +7 -8
  78. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/download_photo.py +3 -4
  79. telegrinder-0.5.1/examples/error_catching.py +28 -0
  80. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/event_node.py +1 -2
  81. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/formatting.py +2 -6
  82. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/forward_message.py +0 -0
  83. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/global_context.py +5 -6
  84. telegrinder-0.5.1/examples/i18n.py +29 -0
  85. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/inline_bot.py +0 -0
  86. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/invoice.py +0 -0
  87. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/kaktovik.py +2 -2
  88. telegrinder-0.5.1/examples/keyboard.py +101 -0
  89. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/long_states.py +0 -0
  90. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/loop_wrapper.py +0 -0
  91. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/message_entities.py +1 -1
  92. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/middleware.py +10 -11
  93. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/nodes.py +5 -5
  94. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/pingpong.py +0 -0
  95. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/ravioli.py +16 -17
  96. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/reply_handler.py +0 -0
  97. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/result_error_log.py +0 -5
  98. telegrinder-0.5.1/examples/return_manager.py +38 -0
  99. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/rule_enum.py +0 -0
  100. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/start_command.py +0 -0
  101. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/upload.py +0 -0
  102. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/user_by_username.py +7 -6
  103. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/wait_many.py +11 -9
  104. telegrinder-0.5.1/examples/webhook_bot/app.py +61 -0
  105. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/webhook_bot/bot.py +4 -7
  106. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/with_nodes.py +0 -0
  107. {telegrinder-0.4.2 → telegrinder-0.5.1}/examples/yes_or_no.py +0 -0
  108. {telegrinder-0.4.2 → telegrinder-0.5.1}/mkdocs.yml +3 -4
  109. {telegrinder-0.4.2 → telegrinder-0.5.1}/pyproject.toml +38 -26
  110. telegrinder-0.5.1/readme.md +97 -0
  111. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/__init__.py +37 -55
  112. telegrinder-0.5.1/telegrinder/__meta__.py +1 -0
  113. telegrinder-0.5.1/telegrinder/api/__init__.py +15 -0
  114. telegrinder-0.5.1/telegrinder/api/api.py +175 -0
  115. telegrinder-0.5.1/telegrinder/api/error.py +54 -0
  116. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/api/response.py +4 -1
  117. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/api/token.py +2 -2
  118. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/__init__.py +9 -25
  119. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/bot.py +31 -25
  120. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/cute_types/__init__.py +0 -0
  121. telegrinder-0.5.1/telegrinder/bot/cute_types/base.py +226 -0
  122. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/cute_types/callback_query.py +447 -400
  123. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/cute_types/chat_join_request.py +59 -62
  124. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/cute_types/chat_member_updated.py +154 -157
  125. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/cute_types/inline_query.py +41 -44
  126. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/cute_types/message.py +98 -67
  127. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/cute_types/pre_checkout_query.py +38 -42
  128. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/cute_types/update.py +1 -8
  129. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/cute_types/utils.py +1 -1
  130. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/__init__.py +10 -15
  131. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/abc.py +12 -11
  132. telegrinder-0.5.1/telegrinder/bot/dispatch/action.py +104 -0
  133. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/context.py +32 -26
  134. telegrinder-0.5.1/telegrinder/bot/dispatch/dispatch.py +181 -0
  135. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/handler/__init__.py +2 -0
  136. telegrinder-0.5.1/telegrinder/bot/dispatch/handler/abc.py +25 -0
  137. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/handler/audio_reply.py +2 -3
  138. telegrinder-0.5.1/telegrinder/bot/dispatch/handler/base.py +34 -0
  139. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/handler/document_reply.py +2 -3
  140. telegrinder-0.5.1/telegrinder/bot/dispatch/handler/func.py +97 -0
  141. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/handler/media_group_reply.py +2 -3
  142. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/handler/message_reply.py +2 -3
  143. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/handler/photo_reply.py +2 -3
  144. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/handler/sticker_reply.py +2 -3
  145. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/handler/video_reply.py +2 -3
  146. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/middleware/__init__.py +0 -0
  147. telegrinder-0.5.1/telegrinder/bot/dispatch/middleware/abc.py +121 -0
  148. telegrinder-0.5.1/telegrinder/bot/dispatch/middleware/global_middleware.py +55 -0
  149. telegrinder-0.5.1/telegrinder/bot/dispatch/process.py +130 -0
  150. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/return_manager/__init__.py +0 -0
  151. telegrinder-0.5.1/telegrinder/bot/dispatch/return_manager/abc.py +145 -0
  152. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/return_manager/callback_query.py +4 -5
  153. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/return_manager/inline_query.py +3 -4
  154. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/return_manager/message.py +8 -10
  155. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/return_manager/pre_checkout_query.py +4 -5
  156. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/view/__init__.py +4 -4
  157. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/view/abc.py +6 -16
  158. telegrinder-0.5.1/telegrinder/bot/dispatch/view/base.py +107 -0
  159. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/view/box.py +19 -18
  160. telegrinder-0.5.1/telegrinder/bot/dispatch/view/callback_query.py +12 -0
  161. telegrinder-0.5.1/telegrinder/bot/dispatch/view/chat_join_request.py +10 -0
  162. telegrinder-0.5.1/telegrinder/bot/dispatch/view/chat_member.py +17 -0
  163. telegrinder-0.5.1/telegrinder/bot/dispatch/view/error.py +9 -0
  164. telegrinder-0.5.1/telegrinder/bot/dispatch/view/inline_query.py +12 -0
  165. telegrinder-0.5.1/telegrinder/bot/dispatch/view/message.py +23 -0
  166. telegrinder-0.5.1/telegrinder/bot/dispatch/view/pre_checkout_query.py +12 -0
  167. telegrinder-0.5.1/telegrinder/bot/dispatch/view/raw.py +10 -0
  168. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/waiter_machine/__init__.py +2 -5
  169. telegrinder-0.5.1/telegrinder/bot/dispatch/waiter_machine/actions.py +16 -0
  170. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/waiter_machine/hasher/__init__.py +1 -3
  171. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/waiter_machine/hasher/callback.py +1 -1
  172. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/waiter_machine/hasher/hasher.py +11 -7
  173. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/waiter_machine/hasher/message.py +0 -0
  174. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/waiter_machine/machine.py +43 -60
  175. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/waiter_machine/middleware.py +19 -23
  176. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/dispatch/waiter_machine/short_state.py +6 -5
  177. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/polling/__init__.py +0 -0
  178. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/polling/abc.py +0 -0
  179. telegrinder-0.5.1/telegrinder/bot/polling/polling.py +260 -0
  180. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/__init__.py +3 -16
  181. telegrinder-0.5.1/telegrinder/bot/rules/abc.py +140 -0
  182. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/callback_data.py +29 -49
  183. telegrinder-0.5.1/telegrinder/bot/rules/chat_join.py +30 -0
  184. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/command.py +8 -4
  185. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/enum_text.py +3 -4
  186. telegrinder-0.5.1/telegrinder/bot/rules/func.py +21 -0
  187. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/fuzzy.py +3 -4
  188. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/inline.py +8 -20
  189. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/integer.py +2 -3
  190. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/is_from.py +12 -11
  191. telegrinder-0.5.1/telegrinder/bot/rules/logic.py +24 -0
  192. telegrinder-0.5.1/telegrinder/bot/rules/markup.py +50 -0
  193. telegrinder-0.5.1/telegrinder/bot/rules/mention.py +15 -0
  194. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/message_entities.py +8 -4
  195. telegrinder-0.5.1/telegrinder/bot/rules/node.py +44 -0
  196. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/payload.py +5 -4
  197. telegrinder-0.5.1/telegrinder/bot/rules/payment_invoice.py +14 -0
  198. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/regex.py +2 -4
  199. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/rule_enum.py +8 -7
  200. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/start.py +5 -6
  201. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/state.py +1 -1
  202. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/text.py +4 -15
  203. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/rules/update.py +3 -4
  204. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/scenario/__init__.py +0 -0
  205. telegrinder-0.5.1/telegrinder/bot/scenario/abc.py +18 -0
  206. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/bot/scenario/checkbox.py +1 -1
  207. telegrinder-0.5.1/telegrinder/bot/scenario/choice.py +39 -0
  208. telegrinder-0.5.1/telegrinder/client/__init__.py +10 -0
  209. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/client/abc.py +11 -6
  210. telegrinder-0.5.1/telegrinder/client/aiohttp.py +248 -0
  211. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/client/form_data.py +1 -1
  212. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/model.py +61 -89
  213. telegrinder-0.5.1/telegrinder/modules.py +462 -0
  214. telegrinder-0.5.1/telegrinder/msgspec_utils/__init__.py +40 -0
  215. telegrinder-0.5.1/telegrinder/msgspec_utils/abc.py +18 -0
  216. telegrinder-0.5.1/telegrinder/msgspec_utils/custom_types/__init__.py +6 -0
  217. telegrinder-0.5.1/telegrinder/msgspec_utils/custom_types/datetime.py +24 -0
  218. telegrinder-0.5.1/telegrinder/msgspec_utils/custom_types/enum_meta.py +43 -0
  219. telegrinder-0.5.1/telegrinder/msgspec_utils/custom_types/literal.py +25 -0
  220. telegrinder-0.5.1/telegrinder/msgspec_utils/custom_types/option.py +17 -0
  221. telegrinder-0.5.1/telegrinder/msgspec_utils/decoder.py +389 -0
  222. telegrinder-0.5.1/telegrinder/msgspec_utils/encoder.py +206 -0
  223. telegrinder-0.4.2/telegrinder/msgspec_json.py → telegrinder-0.5.1/telegrinder/msgspec_utils/json.py +6 -5
  224. telegrinder-0.5.1/telegrinder/msgspec_utils/tools.py +75 -0
  225. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/__init__.py +24 -7
  226. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/attachment.py +1 -0
  227. telegrinder-0.5.1/telegrinder/node/base.py +376 -0
  228. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/callback_query.py +5 -5
  229. telegrinder-0.5.1/telegrinder/node/collection.py +39 -0
  230. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/command.py +1 -2
  231. telegrinder-0.5.1/telegrinder/node/composer.py +212 -0
  232. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/container.py +11 -8
  233. telegrinder-0.5.1/telegrinder/node/context.py +48 -0
  234. telegrinder-0.5.1/telegrinder/node/either.py +69 -0
  235. telegrinder-0.5.1/telegrinder/node/error.py +41 -0
  236. telegrinder-0.5.1/telegrinder/node/event.py +80 -0
  237. telegrinder-0.5.1/telegrinder/node/exceptions.py +7 -0
  238. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/file.py +0 -0
  239. telegrinder-0.5.1/telegrinder/node/i18n.py +108 -0
  240. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/me.py +3 -2
  241. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/payload.py +1 -1
  242. telegrinder-0.5.1/telegrinder/node/polymorphic.py +102 -0
  243. telegrinder-0.5.1/telegrinder/node/reply_message.py +12 -0
  244. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/rule.py +6 -13
  245. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/scope.py +14 -5
  246. telegrinder-0.5.1/telegrinder/node/session.py +53 -0
  247. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/source.py +41 -9
  248. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/text.py +1 -2
  249. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/tools/__init__.py +0 -0
  250. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/node/tools/generator.py +3 -5
  251. telegrinder-0.5.1/telegrinder/node/utility.py +16 -0
  252. telegrinder-0.5.1/telegrinder/py.typed +0 -0
  253. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/rules.py +0 -0
  254. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/tools/__init__.py +48 -88
  255. telegrinder-0.5.1/telegrinder/tools/aio.py +103 -0
  256. telegrinder-0.5.1/telegrinder/tools/callback_data_serialization/__init__.py +5 -0
  257. {telegrinder-0.4.2/telegrinder/tools/callback_data_serilization → telegrinder-0.5.1/telegrinder/tools/callback_data_serialization}/abc.py +0 -0
  258. {telegrinder-0.4.2/telegrinder/tools/callback_data_serilization → telegrinder-0.5.1/telegrinder/tools/callback_data_serialization}/json_ser.py +2 -3
  259. {telegrinder-0.4.2/telegrinder/tools/callback_data_serilization → telegrinder-0.5.1/telegrinder/tools/callback_data_serialization}/msgpack_ser.py +45 -27
  260. telegrinder-0.5.1/telegrinder/tools/final.py +21 -0
  261. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/tools/formatting/__init__.py +2 -18
  262. telegrinder-0.5.1/telegrinder/tools/formatting/deep_links/__init__.py +39 -0
  263. telegrinder-0.4.2/telegrinder/tools/formatting/deep_links.py → telegrinder-0.5.1/telegrinder/tools/formatting/deep_links/links.py +12 -85
  264. telegrinder-0.5.1/telegrinder/tools/formatting/deep_links/parsing.py +90 -0
  265. telegrinder-0.5.1/telegrinder/tools/formatting/deep_links/validators.py +8 -0
  266. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/tools/formatting/html_formatter.py +18 -45
  267. telegrinder-0.5.1/telegrinder/tools/fullname.py +83 -0
  268. telegrinder-0.5.1/telegrinder/tools/global_context/__init__.py +13 -0
  269. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/tools/global_context/abc.py +17 -14
  270. telegrinder-0.5.1/telegrinder/tools/global_context/builtin_context.py +39 -0
  271. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/tools/global_context/global_context.py +138 -39
  272. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/tools/input_file_directory.py +0 -0
  273. telegrinder-0.5.1/telegrinder/tools/keyboard/__init__.py +39 -0
  274. telegrinder-0.5.1/telegrinder/tools/keyboard/abc.py +159 -0
  275. telegrinder-0.5.1/telegrinder/tools/keyboard/base.py +77 -0
  276. telegrinder-0.5.1/telegrinder/tools/keyboard/buttons/__init__.py +14 -0
  277. telegrinder-0.5.1/telegrinder/tools/keyboard/buttons/base.py +18 -0
  278. {telegrinder-0.4.2/telegrinder/tools → telegrinder-0.5.1/telegrinder/tools/keyboard/buttons}/buttons.py +71 -23
  279. telegrinder-0.5.1/telegrinder/tools/keyboard/buttons/static_buttons.py +56 -0
  280. telegrinder-0.5.1/telegrinder/tools/keyboard/buttons/tools.py +18 -0
  281. telegrinder-0.5.1/telegrinder/tools/keyboard/data.py +20 -0
  282. telegrinder-0.5.1/telegrinder/tools/keyboard/keyboard.py +131 -0
  283. telegrinder-0.5.1/telegrinder/tools/keyboard/static_keyboard.py +83 -0
  284. telegrinder-0.5.1/telegrinder/tools/lifespan.py +141 -0
  285. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/tools/limited_dict.py +4 -1
  286. telegrinder-0.5.1/telegrinder/tools/loop_wrapper.py +332 -0
  287. telegrinder-0.5.1/telegrinder/tools/magic/__init__.py +32 -0
  288. telegrinder-0.5.1/telegrinder/tools/magic/annotations.py +165 -0
  289. telegrinder-0.5.1/telegrinder/tools/magic/dictionary.py +20 -0
  290. telegrinder-0.5.1/telegrinder/tools/magic/function.py +246 -0
  291. telegrinder-0.5.1/telegrinder/tools/magic/shortcut.py +111 -0
  292. telegrinder-0.5.1/telegrinder/tools/parse_mode.py +12 -0
  293. telegrinder-0.5.1/telegrinder/tools/singleton/__init__.py +4 -0
  294. telegrinder-0.5.1/telegrinder/tools/singleton/abc.py +14 -0
  295. telegrinder-0.5.1/telegrinder/tools/singleton/singleton.py +18 -0
  296. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/tools/state_storage/__init__.py +0 -0
  297. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/tools/state_storage/abc.py +6 -1
  298. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/tools/state_storage/memory.py +1 -1
  299. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/tools/strings.py +0 -0
  300. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/types/__init__.py +307 -268
  301. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/types/enums.py +68 -37
  302. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/types/input_file.py +3 -3
  303. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/types/methods.py +5699 -5055
  304. telegrinder-0.5.1/telegrinder/types/methods_utils.py +62 -0
  305. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/types/objects.py +1782 -994
  306. {telegrinder-0.4.2 → telegrinder-0.5.1}/telegrinder/verification_utils.py +3 -1
  307. telegrinder-0.5.1/tests/__init__.py +0 -0
  308. {telegrinder-0.4.2 → telegrinder-0.5.1}/tests/conftest.py +0 -0
  309. telegrinder-0.5.1/tests/fixtures/__init__.py +0 -0
  310. {telegrinder-0.4.2 → telegrinder-0.5.1}/tests/fixtures/api_instance.py +0 -0
  311. {telegrinder-0.4.2 → telegrinder-0.5.1}/tests/fixtures/callback_query_update.py +0 -0
  312. {telegrinder-0.4.2 → telegrinder-0.5.1}/tests/fixtures/message_update.py +0 -0
  313. {telegrinder-0.4.2 → telegrinder-0.5.1}/tests/test_api.py +1 -2
  314. telegrinder-0.5.1/tests/test_bot.py +0 -0
  315. {telegrinder-0.4.2 → telegrinder-0.5.1}/tests/test_http.py +0 -0
  316. {telegrinder-0.4.2 → telegrinder-0.5.1}/tests/test_nodes.py +0 -0
  317. {telegrinder-0.4.2 → telegrinder-0.5.1}/tests/test_rules.py +2 -3
  318. {telegrinder-0.4.2 → telegrinder-0.5.1}/tests/test_utils.py +4 -0
  319. {telegrinder-0.4.2 → telegrinder-0.5.1}/tests/test_views.py +15 -26
  320. telegrinder-0.5.1/tests/tools/__init__.py +0 -0
  321. {telegrinder-0.4.2 → telegrinder-0.5.1}/tests/tools/test_global_context.py +14 -14
  322. telegrinder-0.5.1/tests/tools/test_html_formatter.py +0 -0
  323. telegrinder-0.5.1/tests/tools/test_keyboard.py +0 -0
  324. telegrinder-0.5.1/tests/tools/test_loop_wrapper.py +0 -0
  325. telegrinder-0.5.1/tests/tools/test_waiter_machine.py +0 -0
  326. {telegrinder-0.4.2 → telegrinder-0.5.1}/typegen/__init__.py +9 -16
  327. {telegrinder-0.4.2 → telegrinder-0.5.1}/typegen/__main__.py +0 -0
  328. telegrinder-0.5.1/typegen/config.py +35 -0
  329. telegrinder-0.5.1/typegen/config.toml +954 -0
  330. {telegrinder-0.4.2 → telegrinder-0.5.1}/typegen/generator.py +284 -319
  331. {telegrinder-0.4.2 → telegrinder-0.5.1}/typegen/merge_shortcuts.py +50 -34
  332. telegrinder-0.5.1/typegen/models/__init__.py +31 -0
  333. telegrinder-0.5.1/typegen/models/config.py +96 -0
  334. telegrinder-0.4.2/typegen/models.py → telegrinder-0.5.1/typegen/models/schema.py +7 -7
  335. {telegrinder-0.4.2 → telegrinder-0.5.1}/typegen/nicifications.py +15 -21
  336. telegrinder-0.5.1/uv.lock +1154 -0
  337. telegrinder-0.4.2/.github/ISSUE_TEMPLATE/bug.md +0 -30
  338. telegrinder-0.4.2/.github/ISSUE_TEMPLATE/new_feat.md +0 -24
  339. telegrinder-0.4.2/.github/actions/setup/action.yaml +0 -9
  340. telegrinder-0.4.2/.github/workflows/lint_and_test.yml +0 -46
  341. telegrinder-0.4.2/.github/workflows/typegen.yml +0 -41
  342. telegrinder-0.4.2/PKG-INFO +0 -151
  343. telegrinder-0.4.2/docs/guide/code_separation.md +0 -76
  344. telegrinder-0.4.2/docs/guide/index.md +0 -6
  345. telegrinder-0.4.2/docs/guide/optional_dependencies.md +0 -59
  346. telegrinder-0.4.2/docs/tools/error_handler.md +0 -72
  347. telegrinder-0.4.2/docs/tools/formatting.md +0 -100
  348. telegrinder-0.4.2/docs/tools/global_context.md +0 -157
  349. telegrinder-0.4.2/examples/error_handler.py +0 -35
  350. telegrinder-0.4.2/examples/i18n_simple.py +0 -28
  351. telegrinder-0.4.2/examples/keyboard.py +0 -52
  352. telegrinder-0.4.2/examples/raw_event.py +0 -69
  353. telegrinder-0.4.2/examples/return_manager.py +0 -69
  354. telegrinder-0.4.2/examples/webhook_bot/app.py +0 -51
  355. telegrinder-0.4.2/readme.md +0 -89
  356. telegrinder-0.4.2/telegrinder/api/__init__.py +0 -13
  357. telegrinder-0.4.2/telegrinder/api/api.py +0 -101
  358. telegrinder-0.4.2/telegrinder/api/error.py +0 -20
  359. telegrinder-0.4.2/telegrinder/bot/cute_types/base.py +0 -184
  360. telegrinder-0.4.2/telegrinder/bot/dispatch/dispatch.py +0 -254
  361. telegrinder-0.4.2/telegrinder/bot/dispatch/handler/abc.py +0 -23
  362. telegrinder-0.4.2/telegrinder/bot/dispatch/handler/base.py +0 -57
  363. telegrinder-0.4.2/telegrinder/bot/dispatch/handler/func.py +0 -129
  364. telegrinder-0.4.2/telegrinder/bot/dispatch/middleware/abc.py +0 -97
  365. telegrinder-0.4.2/telegrinder/bot/dispatch/middleware/global_middleware.py +0 -70
  366. telegrinder-0.4.2/telegrinder/bot/dispatch/process.py +0 -151
  367. telegrinder-0.4.2/telegrinder/bot/dispatch/return_manager/abc.py +0 -108
  368. telegrinder-0.4.2/telegrinder/bot/dispatch/view/base.py +0 -231
  369. telegrinder-0.4.2/telegrinder/bot/dispatch/view/callback_query.py +0 -16
  370. telegrinder-0.4.2/telegrinder/bot/dispatch/view/chat_join_request.py +0 -11
  371. telegrinder-0.4.2/telegrinder/bot/dispatch/view/chat_member.py +0 -37
  372. telegrinder-0.4.2/telegrinder/bot/dispatch/view/inline_query.py +0 -16
  373. telegrinder-0.4.2/telegrinder/bot/dispatch/view/message.py +0 -43
  374. telegrinder-0.4.2/telegrinder/bot/dispatch/view/pre_checkout_query.py +0 -16
  375. telegrinder-0.4.2/telegrinder/bot/dispatch/view/raw.py +0 -116
  376. telegrinder-0.4.2/telegrinder/bot/dispatch/waiter_machine/actions.py +0 -14
  377. telegrinder-0.4.2/telegrinder/bot/dispatch/waiter_machine/hasher/state.py +0 -20
  378. telegrinder-0.4.2/telegrinder/bot/polling/polling.py +0 -139
  379. telegrinder-0.4.2/telegrinder/bot/rules/abc.py +0 -220
  380. telegrinder-0.4.2/telegrinder/bot/rules/chat_join.py +0 -48
  381. telegrinder-0.4.2/telegrinder/bot/rules/func.py +0 -28
  382. telegrinder-0.4.2/telegrinder/bot/rules/id.py +0 -24
  383. telegrinder-0.4.2/telegrinder/bot/rules/logic.py +0 -18
  384. telegrinder-0.4.2/telegrinder/bot/rules/markup.py +0 -42
  385. telegrinder-0.4.2/telegrinder/bot/rules/mention.py +0 -14
  386. telegrinder-0.4.2/telegrinder/bot/rules/message.py +0 -15
  387. telegrinder-0.4.2/telegrinder/bot/rules/node.py +0 -33
  388. telegrinder-0.4.2/telegrinder/bot/rules/payment_invoice.py +0 -29
  389. telegrinder-0.4.2/telegrinder/bot/scenario/abc.py +0 -17
  390. telegrinder-0.4.2/telegrinder/bot/scenario/choice.py +0 -48
  391. telegrinder-0.4.2/telegrinder/client/__init__.py +0 -12
  392. telegrinder-0.4.2/telegrinder/client/aiohttp.py +0 -134
  393. telegrinder-0.4.2/telegrinder/client/sonic.py +0 -212
  394. telegrinder-0.4.2/telegrinder/modules.py +0 -239
  395. telegrinder-0.4.2/telegrinder/msgspec_utils.py +0 -478
  396. telegrinder-0.4.2/telegrinder/node/base.py +0 -294
  397. telegrinder-0.4.2/telegrinder/node/composer.py +0 -163
  398. telegrinder-0.4.2/telegrinder/node/either.py +0 -82
  399. telegrinder-0.4.2/telegrinder/node/event.py +0 -54
  400. telegrinder-0.4.2/telegrinder/node/polymorphic.py +0 -67
  401. telegrinder-0.4.2/telegrinder/tools/adapter/__init__.py +0 -19
  402. telegrinder-0.4.2/telegrinder/tools/adapter/abc.py +0 -49
  403. telegrinder-0.4.2/telegrinder/tools/adapter/dataclass.py +0 -56
  404. telegrinder-0.4.2/telegrinder/tools/adapter/errors.py +0 -5
  405. telegrinder-0.4.2/telegrinder/tools/adapter/event.py +0 -61
  406. telegrinder-0.4.2/telegrinder/tools/adapter/node.py +0 -46
  407. telegrinder-0.4.2/telegrinder/tools/adapter/raw_event.py +0 -27
  408. telegrinder-0.4.2/telegrinder/tools/adapter/raw_update.py +0 -30
  409. telegrinder-0.4.2/telegrinder/tools/callback_data_serilization/__init__.py +0 -5
  410. telegrinder-0.4.2/telegrinder/tools/error_handler/__init__.py +0 -10
  411. telegrinder-0.4.2/telegrinder/tools/error_handler/abc.py +0 -30
  412. telegrinder-0.4.2/telegrinder/tools/error_handler/error.py +0 -9
  413. telegrinder-0.4.2/telegrinder/tools/error_handler/error_handler.py +0 -179
  414. telegrinder-0.4.2/telegrinder/tools/formatting/spec_html_formats.py +0 -75
  415. telegrinder-0.4.2/telegrinder/tools/functional.py +0 -8
  416. telegrinder-0.4.2/telegrinder/tools/global_context/__init__.py +0 -12
  417. telegrinder-0.4.2/telegrinder/tools/global_context/telegrinder_ctx.py +0 -27
  418. telegrinder-0.4.2/telegrinder/tools/i18n/__init__.py +0 -12
  419. telegrinder-0.4.2/telegrinder/tools/i18n/abc.py +0 -32
  420. telegrinder-0.4.2/telegrinder/tools/i18n/middleware/__init__.py +0 -3
  421. telegrinder-0.4.2/telegrinder/tools/i18n/middleware/abc.py +0 -22
  422. telegrinder-0.4.2/telegrinder/tools/i18n/simple.py +0 -43
  423. telegrinder-0.4.2/telegrinder/tools/keyboard.py +0 -132
  424. telegrinder-0.4.2/telegrinder/tools/lifespan.py +0 -105
  425. telegrinder-0.4.2/telegrinder/tools/loop_wrapper/__init__.py +0 -4
  426. telegrinder-0.4.2/telegrinder/tools/loop_wrapper/abc.py +0 -20
  427. telegrinder-0.4.2/telegrinder/tools/loop_wrapper/loop_wrapper.py +0 -169
  428. telegrinder-0.4.2/telegrinder/tools/magic.py +0 -344
  429. telegrinder-0.4.2/telegrinder/tools/parse_mode.py +0 -6
  430. telegrinder-0.4.2/tests/test_adapters.py +0 -84
  431. telegrinder-0.4.2/typegen/config_default_api_params.json +0 -16
  432. telegrinder-0.4.2/typegen/config_generation_id_by_default.json +0 -84
  433. telegrinder-0.4.2/typegen/config_literal_types.json +0 -1277
  434. telegrinder-0.4.2/uv.lock +0 -866
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: "\U0001F41B Bug report \U0001F41B"
3
+ about: "Reporting a bug."
4
+ title: "bug: "
5
+ labels: ["bug"]
6
+ assignees: []
7
+ ---
8
+
9
+ **bug description:**
10
+ ...
11
+
12
+ **code:**
13
+ <!-- Provide a minimal example to reproduce -->
14
+ ```python
15
+ import telegrinder
16
+ ```
17
+
18
+ **logs:**
19
+ <!-- Provide logs/errors if applicable-->
20
+ ```console
21
+ Traceback (most recent call last):
22
+ File "main.py", line 1, in <module>
23
+ ```
@@ -1,4 +1,4 @@
1
- blank_issues_enabled: false
1
+ blank_issues_enabled: true
2
2
  contact_links:
3
3
  - name: 💬 Telegram chat 💬
4
4
  url: https://t.me/botoforum
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: "\U0001F680 Feature request \U0001F680"
3
+ about: "Creating a feature request."
4
+ title: "feature: "
5
+ labels: ["feature request"]
6
+ assignees: []
7
+ ---
8
+
9
+ **feature description:**
10
+ ...
11
+
12
+ **code:**
13
+ <!-- A small code sample that will demonstrate your feature. -->
14
+ ```python
15
+ from telegrinder import MyFeature
16
+ ```
@@ -0,0 +1,21 @@
1
+ name: Install uv and dependencies
2
+
3
+ inputs:
4
+ python-version:
5
+ description: "Python version."
6
+ required: false
7
+ default: "3.12"
8
+
9
+ runs:
10
+ using: composite
11
+ steps:
12
+ - uses: hynek/setup-cached-uv@v2
13
+ with:
14
+ cache-suffix: -${{ inputs.python-version }}-cache
15
+ cache-dependency-path: "**/uv.lock"
16
+
17
+ - name: "Install dependencies"
18
+ run: |
19
+ uv venv --python ${{ inputs.python-version }}
20
+ uv sync --all-groups --dev
21
+ shell: bash
@@ -0,0 +1,85 @@
1
+ name: CI
2
+
3
+ 'on':
4
+ workflow_call:
5
+ inputs:
6
+ os:
7
+ description: "Operating system"
8
+ required: true
9
+ type: string
10
+ python-version:
11
+ description: "Python version"
12
+ required: true
13
+ type: string
14
+
15
+ defaults:
16
+ run:
17
+ shell: bash
18
+
19
+ jobs:
20
+ lock-file:
21
+ name: "Lock uv"
22
+ runs-on: ${{ inputs.os }}
23
+ steps:
24
+ - uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
25
+
26
+ - uses: ./.github/actions/install-dependencies
27
+ with:
28
+ python-version: ${{ inputs.python-version }}
29
+
30
+ - run: uv lock --locked
31
+
32
+ linting:
33
+ name: "Linting"
34
+ runs-on: ${{ inputs.os }}
35
+ needs: lock-file
36
+ steps:
37
+ - uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
38
+
39
+ - uses: ./.github/actions/install-dependencies
40
+ with:
41
+ python-version: ${{ inputs.python-version }}
42
+
43
+ - name: Load ruff cache
44
+ id: cached-ruff
45
+ uses: actions/cache@v4
46
+ with:
47
+ key: ruff-${{ inputs.python-version }}-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
48
+ path: .ruff_cache
49
+
50
+ - name: "Run ruff"
51
+ run: uvx ruff check .
52
+
53
+ type-checking:
54
+ name: "Type-checking"
55
+ runs-on: ${{ inputs.os }}
56
+ needs: lock-file
57
+ steps:
58
+ - uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
59
+
60
+ - uses: ./.github/actions/install-dependencies
61
+ with:
62
+ python-version: ${{ inputs.python-version }}
63
+
64
+ - run: uv run basedpyright --level ERROR
65
+
66
+ tests:
67
+ name: "Testing"
68
+ runs-on: ${{ inputs.os }}
69
+ needs: lock-file
70
+ steps:
71
+ - uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
72
+
73
+ - uses: ./.github/actions/install-dependencies
74
+ with:
75
+ python-version: ${{ inputs.python-version }}
76
+
77
+ - name: Load pytest cache
78
+ id: cached-pytest
79
+ uses: actions/cache@v4
80
+ with:
81
+ key: pytest-${{ inputs.python-version }}-${{ runner.os }}
82
+ path: .pytest_cache
83
+
84
+ - name: "Run pytest"
85
+ run: uv run pytest --cov
@@ -0,0 +1,40 @@
1
+ name: PR
2
+
3
+ 'on':
4
+ pull_request:
5
+ branches:
6
+ - tba
7
+ - dev
8
+ - main
9
+
10
+ defaults:
11
+ run:
12
+ shell: bash
13
+
14
+ jobs:
15
+ pre-commit:
16
+ name: "Run pre-commit"
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
20
+
21
+ - name: Install uv and dependencies
22
+ uses: ./.github/actions/install-dependencies
23
+ with:
24
+ python-version: "3.13"
25
+
26
+ - name: Load pre-commit cache
27
+ id: cache-pre-commit
28
+ uses: actions/cache@v4
29
+ env:
30
+ cache-name: cache-pre-commit
31
+ with:
32
+ key: ${{ env.cache-name }}-${{ hashFiles('**/.pre-commit-config.yaml', '~/.cache/pre-commit/*') }}
33
+ path: ~/.cache/pre-commit
34
+
35
+ - name: Run pre-commit
36
+ run: uv run pre-commit run --all-files --color=always
37
+
38
+ - uses: pre-commit/action@v3.0.1
39
+ - uses: pre-commit-ci/lite-action@v1.1.0
40
+ if: always()
@@ -0,0 +1,28 @@
1
+ name: Push
2
+
3
+ 'on':
4
+ push:
5
+ branches:
6
+ - dev
7
+ - main
8
+
9
+ defaults:
10
+ run:
11
+ shell: bash
12
+
13
+ jobs:
14
+ ci:
15
+ name: "CI (Push)"
16
+ strategy:
17
+ matrix:
18
+ python-version:
19
+ - "3.12"
20
+ - "3.13"
21
+ os:
22
+ - ubuntu-latest
23
+ - windows-latest
24
+
25
+ uses: ./.github/workflows/ci.yml
26
+ with:
27
+ os: ${{ matrix.os }}
28
+ python-version: ${{ matrix.python-version }}
@@ -0,0 +1,53 @@
1
+ name: Release to PyPI
2
+
3
+ 'on':
4
+ release:
5
+ types:
6
+ - created
7
+
8
+ defaults:
9
+ run:
10
+ shell: bash
11
+
12
+ jobs:
13
+ build:
14
+ name: "Build distribution"
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
18
+
19
+ - uses: ./.github/actions/install-dependencies
20
+ with:
21
+ python-version: "3.13"
22
+
23
+ - name: "Build distribution"
24
+ run: uv build
25
+
26
+ - uses: actions/upload-artifact@v4
27
+ with:
28
+ name: release-dist
29
+ path: dist/
30
+
31
+ pypi-publish:
32
+ name: "Publish to PyPI"
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - uses: asottile/workflows/.github/actions/fast-checkout@v1.8.1
36
+
37
+ - name: Download artifact with distribution
38
+ uses: actions/download-artifact@v4
39
+ with:
40
+ name: release-dist
41
+ path: dist/
42
+
43
+ - name: Release distribution
44
+ uses: actions/checkout@v2
45
+ with:
46
+ token: ${{ secrets.GITHUB_TOKEN }}
47
+ tag: ${{ github.event.release.tag_name }}
48
+ files: dist/
49
+
50
+ - name: Publish distribution to PyPI
51
+ uses: pypa/gh-action-pypi-publish@release/v1
52
+ with:
53
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,49 @@
1
+ name: Telegram Bot API schema
2
+
3
+ on:
4
+ workflow_dispatch: {}
5
+ schedule:
6
+ - cron: "0 16 * * *"
7
+
8
+ jobs:
9
+ lock-file:
10
+ name: "Lock uv"
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - uses: ./.github/actions/install-dependencies
16
+ with:
17
+ python-version: "3.13"
18
+
19
+ - run: uv lock --locked
20
+
21
+ generation:
22
+ name: "TBA schema generation"
23
+ runs-on: ubuntu-latest
24
+ needs: lock-file
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+
28
+ - uses: ./.github/actions/install-dependencies
29
+ with:
30
+ python-version: "3.13"
31
+
32
+ - name: "Run generator"
33
+ run: uv run typegen
34
+
35
+ - name: "Create PR"
36
+ uses: peter-evans/create-pull-request@v7
37
+ with:
38
+ author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
39
+ commit-message: >
40
+ types: Telegram Bot API schema changes
41
+ title: >
42
+ Update Telegram Bot API to the latest schema
43
+ body: >
44
+ This is an automated PR. Please check the diff, and the action logs, to check for any funky behavior.
45
+ branch: automated/tba
46
+ reviewers: luwqz1
47
+ assignees: luwqz1
48
+ labels: automated, TBA
49
+ delete-branch: true
File without changes
@@ -13,8 +13,8 @@ repos:
13
13
 
14
14
  - repo: local
15
15
  hooks:
16
- - id: lock
17
- name: lock
16
+ - id: uv
17
+ name: uv-lock
18
18
  description: "Run uv lock"
19
19
  entry: uv lock --locked
20
20
  language: system
@@ -22,43 +22,51 @@ repos:
22
22
  types: [ python ]
23
23
  stages: [ pre-commit ]
24
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 ]
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
33
 
34
34
  - id: pytest
35
35
  name: pytest
36
36
  description: "Run tests for testing code"
37
- entry: uv run pytest
37
+ entry: uv run pytest tests
38
38
  language: system
39
39
  pass_filenames: false
40
40
  types: [ python ]
41
41
  stages: [ pre-commit ]
42
42
 
43
43
  - id: ruff
44
- name: ruff-format
45
- description: "Run 'ruff format' for extremely fast Python formatting"
46
- entry: uv run ruff format
44
+ name: ruff-isort
45
+ description: "Run 'ruff check --select I --select F401 --fix' for extremely fast Python sorting imports"
46
+ entry: uv run ruff check --select I --select F401 --fix
47
47
  language: system
48
48
  types: [ python ]
49
49
  stages: [ pre-commit ]
50
50
 
51
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
52
+ name: ruff-sortall
53
+ description: "Run 'ruff check --select RUF022 --fix' for extremely fast Python sorting dunder alls"
54
+ entry: uv run ruff check --select RUF022 --fix
55
+ language: system
56
+ types: [ python ]
57
+ stages: [ pre-commit ]
58
+
59
+ - id: ruff
60
+ name: ruff-format
61
+ description: "Run 'ruff format' for extremely fast Python formatting"
62
+ entry: uv run ruff format
55
63
  language: system
56
64
  types: [ python ]
57
65
  stages: [ pre-commit ]
58
66
 
59
67
  - id: ruff
60
68
  name: ruff-check
61
- description: "Run 'ruff-format' for extremely fast Python linting"
69
+ description: "Run 'ruff check --fix' for extremely fast Python linting"
62
70
  entry: uv run ruff check --fix
63
71
  language: system
64
72
  types: [ python ]
@@ -1,7 +1,7 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022-2025 timoniq
4
- Copyright (c) 2024-2025 luwqz1
3
+ Copyright (c) 2022 timoniq
4
+ Copyright (c) 2024 luwqz1
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: telegrinder
3
+ Version: 0.5.1
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://github.com/timoniq/telegrinder/blob/dev/docs/index.md
8
+ Author-email: timoniq <tesseradecades@mail.ru>
9
+ Maintainer-email: luwqz1 <howluwqz1@gmail.com>
10
+ License: MIT License
11
+
12
+ Copyright (c) 2022 timoniq
13
+ Copyright (c) 2024 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,custom rules,framework,middleware,nodes,telegram,telegram bot api framework,telegrinder,telegrinder framework,waiter machine
34
+ Classifier: Environment :: Console
35
+ Classifier: Intended Audience :: Developers
36
+ Classifier: License :: OSI Approved :: MIT License
37
+ Classifier: Programming Language :: Python :: 3.12
38
+ Classifier: Programming Language :: Python :: 3.13
39
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
40
+ Classifier: Topic :: Software Development :: Quality Assurance
41
+ Classifier: Typing :: Typed
42
+ Requires-Python: <4.0,>=3.12
43
+ Requires-Dist: aiodns<4.0.0,>=3.5.0; sys_platform != 'darwin'
44
+ Requires-Dist: aiohttp<4.0.0,>=3.12.13
45
+ Requires-Dist: certifi<2026.0.0,>=2025.7.9
46
+ Requires-Dist: choicelib<0.2.0,>=0.1.5
47
+ Requires-Dist: colorama<0.5.0,>=0.4.6
48
+ Requires-Dist: envparse<0.3.0,>=0.2.0
49
+ Requires-Dist: funtypes==0.2.1
50
+ Requires-Dist: msgspec<0.20.0,>=0.19.0
51
+ Requires-Dist: typing-extensions<5.0.0,>=4.14.1
52
+ Requires-Dist: vbml<2.0,>=1.1.post1
53
+ Provides-Extra: brotli
54
+ Requires-Dist: brotli; extra == 'brotli'
55
+ Provides-Extra: loguru
56
+ Requires-Dist: loguru; extra == 'loguru'
57
+ Provides-Extra: socks
58
+ Requires-Dist: aiohttp-socks; extra == 'socks'
59
+ Provides-Extra: structlog
60
+ Requires-Dist: structlog; extra == 'structlog'
61
+ Provides-Extra: uvloop
62
+ Requires-Dist: uvloop; (sys_platform == 'darwin' or sys_platform == 'linux') and extra == 'uvloop'
63
+ Requires-Dist: winloop; (sys_platform == 'cli' or sys_platform == 'cygwin' or sys_platform == 'win32') and extra == 'uvloop'
64
+ Description-Content-Type: text/markdown
65
+
66
+ <p>
67
+ <a href="https://github.com/timoniq/telegrinder">
68
+ <img width="200px" height="145px" alt="Telegrinder" src="https://github.com/timoniq/telegrinder/blob/main/docs/logo.jpg">
69
+ </a>
70
+ </p>
71
+
72
+ </p>
73
+ <h1>
74
+ telegrinder
75
+ </h1>
76
+
77
+ <p>
78
+ — effective and reliable telegram bot building.
79
+ </p>
80
+
81
+ <p>
82
+ <a href="#contributors"><img alt="Still in development" src="https://img.shields.io/badge/Still_in_development-E3956B?logo=textpattern&logoColor=fff&style=flat-square&color=black"></img></a>
83
+ <a href="#license"><img alt="GitHub License" src="https://img.shields.io/github/license/timoniq/telegrinder.svg?color=lightGreen&labelColor=black&style=flat-square"></img></a>
84
+ <a href="https://docs.astral.sh/ruff/"><img alt="Code Style" src="https://img.shields.io/badge/code_style-Ruff-D7FF64?logo=ruff&logoColor=fff&style=flat-square&labelColor=black"></img></a>
85
+ <a href="https://docs.basedpyright.com/latest/"><img alt="Type Checker" src="https://img.shields.io/badge/types-basedpyright-black?logo=python&color=%23FBCA04&logoColor=edb641&labelColor=black&style=flat-square"></img></a>
86
+ <a href="https://pypi.org/project/telegrinder/"><img alt="Python versions" src="https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Ftimoniq%2Ftelegrinder%2Frefs%2Fheads%2Fmain%2Fpyproject.toml&style=flat-square&logo=python&logoColor=fff&labelColor=black"></img></a>
87
+ <a href="https://core.telegram.org/bots/api"><img alt="Telegram Bot API Version" src="https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftimoniq%2Ftelegrinder%2Frefs%2Fheads%2Fmain%2Ftypegen%2Fconfig.toml&query=%24.telegram-bot-api.version&style=flat-square&logo=telegram&label=Telegram%20API&labelColor=black&color=%23FBCA04"></img></a>
88
+ </p>
89
+
90
+
91
+ * Type hinted
92
+ * Customizable and extensible
93
+ * Ready to use scenarios and rules
94
+ * Fast models built on [msgspec](https://github.com/jcrist/msgspec)
95
+ * Both low-level and high-level API
96
+
97
+
98
+ Basic example:
99
+
100
+ ```python
101
+ from telegrinder import API, Message, Telegrinder, Token
102
+ from telegrinder.modules import logger
103
+ from telegrinder.rules import Text
104
+
105
+ logger.set_level("INFO")
106
+ api = API(token=Token("123:token"))
107
+ bot = Telegrinder(api)
108
+
109
+
110
+ @bot.on.message(Text("/start"))
111
+ async def start(message: Message) -> None:
112
+ me = (await api.get_me()).unwrap()
113
+ await message.answer(f"Hello, {message.from_user.full_name}! I'm {me.full_name}.")
114
+
115
+
116
+ bot.run_forever()
117
+ ```
118
+
119
+ # Getting started
120
+
121
+ Install using pip, uv or poetry:
122
+
123
+ <a href="https://pypi.org/project/telegrinder/"><img alt="PyPI Version" src="https://img.shields.io/pypi/v/telegrinder.svg?labelColor=black&style=flat-square&logo=pypi"></img></a>
124
+
125
+ ```console
126
+ uv add telegrinder
127
+ poetry add telegrinder
128
+ pip install telegrinder
129
+ ```
130
+
131
+ Or install from source (unstable):
132
+
133
+ <a href="https://github.com/timoniq/telegrinder/actions/workflows/push.yml"><img alt="GitHub CI" src="https://img.shields.io/github/actions/workflow/status/timoniq/telegrinder/push.yml?branch=main&style=flat-square&labelColor=black&label=CI&logo=github"></img></a>
134
+
135
+ ```console
136
+ uv add "telegrinder @ git+https://github.com/timoniq/telegrinder@dev"
137
+ poetry add git+https://github.com/timoniq/telegrinder.git#dev
138
+ pip install git+https://github.com/timoniq/telegrinder/archive/dev.zip
139
+ ```
140
+
141
+ # Documentation
142
+
143
+ [Tutorial](/docs/tutorial/en/0_tutorial.md)
144
+
145
+ # Community
146
+
147
+ Join our [telegram forum](https://t.me/botoforum).
148
+
149
+ # License
150
+
151
+ Telegrinder is [MIT licensed](./LICENSE)\
152
+ Copyright © 2022 [timoniq](https://github.com/timoniq)\
153
+ Copyright © 2024 [luwqz1](https://github.com/luwqz1)
154
+
155
+ # Contributors
156
+
157
+ [How to contribute](https://github.com/timoniq/telegrinder/blob/main/contributing.md)
158
+
159
+
160
+ <a href="https://github.com/timoniq/telegrinder/graphs/contributors">
161
+ <img src="https://contributors-img.web.app/image?repo=timoniq/telegrinder" />
162
+ </a>
File without changes
File without changes
@@ -0,0 +1,11 @@
1
+ # Telegram
2
+
3
+ Feel free to add more community links if they are based on telegrinder framework
4
+
5
+ ## EN
6
+
7
+ * [@botoforum](https://t.me/botoforum) - Our main official chat for mixed topics [multiple frameworks and dependency utilities: fntypes, etc] and cozy vibe
8
+
9
+ ## RU
10
+
11
+ * [@botoforum](https://t.me/botoforum) - Наш основной официальный форум по смешанным темам [несколько фреймворков и их авторские депенденси: fntypes и т.д.]. chill
File without changes
Binary file