telegrinder 0.4.2__py3-none-any.whl → 0.5.0__py3-none-any.whl

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 (233) hide show
  1. telegrinder/__init__.py +37 -55
  2. telegrinder/__meta__.py +1 -0
  3. telegrinder/api/__init__.py +6 -4
  4. telegrinder/api/api.py +100 -26
  5. telegrinder/api/error.py +42 -8
  6. telegrinder/api/response.py +4 -1
  7. telegrinder/api/token.py +2 -2
  8. telegrinder/bot/__init__.py +9 -25
  9. telegrinder/bot/bot.py +31 -25
  10. telegrinder/bot/cute_types/__init__.py +0 -0
  11. telegrinder/bot/cute_types/base.py +103 -61
  12. telegrinder/bot/cute_types/callback_query.py +447 -400
  13. telegrinder/bot/cute_types/chat_join_request.py +59 -62
  14. telegrinder/bot/cute_types/chat_member_updated.py +154 -157
  15. telegrinder/bot/cute_types/inline_query.py +41 -44
  16. telegrinder/bot/cute_types/message.py +2621 -2590
  17. telegrinder/bot/cute_types/pre_checkout_query.py +38 -42
  18. telegrinder/bot/cute_types/update.py +1 -8
  19. telegrinder/bot/cute_types/utils.py +1 -1
  20. telegrinder/bot/dispatch/__init__.py +10 -15
  21. telegrinder/bot/dispatch/abc.py +12 -11
  22. telegrinder/bot/dispatch/action.py +104 -0
  23. telegrinder/bot/dispatch/context.py +32 -26
  24. telegrinder/bot/dispatch/dispatch.py +61 -134
  25. telegrinder/bot/dispatch/handler/__init__.py +2 -0
  26. telegrinder/bot/dispatch/handler/abc.py +10 -8
  27. telegrinder/bot/dispatch/handler/audio_reply.py +2 -3
  28. telegrinder/bot/dispatch/handler/base.py +10 -33
  29. telegrinder/bot/dispatch/handler/document_reply.py +2 -3
  30. telegrinder/bot/dispatch/handler/func.py +55 -87
  31. telegrinder/bot/dispatch/handler/media_group_reply.py +2 -3
  32. telegrinder/bot/dispatch/handler/message_reply.py +2 -3
  33. telegrinder/bot/dispatch/handler/photo_reply.py +2 -3
  34. telegrinder/bot/dispatch/handler/sticker_reply.py +2 -3
  35. telegrinder/bot/dispatch/handler/video_reply.py +2 -3
  36. telegrinder/bot/dispatch/middleware/__init__.py +0 -0
  37. telegrinder/bot/dispatch/middleware/abc.py +79 -55
  38. telegrinder/bot/dispatch/middleware/global_middleware.py +18 -33
  39. telegrinder/bot/dispatch/process.py +84 -105
  40. telegrinder/bot/dispatch/return_manager/__init__.py +0 -0
  41. telegrinder/bot/dispatch/return_manager/abc.py +102 -65
  42. telegrinder/bot/dispatch/return_manager/callback_query.py +4 -5
  43. telegrinder/bot/dispatch/return_manager/inline_query.py +3 -4
  44. telegrinder/bot/dispatch/return_manager/message.py +8 -10
  45. telegrinder/bot/dispatch/return_manager/pre_checkout_query.py +4 -5
  46. telegrinder/bot/dispatch/view/__init__.py +4 -4
  47. telegrinder/bot/dispatch/view/abc.py +6 -16
  48. telegrinder/bot/dispatch/view/base.py +54 -178
  49. telegrinder/bot/dispatch/view/box.py +19 -18
  50. telegrinder/bot/dispatch/view/callback_query.py +4 -8
  51. telegrinder/bot/dispatch/view/chat_join_request.py +5 -6
  52. telegrinder/bot/dispatch/view/chat_member.py +5 -25
  53. telegrinder/bot/dispatch/view/error.py +9 -0
  54. telegrinder/bot/dispatch/view/inline_query.py +4 -8
  55. telegrinder/bot/dispatch/view/message.py +5 -25
  56. telegrinder/bot/dispatch/view/pre_checkout_query.py +4 -8
  57. telegrinder/bot/dispatch/view/raw.py +3 -109
  58. telegrinder/bot/dispatch/waiter_machine/__init__.py +2 -5
  59. telegrinder/bot/dispatch/waiter_machine/actions.py +6 -4
  60. telegrinder/bot/dispatch/waiter_machine/hasher/__init__.py +1 -3
  61. telegrinder/bot/dispatch/waiter_machine/hasher/callback.py +1 -1
  62. telegrinder/bot/dispatch/waiter_machine/hasher/hasher.py +11 -7
  63. telegrinder/bot/dispatch/waiter_machine/hasher/message.py +0 -0
  64. telegrinder/bot/dispatch/waiter_machine/machine.py +43 -60
  65. telegrinder/bot/dispatch/waiter_machine/middleware.py +19 -23
  66. telegrinder/bot/dispatch/waiter_machine/short_state.py +6 -5
  67. telegrinder/bot/polling/__init__.py +0 -0
  68. telegrinder/bot/polling/abc.py +0 -0
  69. telegrinder/bot/polling/polling.py +209 -88
  70. telegrinder/bot/rules/__init__.py +3 -16
  71. telegrinder/bot/rules/abc.py +42 -122
  72. telegrinder/bot/rules/callback_data.py +29 -49
  73. telegrinder/bot/rules/chat_join.py +5 -23
  74. telegrinder/bot/rules/command.py +8 -4
  75. telegrinder/bot/rules/enum_text.py +3 -4
  76. telegrinder/bot/rules/func.py +7 -14
  77. telegrinder/bot/rules/fuzzy.py +3 -4
  78. telegrinder/bot/rules/inline.py +8 -20
  79. telegrinder/bot/rules/integer.py +2 -3
  80. telegrinder/bot/rules/is_from.py +12 -11
  81. telegrinder/bot/rules/logic.py +11 -5
  82. telegrinder/bot/rules/markup.py +22 -14
  83. telegrinder/bot/rules/mention.py +8 -7
  84. telegrinder/bot/rules/message_entities.py +8 -4
  85. telegrinder/bot/rules/node.py +23 -12
  86. telegrinder/bot/rules/payload.py +5 -4
  87. telegrinder/bot/rules/payment_invoice.py +6 -21
  88. telegrinder/bot/rules/regex.py +2 -4
  89. telegrinder/bot/rules/rule_enum.py +8 -7
  90. telegrinder/bot/rules/start.py +5 -6
  91. telegrinder/bot/rules/state.py +1 -1
  92. telegrinder/bot/rules/text.py +4 -15
  93. telegrinder/bot/rules/update.py +3 -4
  94. telegrinder/bot/scenario/__init__.py +0 -0
  95. telegrinder/bot/scenario/abc.py +6 -5
  96. telegrinder/bot/scenario/checkbox.py +1 -1
  97. telegrinder/bot/scenario/choice.py +30 -39
  98. telegrinder/client/__init__.py +3 -5
  99. telegrinder/client/abc.py +11 -6
  100. telegrinder/client/aiohttp.py +141 -27
  101. telegrinder/client/form_data.py +1 -1
  102. telegrinder/model.py +61 -89
  103. telegrinder/modules.py +325 -102
  104. telegrinder/msgspec_utils/__init__.py +40 -0
  105. telegrinder/msgspec_utils/abc.py +18 -0
  106. telegrinder/msgspec_utils/custom_types/__init__.py +6 -0
  107. telegrinder/msgspec_utils/custom_types/datetime.py +24 -0
  108. telegrinder/msgspec_utils/custom_types/enum_meta.py +43 -0
  109. telegrinder/msgspec_utils/custom_types/literal.py +25 -0
  110. telegrinder/msgspec_utils/custom_types/option.py +17 -0
  111. telegrinder/msgspec_utils/decoder.py +389 -0
  112. telegrinder/msgspec_utils/encoder.py +206 -0
  113. telegrinder/{msgspec_json.py → msgspec_utils/json.py} +6 -5
  114. telegrinder/msgspec_utils/tools.py +75 -0
  115. telegrinder/node/__init__.py +24 -7
  116. telegrinder/node/attachment.py +1 -0
  117. telegrinder/node/base.py +154 -72
  118. telegrinder/node/callback_query.py +5 -5
  119. telegrinder/node/collection.py +39 -0
  120. telegrinder/node/command.py +1 -2
  121. telegrinder/node/composer.py +121 -72
  122. telegrinder/node/container.py +11 -8
  123. telegrinder/node/context.py +48 -0
  124. telegrinder/node/either.py +27 -40
  125. telegrinder/node/error.py +41 -0
  126. telegrinder/node/event.py +37 -11
  127. telegrinder/node/exceptions.py +7 -0
  128. telegrinder/node/file.py +0 -0
  129. telegrinder/node/i18n.py +108 -0
  130. telegrinder/node/me.py +3 -2
  131. telegrinder/node/payload.py +1 -1
  132. telegrinder/node/polymorphic.py +63 -28
  133. telegrinder/node/reply_message.py +12 -0
  134. telegrinder/node/rule.py +6 -13
  135. telegrinder/node/scope.py +14 -5
  136. telegrinder/node/session.py +53 -0
  137. telegrinder/node/source.py +41 -9
  138. telegrinder/node/text.py +1 -2
  139. telegrinder/node/tools/__init__.py +0 -0
  140. telegrinder/node/tools/generator.py +3 -5
  141. telegrinder/node/utility.py +16 -0
  142. telegrinder/py.typed +0 -0
  143. telegrinder/rules.py +0 -0
  144. telegrinder/tools/__init__.py +48 -88
  145. telegrinder/tools/aio.py +103 -0
  146. telegrinder/tools/callback_data_serialization/__init__.py +5 -0
  147. telegrinder/tools/{callback_data_serilization → callback_data_serialization}/abc.py +0 -0
  148. telegrinder/tools/{callback_data_serilization → callback_data_serialization}/json_ser.py +2 -3
  149. telegrinder/tools/{callback_data_serilization → callback_data_serialization}/msgpack_ser.py +45 -27
  150. telegrinder/tools/final.py +21 -0
  151. telegrinder/tools/formatting/__init__.py +2 -18
  152. telegrinder/tools/formatting/deep_links/__init__.py +39 -0
  153. telegrinder/tools/formatting/{deep_links.py → deep_links/links.py} +12 -85
  154. telegrinder/tools/formatting/deep_links/parsing.py +90 -0
  155. telegrinder/tools/formatting/deep_links/validators.py +8 -0
  156. telegrinder/tools/formatting/html_formatter.py +18 -45
  157. telegrinder/tools/fullname.py +83 -0
  158. telegrinder/tools/global_context/__init__.py +4 -3
  159. telegrinder/tools/global_context/abc.py +17 -14
  160. telegrinder/tools/global_context/builtin_context.py +39 -0
  161. telegrinder/tools/global_context/global_context.py +138 -39
  162. telegrinder/tools/input_file_directory.py +0 -0
  163. telegrinder/tools/keyboard/__init__.py +39 -0
  164. telegrinder/tools/keyboard/abc.py +159 -0
  165. telegrinder/tools/keyboard/base.py +77 -0
  166. telegrinder/tools/keyboard/buttons/__init__.py +14 -0
  167. telegrinder/tools/keyboard/buttons/base.py +18 -0
  168. telegrinder/tools/{buttons.py → keyboard/buttons/buttons.py} +71 -23
  169. telegrinder/tools/keyboard/buttons/static_buttons.py +56 -0
  170. telegrinder/tools/keyboard/buttons/tools.py +18 -0
  171. telegrinder/tools/keyboard/data.py +20 -0
  172. telegrinder/tools/keyboard/keyboard.py +131 -0
  173. telegrinder/tools/keyboard/static_keyboard.py +83 -0
  174. telegrinder/tools/lifespan.py +87 -51
  175. telegrinder/tools/limited_dict.py +4 -1
  176. telegrinder/tools/loop_wrapper.py +332 -0
  177. telegrinder/tools/magic/__init__.py +32 -0
  178. telegrinder/tools/magic/annotations.py +165 -0
  179. telegrinder/tools/magic/dictionary.py +20 -0
  180. telegrinder/tools/magic/function.py +246 -0
  181. telegrinder/tools/magic/shortcut.py +111 -0
  182. telegrinder/tools/parse_mode.py +9 -3
  183. telegrinder/tools/singleton/__init__.py +4 -0
  184. telegrinder/tools/singleton/abc.py +14 -0
  185. telegrinder/tools/singleton/singleton.py +18 -0
  186. telegrinder/tools/state_storage/__init__.py +0 -0
  187. telegrinder/tools/state_storage/abc.py +6 -1
  188. telegrinder/tools/state_storage/memory.py +1 -1
  189. telegrinder/tools/strings.py +0 -0
  190. telegrinder/types/__init__.py +307 -268
  191. telegrinder/types/enums.py +64 -37
  192. telegrinder/types/input_file.py +3 -3
  193. telegrinder/types/methods.py +5699 -5055
  194. telegrinder/types/methods_utils.py +62 -0
  195. telegrinder/types/objects.py +7846 -7058
  196. telegrinder/verification_utils.py +3 -1
  197. telegrinder-0.5.0.dist-info/METADATA +162 -0
  198. telegrinder-0.5.0.dist-info/RECORD +200 -0
  199. {telegrinder-0.4.2.dist-info → telegrinder-0.5.0.dist-info}/licenses/LICENSE +2 -2
  200. telegrinder/bot/dispatch/waiter_machine/hasher/state.py +0 -20
  201. telegrinder/bot/rules/id.py +0 -24
  202. telegrinder/bot/rules/message.py +0 -15
  203. telegrinder/client/sonic.py +0 -212
  204. telegrinder/msgspec_utils.py +0 -478
  205. telegrinder/tools/adapter/__init__.py +0 -19
  206. telegrinder/tools/adapter/abc.py +0 -49
  207. telegrinder/tools/adapter/dataclass.py +0 -56
  208. telegrinder/tools/adapter/errors.py +0 -5
  209. telegrinder/tools/adapter/event.py +0 -61
  210. telegrinder/tools/adapter/node.py +0 -46
  211. telegrinder/tools/adapter/raw_event.py +0 -27
  212. telegrinder/tools/adapter/raw_update.py +0 -30
  213. telegrinder/tools/callback_data_serilization/__init__.py +0 -5
  214. telegrinder/tools/error_handler/__init__.py +0 -10
  215. telegrinder/tools/error_handler/abc.py +0 -30
  216. telegrinder/tools/error_handler/error.py +0 -9
  217. telegrinder/tools/error_handler/error_handler.py +0 -179
  218. telegrinder/tools/formatting/spec_html_formats.py +0 -75
  219. telegrinder/tools/functional.py +0 -8
  220. telegrinder/tools/global_context/telegrinder_ctx.py +0 -27
  221. telegrinder/tools/i18n/__init__.py +0 -12
  222. telegrinder/tools/i18n/abc.py +0 -32
  223. telegrinder/tools/i18n/middleware/__init__.py +0 -3
  224. telegrinder/tools/i18n/middleware/abc.py +0 -22
  225. telegrinder/tools/i18n/simple.py +0 -43
  226. telegrinder/tools/keyboard.py +0 -132
  227. telegrinder/tools/loop_wrapper/__init__.py +0 -4
  228. telegrinder/tools/loop_wrapper/abc.py +0 -20
  229. telegrinder/tools/loop_wrapper/loop_wrapper.py +0 -169
  230. telegrinder/tools/magic.py +0 -344
  231. telegrinder-0.4.2.dist-info/METADATA +0 -151
  232. telegrinder-0.4.2.dist-info/RECORD +0 -182
  233. {telegrinder-0.4.2.dist-info → telegrinder-0.5.0.dist-info}/WHEEL +0 -0
