aiogram-webhook 3.2.0__tar.gz → 3.3.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.
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/PKG-INFO +2 -1
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/pyproject.toml +3 -2
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/pyproject.toml.orig +3 -2
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/route/__init__.py +2 -2
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/route/params.py +2 -8
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/route/query.py +2 -6
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/route/route.py +1 -3
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/web/aiohttp.py +4 -1
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/README.md +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/__init__.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/configs/__init__.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/configs/bot.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/configs/webhook.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/engines/__init__.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/engines/base.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/engines/errors.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/engines/multi.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/engines/single.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/engines/target.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/engines/token.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/errors.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/gate.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/logs.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/py.typed +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/route/config.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/route/errors.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/route/path.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/route/url.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/security/__init__.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/security/checks/__init__.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/security/checks/check.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/security/checks/ip.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/security/errors.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/security/secret_token.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/security/security.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/tasks.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/utils/__init__.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/utils/_payload.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/utils/config.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/web/__init__.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/web/_starlette.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/web/base.py +0 -0
- {aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/web/fastapi.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: aiogram-webhook
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Summary: A python library for integrating webhook support with multiple web frameworks in aiogram. Organizes bot operation via webhooks for both single and multi-bot setups.
|
|
5
5
|
Keywords: aiogram,multibot,telegram,webhook,fastapi,aiohttp
|
|
6
6
|
Author: m-xim
|
|
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
15
16
|
Classifier: Topic :: Software Development :: Libraries
|
|
16
17
|
Classifier: Operating System :: OS Independent
|
|
17
18
|
Classifier: Typing :: Typed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "aiogram-webhook"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.3.0"
|
|
4
4
|
description = "A python library for integrating webhook support with multiple web frameworks in aiogram. Organizes bot operation via webhooks for both single and multi-bot setups."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -25,6 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Programming Language :: Python :: 3.12",
|
|
26
26
|
"Programming Language :: Python :: 3.13",
|
|
27
27
|
"Programming Language :: Python :: 3.14",
|
|
28
|
+
"Programming Language :: Python :: 3.15",
|
|
28
29
|
"Topic :: Software Development :: Libraries",
|
|
29
30
|
"Operating System :: OS Independent",
|
|
30
31
|
"Typing :: Typed",
|
|
@@ -58,7 +59,7 @@ dev = [
|
|
|
58
59
|
]
|
|
59
60
|
|
|
60
61
|
[build-system]
|
|
61
|
-
requires = ["uv_build<0.
|
|
62
|
+
requires = ["uv_build<0.14"]
|
|
62
63
|
build-backend = "uv_build"
|
|
63
64
|
|
|
64
65
|
[tool.pytest.ini_options]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "aiogram-webhook"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.3.0"
|
|
4
4
|
description = "A python library for integrating webhook support with multiple web frameworks in aiogram. Organizes bot operation via webhooks for both single and multi-bot setups."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { text = "MIT" }
|
|
@@ -28,6 +28,7 @@ classifiers = [
|
|
|
28
28
|
"Programming Language :: Python :: 3.12",
|
|
29
29
|
"Programming Language :: Python :: 3.13",
|
|
30
30
|
"Programming Language :: Python :: 3.14",
|
|
31
|
+
"Programming Language :: Python :: 3.15",
|
|
31
32
|
"Topic :: Software Development :: Libraries",
|
|
32
33
|
"Operating System :: OS Independent",
|
|
33
34
|
"Typing :: Typed",
|
|
@@ -58,7 +59,7 @@ dev = [
|
|
|
58
59
|
]
|
|
59
60
|
|
|
60
61
|
[build-system]
|
|
61
|
-
requires = ["uv_build<0.
|
|
62
|
+
requires = ["uv_build<0.14"]
|
|
62
63
|
build-backend = "uv_build"
|
|
63
64
|
|
|
64
65
|
[tool.pytest.ini_options]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from aiogram_webhook.route.params import BotIdParam, BotTokenParam
|
|
1
|
+
from aiogram_webhook.route.params import BotIdParam, BotTokenParam, RouteParam
|
|
2
2
|
from aiogram_webhook.route.query import Const, Ref
|
|
3
3
|
from aiogram_webhook.route.route import Route
|
|
4
4
|
|
|
5
|
-
__all__ = ("BotIdParam", "BotTokenParam", "Const", "Ref", "Route")
|
|
5
|
+
__all__ = ("BotIdParam", "BotTokenParam", "Const", "Ref", "Route", "RouteParam")
|
|
@@ -9,16 +9,10 @@ RouteParams: TypeAlias = Mapping[str, Any]
|
|
|
9
9
|
|
|
10
10
|
class RouteParam(Protocol):
|
|
11
11
|
async def build(self, target: Target, params: RouteParams) -> str:
|
|
12
|
-
"""
|
|
13
|
-
Build raw path param value for an outgoing URL.
|
|
14
|
-
|
|
15
|
-
Route will encode this value for URL path.
|
|
16
|
-
"""
|
|
12
|
+
"""Build the raw path value. Route URL-encodes it."""
|
|
17
13
|
|
|
18
14
|
async def parse(self, value: str, params: RouteParams) -> Any:
|
|
19
|
-
"""
|
|
20
|
-
Parse incoming framework path param into a normalized route param value.
|
|
21
|
-
"""
|
|
15
|
+
"""Parse an incoming path value into its normalized form."""
|
|
22
16
|
|
|
23
17
|
|
|
24
18
|
@dataclass(frozen=True, slots=True)
|
|
@@ -26,7 +26,7 @@ class QueryValue(ABC):
|
|
|
26
26
|
@dataclass(frozen=True, slots=True)
|
|
27
27
|
class Ref(QueryValue):
|
|
28
28
|
"""
|
|
29
|
-
Query value copied from route
|
|
29
|
+
Query value copied from a route param.
|
|
30
30
|
|
|
31
31
|
Example:
|
|
32
32
|
query={"bot_id": Ref("bot_id")}
|
|
@@ -43,11 +43,7 @@ class Ref(QueryValue):
|
|
|
43
43
|
|
|
44
44
|
@dataclass(frozen=True, slots=True)
|
|
45
45
|
class Const(QueryValue):
|
|
46
|
-
"""
|
|
47
|
-
Static query value.
|
|
48
|
-
|
|
49
|
-
Usually created internally from str/int.
|
|
50
|
-
"""
|
|
46
|
+
"""Static query value. Usually created internally from str or int."""
|
|
51
47
|
|
|
52
48
|
value: str
|
|
53
49
|
|
|
@@ -54,9 +54,7 @@ class Route:
|
|
|
54
54
|
@property
|
|
55
55
|
def path(self) -> str:
|
|
56
56
|
"""
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
This is not a full URL, only the path part, for example "/webhook/{bot_id}".
|
|
57
|
+
Path template for route registration in a web framework, for example "/webhook/{bot_id}".
|
|
60
58
|
"""
|
|
61
59
|
return self._path_template.value
|
|
62
60
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import json
|
|
1
2
|
from collections.abc import Mapping
|
|
2
3
|
from typing import Any
|
|
3
4
|
|
|
@@ -39,7 +40,9 @@ class AiohttpWebRequest(WebRequest[Request]):
|
|
|
39
40
|
return None
|
|
40
41
|
|
|
41
42
|
async def json(self) -> dict[str, Any]:
|
|
42
|
-
|
|
43
|
+
# Telegram webhook payloads are UTF-8; do not trust the request charset
|
|
44
|
+
body = await self._request.read()
|
|
45
|
+
return json.loads(body.decode("utf-8"))
|
|
43
46
|
|
|
44
47
|
@property
|
|
45
48
|
def headers(self) -> Headers:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/security/checks/__init__.py
RENAMED
|
File without changes
|
{aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/security/checks/check.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aiogram_webhook-3.2.0 → aiogram_webhook-3.3.0}/src/aiogram_webhook/security/secret_token.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|