telegrinder 0.3.4__tar.gz → 0.4.0__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 (215) hide show
  1. {telegrinder-0.3.4 → telegrinder-0.4.0}/LICENSE +22 -22
  2. telegrinder-0.4.0/PKG-INFO +144 -0
  3. telegrinder-0.4.0/pyproject.toml +164 -0
  4. {telegrinder-0.3.4 → telegrinder-0.4.0}/readme.md +79 -73
  5. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/__init__.py +148 -149
  6. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/api/__init__.py +9 -8
  7. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/api/api.py +101 -93
  8. telegrinder-0.4.0/telegrinder/api/error.py +20 -0
  9. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/api/response.py +20 -20
  10. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/api/token.py +36 -36
  11. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/__init__.py +72 -66
  12. telegrinder-0.4.0/telegrinder/bot/bot.py +83 -0
  13. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/cute_types/__init__.py +19 -17
  14. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/cute_types/base.py +184 -258
  15. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/cute_types/callback_query.py +400 -385
  16. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/cute_types/chat_join_request.py +62 -61
  17. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/cute_types/chat_member_updated.py +157 -160
  18. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/cute_types/inline_query.py +44 -43
  19. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/cute_types/message.py +2590 -2637
  20. telegrinder-0.4.0/telegrinder/bot/cute_types/pre_checkout_query.py +42 -0
  21. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/cute_types/update.py +112 -104
  22. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/cute_types/utils.py +62 -95
  23. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/__init__.py +59 -55
  24. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/abc.py +76 -77
  25. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/context.py +96 -98
  26. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/dispatch.py +254 -202
  27. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/handler/__init__.py +13 -13
  28. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/handler/abc.py +23 -24
  29. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/handler/audio_reply.py +44 -44
  30. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/handler/base.py +57 -57
  31. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/handler/document_reply.py +44 -44
  32. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/handler/func.py +129 -135
  33. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/handler/media_group_reply.py +44 -43
  34. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/handler/message_reply.py +36 -36
  35. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/handler/photo_reply.py +44 -44
  36. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/handler/sticker_reply.py +37 -37
  37. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/handler/video_reply.py +44 -44
  38. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/middleware/__init__.py +3 -3
  39. telegrinder-0.4.0/telegrinder/bot/dispatch/middleware/abc.py +97 -0
  40. telegrinder-0.4.0/telegrinder/bot/dispatch/middleware/global_middleware.py +70 -0
  41. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/process.py +151 -157
  42. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/return_manager/__init__.py +15 -13
  43. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/return_manager/abc.py +104 -108
  44. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/return_manager/callback_query.py +20 -20
  45. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/return_manager/inline_query.py +15 -15
  46. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/return_manager/message.py +36 -36
  47. telegrinder-0.4.0/telegrinder/bot/dispatch/return_manager/pre_checkout_query.py +20 -0
  48. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/view/__init__.py +15 -13
  49. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/view/abc.py +45 -41
  50. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/view/base.py +231 -200
  51. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/view/box.py +140 -129
  52. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/view/callback_query.py +16 -17
  53. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/view/chat_join_request.py +11 -16
  54. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/view/chat_member.py +37 -39
  55. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/view/inline_query.py +16 -17
  56. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/view/message.py +43 -44
  57. telegrinder-0.4.0/telegrinder/bot/dispatch/view/pre_checkout_query.py +16 -0
  58. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/view/raw.py +116 -114
  59. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/waiter_machine/__init__.py +17 -17
  60. telegrinder-0.4.0/telegrinder/bot/dispatch/waiter_machine/actions.py +14 -0
  61. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/waiter_machine/hasher/__init__.py +8 -8
  62. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/waiter_machine/hasher/callback.py +55 -55
  63. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/waiter_machine/hasher/hasher.py +59 -57
  64. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/waiter_machine/hasher/message.py +51 -51
  65. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/waiter_machine/hasher/state.py +20 -19
  66. telegrinder-0.4.0/telegrinder/bot/dispatch/waiter_machine/machine.py +251 -0
  67. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/waiter_machine/middleware.py +94 -89
  68. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/dispatch/waiter_machine/short_state.py +57 -68
  69. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/polling/__init__.py +4 -4
  70. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/polling/abc.py +25 -25
  71. telegrinder-0.4.0/telegrinder/bot/polling/polling.py +139 -0
  72. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/__init__.py +85 -62
  73. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/abc.py +213 -206
  74. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/callback_data.py +122 -163
  75. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/chat_join.py +45 -43
  76. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/command.py +126 -126
  77. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/enum_text.py +33 -36
  78. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/func.py +28 -26
  79. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/fuzzy.py +24 -24
  80. telegrinder-0.4.0/telegrinder/bot/rules/id.py +24 -0
  81. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/inline.py +58 -56
  82. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/integer.py +21 -20
  83. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/is_from.py +127 -127
  84. telegrinder-0.4.0/telegrinder/bot/rules/logic.py +18 -0
  85. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/markup.py +42 -43
  86. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/mention.py +14 -14
  87. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/message.py +15 -17
  88. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/message_entities.py +33 -35
  89. telegrinder-0.4.0/telegrinder/bot/rules/node.py +33 -0
  90. telegrinder-0.4.0/telegrinder/bot/rules/payload.py +81 -0
  91. telegrinder-0.4.0/telegrinder/bot/rules/payment_invoice.py +29 -0
  92. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/regex.py +36 -37
  93. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/rule_enum.py +72 -72
  94. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/start.py +42 -42
  95. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/state.py +35 -37
  96. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/text.py +38 -33
  97. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/rules/update.py +15 -15
  98. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/scenario/__init__.py +5 -5
  99. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/scenario/abc.py +17 -19
  100. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/scenario/checkbox.py +174 -176
  101. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/bot/scenario/choice.py +48 -51
  102. telegrinder-0.4.0/telegrinder/client/__init__.py +12 -0
  103. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/client/abc.py +100 -75
  104. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/client/aiohttp.py +134 -130
  105. telegrinder-0.4.0/telegrinder/client/form_data.py +31 -0
  106. telegrinder-0.4.0/telegrinder/client/sonic.py +212 -0
  107. telegrinder-0.4.0/telegrinder/model.py +213 -0
  108. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/modules.py +239 -237
  109. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/msgspec_json.py +14 -14
  110. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/msgspec_utils.py +478 -410
  111. telegrinder-0.4.0/telegrinder/node/__init__.py +121 -0
  112. telegrinder-0.4.0/telegrinder/node/attachment.py +168 -0
  113. telegrinder-0.4.0/telegrinder/node/base.py +294 -0
  114. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/node/callback_query.py +54 -53
  115. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/node/command.py +34 -33
  116. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/node/composer.py +163 -198
  117. telegrinder-0.4.0/telegrinder/node/container.py +33 -0
  118. telegrinder-0.4.0/telegrinder/node/either.py +82 -0
  119. telegrinder-0.4.0/telegrinder/node/event.py +54 -0
  120. telegrinder-0.4.0/telegrinder/node/file.py +51 -0
  121. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/node/me.py +15 -16
  122. telegrinder-0.4.0/telegrinder/node/payload.py +78 -0
  123. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/node/polymorphic.py +67 -48
  124. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/node/rule.py +72 -76
  125. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/node/scope.py +36 -38
  126. telegrinder-0.4.0/telegrinder/node/source.py +87 -0
  127. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/node/text.py +53 -41
  128. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/node/tools/__init__.py +3 -3
  129. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/node/tools/generator.py +36 -40
  130. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/py.typed +0 -0
  131. telegrinder-0.4.0/telegrinder/rules.py +1 -0
  132. telegrinder-0.4.0/telegrinder/tools/__init__.py +205 -0
  133. telegrinder-0.4.0/telegrinder/tools/adapter/__init__.py +19 -0
  134. telegrinder-0.4.0/telegrinder/tools/adapter/abc.py +49 -0
  135. telegrinder-0.4.0/telegrinder/tools/adapter/dataclass.py +56 -0
  136. {telegrinder-0.3.4/telegrinder/bot/rules → telegrinder-0.4.0/telegrinder/tools}/adapter/errors.py +5 -5
  137. {telegrinder-0.3.4/telegrinder/bot/rules → telegrinder-0.4.0/telegrinder/tools}/adapter/event.py +63 -65
  138. {telegrinder-0.3.4/telegrinder/bot/rules → telegrinder-0.4.0/telegrinder/tools}/adapter/node.py +46 -48
  139. {telegrinder-0.3.4/telegrinder/bot/rules → telegrinder-0.4.0/telegrinder/tools}/adapter/raw_event.py +27 -27
  140. {telegrinder-0.3.4/telegrinder/bot/rules → telegrinder-0.4.0/telegrinder/tools}/adapter/raw_update.py +30 -30
  141. telegrinder-0.4.0/telegrinder/tools/buttons.py +109 -0
  142. telegrinder-0.4.0/telegrinder/tools/callback_data_serilization/__init__.py +5 -0
  143. telegrinder-0.4.0/telegrinder/tools/callback_data_serilization/abc.py +51 -0
  144. telegrinder-0.4.0/telegrinder/tools/callback_data_serilization/json_ser.py +60 -0
  145. telegrinder-0.4.0/telegrinder/tools/callback_data_serilization/msgpack_ser.py +172 -0
  146. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/error_handler/__init__.py +7 -7
  147. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/error_handler/abc.py +30 -33
  148. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/error_handler/error.py +9 -9
  149. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/error_handler/error_handler.py +179 -193
  150. telegrinder-0.4.0/telegrinder/tools/formatting/__init__.py +101 -0
  151. telegrinder-0.4.0/telegrinder/tools/formatting/deep_links.py +541 -0
  152. telegrinder-0.3.4/telegrinder/tools/formatting/html.py → telegrinder-0.4.0/telegrinder/tools/formatting/html_formatter.py +266 -294
  153. telegrinder-0.4.0/telegrinder/tools/formatting/spec_html_formats.py +75 -0
  154. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/functional.py +8 -12
  155. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/global_context/__init__.py +7 -7
  156. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/global_context/abc.py +63 -63
  157. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/global_context/global_context.py +387 -412
  158. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/global_context/telegrinder_ctx.py +27 -27
  159. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/i18n/__init__.py +7 -7
  160. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/i18n/abc.py +30 -30
  161. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/i18n/middleware/__init__.py +3 -3
  162. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/i18n/middleware/abc.py +22 -25
  163. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/i18n/simple.py +43 -43
  164. telegrinder-0.4.0/telegrinder/tools/input_file_directory.py +30 -0
  165. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/keyboard.py +128 -128
  166. telegrinder-0.4.0/telegrinder/tools/lifespan.py +105 -0
  167. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/limited_dict.py +32 -37
  168. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/loop_wrapper/__init__.py +4 -4
  169. telegrinder-0.4.0/telegrinder/tools/loop_wrapper/abc.py +20 -0
  170. telegrinder-0.4.0/telegrinder/tools/loop_wrapper/loop_wrapper.py +169 -0
  171. telegrinder-0.4.0/telegrinder/tools/magic.py +318 -0
  172. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/parse_mode.py +6 -6
  173. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/state_storage/__init__.py +4 -4
  174. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/state_storage/abc.py +31 -35
  175. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/tools/state_storage/memory.py +25 -25
  176. telegrinder-0.4.0/telegrinder/tools/strings.py +13 -0
  177. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/types/__init__.py +268 -260
  178. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/types/enums.py +711 -701
  179. telegrinder-0.4.0/telegrinder/types/input_file.py +51 -0
  180. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/types/methods.py +5055 -4633
  181. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/types/objects.py +7058 -6950
  182. {telegrinder-0.3.4 → telegrinder-0.4.0}/telegrinder/verification_utils.py +30 -32
  183. telegrinder-0.3.4/PKG-INFO +0 -110
  184. telegrinder-0.3.4/pyproject.toml +0 -100
  185. telegrinder-0.3.4/telegrinder/api/error.py +0 -16
  186. telegrinder-0.3.4/telegrinder/bot/bot.py +0 -76
  187. telegrinder-0.3.4/telegrinder/bot/dispatch/middleware/abc.py +0 -22
  188. telegrinder-0.3.4/telegrinder/bot/dispatch/waiter_machine/actions.py +0 -13
  189. telegrinder-0.3.4/telegrinder/bot/dispatch/waiter_machine/machine.py +0 -172
  190. telegrinder-0.3.4/telegrinder/bot/polling/polling.py +0 -131
  191. telegrinder-0.3.4/telegrinder/bot/rules/adapter/__init__.py +0 -17
  192. telegrinder-0.3.4/telegrinder/bot/rules/adapter/abc.py +0 -31
  193. telegrinder-0.3.4/telegrinder/bot/rules/node.py +0 -27
  194. telegrinder-0.3.4/telegrinder/client/__init__.py +0 -4
  195. telegrinder-0.3.4/telegrinder/model.py +0 -320
  196. telegrinder-0.3.4/telegrinder/node/__init__.py +0 -60
  197. telegrinder-0.3.4/telegrinder/node/attachment.py +0 -92
  198. telegrinder-0.3.4/telegrinder/node/base.py +0 -166
  199. telegrinder-0.3.4/telegrinder/node/container.py +0 -27
  200. telegrinder-0.3.4/telegrinder/node/event.py +0 -65
  201. telegrinder-0.3.4/telegrinder/node/message.py +0 -14
  202. telegrinder-0.3.4/telegrinder/node/source.py +0 -71
  203. telegrinder-0.3.4/telegrinder/node/update.py +0 -15
  204. telegrinder-0.3.4/telegrinder/rules.py +0 -62
  205. telegrinder-0.3.4/telegrinder/tools/__init__.py +0 -146
  206. telegrinder-0.3.4/telegrinder/tools/buttons.py +0 -83
  207. telegrinder-0.3.4/telegrinder/tools/formatting/__init__.py +0 -81
  208. telegrinder-0.3.4/telegrinder/tools/formatting/links.py +0 -38
  209. telegrinder-0.3.4/telegrinder/tools/formatting/spec_html_formats.py +0 -121
  210. telegrinder-0.3.4/telegrinder/tools/kb_set/__init__.py +0 -4
  211. telegrinder-0.3.4/telegrinder/tools/kb_set/base.py +0 -15
  212. telegrinder-0.3.4/telegrinder/tools/kb_set/yaml.py +0 -63
  213. telegrinder-0.3.4/telegrinder/tools/loop_wrapper/abc.py +0 -15
  214. telegrinder-0.3.4/telegrinder/tools/loop_wrapper/loop_wrapper.py +0 -224
  215. telegrinder-0.3.4/telegrinder/tools/magic.py +0 -168
