Skip to content
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
616c602
feat(webhook): update web
m-xim Jul 26, 2026
e3d851a
feat(webhook): update route
m-xim Jul 26, 2026
79eb09a
feat(webhook): update security
m-xim Jul 26, 2026
e7551bc
feat(webhook): add TaskTracker
m-xim Jul 26, 2026
42f684e
test(webhook): update web, route, security
m-xim Jul 26, 2026
be3981e
feat: add custum transport in bot, api_client
m-xim Jul 26, 2026
7c81793
feat: add middlewares for api_client
m-xim Jul 26, 2026
e0ad33b
test: update test for custom transport
m-xim Jul 26, 2026
71a4289
refactor(api_client): pass validate in AddMembers
m-xim Jul 26, 2026
813dd2d
test(webhook): add fixtures
m-xim Jul 26, 2026
170f2c5
Merge branch 'K1rL3s:master' into webhook3
m-xim Jul 26, 2026
464802a
feat(deps): add multidict for webhook
m-xim Jul 26, 2026
f38e0e0
feat: update resumable_upload
m-xim Jul 26, 2026
0850b87
test: update resumable_upload
m-xim Jul 26, 2026
6fc82fb
refactor(bot): lazy Bot start
m-xim Jul 28, 2026
507e31d
feat(webhook): drop Target abstraction, add base and single engines
m-xim Jul 28, 2026
d7828b6
feat(webhook): add errors
m-xim Jul 28, 2026
18e2c65
test(webhook): add new tests, drop target
m-xim Jul 28, 2026
3d49ef8
feat(webhook): add WebhookConfig
m-xim Jul 28, 2026
212239a
feat(api_client): add default request_dumper/response_loader in defau…
m-xim Jul 28, 2026
4347970
test(state): remove bot.state
m-xim Jul 28, 2026
e321a5a
test(state): remove bot.state
m-xim Jul 28, 2026
0a0805d
fix(state): remove bot.state
m-xim Jul 28, 2026
22c3873
fix: clening
m-xim Jul 28, 2026
07f2e5e
docs: bot.state.info to bot.state
m-xim Jul 28, 2026
49dceb9
fix(bot): use api_client.transport in get_my_info
m-xim Jul 28, 2026
666834b
Merge branch 'master' into webhook3
m-xim Jul 30, 2026
ebd9381
fix(bot): shared retort, drop MaxApiClient
m-xim Jul 30, 2026
82f2c92
refactor: BotMixin
m-xim Jul 30, 2026
bedebbe
test: shared retort, drop MaxApiClient
m-xim Jul 30, 2026
e7bb9d0
test: add tests for binding
m-xim Jul 30, 2026
770d36e
docs: update text about BotMixin and warm
m-xim Jul 30, 2026
213eafc
fix: remove `noqa: S105`
m-xim Jul 30, 2026
5f280d7
fix: cleaning
m-xim Jul 30, 2026
aee5390
fix: tests, mypy
m-xim Jul 30, 2026
64dcc7b
feat: update webhook examples
m-xim Jul 30, 2026
0003f19
fix: remove unused Body marker from WebhookConfig.update_types
m-xim Jul 30, 2026
d0f4a2f
feat: add MaxoStreamMethod for streamed methods
m-xim Jul 30, 2026
e5aba38
refactor(bot): start
m-xim Jul 30, 2026
6a7f71f
feat: add response.data in error logs
m-xim Jul 31, 2026
361f2d9
feat: bump unihttp
m-xim Aug 1, 2026
31c62a9
refactor(bot): add ChunkUploadRetryMiddleware for resumable uploads
m-xim Aug 1, 2026
f30af3c
refactor(bot): simplify context and remove start method
m-xim Aug 1, 2026
3653561
test(bot): fixed
m-xim Aug 1, 2026
f7f7476
fix(transport): remove start from long_polling
m-xim Aug 1, 2026
40a931f
refactor(single): remove redundant bot.start calls and handle StateError
m-xim Aug 1, 2026
5b7a93f
feat(webhook): add TokenEngine for multi-bot webhook handling
m-xim Aug 1, 2026
3909f9d
feat: update optional dependencies for webhook support
m-xim Aug 1, 2026
f9acd78
fix: optional dependencies for webhook support
m-xim Aug 1, 2026
637a579
feat(binding): enhance type introspection and add cycle detection for…
m-xim Aug 2, 2026
d03b905
refactor(binding): simplify type hints retrieval by removing unnecess…
m-xim Aug 2, 2026
7d892a5
refactor(binding): improve reading
m-xim Aug 2, 2026
dfa6351
Merge branch 'K1rL3s:master' into webhook3
m-xim Aug 10, 2026
b96e922
feat: add usage instruction for running webhook_fastapi example
m-xim Aug 10, 2026
30e1746
refactor(binding): update mixin imports and restructure bot binding l…
m-xim Aug 11, 2026
ba8f949
refactor(base): reorganize MaxoStreamMethod
m-xim Aug 11, 2026
b9e0196
refactor(dialogs): simplify bot assignment in cleaned_event processing
m-xim Aug 11, 2026
2cc038e
docs(errors): update error handlers to use Bot instance directly
m-xim Aug 11, 2026
a54694e
docs(dacades): fix import path for MediaInput
m-xim Aug 11, 2026
b90a534
refactor(download): update import path for Path marker
m-xim Aug 11, 2026
cc02fc0
refactor(bot): rename middleware to middlewares
m-xim Aug 11, 2026
9133e73
fix(bot): update get_my_info return type
m-xim Aug 11, 2026
63daf96
refactor(upload): implement resumable file upload with chunk handling
m-xim Aug 11, 2026
c36f6dd
refactor(bot): remove unused upload media test for resumable uploads
m-xim Aug 11, 2026
b9d544b
refactor(warming_up): rename DUMPED_ROOTS and LOADED_ROOTS for consis…
m-xim Aug 11, 2026
7f7a89b
refactor(warming_up): streamline retort handling
m-xim Aug 11, 2026
a804af2
refactor(bot): rename transport to client
m-xim Aug 11, 2026
01ec683
refactor(constants): add comment to test token for clarity
m-xim Aug 11, 2026
5d4f23e
refactor(tests): cleaning bot test
m-xim Aug 11, 2026
cc51553
fix(bot): update type hint for get_my_info and correct middleware key
m-xim Aug 11, 2026
9b9146a
Merge remote-tracking branch 'upstream/master' into webhook3
m-xim Aug 22, 2026
b4f4f60
refactor: simplify retort initialization and update WebhookConfig class
m-xim Aug 22, 2026
6258e99
refactor: replace create_retort with get_retort and update method ref…
m-xim Aug 22, 2026
22a845b
refactor: rename webhook_fastapi to fastapi in pyproject.toml
m-xim Aug 22, 2026
7fb2b56
refactor(Bot): remove unused async context manager methods from bot.py
m-xim Aug 22, 2026
52f4a0d
refactor(Security): rename SecretToken to BaseSecret and update relat…
m-xim Aug 22, 2026
a57ca80
refactor(Token): improve bot removal logic with try-finally structure
m-xim Aug 22, 2026
3b869b4
refactor(Bot): adjust middleware order in call_method for better erro…
m-xim Aug 22, 2026
b2e7e61
refactor(BotConfig): change BotConfig to inherit from MaxoType
m-xim Aug 22, 2026
6ed9f51
refactor(TokenEngine): enhance bot subscription logic
m-xim Aug 22, 2026
8a3b13c
chore(webhook): remove dead config/
m-xim Aug 22, 2026
5d57e91
refactor(facades): update deprecation warnings and reorganize imports
m-xim Aug 22, 2026
c946af1
fix(mypy): remove unnecessary type ignore comment
m-xim Aug 22, 2026
6f7a845
refactor(binding): simplify hint flattening logic in _field_classes
m-xim Aug 22, 2026
7d927da
fix(web_preview): for microsoft windows
m-xim Aug 22, 2026
c405bcb
feat(webhook): add debug logging for new updates
m-xim Aug 22, 2026
148d341
fix(webhook): add warning for unprotected webhook registration
m-xim Aug 22, 2026
7e92b5f
refactor(webhook): update webhook engine and adapter usage in documen…
m-xim Aug 22, 2026
d58764a
feat(webhook): expose Route in module exports
m-xim Aug 22, 2026
528b51b
fix(webhook): update warning message for unprotected webhook registra…
m-xim Aug 22, 2026
0e91a90
refactor(webhook): reorganize imports and update documentation for ad…
m-xim Aug 22, 2026
c8194e3
refactor(bot): remove silent_call_method and related tests
m-xim Aug 23, 2026
eb67e9f
feat(download): implement download methods for attachments with strea…
m-xim Aug 23, 2026
7bef115
refactor(message_callback): reorganize import statements for clarity
m-xim Aug 23, 2026
592b89b
refactor(imports): consolidate import statements in __init__.py and m…
m-xim Aug 23, 2026
9f89f5f
feat(single): improve logging during shutdown with masked bot token
m-xim Aug 24, 2026
af8a3d3
refactor(multi): encapsulate bot registration and unregistration logic
m-xim Aug 24, 2026
34935f6
fix(single): ensure bot info is retrieved if not started before webho…
m-xim Aug 24, 2026
b9be27e
test(single): add subscription test for SingleBotEngine with bot ID r…
m-xim Aug 24, 2026
16db813
docs(agents): update AGENTS.md to include Download method in the list
m-xim Aug 24, 2026
5033a2a
style(single): clean up comments and formatting in single.py and test…
m-xim Aug 24, 2026
ae3e107
fix(base): ensure requests are accepted only when bot is active
m-xim Aug 24, 2026
e91d9bf
fix(token): add locking mechanism for concurrent bot management and i…
m-xim Aug 24, 2026
4c3d07f
test: implement SubscribingClient and BlockingJsonWebRequest for enha…
m-xim Aug 24, 2026
da5a75f
chore: merge master into webhook3
K1rL3s Aug 25, 2026
154c12f
Исправил дамп даты-время в таймстамп в квери
K1rL3s Aug 26, 2026
5109ac8
Переделал `make_comment` и `make_bot` в тесте комментов на фикстуры
K1rL3s Aug 26, 2026
f0a6a74
Merge pull request #2 from K1rL3s/mxim-webhook
m-xim Aug 26, 2026
60f7d65
refactor(init): remove imports
m-xim Aug 26, 2026
6f86d77
refactor(init): expose BaseMiddleware in the public API
m-xim Aug 26, 2026
fa3e7ed
Merge remote-tracking branch 'origin/master' into webhook3
m-xim Aug 26, 2026
e07fca2
Подсократил тесты кукодексом
K1rL3s Aug 29, 2026
43667ee
Merge pull request #4 from K1rL3s/mxim-webhook
m-xim Aug 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/pages/event-handling/signals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