@@ -1,344 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import asyncio
4
- import dataclasses
5
- import enum
6
- import inspect
7
- from collections import OrderedDict
8
- from functools import wraps
9
-
10
- import typing_extensions as typing
11
- from fntypes import Result
12
-
13
- from telegrinder.model import get_params
14
-
15
- if typing.TYPE_CHECKING:
16
- from telegrinder.bot.rules.abc import ABCRule
17
- from telegrinder.node.polymorphic import Polymorphic
18
-
19
- type Impl = type[classmethod]
20
- type Function = typing.Callable[..., typing.Any]
21
- type Executor[T] = typing.Callable[
22
- [T, str, dict[str, typing.Any]],
23
- typing.Awaitable[Result[typing.Any, typing.Any]],
24
- ]
25
-
26
- TRANSLATIONS_KEY: typing.Final[str] = "_translations"
27
- MORPH_IMPLEMENTATIONS_KEY = "__morph_implementations__"
28
- IMPL_MARK: typing.Final[str] = "_is_impl"
29
- CONTEXT_KEYS: typing.Final[tuple[str, ...]] = ("ctx", "context")
30
-
31
-
32
- class FuncParams(typing.TypedDict, total=True):
33
- args: list[tuple[str, typing.Any | inspect.Parameter.empty]]
34
- kwargs: list[tuple[str, typing.Any | inspect.Parameter.empty]]
35
- var_args: typing.NotRequired[str]
36
- var_kwargs: typing.NotRequired[str]
37
-
38
-
39
- @dataclasses.dataclass(slots=True, frozen=True)
40
- class Shortcut[T]:
41
- method_name: str
42
- executor: Executor[T] | None = dataclasses.field(default=None, kw_only=True)
43
- custom_params: set[str] = dataclasses.field(default_factory=lambda: set[str](), kw_only=True)
44
-
45
-
46
- def cache_magic_value(mark_key: str, /):
47
- def inner[Func: typing.Callable[..., typing.Any]](func: Func) -> Func:
48
- @wraps(func)
49
- def wrapper(
50
- f: Function | None = None,
51
- /,
52
- *args: typing.Any,
53
- **kwargs: typing.Any,
54
- ) -> typing.Any:
55
- if f is not None and mark_key not in f.__dict__:
56
- f.__dict__[mark_key] = func(f, *args, **kwargs)
57
- return f.__dict__[mark_key]
58
-
59
- return wrapper # type: ignore
60
-
61
- return inner
62
-
63
-
64
- def resolve_arg_names(func: Function, start_idx: int = 1) -> tuple[str, ...]:
65
- return func.__code__.co_varnames[start_idx : func.__code__.co_argcount]
66
-
67
-
68
- @cache_magic_value("__default_arguments__")
69
- def get_default_args(func: Function, /) -> dict[str, typing.Any]:
70
- defaults = func.__defaults__
71
- kwdefaults = {} if not func.__kwdefaults__ else func.__kwdefaults__.copy()
72
- if not defaults:
73
- return kwdefaults
74
- return {
75
- k: defaults[i] for i, k in enumerate(resolve_arg_names(func, start_idx=0)[-len(defaults) :])
76
- } | kwdefaults
77
-
78
-
79
- @cache_magic_value("__function_parameters__")
80
- def get_func_parameters(func: Function, /) -> FuncParams:
81
- func_params: FuncParams = {"args": [], "kwargs": []}
82
-
83
- for k, p in inspect.signature(func).parameters.items():
84
- if k in ("self", "cls"):
85
- continue
86
-
87
- match p.kind:
88
- case p.POSITIONAL_OR_KEYWORD | p.POSITIONAL_ONLY:
89
- func_params["args"].append((k, p.default))
90
- case p.KEYWORD_ONLY:
91
- func_params["kwargs"].append((k, p.default))
92
- case p.VAR_POSITIONAL:
93
- func_params["var_args"] = k
94
- case p.VAR_KEYWORD:
95
- func_params["var_kwargs"] = k
96
-
97
- return func_params
98
-
99
-
100
- def get_annotations(func: Function, *, return_type: bool = False) -> dict[str, typing.Any]:
101
- annotations = func.__annotations__.copy()
102
- if not return_type:
103
- annotations.pop("return", None)
104
- return annotations
105
-
106
-
107
- def to_str(s: str | enum.Enum) -> str:
108
- if isinstance(s, enum.Enum):
109
- return str(s.value)
110
- return s
111
-
112
-
113
- @typing.overload
114
- def magic_bundle(
115
- function: Function,
116
- kw: dict[str, typing.Any],
117
- *,
118
- start_idx: int = 1,
119
- omit_defaults: bool = False,
120
- ) -> dict[str, typing.Any]: ...
121
-
122
-
123
- @typing.overload
124
- def magic_bundle(
125
- function: Function,
126
- kw: dict[enum.Enum, typing.Any],
127
- *,
128
- start_idx: int = 1,
129
- omit_defaults: bool = False,
130
- ) -> dict[str, typing.Any]: ...
131
-
132
-
133
- @typing.overload
134
- def magic_bundle(
135
- function: Function,
136
- kw: dict[str, typing.Any],
137
- *,
138
- start_idx: int = 1,
139
- bundle_ctx: bool = False,
140
- omit_defaults: bool = False,
141
- ) -> dict[str, typing.Any]: ...
142
-
143
-
144
- @typing.overload
145
- def magic_bundle(
146
- function: Function,
147
- kw: dict[enum.Enum, typing.Any],
148
- *,
149
- start_idx: int = 1,
150
- bundle_ctx: bool = False,
151
- omit_defaults: bool = False,
152
- ) -> dict[str, typing.Any]: ...
153
-
154
-
155
- @typing.overload
156
- def magic_bundle(
157
- function: Function,
158
- kw: dict[type[typing.Any], typing.Any],
159
- *,
160
- start_idx: int = 1,
161
- typebundle: typing.Literal[True] = True,
162
- omit_defaults: bool = False,
163
- ) -> dict[str, typing.Any]: ...
164
-
165
-
166
- def magic_bundle(
167
- function: Function,
168
- kw: dict[typing.Any, typing.Any],
169
- *,
170
- start_idx: int = 1,
171
- bundle_ctx: bool = False,
172
- typebundle: bool = False,
173
- omit_defaults: bool = False,
174
- ) -> dict[str, typing.Any]:
175
- # Bundle considering the function annotations
176
- if typebundle:
177
- return {name: kw[t] for name, t in get_annotations(function, return_type=False).items() if t in kw}
178
-
179
- names = resolve_arg_names(function, start_idx=start_idx)
180
- # Determine if the function is only have the **kwargs parameter, then bundle all kw
181
- if "var_kwargs" in get_func_parameters(function) and not names:
182
- return {to_str(k): v for k, v in kw.items()}
183
-
184
- # Bundle considering the function parameters and defaults (if do not omit defaults)
185
- defaults = {} if omit_defaults else get_default_args(function)
186
- args = defaults | {n: v for k, v in kw.items() if (n := to_str(k)) in names}
187
-
188
- # Bundle a context if context key specified in `names`
189
- if bundle_ctx:
190
- for key in CONTEXT_KEYS:
191
- if key in names:
192
- args[key] = kw
193
- break
194
-
195
- return args
196
-
197
-
198
- def join_dicts[Key: typing.Hashable, Value](
199
- left_dict: dict[Key, typing.Any],
200
- right_dict: dict[typing.Any, Value],
201
- ) -> dict[Key, Value]:
202
- return {key: right_dict[type_key] for key, type_key in left_dict.items()}
203
-
204
-
205
- def get_cached_translation[Rule: ABCRule](rule: Rule, locale: str) -> Rule | None:
206
- return getattr(rule, TRANSLATIONS_KEY, {}).get(locale)
207
-
208
-
209
- def cache_translation[Rule: ABCRule](
210
- base_rule: Rule,
211
- locale: str,
212
- translated_rule: Rule,
213
- ) -> None:
214
- translations = getattr(base_rule, TRANSLATIONS_KEY, {})
215
- translations[locale] = translated_rule
216
- setattr(base_rule, TRANSLATIONS_KEY, translations)
217
-
218
-
219
- @typing.cast(typing.Callable[..., Impl], lambda f: f)
220
- def impl(method: typing.Callable[..., typing.Any]):
221
- setattr(method, IMPL_MARK, True)
222
- return classmethod(method)
223
-
224
-
225
- def get_polymorphic_implementations(cls: type[Polymorphic], /) -> list[typing.Callable[..., typing.Any]]:
226
- moprh_impls = getattr(cls, MORPH_IMPLEMENTATIONS_KEY, None)
227
- if moprh_impls is not None:
228
- return moprh_impls
229
-
230
- impls = []
231
- for cls_ in cls.mro():
232
- impls += [
233
- obj.__func__
234
- for obj in vars(cls_).values()
235
- if isinstance(obj, classmethod) and getattr(obj.__func__, IMPL_MARK, False)
236
- ]
237
-
238
- setattr(cls, MORPH_IMPLEMENTATIONS_KEY, impls)
239
- return impls
240
-
241
-
242
- def shortcut[T](
243
- method_name: str,
244
- *,
245
- executor: Executor[T] | None = None,
246
- custom_params: set[str] | None = None,
247
- ):
248
- """Decorate a cute method as a shortcut."""
249
-
250
- def wrapper[F: typing.Callable[..., typing.Any]](func: F) -> F:
251
- @wraps(func)
252
- async def inner(
253
- self: T,
254
- *args: typing.Any,
255
- **kwargs: typing.Any,
256
- ) -> typing.Any:
257
- if executor is None:
258
- return await func(self, *args, **kwargs)
259
-
260
- params: dict[str, typing.Any] = OrderedDict()
261
- func_params = get_func_parameters(func)
262
-
263
- for index, (arg, default) in enumerate(func_params["args"]):
264
- if len(args) > index:
265
- params[arg] = args[index]
266
- elif default is not inspect.Parameter.empty:
267
- params[arg] = default
268
-
269
- if var_args := func_params.get("var_args"):
270
- params[var_args] = args[len(func_params["args"]) :]
271
-
272
- for kwarg, default in func_params["kwargs"]:
273
- params[kwarg] = (
274
- kwargs.pop(kwarg, default) if default is not inspect.Parameter.empty else kwargs.pop(kwarg)
275
- )
276
-
277
- if var_kwargs := func_params.get("var_kwargs"):
278
- params[var_kwargs] = kwargs.copy()
279
-
280
- return await executor(self, method_name, get_params(params))
281
-
282
- inner.__shortcut__ = Shortcut( # type: ignore
283
- method_name=method_name,
284
- executor=executor,
285
- custom_params=custom_params or set(),
286
- )
287
- return inner # type: ignore
288
-
289
- return wrapper
290
-
291
-
292
- # Source code: https://github.com/facebookincubator/later/blob/main/later/task.py#L75
293
- async def cancel_future(fut: asyncio.Future[typing.Any], /) -> None:
294
- if fut.done():
295
- return
296
-
297
- fut.cancel()
298
- exc: asyncio.CancelledError | None = None
299
-
300
- while not fut.done():
301
- shielded = asyncio.shield(fut)
302
- try:
303
- await asyncio.wait([shielded])
304
- except asyncio.CancelledError as ex:
305
- exc = ex
306
- finally:
307
- # Insure we handle the exception/value that may exist on the shielded task
308
- # This will prevent errors logged to the asyncio logger
309
- if shielded.done() and not shielded.cancelled() and not shielded.exception():
310
- shielded.result()
311
-
312
- if fut.cancelled():
313
- if exc is None:
314
- return
315
- raise exc from None
316
-
317
- ex = fut.exception()
318
- if ex is not None:
319
- raise ex from None
320
-
321
- raise asyncio.InvalidStateError(
322
- f"Task did not raise CancelledError on cancel: {fut!r} had result {fut.result()!r}",
323
- )
324
-
325
-
326
- __all__ = (
327
- "Shortcut",
328
- "TRANSLATIONS_KEY",
329
- "cache_magic_value",
330
- "cache_translation",
331
- "cancel_future",
332
- "get_annotations",
333
- "get_cached_translation",
334
- "get_default_args",
335
- "get_default_args",
336
- "get_func_parameters",
337
- "get_polymorphic_implementations",
338
- "impl",
339
- "join_dicts",
340
- "magic_bundle",
341
- "resolve_arg_names",
342
- "shortcut",
343
- "to_str",
344
- )
@@ -1,151 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: telegrinder
3
- Version: 0.4.2
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>
10
- License: MIT License
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
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: 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
52
- Provides-Extra: all
53
- Requires-Dist: loguru>=0.7.0; extra == 'all'
54
- Requires-Dist: uvloop>=0.21.0; extra == 'all'
55
- Provides-Extra: fast
56
- Requires-Dist: uvloop>=0.21.0; extra == 'fast'
57
- Provides-Extra: loguru
58
- Requires-Dist: loguru>=0.7.0; extra == 'loguru'
59
- Provides-Extra: uvloop
60
- Requires-Dist: uvloop>=0.21.0; extra == 'uvloop'
61
- Description-Content-Type: text/markdown
62
-
63
- # Telegrinder
64
-
65
- Framework for effective and reliable telegram bot building.
66
-
67
- Still in development.
68
-
69
- * Type hinted
70
- * Customizable and extensible
71
- * Ready to use scenarios and rules
72
- * Fast models built on [msgspec](https://github.com/jcrist/msgspec)
73
- * Both low-level and high-level API
74
- * Support [optional dependecies](https://github.com/timoniq/telegrinder/blob/dev/docs/guide/optional_dependencies.md)
75
-
76
- # Getting started
77
-
78
- Install using pip:
79
-
80
- ```console
81
- pip install telegrinder
82
- ```
83
-
84
- Using poetry:
85
- ```console
86
- poetry add telegrinder
87
- ```
88
-
89
- Using uv:
90
-
91
- ```console
92
- uv add telegrinder
93
- ```
94
-
95
- Install from github:
96
-
97
- ```console
98
- pip install -U https://github.com/timoniq/telegrinder/archive/dev.zip
99
- ```
100
-
101
- ```console
102
- uv add "telegrinder @ git+https://github.com/timoniq/telegrinder.git@dev"
103
- ```
104
-
105
- ```console
106
- poetry add git+https://github.com/timoniq/telegrinder.git#dev
107
- ```
108
-
109
- Basic example:
110
-
111
- ```python
112
- from telegrinder import API, Message, Telegrinder, Token
113
- from telegrinder.modules import logger
114
- from telegrinder.rules import Text
115
-
116
- api = API(token=Token("123:token"))
117
- bot = Telegrinder(api)
118
- logger.set_level("INFO")
119
-
120
-
121
- @bot.on.message(Text("/start"))
122
- async def start(message: Message) -> None:
123
- me = (await api.get_me()).unwrap()
124
- await message.answer(f"Hello, {message.from_user.full_name}! I'm {me.full_name}.")
125
-
126
-
127
- bot.run_forever()
128
- ```
129
-
130
- # Documentation
131
-
132
- [Readthedocs](https://telegrinder.readthedocs.io)
133
-
134
- # Community
135
-
136
- Join our [telegram forum](https://t.me/botoforum).
137
-
138
- # [Contributing](https://github.com/timoniq/telegrinder/blob/main/contributing.md)
139
-
140
- # License
141
-
142
- Telegrinder is [MIT licensed](./LICENSE)\
143
- Copyright © 2022-2025 [timoniq](https://github.com/timoniq)\
144
- Copyright © 2024-2025 [luwqz1](https://github.com/luwqz1)
145
-
146
- # Contributors
147
-
148
-
149
- <a href="https://github.com/timoniq/telegrinder/graphs/contributors">
150
- <img src="https://contributors-img.web.app/image?repo=timoniq/telegrinder" />
151
- </a>
@@ -1,182 +0,0 @@
1
- telegrinder/__init__.py,sha256=Gp0nHwVBqk024sFO40CVWgbtnKG2WYG-2czdlmO6zXA,5941
2
- telegrinder/model.py,sha256=CrN2XOMG_rPFN5jF-QQeNGyepwT3DuBzWLm7oqIMajI,6106
3
- telegrinder/modules.py,sha256=XcEIjz67xAKcYQfNVIm4VfidMa3M43iDcfUaX6QKFX8,7826
4
- telegrinder/msgspec_json.py,sha256=eDuRTP_bFYWtNPDINuzY2OGKXbdleaKyXh2mQgfJdMk,237
5
- telegrinder/msgspec_utils.py,sha256=PYs3-qQ0HoP4JzDg-8c0gC0ZIe-UmMkTHhOBnPWEIfQ,14303
6
- telegrinder/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- telegrinder/rules.py,sha256=BFB8RFwKKxqs9HFfo_p0RfulQNonPZAX8cHpmnG7qCU,39
8
- telegrinder/verification_utils.py,sha256=Tp-XEp5nu4ih67jbrgU5USSNRgzlILMrfKgfGENYBtg,985
9
- telegrinder/api/__init__.py,sha256=RuqIF0RsCEGZth6Nc8_6lOYxr9e50Bx5OiR212U3XwU,264
10
- telegrinder/api/api.py,sha256=DqeSvQcHKVbvkAv7o6r2wCVZM2fcox1DfKHiUWlgggY,3417
11
- telegrinder/api/error.py,sha256=tYgJtqDakXO2ef_MvhTmNuWALktefpVlyJMfXM0Btg8,440
12
- telegrinder/api/response.py,sha256=PVTprCDhBBS_8KB5acUs739tfq_SCwZYJ6IB-2sroio,513
13
- telegrinder/api/token.py,sha256=q2wP2GNy14LdNA3kHBJtSw3-bHZ0ADm_ASesbVWQXSE,951
14
- telegrinder/bot/__init__.py,sha256=c8vMIjXEOZIuRccrxlRpcpbr-HzvMKxe6HrrIKlH8NM,2945
15
- telegrinder/bot/bot.py,sha256=jx4ZJHBFSMCTUDgsv0fFocEr6Ti9foEnROB9sYTkyQY,3134
16
- telegrinder/bot/cute_types/__init__.py,sha256=zytO2K8RuTjlhojRJlfApae9YSOu39GWsAwdffaok-I,746
17
- telegrinder/bot/cute_types/base.py,sha256=kkzYW4fntazqe3n3KH8aETgT-yAyVWW15agCWiQWDeI,6422
18
- telegrinder/bot/cute_types/callback_query.py,sha256=vWnyO7dNJ_7EBYmVwurzDC606RS_99inwP9nK_6gGDo,19499
19
- telegrinder/bot/cute_types/chat_join_request.py,sha256=LWs8Vta27czrZxFtKu8TkjVE4_n9s7H_OLk6r6tyJh4,2056
20
- telegrinder/bot/cute_types/chat_member_updated.py,sha256=oVvQ12FSFSL9UC87r7fPuhDv0kOzk7LC8dvXZKKbVus,6251
21
- telegrinder/bot/cute_types/inline_query.py,sha256=XAz63x7mKaYWVvSJQ7pq_hi5DWw-tiVSiPfj_rqAChc,1550
22
- telegrinder/bot/cute_types/message.py,sha256=wn1ps4KebSESZ0_PDtdNtRUjCY0KG_XQ-EDsfsh1nMI,145233
23
- telegrinder/bot/cute_types/pre_checkout_query.py,sha256=y8QgqcvCqVMNmh7JfGQeRYlphH4LF_WAQAwrBPlxWk8,1612
24
- telegrinder/bot/cute_types/update.py,sha256=4OKBSK0_EgUQTKcHpO5XT4frzhFG84vfQDaADPGTLoM,4181
25
- telegrinder/bot/cute_types/utils.py,sha256=lt7ycHophjM5A3T20p6PdbO6bXfvKcWOAIsrWJqS9Gc,1563
26
- telegrinder/bot/dispatch/__init__.py,sha256=agSk03df-VD9Odo8JqfgF8lzW8JWcaXhv3a647hUW0o,2591
27
- telegrinder/bot/dispatch/abc.py,sha256=8BaLdmupx7Ch0zd5g6jwcTLdidKPFZVaL3kGpzLjpeE,2341
28
- telegrinder/bot/dispatch/context.py,sha256=-_beXNZ82zpccDOMwO8_WK5_UcXBR6JebnqowOBk570,2727
29
- telegrinder/bot/dispatch/dispatch.py,sha256=bK0IQeo0UZ_wYJccrNYLTHA481yV1l7OfPyPgYO1V60,7899
30
- telegrinder/bot/dispatch/process.py,sha256=-gZ8BjMti1HXCDQmrnimwOULujJJlk0aKTSpa6QRDHs,4716
31
- telegrinder/bot/dispatch/handler/__init__.py,sha256=PL17gyh9u9fHHz1yTglyBpRGoioqdMD5UxFAtmTidC0,911
32
- telegrinder/bot/dispatch/handler/abc.py,sha256=JKLxHaxq9YjBe4xs1_fMYfMRy7U8TJNGtgmbtY0l0Ao,596
33
- telegrinder/bot/dispatch/handler/audio_reply.py,sha256=MZkWROKdugRcu02-HHq_p8ZsCGxKLkrLJdZmfeOj98g,1340
34
- telegrinder/bot/dispatch/handler/base.py,sha256=xrM6K4PNxwh37s_L6Y-9M7phaEkU9k1Bx5BQnur8kWE,1780
35
- telegrinder/bot/dispatch/handler/document_reply.py,sha256=YYcC_4658eN56hlNgGPU2J8WQM6r53TPnHkYpUp4aHQ,1367
36
- telegrinder/bot/dispatch/handler/func.py,sha256=5CjSVEsr6NQHffHGLPZ7qN1qmMX4eV-5BEEjTpFSMfY,4997
37
- telegrinder/bot/dispatch/handler/media_group_reply.py,sha256=57Mqun52VsJblkde8IiSYZF-yBrSwpiqe3nDv0xFsd8,1401
38
- telegrinder/bot/dispatch/handler/message_reply.py,sha256=E5aH3omcdhxrxe98ysrJcoJtZR7mAYP8T859cS0k3UM,1119
39
- telegrinder/bot/dispatch/handler/photo_reply.py,sha256=iyfNeCLgn3j6wyEIcJqUyAoUT6kur0DHtbGFLymHEZI,1340
40
- telegrinder/bot/dispatch/handler/sticker_reply.py,sha256=ihnJtmqMBsFsySNsP7Jzu3hcC09OWhwthvRiCObGHmQ,1185
41
- telegrinder/bot/dispatch/handler/video_reply.py,sha256=kqwJHxFNQ2_foWzZ59QgX2VEE3yvUlVfwh_sFaFk4Xg,1340
42
- telegrinder/bot/dispatch/middleware/__init__.py,sha256=znQGQ0jnBioEXr-2RPHOkmDbjei4LEbaTjgiE9c8aXI,96
43
- telegrinder/bot/dispatch/middleware/abc.py,sha256=CkZc3uW2IAZAFAdb37Cc2ViAe2kfnQ07wubjLDFsPlY,3208
44
- telegrinder/bot/dispatch/middleware/global_middleware.py,sha256=6k4dY8ax5djqQ0KBlO8F-rK86VGh6sK_VQjMFygQbFI,2523
45
- telegrinder/bot/dispatch/return_manager/__init__.py,sha256=ubhWS1MUT0928-KYNZLyM8CKFwTtXoh1QVUf4Xh9V-w,728
46
- telegrinder/bot/dispatch/return_manager/abc.py,sha256=PK8p2rHNR_7RNIAsFNWbgtN_xfYj_LqDkOA8xQ_1emg,3619
47
- telegrinder/bot/dispatch/return_manager/callback_query.py,sha256=x7FT1PioR6USsfeyNVyy8mWvP4Vkq-sysIl1OpZm-fI,722
48
- telegrinder/bot/dispatch/return_manager/inline_query.py,sha256=pM41c53TyPkVY5o5HPBDjgUoyw0w68Kmi9BQcTsXRGc,543
49
- telegrinder/bot/dispatch/return_manager/message.py,sha256=cLnY3sAJCvVr1iA3GpakwngHrm_5STPMES2ip0VhkuQ,1238
50
- telegrinder/bot/dispatch/return_manager/pre_checkout_query.py,sha256=M0o1rkNpFNa7m1bATmTC9ZDJCy4eE3e6MnZaknziOw8,735
51
- telegrinder/bot/dispatch/view/__init__.py,sha256=7nmeWaT94em5IASMUlx8negkZKoOjgm-ap7tya5JAC8,957
52
- telegrinder/bot/dispatch/view/abc.py,sha256=1uqf0YUxezO4B-ApXBSWk2SErcHtDLvoOEc7flmazV0,1048
53
- telegrinder/bot/dispatch/view/base.py,sha256=X37M_xjZsgYhcyoorveVLQU57pEtsOGKsT4bBkBwXs8,7587
54
- telegrinder/bot/dispatch/view/box.py,sha256=WDIBZ24_53KHlDFr6oj17XP0EJLdV0bOoCvBfKVpcPg,5883
55
- telegrinder/bot/dispatch/view/callback_query.py,sha256=naur6BpqKa_UgYQBHzpeYNUN3q7Gl5r2vpbuNti3MHM,576
56
- telegrinder/bot/dispatch/view/chat_join_request.py,sha256=Xt_YmuweXJ4XjBJS1wvpIxoJmSigV2m0JCKZ4NbSsFE,356
57
- telegrinder/bot/dispatch/view/chat_member.py,sha256=OOJeedTPPC5Bf7kpWqXKcblq7aJ7J-SXZwx3I4sNrA4,1160
58
- telegrinder/bot/dispatch/view/inline_query.py,sha256=gfGidFVGTGvHOIxPpkPVljUMkJJSDa8kiN549tQLKU4,530
59
- telegrinder/bot/dispatch/view/message.py,sha256=RB75IUCnvodseQ5gyiQY77adWD_OD2E9hzCoz0wZDX8,1373
60
- telegrinder/bot/dispatch/view/pre_checkout_query.py,sha256=EMEISukuS45J4a_1UH_rRhCyFoaIEEscuXe0s8Me4Mc,578
61
- telegrinder/bot/dispatch/view/raw.py,sha256=HD1iRuRqNw_6dRa-eO2SGR1j_4E_-AjHYUI07b9RS_E,3858
62
- telegrinder/bot/dispatch/waiter_machine/__init__.py,sha256=2I3MQpTAVFCHoHJUxAPCWUyasGOkdGSBKRETiTLgBpg,862
63
- telegrinder/bot/dispatch/waiter_machine/actions.py,sha256=omU5poxjDz9D800Zu4GjXPOW44m4-UqJ8pO9FjRV8iQ,376
64
- telegrinder/bot/dispatch/waiter_machine/machine.py,sha256=uI_tx8VsbVAjHg-NK5ZlGsWVGIyvYcRj2hXTJrkXrKk,9012
65
- telegrinder/bot/dispatch/waiter_machine/middleware.py,sha256=9uULMp-oF_WSOfU1jQk-D5F1pixmO0i1zj0VdfW5jXc,3075
66
- telegrinder/bot/dispatch/waiter_machine/short_state.py,sha256=rBLkSgSQvHAO-9XkL5ScAu2gjf42NxOrkJV2tRR64Kk,1739
67
- telegrinder/bot/dispatch/waiter_machine/hasher/__init__.py,sha256=nu0WhOWmGkhybOP-faiAFEx1nlYo_N_LW2AuAmbC_Z0,497
68
- telegrinder/bot/dispatch/waiter_machine/hasher/callback.py,sha256=W-caGejmYBRx-yWdUPH-D54yPPBtESrroNLyVog8e2I,1587
69
- telegrinder/bot/dispatch/waiter_machine/hasher/hasher.py,sha256=EHBdcAJEeB7_AA0RnLc8JogsEVy82Y-U4kktk3fAs5g,1845
70
- telegrinder/bot/dispatch/waiter_machine/hasher/message.py,sha256=NoT2BaTrHVnyaaXsXTkf8riJZp8473-T3EXNri4y70I,1253
71
- telegrinder/bot/dispatch/waiter_machine/hasher/state.py,sha256=D1j8H8XwML0nPPYcDBy9QWM5OAXi3mch5ElUOo7-RmA,677
72
- telegrinder/bot/polling/__init__.py,sha256=OqfIFPS_V6UrCg-vCv9pkMFzTKdNbDP2faBfATs_TGg,94
73
- telegrinder/bot/polling/abc.py,sha256=qFiKzWTWENK-sSuShC5cPlM-JS4In2c8-1_ARdwdTms,442
74
- telegrinder/bot/polling/polling.py,sha256=76YLN_MN85UF69LBNDzihRAz04cnUchtxL8n8SmtoZo,5514
75
- telegrinder/bot/rules/__init__.py,sha256=KtZgJP3vbSJxqEyOm4b-i5nfMa79LsYkW3ylg0LJVyU,3426
76
- telegrinder/bot/rules/abc.py,sha256=UE4lMr7jMQ5g3upnRR6sOxlOPydu-ZsAIcPXrnRlthg,6721
77
- telegrinder/bot/rules/callback_data.py,sha256=I8k2ih0uQ4S6TbebGp8_se9edR2YBjIepgBYCZtHCPE,4379
78
- telegrinder/bot/rules/chat_join.py,sha256=Tk3XQntpEkibb0g1dft6YmPD7pg9EH_w1IzMAkOmdrY,1355
79
- telegrinder/bot/rules/command.py,sha256=Ppp2ewM6IF07tX8ik5XbObv1UllhA4RNIEgUQhFPreM,3898
80
- telegrinder/bot/rules/enum_text.py,sha256=RmamlxJ_rRHbcHXbjfOkeseSZo2uPVS8E07btdqxAAI,907
81
- telegrinder/bot/rules/func.py,sha256=r1ftBgIA9a_oTCx2IWTPmf2-ZvoMNJVTcYFjoOHsy1w,844
82
- telegrinder/bot/rules/fuzzy.py,sha256=SmJkL9nKL64OGj8OziHDgkKQcpQNq-Gt8hXnEmovFZ0,673
83
- telegrinder/bot/rules/id.py,sha256=B5A4gIqe54gnpjerJRm7coRANBbh6rjY1mUcoqeU0Rg,591
84
- telegrinder/bot/rules/inline.py,sha256=Sm-FGkOf_k_NtlxmdKrXzLLGIMq67K5wwScd-9FA5Eg,1912
85
- telegrinder/bot/rules/integer.py,sha256=Hjn-tC775-OSYb58Z3a1IT4XsESiLl1YDKy-tsEZjVM,480
86
- telegrinder/bot/rules/is_from.py,sha256=_ZFdPg6zAsXJ8Cb-sjcRc9fsonzmvGJvh-5Fca2JPTI,3700
87
- telegrinder/bot/rules/logic.py,sha256=38zsHIyQa2jdBHxQBrppwi1-LJKkYmtnTlFoQKatlC8,598
88
- telegrinder/bot/rules/markup.py,sha256=vi1n7rrzzTD5YW-wd5yCelV7thVZoMVH5HZsMI7RCh8,1360
89
- telegrinder/bot/rules/mention.py,sha256=u5VQbEwb1BuYmXMLE0bxLde4fDcvEGCq3JAg0dhuaN8,429
90
- telegrinder/bot/rules/message.py,sha256=lozu87O7-GbsZrhC9F-AqBa4Nlemr9WfCnjzG2lgPfM,420
91
- telegrinder/bot/rules/message_entities.py,sha256=ALWS6mgWWvu0NxmRHRt85c0jrcI8FT39oYWqL11fV5E,1057
92
- telegrinder/bot/rules/node.py,sha256=5n8lGOfNX9hVzpuzmRQDDzsI403Kyc2xiCXSyDbnYK8,1013
93
- telegrinder/bot/rules/payload.py,sha256=8shfNd7q34q_peSPCllauJOkeVw21HPCrfY2UV-vFhI,2581
94
- telegrinder/bot/rules/payment_invoice.py,sha256=h3G4BdgFa2huo9H3vdigZ2iUkzQc7spfpySAqH58aOo,901
95
- telegrinder/bot/rules/regex.py,sha256=OlU_uVlLGsooYs7oA5K-XJ3Gns5jslqveNilDK6FHi8,1165
96
- telegrinder/bot/rules/rule_enum.py,sha256=35GwPKLBTG_ESn4TZLcFJTLNjYXAi_d9wrfIDexoEH8,2113
97
- telegrinder/bot/rules/start.py,sha256=AipwfOQ2LGCofvgouRmkIiY9mGFLlEUJ-7a3CLIiy4Q,1147
98
- telegrinder/bot/rules/state.py,sha256=T0pMFprklUIHKHD-1Gwksn0f8chRHS_MfBjyiNamMLc,922
99
- telegrinder/bot/rules/text.py,sha256=S-gnf38Kk2KBOf7JLK_AsFU8WvRSK8m4Q_1Rq_v2B74,1171
100
- telegrinder/bot/rules/update.py,sha256=-mE12-xy0AjOz9RVRVZ8vS7ohGCuf_bNmG26rDbrjfg,392
101
- telegrinder/bot/scenario/__init__.py,sha256=nnPjdxdvjoEYYMRUEfWvIhZStiY1C984x1azdRRP9II,136
102
- telegrinder/bot/scenario/abc.py,sha256=ZjcHJyVuUeNKHIHWd_3bNBxuklNMLM-HsBadLnDVzm8,409
103
- telegrinder/bot/scenario/checkbox.py,sha256=4vfpbRMUFxa06ZKfYcIsVOH6-UWhAn4MjhmU9kGOVAc,5174
104
- telegrinder/bot/scenario/choice.py,sha256=VOuIrDGnX2IMrU11TMYp_9VIyhc0EAOUvqYP99Fp1Jk,1706
105
- telegrinder/client/__init__.py,sha256=2TfRdGAokRyuQhwu09u0KAXc9cLIch9WJtBIjgj49yg,281
106
- telegrinder/client/abc.py,sha256=rEDgfuo8dufkCY5o9ijgDawAmEuhzGDNj9WrdqUUMA8,2431
107
- telegrinder/client/aiohttp.py,sha256=v5R-WZS8AwaypHsY12jT6VbI9GN763O0y69DYA3qZZ0,3932
108
- telegrinder/client/form_data.py,sha256=XpSrM6b42lnoUDR7rnFko7agDzjnuChrCyjp-cACGHE,689
109
- telegrinder/client/sonic.py,sha256=MZ1ZdVUlwoXkKrfzaV08n4q0M3IYfHKd3UGttVcfK8g,6523
110
- telegrinder/node/__init__.py,sha256=WbargilSBjZHE1CUKZzbjZpZx5hl_XOw565Ecy4PRCk,2268
111
- telegrinder/node/attachment.py,sha256=ocSUsqnPJEIq5aaj5-xKbKmoifnoA1fhlp2brZLJgXY,4857
112
- telegrinder/node/base.py,sha256=xlqwSPuwDc5FCr-1cJkAafW2_NlZm0o2nAQI7_wYPsQ,8249
113
- telegrinder/node/callback_query.py,sha256=mcB1mTC20ycwrdV-xjsp0OP7Hgh4umQM8Lb8p4wbHe0,1576
114
- telegrinder/node/command.py,sha256=0uK1hdAIuTmtKguvUDM39nyLpTV6h_xlIkBytaiSdyc,976
115
- telegrinder/node/composer.py,sha256=pWFlzQOPxh02qL_fAu8EdpUfADorxxiev-CTX6X6GwM,5602
116
- telegrinder/node/container.py,sha256=xtPMsPhfXUQAnS-sEvUKPhT-a3pkvUXOUjyD8gJKG_Y,1118
117
- telegrinder/node/either.py,sha256=waeBVmi5SrZIGQ0xSR633xcnCgZ3MvwIweM11DhocCU,2905
118
- telegrinder/node/event.py,sha256=KItU-Pf7mT-ztTnVethqd63hkwwOTnqB6smasxRwk00,1842
119
- telegrinder/node/file.py,sha256=88fS9tDfGpElrqEb1ejY-kpfc0dPkgZMHFNN_wpavO8,1430
120
- telegrinder/node/me.py,sha256=mBP1i1Jto0XMS9ZYgfRtte9QPfrak0ARgBDJvGQ6CX4,414
121
- telegrinder/node/payload.py,sha256=Z3rjzux4oB6OKNK0kB7JALp6hclxF174N8WUj3l6FnE,2706
122
- telegrinder/node/polymorphic.py,sha256=S6nnB8PkqIllCTN7x1G_M5bs9jx2OUCFfFWTOAwONAA,2665
123
- telegrinder/node/rule.py,sha256=pwCHC7Z2IRR-q7ewDB_cjCmbYJsdkftF0QD4r889HQs,2381
124
- telegrinder/node/scope.py,sha256=tq9TyKyUeiRl0WpAyBAVTBdF9pKC_z0X0MxuxwLBQ8M,734
125
- telegrinder/node/source.py,sha256=pUBICRo8bkcgzdUW60cy6fsmjAZGv2efBhaQWHTp2Y0,2691
126
- telegrinder/node/text.py,sha256=vx9gQscBAqwG0e5zm9p1bt6D7yMnp1JS_NWbuZe4Rrw,1379
127
- telegrinder/node/tools/__init__.py,sha256=iyjs82g3brYGzpPsUQaoK6_r7YuQhRkJ61YjjuPOx9E,67
128
- telegrinder/node/tools/generator.py,sha256=4zbAASQmSJGiEPBWbHh1F0mXJrCuc4oXHI-kB51I3qQ,973
129
- telegrinder/tools/__init__.py,sha256=9PkcZsbdHbmQ_2-F_OVQeuBcUYwDFyiU8hnJt8mr5pY,4488
130
- telegrinder/tools/buttons.py,sha256=Ez99XgIcg4_6mtdDvkN0Uq4VkcpgcGE1cufSitXe61A,3904
131
- telegrinder/tools/functional.py,sha256=pkCVxLIyOLlO-hVtT5xz7LLFdLFbwQ7a0NTqhLV2jJs,201
132
- telegrinder/tools/input_file_directory.py,sha256=F77qMxG7reK8VX6rnHKbYZhzQAzw229Q20K8q0CF0cw,839
133
- telegrinder/tools/keyboard.py,sha256=BvxGs6RvXpqbWBEUVqKKij-Nw4acgXpH7u7fU_N9rP0,3791
134
- telegrinder/tools/lifespan.py,sha256=2-vGm8Jb9Hpx0mvhWRpSvIRiibtAPJnYSQuAE-QEo-A,3199
135
- telegrinder/tools/limited_dict.py,sha256=ySot8-lVd0XkRcxl_R9dvTb0g8OfspsbSXQdlB7mVgo,1039
136
- telegrinder/tools/magic.py,sha256=z6soR2gU_FlxO5MhDbJg2_aQi6BUTEuGRRA5mQVaV2c,10122
137
- telegrinder/tools/parse_mode.py,sha256=JyQ-x9YAMPLhIIiUX01acyKkpWgs5TBA07W-iUyPHpE,92
138
- telegrinder/tools/strings.py,sha256=rb8tAmEqkkJnEAIVqME1LpV4GICBZ2IbfUJ_nd7F2Mo,285
139
- telegrinder/tools/adapter/__init__.py,sha256=ZOnQl0uu7UGshKKopH5ZkFtg5N-LMrI8FXwIVTMuNDw,633
140
- telegrinder/tools/adapter/abc.py,sha256=vq1Q8PzdjtkiJPtjuFg9UJJxcnlvaABlUxTy4NCGOOw,1333
141
- telegrinder/tools/adapter/dataclass.py,sha256=x6xAjHB8CngwhDbOxIupgzusiP0RXtRH2z4diz4drm8,2232
142
- telegrinder/tools/adapter/errors.py,sha256=2r_UBTWm5-heU-NchBfobC1f848EWeC64nKvprGnAAY,73
143
- telegrinder/tools/adapter/event.py,sha256=1O3Y10JJh4NekmaXLu5z3JyB9L-4G9CyFu3ffoWZcxw,2369
144
- telegrinder/tools/adapter/node.py,sha256=APX_hXf5R16vPULvfUlhh9jr9X4q_aFSyItDKstlXdM,1572
145
- telegrinder/tools/adapter/raw_event.py,sha256=Ve2ziMogw533B8K_DXRBpqQGnjnjGFXu7qeYiF-stc0,975
146
- telegrinder/tools/adapter/raw_update.py,sha256=o-posiO4C_YRMi2KXYGjRKdKJM0wOke90x5aYPB9ZGE,997
147
- telegrinder/tools/callback_data_serilization/__init__.py,sha256=mavF_sXLzhcF2xZ00Z2_jbKzAc2xx4xDUTCMNJUJL8I,187
148
- telegrinder/tools/callback_data_serilization/abc.py,sha256=OgzpVKw12kbabTxzoNid0a1mrjb1GYvYyYp0BU4TYik,1232
149
- telegrinder/tools/callback_data_serilization/json_ser.py,sha256=gjgOJMcTmahqZUEOjZatgsqmSFi7BAyOy20FErmlxJE,1952
150
- telegrinder/tools/callback_data_serilization/msgpack_ser.py,sha256=BREZllzEFuILtWIx46moImpOgrNK3BB2K-oGHhQ5Htw,6972
151
- telegrinder/tools/error_handler/__init__.py,sha256=WmYWZCNhhSk32j4lIOltEwzoYUx086TGTbOF5h3Ps7s,207
152
- telegrinder/tools/error_handler/abc.py,sha256=0SJoKDRKFLn83tXvjIFYEm_OWoYt4kWg2v7zCn-5vYo,771
153
- telegrinder/tools/error_handler/error.py,sha256=uLcG-wqyOeCEB45m8vMcGy5kZ87bGHUS_-fPw2cGE9s,221
154
- telegrinder/tools/error_handler/error_handler.py,sha256=bvCPnoTQpIB2nbTMp8YtfN2G6ROVd5VvWiumULVJm8s,5897
155
- telegrinder/tools/formatting/__init__.py,sha256=-OwOBkYwg3Dj7fL5gKpTSMDLb2rRmLHWt1DgsswFORY,2162
156
- telegrinder/tools/formatting/deep_links.py,sha256=o9bE3sADuTt_DluGR6yqQ3GLBFxXODeI1r3LUqEReDU,19576
157
- telegrinder/tools/formatting/html_formatter.py,sha256=5r2lryBksrarn9Ejt4mp_0ZZHd8CX310Six82wn1BjM,7854
158
- telegrinder/tools/formatting/spec_html_formats.py,sha256=YyppEtrgwRTrjK8h5nwIIYaPQXGovYEXarMpk5EPNKs,1542
159
- telegrinder/tools/global_context/__init__.py,sha256=5pF9growKd28WO739wk_DZUqCDw5hxs6eUcDtxTosX8,290
160
- telegrinder/tools/global_context/abc.py,sha256=twwAmbTk49KGl_POImr4yj6POr-zdx8mz74McuphZH0,1644
161
- telegrinder/tools/global_context/global_context.py,sha256=ddKLJyyczORxqb3AbAGG6YeYfV2mL55TNehG6NZMk_E,13626
162
- telegrinder/tools/global_context/telegrinder_ctx.py,sha256=lEbJqgC0Ex3Cgeu3ufqbD-iVlGRNiB37N1Hto3wmf0Y,707
163
- telegrinder/tools/i18n/__init__.py,sha256=jMrrdFexgMU-BUiKf-p22VowQaqtQeaCb-Cs0fq2Tls,287
164
- telegrinder/tools/i18n/abc.py,sha256=jxJVYiTplJaNeklkGiin-m7BkfZiac2fbVXTEdhNw6o,726
165
- telegrinder/tools/i18n/simple.py,sha256=w2SlMKYqJbDK9ScTwCAB6pdskqwtmqV7pK8yEhSUFDA,1564
166
- telegrinder/tools/i18n/middleware/__init__.py,sha256=a0yJUYmDbl1Mqf_cWx2TTmA3_Andlk8ixLJyDYAA23I,81
167
- telegrinder/tools/i18n/middleware/abc.py,sha256=RQLDDEGXseaf2E4XGvtof_2CxhOzHnMLXMvhb6PkWg8,701
168
- telegrinder/tools/loop_wrapper/__init__.py,sha256=ZQ5jmE1lOKnqJlMZ9k2OYmjvOEhOlHPijUWqZ4nHIgk,165
169
- telegrinder/tools/loop_wrapper/abc.py,sha256=aZG2OGoQKLUxeO6WZ_gluFAjRHubeMfKxmKeIG7isYI,383
170
- telegrinder/tools/loop_wrapper/loop_wrapper.py,sha256=t31AYkk1S_uyoq4MJMQCkoC6_fSvfON3NjBBKEuQy5U,5160
171
- telegrinder/tools/state_storage/__init__.py,sha256=G2EK2HwS0NbRQIu0OotVlgEYtO_GuzN1aJOIxmDEtz4,211
172
- telegrinder/tools/state_storage/abc.py,sha256=GufeznJI1AF2Cl0D6J3MW94UvsL_QHuOnlEc1lqQNss,878
173
- telegrinder/tools/state_storage/memory.py,sha256=nbCHHhN3YmjvnbrS_5cLvwrkuJgFA0qGVuAsqhBGNyY,740
174
- telegrinder/types/__init__.py,sha256=9uF3fmerYcpt0B_3ycj-2AoAv-KVShlUAAaePo65wfY,6844
175
- telegrinder/types/enums.py,sha256=xK3_4GrM5U3mIezwgzvu-C7Xx_GUQqfQRGEDPaURiec,19060
176
- telegrinder/types/input_file.py,sha256=xwzag5QvhAUAraw_qeoOQjG6Qqf72GLtQKbHB6VUblI,1440
177
- telegrinder/types/methods.py,sha256=D45Ou7BrNRqCGRGpatBnMGoM7ZbsXTHq42EBb7ZasrM,219112
178
- telegrinder/types/objects.py,sha256=jZCyM1-A6msV9XZQcVqVN-pEh_P1qw62kj2Xh-caycU,299955
179
- telegrinder-0.4.2.dist-info/METADATA,sha256=oL_EoJvJucIYBRfonzaYHiYqRqxCnSFaUJnGd8ZywJM,4921
180
- telegrinder-0.4.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
181
- telegrinder-0.4.2.dist-info/licenses/LICENSE,sha256=mKmh92w0b8JKW6Z72AJ00ZtKS_9ZhTH7uevlEspyVD4,1100
182
- telegrinder-0.4.2.dist-info/RECORD,,