@@ -1,22 +1,22 @@
1
- MIT License
2
-
3
- Copyright (c) 2022-2024 timoniq
4
- Copyright (c) 2024 luwqz1
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all
14
- copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022-2025 timoniq
4
+ Copyright (c) 2024-2025 luwqz1
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -0,0 +1,144 @@
1
+ Metadata-Version: 2.3
2
+ Name: telegrinder
3
+ Version: 0.4.0
4
+ Summary: Modern visionary telegram bot framework.
5
+ License: MIT License
6
+
7
+ Copyright (c) 2022-2025 timoniq
8
+ Copyright (c) 2024-2025 luwqz1
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+ Keywords: asyncio,api schema,async,bot building,bot api,custom rules,telegram,telegram bot api framework,telegrinder framework,middleware,composition,framework,telegrinder,waiter machine
28
+ Author: timoniq
29
+ Author-email: tesseradecades@mail.ru
30
+ Maintainer: luwqz1
31
+ Maintainer-email: howluwqz1@gmail.com
32
+ Requires-Python: >=3.12,<4.0
33
+ Classifier: Environment :: Console
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Programming Language :: Python :: 3.12
37
+ Classifier: Programming Language :: Python :: 3.13
38
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
39
+ Classifier: Topic :: Software Development :: Quality Assurance
40
+ Classifier: Typing :: Typed
41
+ Provides-Extra: all
42
+ Provides-Extra: fast
43
+ Provides-Extra: loguru
44
+ Provides-Extra: uvloop
45
+ Requires-Dist: aiohttp (>=3.11.11,<4.0.0)
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
63
+ Description-Content-Type: text/markdown
64
+
65
+ # Telegrinder
66
+
67
+ Framework for effective and reliable telegram bot building.
68
+
69
+ Still in development.
70
+
71
+ * Type hinted
72
+ * Customizable and extensible
73
+ * Ready to use scenarios and rules
74
+ * Fast models built on [msgspec](https://github.com/jcrist/msgspec)
75
+ * Both low-level and high-level API
76
+ * Support [optional dependecies](https://github.com/timoniq/telegrinder/blob/dev/docs/guide/optional_dependencies.md)
77
+
78
+ # Getting started
79
+
80
+ Install using pip:
81
+
82
+ ```console
83
+ pip install telegrinder
84
+ ```
85
+
86
+ Using poetry:
87
+
88
+ ```console
89
+ poetry add telegrinder
90
+ ```
91
+
92
+ Install from github:
93
+
94
+ ```console
95
+ pip install -U https://github.com/timoniq/telegrinder/archive/dev.zip
96
+ ```
97
+
98
+ ```console
99
+ poetry add git+https://github.com/timoniq/telegrinder.git#dev
100
+ ```
101
+
102
+ Basic example:
103
+
104
+ ```python
105
+ from telegrinder import API, Message, Telegrinder, Token
106
+ from telegrinder.modules import logger
107
+ from telegrinder.rules import Text
108
+
109
+ api = API(token=Token("123:token"))
110
+ bot = Telegrinder(api)
111
+ logger.set_level("INFO")
112
+
113
+
114
+ @bot.on.message(Text("/start"))
115
+ async def start(message: Message):
116
+ me = (await api.get_me()).unwrap()
117
+ await message.answer(f"Hello, {message.from_user.full_name}! I'm {me.full_name}.")
118
+
119
+
120
+ bot.run_forever()
121
+ ```
122
+
123
+ # Documentation
124
+
125
+ [Readthedocs](https://telegrinder.readthedocs.io)
126
+
127
+ # Community
128
+
129
+ Join our [telegram forum](https://t.me/botoforum).
130
+
131
+ # [Contributing](https://github.com/timoniq/telegrinder/blob/main/contributing.md)
132
+
133
+ # License
134
+
135
+ Telegrinder is [MIT licensed](./LICENSE)\
136
+ Copyright © 2022-2025 [timoniq](https://github.com/timoniq)\
137
+ Copyright © 2024-2025 [luwqz1](https://github.com/luwqz1)
138
+
139
+ # Contributors
140
+
141
+ <a href="https://github.com/timoniq/telegrinder/graphs/contributors">
142
+ <img src="https://contributors-img.web.app/image?repo=timoniq/telegrinder" />
143
+ </a>
144
+
@@ -0,0 +1,164 @@
1
+ [build-system]
2
+ requires = ["poetry-core>=2.0.0"]
3
+ build-backend = "poetry.core.masonry.api"
4
+
5
+ [project]
6
+ requires-python = ">=3.12,<4.0"
7
+ name = "telegrinder"
8
+ version = "0.4.0"
9
+ description = "Modern visionary telegram bot framework."
10
+ authors = [
11
+ {name = "timoniq", email = "tesseradecades@mail.ru"}
12
+ ]
13
+ maintainers = [
14
+ {name = "luwqz1", email = "howluwqz1@gmail.com"}
15
+ ]
16
+ license = { file = "LICENSE" }
17
+ readme = "readme.md"
18
+ keywords = [
19
+ "asyncio",
20
+ "api schema",
21
+ "async",
22
+ "bot building",
23
+ "bot api",
24
+ "custom rules",
25
+ "telegram",
26
+ "telegram bot api framework",
27
+ "telegrinder framework",
28
+ "middleware",
29
+ "composition",
30
+ "framework",
31
+ "telegrinder",
32
+ "waiter machine"
33
+ ]
34
+ classifiers = [
35
+ "Environment :: Console",
36
+ "Intended Audience :: Developers",
37
+ "License :: OSI Approved :: MIT License",
38
+ "Programming Language :: Python :: 3.12",
39
+ "Programming Language :: Python :: 3.13",
40
+ "Topic :: Software Development :: Libraries :: Python Modules",
41
+ "Topic :: Software Development :: Quality Assurance",
42
+ "Typing :: Typed",
43
+ ]
44
+ dependencies = [
45
+ "aiohttp (>=3.11.11,<4.0.0)",
46
+ "colorama (>=0.4.6,<0.5.0)",
47
+ "vbml (>=1.1.post1,<2.0)",
48
+ "choicelib (>=0.1.5,<0.2.0)",
49
+ "envparse (>=0.2.0,<0.3.0)",
50
+ "pyyaml (>=6.0.2,<7.0.0)",
51
+ "certifi (>=2025.1.31)",
52
+ "msgspec (>=0.19.0,<0.20.0)",
53
+ "typing-extensions (>=4.12.2,<5.0.0)",
54
+ "fntypes (>=0.1.4.post3,<0.2.0)"
55
+ ]
56
+
57
+ [project.urls]
58
+ Source = "https://github.com/timoniq/telegrinder"
59
+ "Bug Tracker" = "https://github.com/timoniq/telegrinder/issues"
60
+ Documentation = "https://telegrinder.readthedocs.io/en/latest/"
61
+
62
+ [project.optional-dependencies]
63
+ all = [
64
+ "uvloop >= 0.21.0",
65
+ "loguru >= 0.7.0"
66
+ ]
67
+ fast = [
68
+ "uvloop >= 0.21.0"
69
+ ]
70
+ uvloop = [
71
+ "uvloop >= 0.21.0"
72
+ ]
73
+ loguru = [
74
+ "loguru >= 0.7.0"
75
+ ]
76
+
77
+ [tool.poetry]
78
+ package-mode = true
79
+
80
+ [tool.poetry.group.dev.dependencies]
81
+ pre-commit = ">=4.1.0,<5.0"
82
+ ruff = "^0.9.2"
83
+ basedpyright = "^1.26.0"
84
+ requests = "^2.28.1"
85
+ sort-all = "^1.2.0"
86
+ libcst = "^1.4.0"
87
+ pytest = "^8.0.0"
88
+ pytest-asyncio = ">=0.23.5,<0.26.0"
89
+ pytest-cov = ">=5,<7"
90
+ pytest-mock = "^3.10.0"
91
+
92
+ [tool.ruff]
93
+ line-length = 115
94
+ target-version = "py312"
95
+
96
+ [tool.ruff.format]
97
+ quote-style = "double"
98
+ docstring-code-line-length = "dynamic"
99
+
100
+ [tool.ruff.lint]
101
+ select = [
102
+ "I",
103
+ "D",
104
+ "N",
105
+ "PLR",
106
+ "Q",
107
+ "COM",
108
+ "TC",
109
+ "YTT",
110
+ "SIM"
111
+ ]
112
+ ignore = [
113
+ "COM812",
114
+ "N805",
115
+ "N818",
116
+ "TC001",
117
+ "TC002",
118
+ "TC003",
119
+ "TC004",
120
+ "D100",
121
+ "D101",
122
+ "D102",
123
+ "D103",
124
+ "D104",
125
+ "D105",
126
+ "D107",
127
+ "D202",
128
+ "D203",
129
+ "D205",
130
+ "D209",
131
+ "D211",
132
+ "D213",
133
+ "D400",
134
+ "D401",
135
+ "D404",
136
+ "D415",
137
+ "PLR2004",
138
+ "PLR0911",
139
+ "PLR0912",
140
+ "PLR0913"
141
+ ]
142
+ fixable = ["ALL"]
143
+
144
+ [tool.ruff.lint.per-file-ignores]
145
+ "__init__.py" = ["F401", "F403"]
146
+ "typegen/**.py" = ["N802"]
147
+
148
+ [tool.pytest.ini_options]
149
+ asyncio_mode = "auto"
150
+ asyncio_default_fixture_loop_scope = "function"
151
+
152
+ [tool.pyright]
153
+ exclude = [
154
+ "**/__pycache__",
155
+ "docs",
156
+ "local",
157
+ "telegrinder/client/sonic.py"
158
+ ]
159
+ typeCheckingMode = "basic"
160
+ pythonPlatform = "All"
161
+ pythonVersion = "3.12"
162
+ reportMissingImports = true
163
+ reportMissingTypeStubs = false
164
+ enableExperimentalFeatures = true
@@ -1,73 +1,79 @@
1
- # Telegrinder
2
-
3
- Framework for effective and reliable telegram bot building.
4
-
5
- Still in development.
6
-
7
- * Type hinted
8
- * Customizable and extensible
9
- * Ready to use scenarios and rules
10
- * Fast models built on [msgspec](https://github.com/jcrist/msgspec)
11
- * Both low-level and high-level API
12
- * Support [optional dependecies](https://github.com/timoniq/telegrinder/blob/dev/docs/guide/optional_dependencies.md)
13
-
14
- # Getting started
15
-
16
- Install using pip:
17
-
18
- ```console
19
- pip install telegrinder
20
- ```
21
-
22
- Using poetry:
23
-
24
- ```console
25
- poetry add telegrinder
26
- ```
27
-
28
- Install from github:
29
-
30
- ```console
31
- pip install -U https://github.com/timoniq/telegrinder/archive/dev.zip
32
- ```
33
-
34
- ```console
35
- poetry add git+https://github.com/timoniq/telegrinder.git#dev
36
- ```
37
-
38
- Basic example:
39
-
40
- ```python
41
- from telegrinder import API, Message, Telegrinder, Token
42
- from telegrinder.modules import logger
43
- from telegrinder.rules import Text
44
-
45
- api = API(token=Token("123:token"))
46
- bot = Telegrinder(api)
47
- logger.set_level("INFO")
48
-
49
-
50
- @bot.on.message(Text("/start"))
51
- async def start(message: Message):
52
- me = (await api.get_me()).unwrap()
53
- await message.answer(f"Hello, {message.from_user.full_name}! I'm {me.full_name}.")
54
-
55
-
56
- bot.run_forever()
57
- ```
58
-
59
- # Documentation
60
-
61
- [Readthedocs](https://telegrinder.readthedocs.io)
62
-
63
- # Community
64
-
65
- Join our [telegram forum](https://t.me/botoforum).
66
-
67
- # [Contributing](https://github.com/timoniq/telegrinder/blob/main/contributing.md)
68
-
69
- # License
70
-
71
- Telegrinder is [MIT licensed](./LICENSE)\
72
- Copyright © 2022-2024 [timoniq](https://github.com/timoniq)\
73
- Copyright © 2024 [luwqz1](https://github.com/luwqz1)
1
+ # Telegrinder
2
+
3
+ Framework for effective and reliable telegram bot building.
4
+
5
+ Still in development.
6
+
7
+ * Type hinted
8
+ * Customizable and extensible
9
+ * Ready to use scenarios and rules
10
+ * Fast models built on [msgspec](https://github.com/jcrist/msgspec)
11
+ * Both low-level and high-level API
12
+ * Support [optional dependecies](https://github.com/timoniq/telegrinder/blob/dev/docs/guide/optional_dependencies.md)
13
+
14
+ # Getting started
15
+
16
+ Install using pip:
17
+
18
+ ```console
19
+ pip install telegrinder
20
+ ```
21
+
22
+ Using poetry:
23
+
24
+ ```console
25
+ poetry add telegrinder
26
+ ```
27
+
28
+ Install from github:
29
+
30
+ ```console
31
+ pip install -U https://github.com/timoniq/telegrinder/archive/dev.zip
32
+ ```
33
+
34
+ ```console
35
+ poetry add git+https://github.com/timoniq/telegrinder.git#dev
36
+ ```
37
+
38
+ Basic example:
39
+
40
+ ```python
41
+ from telegrinder import API, Message, Telegrinder, Token
42
+ from telegrinder.modules import logger
43
+ from telegrinder.rules import Text
44
+
45
+ api = API(token=Token("123:token"))
46
+ bot = Telegrinder(api)
47
+ logger.set_level("INFO")
48
+
49
+
50
+ @bot.on.message(Text("/start"))
51
+ async def start(message: Message):
52
+ me = (await api.get_me()).unwrap()
53
+ await message.answer(f"Hello, {message.from_user.full_name}! I'm {me.full_name}.")
54
+
55
+
56
+ bot.run_forever()
57
+ ```
58
+
59
+ # Documentation
60
+
61
+ [Readthedocs](https://telegrinder.readthedocs.io)
62
+
63
+ # Community
64
+
65
+ Join our [telegram forum](https://t.me/botoforum).
66
+
67
+ # [Contributing](https://github.com/timoniq/telegrinder/blob/main/contributing.md)
68
+
69
+ # License
70
+
71
+ Telegrinder is [MIT licensed](./LICENSE)\
72
+ Copyright © 2022-2025 [timoniq](https://github.com/timoniq)\
73
+ Copyright © 2024-2025 [luwqz1](https://github.com/luwqz1)
74
+
75
+ # Contributors
76
+
77
+ <a href="https://github.com/timoniq/telegrinder/graphs/contributors">
78
+ <img src="https://contributors-img.web.app/image?repo=timoniq/telegrinder" />
79
+ </a>