@dispatcher.after_startup()
async def on_startup(bot: Bot) -> None:
info = bot.state.info
info = bot.info
print(f"Бот @{info.username} запущен!")

@dispatcher.before_shutdown()
Expand All @@ -86,7 +86,7 @@
from maxo import Bot, Dispatcher

async def on_startup(bot: Bot) -> None:
print(f"Бот @{bot.state.info.username} запущен!")
print(f"Бот @{bot.info.username} запущен!")

dispatcher = Dispatcher()
dispatcher.after_startup.handler(on_startup)
Expand Down
5 changes: 3 additions & 2 deletions examples/bot_middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from maxo import Bot
from maxo.backoff import Backoff, BackoffConfig
from maxo.bot.api_client import default_transport
from maxo.errors import MaxBotNotFoundError

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -86,13 +87,13 @@ async def handle(


async def main() -> None:
bot = Bot(
token=os.environ["TOKEN"],
transport = default_transport(
middleware=[
LoggingMiddleware(),
RetryMiddleware(exceptions=[MaxBotNotFoundError]),
],
)
bot = Bot(token=os.environ["TOKEN"], transport=transport)
async with bot.context():
await bot.send_message(chat_id=-1)

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ dependencies = [
"jinja2>=3.0.0,<4.0.0",
"adaptix==3.0.0b12",
"typing-extensions>=4.12.0,<5.0.0"
"typing-extensions>=4.12.0,<5.0.0",
Comment thread
m-xim marked this conversation as resolved.
Outdated
"multidict>=6.7.1,<7.0.0",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -265,6 +267,7 @@ ignore = [
"PLR", # complexity
"FBT003",
"SLF001",
"S105", # hardcoded password strings
Comment thread
m-xim marked this conversation as resolved.
Outdated
]
"examples/**/*.py" = ["T201", "D", "TID252"]
"src/maxo/types/*.py" = ["E501", "D", "W291", "W293"]
Expand Down
Loading