From 762b2e6ef1d598502656bad916a6c44f4ca52a65 Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Wed, 25 Dec 2024 15:15:20 +0800 Subject: [PATCH] :bookmark: Release: v2.4.1 (#3204) --- envs/pydantic-v1/poetry.lock | 1111 +++++++------- envs/pydantic-v2/poetry.lock | 1321 ++++++++-------- envs/test/poetry.lock | 953 ++++++------ poetry.lock | 1357 ++++++++--------- pyproject.toml | 2 +- .../versioned_docs/version-2.3.1/README.md | 49 - .../version-2.3.1/advanced/adapter.md | 161 -- .../version-2.3.1/advanced/dependency.mdx | 1320 ---------------- .../version-2.3.1/advanced/driver.md | 287 ---- .../advanced/matcher-provider.md | 40 - .../version-2.3.1/advanced/matcher.md | 338 ---- .../version-2.3.1/advanced/plugin-info.md | 104 -- .../version-2.3.1/advanced/plugin-nesting.md | 41 - .../version-2.3.1/advanced/requiring.md | 37 - .../version-2.3.1/advanced/routing.md | 135 -- .../version-2.3.1/advanced/runtime-hook.md | 163 -- .../advanced/session-updating.md | 59 - .../versioned_docs/version-2.3.1/api/.gitkeep | 0 .../api/adapters/_category_.json | 3 - .../version-2.3.1/api/adapters/index.md | 878 ----------- .../version-2.3.1/api/compat.md | 218 --- .../version-2.3.1/api/config.md | 179 --- .../version-2.3.1/api/consts.md | 116 -- .../api/dependencies/_category_.json | 3 - .../version-2.3.1/api/dependencies/index.md | 98 -- .../version-2.3.1/api/dependencies/utils.md | 46 - .../version-2.3.1/api/drivers/_category_.json | 3 - .../version-2.3.1/api/drivers/aiohttp.md | 204 --- .../version-2.3.1/api/drivers/fastapi.md | 242 --- .../version-2.3.1/api/drivers/httpx.md | 110 -- .../version-2.3.1/api/drivers/index.md | 596 -------- .../version-2.3.1/api/drivers/none.md | 60 - .../version-2.3.1/api/drivers/quart.md | 218 --- .../version-2.3.1/api/drivers/websockets.md | 136 -- .../version-2.3.1/api/exception.md | 254 --- .../versioned_docs/version-2.3.1/api/index.md | 284 ---- .../versioned_docs/version-2.3.1/api/log.md | 71 - .../version-2.3.1/api/matcher.md | 749 --------- .../version-2.3.1/api/message.md | 117 -- .../version-2.3.1/api/params.md | 510 ------- .../version-2.3.1/api/permission.md | 208 --- .../version-2.3.1/api/plugin/_category_.json | 3 - .../version-2.3.1/api/plugin/index.md | 109 -- .../version-2.3.1/api/plugin/load.md | 161 -- .../version-2.3.1/api/plugin/manager.md | 122 -- .../version-2.3.1/api/plugin/model.md | 138 -- .../version-2.3.1/api/plugin/on.md | 948 ------------ .../versioned_docs/version-2.3.1/api/rule.md | 402 ----- .../version-2.3.1/api/typing.md | 303 ---- .../versioned_docs/version-2.3.1/api/utils.md | 280 ---- .../version-2.3.1/appendices/api-calling.mdx | 131 -- .../version-2.3.1/appendices/config.mdx | 632 -------- .../version-2.3.1/appendices/log.md | 102 -- .../version-2.3.1/appendices/overload.md | 74 - .../version-2.3.1/appendices/permission.mdx | 116 -- .../version-2.3.1/appendices/rule.md | 107 -- .../appendices/session-control.mdx | 397 ----- .../version-2.3.1/appendices/session-state.md | 59 - .../version-2.3.1/appendices/whats-next.md | 11 - .../best-practice/alconna/README.mdx | 141 -- .../best-practice/alconna/_category_.json | 4 - .../best-practice/alconna/command.md | 640 -------- .../best-practice/alconna/config.md | 76 - .../best-practice/alconna/matcher.mdx | 607 -------- .../best-practice/alconna/uniseg.mdx | 590 ------- .../best-practice/data-storing.md | 155 -- .../best-practice/database/README.mdx | 145 -- .../best-practice/database/_category_.json | 4 - .../database/developer/README.md | 378 ----- .../database/developer/_category_.json | 4 - .../database/developer/dependency.md | 240 --- .../best-practice/database/developer/test.md | 147 -- .../best-practice/database/user.md | 158 -- .../best-practice/deployment.mdx | 299 ---- .../best-practice/error-tracking.md | 64 - .../best-practice/multi-adapter.mdx | 183 --- .../version-2.3.1/best-practice/scheduler.md | 96 -- .../best-practice/testing/README.mdx | 240 --- .../best-practice/testing/_category_.json | 4 - .../best-practice/testing/behavior.mdx | 292 ---- .../best-practice/testing/mock-network.md | 96 -- .../version-2.3.1/community/contact.md | 24 - .../version-2.3.1/community/contributing.md | 22 - .../developer/adapter-writing.md | 608 -------- .../developer/plugin-publishing.mdx | 202 --- .../version-2.3.1/editor-support.md | 31 - .../versioned_docs/version-2.3.1/ospp/2021.md | 191 --- .../versioned_docs/version-2.3.1/ospp/2022.md | 98 -- .../versioned_docs/version-2.3.1/ospp/2023.md | 91 -- .../versioned_docs/version-2.3.1/ospp/2024.md | 105 -- .../version-2.3.1/quick-start.mdx | 119 -- .../version-2.3.1/tutorial/application.md | 110 -- .../version-2.3.1/tutorial/create-plugin.md | 226 --- .../version-2.3.1/tutorial/event-data.mdx | 65 - .../version-2.3.1/tutorial/fundamentals.md | 24 - .../version-2.3.1/tutorial/handler.mdx | 87 -- .../version-2.3.1/tutorial/matcher.md | 58 - .../version-2.3.1/tutorial/message.md | 349 ----- .../version-2.3.1/tutorial/store.mdx | 267 ---- .../versioned_docs/version-2.3.2/README.md | 49 - .../version-2.3.2/advanced/adapter.md | 161 -- .../version-2.3.2/advanced/dependency.mdx | 1320 ---------------- .../version-2.3.2/advanced/driver.md | 287 ---- .../advanced/matcher-provider.md | 40 - .../version-2.3.2/advanced/matcher.md | 338 ---- .../version-2.3.2/advanced/plugin-info.md | 104 -- .../version-2.3.2/advanced/plugin-nesting.md | 41 - .../version-2.3.2/advanced/requiring.md | 37 - .../version-2.3.2/advanced/routing.md | 135 -- .../version-2.3.2/advanced/runtime-hook.md | 163 -- .../advanced/session-updating.md | 59 - .../versioned_docs/version-2.3.2/api/.gitkeep | 0 .../api/adapters/_category_.json | 3 - .../version-2.3.2/api/adapters/index.md | 878 ----------- .../version-2.3.2/api/compat.md | 218 --- .../version-2.3.2/api/config.md | 179 --- .../version-2.3.2/api/consts.md | 116 -- .../api/dependencies/_category_.json | 3 - .../version-2.3.2/api/dependencies/index.md | 98 -- .../version-2.3.2/api/dependencies/utils.md | 46 - .../version-2.3.2/api/drivers/_category_.json | 3 - .../version-2.3.2/api/drivers/aiohttp.md | 204 --- .../version-2.3.2/api/drivers/fastapi.md | 242 --- .../version-2.3.2/api/drivers/httpx.md | 110 -- .../version-2.3.2/api/drivers/index.md | 596 -------- .../version-2.3.2/api/drivers/none.md | 60 - .../version-2.3.2/api/drivers/quart.md | 218 --- .../version-2.3.2/api/drivers/websockets.md | 136 -- .../version-2.3.2/api/exception.md | 254 --- .../versioned_docs/version-2.3.2/api/index.md | 284 ---- .../versioned_docs/version-2.3.2/api/log.md | 71 - .../version-2.3.2/api/matcher.md | 749 --------- .../version-2.3.2/api/message.md | 117 -- .../version-2.3.2/api/params.md | 510 ------- .../version-2.3.2/api/permission.md | 208 --- .../version-2.3.2/api/plugin/_category_.json | 3 - .../version-2.3.2/api/plugin/index.md | 109 -- .../version-2.3.2/api/plugin/load.md | 161 -- .../version-2.3.2/api/plugin/manager.md | 122 -- .../version-2.3.2/api/plugin/model.md | 138 -- .../version-2.3.2/api/plugin/on.md | 948 ------------ .../versioned_docs/version-2.3.2/api/rule.md | 402 ----- .../version-2.3.2/api/typing.md | 303 ---- .../versioned_docs/version-2.3.2/api/utils.md | 280 ---- .../version-2.3.2/appendices/api-calling.mdx | 131 -- .../version-2.3.2/appendices/config.mdx | 632 -------- .../version-2.3.2/appendices/log.md | 102 -- .../version-2.3.2/appendices/overload.md | 74 - .../version-2.3.2/appendices/permission.mdx | 116 -- .../version-2.3.2/appendices/rule.md | 107 -- .../appendices/session-control.mdx | 397 ----- .../version-2.3.2/appendices/session-state.md | 59 - .../version-2.3.2/appendices/whats-next.md | 11 - .../best-practice/alconna/README.mdx | 141 -- .../best-practice/alconna/_category_.json | 4 - .../best-practice/alconna/command.md | 640 -------- .../best-practice/alconna/config.md | 76 - .../best-practice/alconna/matcher.mdx | 607 -------- .../best-practice/alconna/uniseg.mdx | 590 ------- .../best-practice/data-storing.md | 155 -- .../best-practice/database/README.mdx | 145 -- .../best-practice/database/_category_.json | 4 - .../database/developer/README.md | 378 ----- .../database/developer/_category_.json | 4 - .../database/developer/dependency.md | 240 --- .../best-practice/database/developer/test.md | 147 -- .../best-practice/database/user.md | 158 -- .../best-practice/deployment.mdx | 299 ---- .../best-practice/error-tracking.md | 64 - .../best-practice/multi-adapter.mdx | 183 --- .../version-2.3.2/best-practice/scheduler.md | 96 -- .../best-practice/testing/README.mdx | 240 --- .../best-practice/testing/_category_.json | 4 - .../best-practice/testing/behavior.mdx | 292 ---- .../best-practice/testing/mock-network.md | 96 -- .../version-2.3.2/community/contact.md | 24 - .../version-2.3.2/community/contributing.md | 22 - .../developer/adapter-writing.md | 608 -------- .../developer/plugin-publishing.mdx | 202 --- .../version-2.3.2/editor-support.md | 31 - .../versioned_docs/version-2.3.2/ospp/2021.md | 191 --- .../versioned_docs/version-2.3.2/ospp/2022.md | 98 -- .../versioned_docs/version-2.3.2/ospp/2023.md | 91 -- .../versioned_docs/version-2.3.2/ospp/2024.md | 105 -- .../version-2.3.2/quick-start.mdx | 119 -- .../version-2.3.2/tutorial/application.md | 110 -- .../version-2.3.2/tutorial/create-plugin.md | 226 --- .../version-2.3.2/tutorial/event-data.mdx | 65 - .../version-2.3.2/tutorial/fundamentals.md | 24 - .../version-2.3.2/tutorial/handler.mdx | 87 -- .../version-2.3.2/tutorial/matcher.md | 58 - .../version-2.3.2/tutorial/message.md | 349 ----- .../version-2.3.2/tutorial/store.mdx | 267 ---- .../version-2.3.1-sidebars.json | 127 -- .../version-2.3.2-sidebars.json | 127 -- website/versions.json | 2 +- 196 files changed, 2315 insertions(+), 41429 deletions(-) delete mode 100644 website/versioned_docs/version-2.3.1/README.md delete mode 100644 website/versioned_docs/version-2.3.1/advanced/adapter.md delete mode 100644 website/versioned_docs/version-2.3.1/advanced/dependency.mdx delete mode 100644 website/versioned_docs/version-2.3.1/advanced/driver.md delete mode 100644 website/versioned_docs/version-2.3.1/advanced/matcher-provider.md delete mode 100644 website/versioned_docs/version-2.3.1/advanced/matcher.md delete mode 100644 website/versioned_docs/version-2.3.1/advanced/plugin-info.md delete mode 100644 website/versioned_docs/version-2.3.1/advanced/plugin-nesting.md delete mode 100644 website/versioned_docs/version-2.3.1/advanced/requiring.md delete mode 100644 website/versioned_docs/version-2.3.1/advanced/routing.md delete mode 100644 website/versioned_docs/version-2.3.1/advanced/runtime-hook.md delete mode 100644 website/versioned_docs/version-2.3.1/advanced/session-updating.md delete mode 100644 website/versioned_docs/version-2.3.1/api/.gitkeep delete mode 100644 website/versioned_docs/version-2.3.1/api/adapters/_category_.json delete mode 100644 website/versioned_docs/version-2.3.1/api/adapters/index.md delete mode 100644 website/versioned_docs/version-2.3.1/api/compat.md delete mode 100644 website/versioned_docs/version-2.3.1/api/config.md delete mode 100644 website/versioned_docs/version-2.3.1/api/consts.md delete mode 100644 website/versioned_docs/version-2.3.1/api/dependencies/_category_.json delete mode 100644 website/versioned_docs/version-2.3.1/api/dependencies/index.md delete mode 100644 website/versioned_docs/version-2.3.1/api/dependencies/utils.md delete mode 100644 website/versioned_docs/version-2.3.1/api/drivers/_category_.json delete mode 100644 website/versioned_docs/version-2.3.1/api/drivers/aiohttp.md delete mode 100644 website/versioned_docs/version-2.3.1/api/drivers/fastapi.md delete mode 100644 website/versioned_docs/version-2.3.1/api/drivers/httpx.md delete mode 100644 website/versioned_docs/version-2.3.1/api/drivers/index.md delete mode 100644 website/versioned_docs/version-2.3.1/api/drivers/none.md delete mode 100644 website/versioned_docs/version-2.3.1/api/drivers/quart.md delete mode 100644 website/versioned_docs/version-2.3.1/api/drivers/websockets.md delete mode 100644 website/versioned_docs/version-2.3.1/api/exception.md delete mode 100644 website/versioned_docs/version-2.3.1/api/index.md delete mode 100644 website/versioned_docs/version-2.3.1/api/log.md delete mode 100644 website/versioned_docs/version-2.3.1/api/matcher.md delete mode 100644 website/versioned_docs/version-2.3.1/api/message.md delete mode 100644 website/versioned_docs/version-2.3.1/api/params.md delete mode 100644 website/versioned_docs/version-2.3.1/api/permission.md delete mode 100644 website/versioned_docs/version-2.3.1/api/plugin/_category_.json delete mode 100644 website/versioned_docs/version-2.3.1/api/plugin/index.md delete mode 100644 website/versioned_docs/version-2.3.1/api/plugin/load.md delete mode 100644 website/versioned_docs/version-2.3.1/api/plugin/manager.md delete mode 100644 website/versioned_docs/version-2.3.1/api/plugin/model.md delete mode 100644 website/versioned_docs/version-2.3.1/api/plugin/on.md delete mode 100644 website/versioned_docs/version-2.3.1/api/rule.md delete mode 100644 website/versioned_docs/version-2.3.1/api/typing.md delete mode 100644 website/versioned_docs/version-2.3.1/api/utils.md delete mode 100644 website/versioned_docs/version-2.3.1/appendices/api-calling.mdx delete mode 100644 website/versioned_docs/version-2.3.1/appendices/config.mdx delete mode 100644 website/versioned_docs/version-2.3.1/appendices/log.md delete mode 100644 website/versioned_docs/version-2.3.1/appendices/overload.md delete mode 100644 website/versioned_docs/version-2.3.1/appendices/permission.mdx delete mode 100644 website/versioned_docs/version-2.3.1/appendices/rule.md delete mode 100644 website/versioned_docs/version-2.3.1/appendices/session-control.mdx delete mode 100644 website/versioned_docs/version-2.3.1/appendices/session-state.md delete mode 100644 website/versioned_docs/version-2.3.1/appendices/whats-next.md delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/alconna/README.mdx delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/alconna/_category_.json delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/alconna/command.md delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/alconna/config.md delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/alconna/matcher.mdx delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/alconna/uniseg.mdx delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/data-storing.md delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/database/README.mdx delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/database/_category_.json delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/database/developer/README.md delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/database/developer/_category_.json delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/database/developer/dependency.md delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/database/developer/test.md delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/database/user.md delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/deployment.mdx delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/error-tracking.md delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/multi-adapter.mdx delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/scheduler.md delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/testing/README.mdx delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/testing/_category_.json delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/testing/behavior.mdx delete mode 100644 website/versioned_docs/version-2.3.1/best-practice/testing/mock-network.md delete mode 100644 website/versioned_docs/version-2.3.1/community/contact.md delete mode 100644 website/versioned_docs/version-2.3.1/community/contributing.md delete mode 100644 website/versioned_docs/version-2.3.1/developer/adapter-writing.md delete mode 100644 website/versioned_docs/version-2.3.1/developer/plugin-publishing.mdx delete mode 100644 website/versioned_docs/version-2.3.1/editor-support.md delete mode 100644 website/versioned_docs/version-2.3.1/ospp/2021.md delete mode 100644 website/versioned_docs/version-2.3.1/ospp/2022.md delete mode 100644 website/versioned_docs/version-2.3.1/ospp/2023.md delete mode 100644 website/versioned_docs/version-2.3.1/ospp/2024.md delete mode 100644 website/versioned_docs/version-2.3.1/quick-start.mdx delete mode 100644 website/versioned_docs/version-2.3.1/tutorial/application.md delete mode 100644 website/versioned_docs/version-2.3.1/tutorial/create-plugin.md delete mode 100644 website/versioned_docs/version-2.3.1/tutorial/event-data.mdx delete mode 100644 website/versioned_docs/version-2.3.1/tutorial/fundamentals.md delete mode 100644 website/versioned_docs/version-2.3.1/tutorial/handler.mdx delete mode 100644 website/versioned_docs/version-2.3.1/tutorial/matcher.md delete mode 100644 website/versioned_docs/version-2.3.1/tutorial/message.md delete mode 100644 website/versioned_docs/version-2.3.1/tutorial/store.mdx delete mode 100644 website/versioned_docs/version-2.3.2/README.md delete mode 100644 website/versioned_docs/version-2.3.2/advanced/adapter.md delete mode 100644 website/versioned_docs/version-2.3.2/advanced/dependency.mdx delete mode 100644 website/versioned_docs/version-2.3.2/advanced/driver.md delete mode 100644 website/versioned_docs/version-2.3.2/advanced/matcher-provider.md delete mode 100644 website/versioned_docs/version-2.3.2/advanced/matcher.md delete mode 100644 website/versioned_docs/version-2.3.2/advanced/plugin-info.md delete mode 100644 website/versioned_docs/version-2.3.2/advanced/plugin-nesting.md delete mode 100644 website/versioned_docs/version-2.3.2/advanced/requiring.md delete mode 100644 website/versioned_docs/version-2.3.2/advanced/routing.md delete mode 100644 website/versioned_docs/version-2.3.2/advanced/runtime-hook.md delete mode 100644 website/versioned_docs/version-2.3.2/advanced/session-updating.md delete mode 100644 website/versioned_docs/version-2.3.2/api/.gitkeep delete mode 100644 website/versioned_docs/version-2.3.2/api/adapters/_category_.json delete mode 100644 website/versioned_docs/version-2.3.2/api/adapters/index.md delete mode 100644 website/versioned_docs/version-2.3.2/api/compat.md delete mode 100644 website/versioned_docs/version-2.3.2/api/config.md delete mode 100644 website/versioned_docs/version-2.3.2/api/consts.md delete mode 100644 website/versioned_docs/version-2.3.2/api/dependencies/_category_.json delete mode 100644 website/versioned_docs/version-2.3.2/api/dependencies/index.md delete mode 100644 website/versioned_docs/version-2.3.2/api/dependencies/utils.md delete mode 100644 website/versioned_docs/version-2.3.2/api/drivers/_category_.json delete mode 100644 website/versioned_docs/version-2.3.2/api/drivers/aiohttp.md delete mode 100644 website/versioned_docs/version-2.3.2/api/drivers/fastapi.md delete mode 100644 website/versioned_docs/version-2.3.2/api/drivers/httpx.md delete mode 100644 website/versioned_docs/version-2.3.2/api/drivers/index.md delete mode 100644 website/versioned_docs/version-2.3.2/api/drivers/none.md delete mode 100644 website/versioned_docs/version-2.3.2/api/drivers/quart.md delete mode 100644 website/versioned_docs/version-2.3.2/api/drivers/websockets.md delete mode 100644 website/versioned_docs/version-2.3.2/api/exception.md delete mode 100644 website/versioned_docs/version-2.3.2/api/index.md delete mode 100644 website/versioned_docs/version-2.3.2/api/log.md delete mode 100644 website/versioned_docs/version-2.3.2/api/matcher.md delete mode 100644 website/versioned_docs/version-2.3.2/api/message.md delete mode 100644 website/versioned_docs/version-2.3.2/api/params.md delete mode 100644 website/versioned_docs/version-2.3.2/api/permission.md delete mode 100644 website/versioned_docs/version-2.3.2/api/plugin/_category_.json delete mode 100644 website/versioned_docs/version-2.3.2/api/plugin/index.md delete mode 100644 website/versioned_docs/version-2.3.2/api/plugin/load.md delete mode 100644 website/versioned_docs/version-2.3.2/api/plugin/manager.md delete mode 100644 website/versioned_docs/version-2.3.2/api/plugin/model.md delete mode 100644 website/versioned_docs/version-2.3.2/api/plugin/on.md delete mode 100644 website/versioned_docs/version-2.3.2/api/rule.md delete mode 100644 website/versioned_docs/version-2.3.2/api/typing.md delete mode 100644 website/versioned_docs/version-2.3.2/api/utils.md delete mode 100644 website/versioned_docs/version-2.3.2/appendices/api-calling.mdx delete mode 100644 website/versioned_docs/version-2.3.2/appendices/config.mdx delete mode 100644 website/versioned_docs/version-2.3.2/appendices/log.md delete mode 100644 website/versioned_docs/version-2.3.2/appendices/overload.md delete mode 100644 website/versioned_docs/version-2.3.2/appendices/permission.mdx delete mode 100644 website/versioned_docs/version-2.3.2/appendices/rule.md delete mode 100644 website/versioned_docs/version-2.3.2/appendices/session-control.mdx delete mode 100644 website/versioned_docs/version-2.3.2/appendices/session-state.md delete mode 100644 website/versioned_docs/version-2.3.2/appendices/whats-next.md delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/alconna/README.mdx delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/alconna/_category_.json delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/alconna/command.md delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/alconna/config.md delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/alconna/matcher.mdx delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/alconna/uniseg.mdx delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/data-storing.md delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/database/README.mdx delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/database/_category_.json delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/database/developer/README.md delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/database/developer/_category_.json delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/database/developer/dependency.md delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/database/developer/test.md delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/database/user.md delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/deployment.mdx delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/error-tracking.md delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/multi-adapter.mdx delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/scheduler.md delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/testing/README.mdx delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/testing/_category_.json delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/testing/behavior.mdx delete mode 100644 website/versioned_docs/version-2.3.2/best-practice/testing/mock-network.md delete mode 100644 website/versioned_docs/version-2.3.2/community/contact.md delete mode 100644 website/versioned_docs/version-2.3.2/community/contributing.md delete mode 100644 website/versioned_docs/version-2.3.2/developer/adapter-writing.md delete mode 100644 website/versioned_docs/version-2.3.2/developer/plugin-publishing.mdx delete mode 100644 website/versioned_docs/version-2.3.2/editor-support.md delete mode 100644 website/versioned_docs/version-2.3.2/ospp/2021.md delete mode 100644 website/versioned_docs/version-2.3.2/ospp/2022.md delete mode 100644 website/versioned_docs/version-2.3.2/ospp/2023.md delete mode 100644 website/versioned_docs/version-2.3.2/ospp/2024.md delete mode 100644 website/versioned_docs/version-2.3.2/quick-start.mdx delete mode 100644 website/versioned_docs/version-2.3.2/tutorial/application.md delete mode 100644 website/versioned_docs/version-2.3.2/tutorial/create-plugin.md delete mode 100644 website/versioned_docs/version-2.3.2/tutorial/event-data.mdx delete mode 100644 website/versioned_docs/version-2.3.2/tutorial/fundamentals.md delete mode 100644 website/versioned_docs/version-2.3.2/tutorial/handler.mdx delete mode 100644 website/versioned_docs/version-2.3.2/tutorial/matcher.md delete mode 100644 website/versioned_docs/version-2.3.2/tutorial/message.md delete mode 100644 website/versioned_docs/version-2.3.2/tutorial/store.mdx delete mode 100644 website/versioned_sidebars/version-2.3.1-sidebars.json delete mode 100644 website/versioned_sidebars/version-2.3.2-sidebars.json diff --git a/envs/pydantic-v1/poetry.lock b/envs/pydantic-v1/poetry.lock index 5ff2d288acd7..72b45c6377f1 100644 --- a/envs/pydantic-v1/poetry.lock +++ b/envs/pydantic-v1/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "aiodns" @@ -38,87 +38,87 @@ files = [ [[package]] name = "aiohttp" -version = "3.11.8" +version = "3.11.11" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.9" files = [ - {file = "aiohttp-3.11.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2d2ca685c6a851ce64e511fbcb906e4dd97d13e567ca7ecb5cb30b184e15dc6d"}, - {file = "aiohttp-3.11.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52913bb8a0a72a57479f54b281300c9d23036aa9aa3ebbc9a32a643484eadfc2"}, - {file = "aiohttp-3.11.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:35dafc70051b6cbd6dafb533b4e3f0df6225a4896be373ef86367b2987409331"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:561b9596a9f90266673ef0b950c27e04ab597cdb53785e2ac91b83b33c31b509"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d479c1fdcc920056a06d04059db52eb8590ecbbb3acdcaeeea26a88ff782e94a"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9ce8eb6444bb6e862feca664ce365afa8e2e32db24dcf1a502719a8a002f9274"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df9bf08eb93611b1d4d6245b6fecf88728e90eece00e00d554e1b0c445557d83"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a20ddaa58fea717177fac9a4a1fb8b39be868aa4fed2af6de4313b7a08f0f71"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9f4aadfea6b48cfa17aef1a68ba6bee5a0246374f5a588e299a4f4ff5bd1c77b"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:aa7deebb4bc5143745e6282139d7b9de50beb6d06609df64d2c993ef496bc7eb"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fe503a76b9e3a13b62e64545693c9463afe9d429e0909120f7bb66de91ed8bc2"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1c5838a68e31712354129add1b5fe32b06aa05275f835130edc650e6288af05f"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:832e58d9454fe501b0d092cdf660c0e34e16005f61acd06e1c79b0fc45019c94"}, - {file = "aiohttp-3.11.8-cp310-cp310-win32.whl", hash = "sha256:00618c37a350884c08e87cf9a6532be274d564227ac49e0b474cf41f27e1f190"}, - {file = "aiohttp-3.11.8-cp310-cp310-win_amd64.whl", hash = "sha256:8eeaac75203da1a54afe1faea3c855a1973026b54929112aa9b67bceadbcb0ca"}, - {file = "aiohttp-3.11.8-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f8dd02b44555893adfe7cc4b3b454fee04f9dcec45cf66ef5bb53ebf393f0505"}, - {file = "aiohttp-3.11.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:658052941324edea3dee1f681375e70779f55e437e07bdfc4b5bbe65ad53cefb"}, - {file = "aiohttp-3.11.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6c829471a9e2266da4a0666f8a9e215f19320f79778af379c1c7db324ac24ed2"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d21951756690f5d86d0215da38eb0fd65def03b5e2a1c08a4a39718a6d0d48f2"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2fa50ddc6b21cc1ae23e13524d6f75b27e279fdf5cf905b2df6fd171891ac4e2"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a5afbd805e449048ecebb1a256176e953d4ca9e48bab387d4d1c8524f1c7a95"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea68db69f2a4ddc24b28b8e754fc0b963ed7f9b9a76137f06fe44643d6821fbd"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80b3ac163145660ce660aed2f1005e6d4de840d39728990b7250525eeec4e4a8"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e9ac0cce897904b77e109e5403ed713187dbdf96832bfd061ac07164264be16c"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:3260c77cff4e35245bc517658bd54d7a64787f71f3c4f723877c82f22835b032"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f7fd9c11ffad6b022bf02a41a70418cb2ab3b33f2c27842a5999e3ab78daf280"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:16bda233a7b159ab08107e8858fedca90a9de287057fab54cafde51bd83f9819"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4867008617bbf86e9fb5b00f72dd0e3a00a579b32233caff834320867f9b7cac"}, - {file = "aiohttp-3.11.8-cp311-cp311-win32.whl", hash = "sha256:17e6b9d8e29e3bfc7f893f327e92c9769d3582cee2fb1652c1431ac3f60115a0"}, - {file = "aiohttp-3.11.8-cp311-cp311-win_amd64.whl", hash = "sha256:7f3be4961a5c2c670f31caab7641a37ea2a97031f0d8ae15bcfd36b6bf273200"}, - {file = "aiohttp-3.11.8-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0e3b5bfef913d6be270c81976fbc0cbf66625cd92663bbb7e03b3adbd6aa4ac6"}, - {file = "aiohttp-3.11.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cb51a81cb637b9a072c9cfae1839e35c6579638861eb3479eb5d6e6ce8bc6782"}, - {file = "aiohttp-3.11.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:dd2ca84e5f7a35f313a62eb7d6a50bac6760b60bafce34586750712731c0aeff"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:47c6663df9446aa848b478413219600da4b54bc0409e1ac4bc80fb1a81501363"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c665ed4b52256614858b20711bbbd2755b0e19ec86870f8ff1645acf9ae9e760"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35d4545e7684da7a954ffc2dce495462cb16a902dffdebe98572408f6aaaee83"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85be3899e6860dd2cd3f4370ded6708e939d00d5ec922a8eb328d114db605a47"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0ed9f1f2697713c48efc9ec483ad5d062e4aa91854f090a3eba0b19c002851d"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c0dbae99737badf3f5e862088a118e28d3b36f03eb608a6382eddfd68178e05b"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:beae08f900b2980af4353a0200eb162b39f276fd8a6e43079a540f83964671f4"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d6f9e5fd1b3ecbaca3e04a15a02d1fa213248608caee99fd5bdddd4759959cf7"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a7def89a41fe32120d89cd4577f5efbab3c52234c5890066ced8a2f7202dff88"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:98f596cf59292e779bc387f22378a3d2c5e052c9fe2bf822ac4f547c6fe57758"}, - {file = "aiohttp-3.11.8-cp312-cp312-win32.whl", hash = "sha256:b64fa6b76b35b695cd3e5c42a4e568cbea8d41c9e59165e2a43da00976e2027e"}, - {file = "aiohttp-3.11.8-cp312-cp312-win_amd64.whl", hash = "sha256:afba47981ff73b1794c00dce774334dcfe62664b3b4f78f278b77d21ce9daf43"}, - {file = "aiohttp-3.11.8-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a81525430da5ca356fae6e889daeb6f5cc0d5f0cef88e59cdde48e2394ea1365"}, - {file = "aiohttp-3.11.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7565689e86a88c1d258351ebd14e343337b76a56ca5c0a2c1db96ec28149386f"}, - {file = "aiohttp-3.11.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d0f9dbe9763c014c408ad51a027dc9582518e992dc63e2ffe359ac1b4840a560"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8ca580edc3ccd7f6ea76ad9cf59f5a8756d338e770b5eda7be26bcda8fa7ef53"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7d141631a7348038fc7b5d1a81b3c9afa9aa056188ded7902fe754028fdea5c5"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64e6b14608a56a4c76c60daac730b0c0eeaf9d10dfc3231f7fc26521a0d628fd"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0983d0ce329f2f9dbeb355c3744bd6333f34e0dc56025b6b7d4f285b90acb51e"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d96b93a46a3742880fa21bcb35c6c40cf27714ec0fb8ec85fe444d73b95131b9"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f4f1779c3142d913c509c2ed1de8b8f920e07a5cd65ac1f57c61cfb6bfded5a4"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:48be7cff468c9c0d86a02e6a826e1fe159094b16d5aa2c17703e7317f791b0f9"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:daea456b79ca2bacc7f062845bbb1139c3b3231fc83169da5a682cf385416dd1"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:c92e763cf641e10ad9342597d20060ba23de5e411aada96660e679e3f9371189"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a750ee5a177e0f873d6b2d7d0fa6e1e7c658fc0ca8ea56438dcba2ac94bedb09"}, - {file = "aiohttp-3.11.8-cp313-cp313-win32.whl", hash = "sha256:4448c9c7f77bad48a6569062c0c16deb77fbb7363de1dc71ed087f66fb3b3c96"}, - {file = "aiohttp-3.11.8-cp313-cp313-win_amd64.whl", hash = "sha256:481075a1949de79a8a6841e0086f2f5f464785c592cf527ed0db2c0cbd0e1ba2"}, - {file = "aiohttp-3.11.8-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:72779bfb34d6d6b51e55a7f4901b410e416b5431738b367d49696928c91a2ca8"}, - {file = "aiohttp-3.11.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e6523f39071a01757048985e4cc22d04aa130bc40d9128503f3a61a3ee98328"}, - {file = "aiohttp-3.11.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:220bbce18b3046973465be45415430f1cab39d7fdc40cbcf0a8c05485c6902fe"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:336bbf7a33dd8cb4a7afb98c70e9935a81e5e88f7ac595ba2e84b1fb5da190d6"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c5e4f1ba5059b85e05c551961a448ce2689c6249ed6a2e2174796842c191d10"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e9f9fd5c672c962389429abd11ed32c9c93f7932fd58584cae1e43951b141c6b"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58bd94ad48143e1d42e05fc055da41de0a9933f378ad87760595b8aec83d317b"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bf52642b12d70d78c18882915201bc5345f7c8f0f2ab8919d99b886aa6475a7"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fee12d8487b0df2b683424cca2a0d8fb7281d5607518d742e98119a74af01026"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:65fd04f1fea668ad1af48ac31b752000e222dccffedcad3de8ccf9d34489ccd3"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:c3f397e0511a0ec4fe331e602fc057dfd336d352062deb9969ebd81e253a149c"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:cf8f05f4abe3288fe2e106e1461fd20d8abf6103886ddfb6d746a5b8fb830d2b"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7d71d4ac0792ff89541179394d303be846a0b6cd3821ae67286ee69ecec16f9f"}, - {file = "aiohttp-3.11.8-cp39-cp39-win32.whl", hash = "sha256:2b6f8716044ae5e5f2a3b4e4b6bfee48e97c8b2a92e56f43aadd728c7fd26b7d"}, - {file = "aiohttp-3.11.8-cp39-cp39-win_amd64.whl", hash = "sha256:da343903214bf9f9d314b913caa499fa19e26d73e6e23a3db7d4898ea6d47028"}, - {file = "aiohttp-3.11.8.tar.gz", hash = "sha256:7bc9d64a2350cbb29a9732334e1a0743cbb6844de1731cbdf5949b235653f3fd"}, + {file = "aiohttp-3.11.11-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a60804bff28662cbcf340a4d61598891f12eea3a66af48ecfdc975ceec21e3c8"}, + {file = "aiohttp-3.11.11-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4b4fa1cb5f270fb3eab079536b764ad740bb749ce69a94d4ec30ceee1b5940d5"}, + {file = "aiohttp-3.11.11-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:731468f555656767cda219ab42e033355fe48c85fbe3ba83a349631541715ba2"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb23d8bb86282b342481cad4370ea0853a39e4a32a0042bb52ca6bdde132df43"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f047569d655f81cb70ea5be942ee5d4421b6219c3f05d131f64088c73bb0917f"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd7659baae9ccf94ae5fe8bfaa2c7bc2e94d24611528395ce88d009107e00c6d"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af01e42ad87ae24932138f154105e88da13ce7d202a6de93fafdafb2883a00ef"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5854be2f3e5a729800bac57a8d76af464e160f19676ab6aea74bde18ad19d438"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6526e5fb4e14f4bbf30411216780c9967c20c5a55f2f51d3abd6de68320cc2f3"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:85992ee30a31835fc482468637b3e5bd085fa8fe9392ba0bdcbdc1ef5e9e3c55"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:88a12ad8ccf325a8a5ed80e6d7c3bdc247d66175afedbe104ee2aaca72960d8e"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:0a6d3fbf2232e3a08c41eca81ae4f1dff3d8f1a30bae415ebe0af2d2458b8a33"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:84a585799c58b795573c7fa9b84c455adf3e1d72f19a2bf498b54a95ae0d194c"}, + {file = "aiohttp-3.11.11-cp310-cp310-win32.whl", hash = "sha256:bfde76a8f430cf5c5584553adf9926534352251d379dcb266ad2b93c54a29745"}, + {file = "aiohttp-3.11.11-cp310-cp310-win_amd64.whl", hash = "sha256:0fd82b8e9c383af11d2b26f27a478640b6b83d669440c0a71481f7c865a51da9"}, + {file = "aiohttp-3.11.11-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ba74ec819177af1ef7f59063c6d35a214a8fde6f987f7661f4f0eecc468a8f76"}, + {file = "aiohttp-3.11.11-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4af57160800b7a815f3fe0eba9b46bf28aafc195555f1824555fa2cfab6c1538"}, + {file = "aiohttp-3.11.11-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ffa336210cf9cd8ed117011085817d00abe4c08f99968deef0013ea283547204"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81b8fe282183e4a3c7a1b72f5ade1094ed1c6345a8f153506d114af5bf8accd9"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3af41686ccec6a0f2bdc66686dc0f403c41ac2089f80e2214a0f82d001052c03"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70d1f9dde0e5dd9e292a6d4d00058737052b01f3532f69c0c65818dac26dc287"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:249cc6912405917344192b9f9ea5cd5b139d49e0d2f5c7f70bdfaf6b4dbf3a2e"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0eb98d90b6690827dcc84c246811feeb4e1eea683c0eac6caed7549be9c84665"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ec82bf1fda6cecce7f7b915f9196601a1bd1a3079796b76d16ae4cce6d0ef89b"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9fd46ce0845cfe28f108888b3ab17abff84ff695e01e73657eec3f96d72eef34"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:bd176afcf8f5d2aed50c3647d4925d0db0579d96f75a31e77cbaf67d8a87742d"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ec2aa89305006fba9ffb98970db6c8221541be7bee4c1d027421d6f6df7d1ce2"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:92cde43018a2e17d48bb09c79e4d4cb0e236de5063ce897a5e40ac7cb4878773"}, + {file = "aiohttp-3.11.11-cp311-cp311-win32.whl", hash = "sha256:aba807f9569455cba566882c8938f1a549f205ee43c27b126e5450dc9f83cc62"}, + {file = "aiohttp-3.11.11-cp311-cp311-win_amd64.whl", hash = "sha256:ae545f31489548c87b0cced5755cfe5a5308d00407000e72c4fa30b19c3220ac"}, + {file = "aiohttp-3.11.11-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e595c591a48bbc295ebf47cb91aebf9bd32f3ff76749ecf282ea7f9f6bb73886"}, + {file = "aiohttp-3.11.11-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3ea1b59dc06396b0b424740a10a0a63974c725b1c64736ff788a3689d36c02d2"}, + {file = "aiohttp-3.11.11-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8811f3f098a78ffa16e0ea36dffd577eb031aea797cbdba81be039a4169e242c"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7227b87a355ce1f4bf83bfae4399b1f5bb42e0259cb9405824bd03d2f4336a"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d40f9da8cabbf295d3a9dae1295c69975b86d941bc20f0a087f0477fa0a66231"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ffb3dc385f6bb1568aa974fe65da84723210e5d9707e360e9ecb51f59406cd2e"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8f5f7515f3552d899c61202d99dcb17d6e3b0de777900405611cd747cecd1b8"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3499c7ffbfd9c6a3d8d6a2b01c26639da7e43d47c7b4f788016226b1e711caa8"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8e2bf8029dbf0810c7bfbc3e594b51c4cc9101fbffb583a3923aea184724203c"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b6212a60e5c482ef90f2d788835387070a88d52cf6241d3916733c9176d39eab"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d119fafe7b634dbfa25a8c597718e69a930e4847f0b88e172744be24515140da"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:6fba278063559acc730abf49845d0e9a9e1ba74f85f0ee6efd5803f08b285853"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:92fc484e34b733704ad77210c7957679c5c3877bd1e6b6d74b185e9320cc716e"}, + {file = "aiohttp-3.11.11-cp312-cp312-win32.whl", hash = "sha256:9f5b3c1ed63c8fa937a920b6c1bec78b74ee09593b3f5b979ab2ae5ef60d7600"}, + {file = "aiohttp-3.11.11-cp312-cp312-win_amd64.whl", hash = "sha256:1e69966ea6ef0c14ee53ef7a3d68b564cc408121ea56c0caa2dc918c1b2f553d"}, + {file = "aiohttp-3.11.11-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:541d823548ab69d13d23730a06f97460f4238ad2e5ed966aaf850d7c369782d9"}, + {file = "aiohttp-3.11.11-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:929f3ed33743a49ab127c58c3e0a827de0664bfcda566108989a14068f820194"}, + {file = "aiohttp-3.11.11-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0882c2820fd0132240edbb4a51eb8ceb6eef8181db9ad5291ab3332e0d71df5f"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b63de12e44935d5aca7ed7ed98a255a11e5cb47f83a9fded7a5e41c40277d104"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa54f8ef31d23c506910c21163f22b124facb573bff73930735cf9fe38bf7dff"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a344d5dc18074e3872777b62f5f7d584ae4344cd6006c17ba12103759d407af3"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b7fb429ab1aafa1f48578eb315ca45bd46e9c37de11fe45c7f5f4138091e2f1"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c341c7d868750e31961d6d8e60ff040fb9d3d3a46d77fd85e1ab8e76c3e9a5c4"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ed9ee95614a71e87f1a70bc81603f6c6760128b140bc4030abe6abaa988f1c3d"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:de8d38f1c2810fa2a4f1d995a2e9c70bb8737b18da04ac2afbf3971f65781d87"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a9b7371665d4f00deb8f32208c7c5e652059b0fda41cf6dbcac6114a041f1cc2"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:620598717fce1b3bd14dd09947ea53e1ad510317c85dda2c9c65b622edc96b12"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bf8d9bfee991d8acc72d060d53860f356e07a50f0e0d09a8dfedea1c554dd0d5"}, + {file = "aiohttp-3.11.11-cp313-cp313-win32.whl", hash = "sha256:9d73ee3725b7a737ad86c2eac5c57a4a97793d9f442599bea5ec67ac9f4bdc3d"}, + {file = "aiohttp-3.11.11-cp313-cp313-win_amd64.whl", hash = "sha256:c7a06301c2fb096bdb0bd25fe2011531c1453b9f2c163c8031600ec73af1cc99"}, + {file = "aiohttp-3.11.11-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3e23419d832d969f659c208557de4a123e30a10d26e1e14b73431d3c13444c2e"}, + {file = "aiohttp-3.11.11-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:21fef42317cf02e05d3b09c028712e1d73a9606f02467fd803f7c1f39cc59add"}, + {file = "aiohttp-3.11.11-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1f21bb8d0235fc10c09ce1d11ffbd40fc50d3f08a89e4cf3a0c503dc2562247a"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1642eceeaa5ab6c9b6dfeaaa626ae314d808188ab23ae196a34c9d97efb68350"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2170816e34e10f2fd120f603e951630f8a112e1be3b60963a1f159f5699059a6"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8be8508d110d93061197fd2d6a74f7401f73b6d12f8822bbcd6d74f2b55d71b1"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4eed954b161e6b9b65f6be446ed448ed3921763cc432053ceb606f89d793927e"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6c9af134da4bc9b3bd3e6a70072509f295d10ee60c697826225b60b9959acdd"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:44167fc6a763d534a6908bdb2592269b4bf30a03239bcb1654781adf5e49caf1"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:479b8c6ebd12aedfe64563b85920525d05d394b85f166b7873c8bde6da612f9c"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:10b4ff0ad793d98605958089fabfa350e8e62bd5d40aa65cdc69d6785859f94e"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:b540bd67cfb54e6f0865ceccd9979687210d7ed1a1cc8c01f8e67e2f1e883d28"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1dac54e8ce2ed83b1f6b1a54005c87dfed139cf3f777fdc8afc76e7841101226"}, + {file = "aiohttp-3.11.11-cp39-cp39-win32.whl", hash = "sha256:568c1236b2fde93b7720f95a890741854c1200fba4a3471ff48b2934d2d93fd3"}, + {file = "aiohttp-3.11.11-cp39-cp39-win_amd64.whl", hash = "sha256:943a8b052e54dfd6439fd7989f67fc6a7f2138d0a2cf0a7de5f18aa4fe7eb3b1"}, + {file = "aiohttp-3.11.11.tar.gz", hash = "sha256:bb49c7f1e6ebf3821a42d81d494f538107610c3a705987f53068546b0e90303e"}, ] [package.dependencies] @@ -139,13 +139,13 @@ speedups = ["Brotli", "aiodns (>=3.2.0)", "brotlicffi"] [[package]] name = "aiosignal" -version = "1.3.1" +version = "1.3.2" description = "aiosignal: a list of registered asynchronous callbacks" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"}, - {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"}, + {file = "aiosignal-1.3.2-py2.py3-none-any.whl", hash = "sha256:45cde58e409a301715980c2b01d0c28bdde3770d8290b5eb2173759d9acb31a5"}, + {file = "aiosignal-1.3.2.tar.gz", hash = "sha256:a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54"}, ] [package.dependencies] @@ -153,24 +153,24 @@ frozenlist = ">=1.1.0" [[package]] name = "anyio" -version = "4.6.2.post1" +version = "4.7.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" files = [ - {file = "anyio-4.6.2.post1-py3-none-any.whl", hash = "sha256:6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d"}, - {file = "anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c"}, + {file = "anyio-4.7.0-py3-none-any.whl", hash = "sha256:ea60c3723ab42ba6fff7e8ccb0488c898ec538ff4df1f1d5e642c3601d07e352"}, + {file = "anyio-4.7.0.tar.gz", hash = "sha256:2f834749c602966b7d456a7567cafcb309f96482b5081d14ac93ccd457f9dd48"}, ] [package.dependencies] exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" -typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} +typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] -doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"] +doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] trio = ["trio (>=0.26.1)"] [[package]] @@ -217,19 +217,19 @@ files = [ [[package]] name = "attrs" -version = "24.2.0" +version = "24.3.0" description = "Classes Without Boilerplate" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, - {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, + {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, + {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, ] [package.extras] benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] @@ -420,13 +420,13 @@ cffi = ">=1.0.0" [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] @@ -510,127 +510,114 @@ pycparser = "*" [[package]] name = "charset-normalizer" -version = "3.4.0" +version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false -python-versions = ">=3.7.0" +python-versions = ">=3.7" files = [ - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"}, - {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"}, - {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e218488cd232553829be0664c2292d3af2eeeb94b32bea483cf79ac6a694e037"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80ed5e856eb7f30115aaf94e4a08114ccc8813e6ed1b5efa74f9f82e8509858f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b010a7a4fd316c3c484d482922d13044979e78d1861f0e0650423144c616a46a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4532bff1b8421fd0a320463030c7520f56a79c9024a4e88f01c537316019005a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d973f03c0cb71c5ed99037b870f2be986c3c05e63622c017ea9816881d2dd247"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3a3bd0dcd373514dcec91c411ddb9632c0d7d92aed7093b8c3bbb6d69ca74408"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9c3cdf5390dcd29aa8056d13e8e99526cda0305acc038b96b30352aff5ff2bb"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2bdfe3ac2e1bbe5b59a1a63721eb3b95fc9b6817ae4a46debbb4e11f6232428d"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:eab677309cdb30d047996b36d34caeda1dc91149e4fdca0b1a039b3f79d9a807"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win32.whl", hash = "sha256:c0429126cf75e16c4f0ad00ee0eae4242dc652290f940152ca8c75c3a4b6ee8f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:9f0b8b1c6d84c8034a44893aba5e767bf9c7a211e313a9605d9c617d7083829f"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f30bf9fd9be89ecb2360c7d94a711f00c09b976258846efe40db3d05828e8089"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97f68b8d6831127e4787ad15e6757232e14e12060bec17091b85eb1486b91d8d"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7974a0b5ecd505609e3b19742b60cee7aa2aa2fb3151bc917e6e2646d7667dcf"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc54db6c8593ef7d4b2a331b58653356cf04f67c960f584edb7c3d8c97e8f39e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:311f30128d7d333eebd7896965bfcfbd0065f1716ec92bd5638d7748eb6f936a"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:7d053096f67cd1241601111b698f5cad775f97ab25d81567d3f59219b5f1adbd"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:807f52c1f798eef6cf26beb819eeb8819b1622ddfeef9d0977a8502d4db6d534"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:dccbe65bd2f7f7ec22c4ff99ed56faa1e9f785482b9bbd7c717e26fd723a1d1e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:2fb9bd477fdea8684f78791a6de97a953c51831ee2981f8e4f583ff3b9d9687e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:01732659ba9b5b873fc117534143e4feefecf3b2078b0a6a2e925271bb6f4cfa"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win32.whl", hash = "sha256:7a4f97a081603d2050bfaffdefa5b02a9ec823f8348a572e39032caa8404a487"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:7b1bef6280950ee6c177b326508f86cad7ad4dff12454483b51d8b7d673a2c5d"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ecddf25bee22fe4fe3737a399d0d177d72bc22be6913acfab364b40bce1ba83c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c60ca7339acd497a55b0ea5d506b2a2612afb2826560416f6894e8b5770d4a9"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7b2d86dd06bfc2ade3312a83a5c364c7ec2e3498f8734282c6c3d4b07b346b8"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd78cfcda14a1ef52584dbb008f7ac81c1328c0f58184bf9a84c49c605002da6"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e27f48bcd0957c6d4cb9d6fa6b61d192d0b13d5ef563e5f2ae35feafc0d179c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01ad647cdd609225c5350561d084b42ddf732f4eeefe6e678765636791e78b9a"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:619a609aa74ae43d90ed2e89bdd784765de0a25ca761b93e196d938b8fd1dbbd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:89149166622f4db9b4b6a449256291dc87a99ee53151c74cbd82a53c8c2f6ccd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:7709f51f5f7c853f0fb938bcd3bc59cdfdc5203635ffd18bf354f6967ea0f824"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:345b0426edd4e18138d6528aed636de7a9ed169b4aaf9d61a8c19e39d26838ca"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0907f11d019260cdc3f94fbdb23ff9125f6b5d1039b76003b5b0ac9d6a6c9d5b"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win32.whl", hash = "sha256:ea0d8d539afa5eb2728aa1932a988a9a7af94f18582ffae4bc10b3fbdad0626e"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:329ce159e82018d646c7ac45b01a430369d526569ec08516081727a20e9e4af4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b97e690a2118911e39b4042088092771b4ae3fc3aa86518f84b8cf6888dbdb41"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78baa6d91634dfb69ec52a463534bc0df05dbd546209b79a3880a34487f4b84f"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a2bc9f351a75ef49d664206d51f8e5ede9da246602dc2d2726837620ea034b2"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75832c08354f595c760a804588b9357d34ec00ba1c940c15e31e96d902093770"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af291f4fe114be0280cdd29d533696a77b5b49cfde5467176ecab32353395c4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0167ddc8ab6508fe81860a57dd472b2ef4060e8d378f0cc555707126830f2537"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2a75d49014d118e4198bcee5ee0a6f25856b29b12dbf7cd012791f8a6cc5c496"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363e2f92b0f0174b2f8238240a1a30142e3db7b957a5dd5689b0e75fb717cc78"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ab36c8eb7e454e34e60eb55ca5d241a5d18b2c6244f6827a30e451c42410b5f7"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:4c0907b1928a36d5a998d72d64d8eaa7244989f7aaaf947500d3a800c83a3fd6"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04432ad9479fa40ec0f387795ddad4437a2b50417c69fa275e212933519ff294"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win32.whl", hash = "sha256:3bed14e9c89dcb10e8f3a29f9ccac4955aebe93c71ae803af79265c9ca5644c5"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:49402233c892a461407c512a19435d1ce275543138294f7ef013f0b63d5d3765"}, + {file = "charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85"}, + {file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"}, ] [[package]] name = "click" -version = "8.1.7" +version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, + {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, + {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, ] [package.dependencies] @@ -649,73 +636,73 @@ files = [ [[package]] name = "coverage" -version = "7.6.8" +version = "7.6.9" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" files = [ - {file = "coverage-7.6.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b39e6011cd06822eb964d038d5dff5da5d98652b81f5ecd439277b32361a3a50"}, - {file = "coverage-7.6.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:63c19702db10ad79151a059d2d6336fe0c470f2e18d0d4d1a57f7f9713875dcf"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3985b9be361d8fb6b2d1adc9924d01dec575a1d7453a14cccd73225cb79243ee"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:644ec81edec0f4ad17d51c838a7d01e42811054543b76d4ba2c5d6af741ce2a6"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f188a2402f8359cf0c4b1fe89eea40dc13b52e7b4fd4812450da9fcd210181d"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e19122296822deafce89a0c5e8685704c067ae65d45e79718c92df7b3ec3d331"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:13618bed0c38acc418896005732e565b317aa9e98d855a0e9f211a7ffc2d6638"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:193e3bffca48ad74b8c764fb4492dd875038a2f9925530cb094db92bb5e47bed"}, - {file = "coverage-7.6.8-cp310-cp310-win32.whl", hash = "sha256:3988665ee376abce49613701336544041f2117de7b7fbfe91b93d8ff8b151c8e"}, - {file = "coverage-7.6.8-cp310-cp310-win_amd64.whl", hash = "sha256:f56f49b2553d7dd85fd86e029515a221e5c1f8cb3d9c38b470bc38bde7b8445a"}, - {file = "coverage-7.6.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:86cffe9c6dfcfe22e28027069725c7f57f4b868a3f86e81d1c62462764dc46d4"}, - {file = "coverage-7.6.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d82ab6816c3277dc962cfcdc85b1efa0e5f50fb2c449432deaf2398a2928ab94"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13690e923a3932e4fad4c0ebfb9cb5988e03d9dcb4c5150b5fcbf58fd8bddfc4"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4be32da0c3827ac9132bb488d331cb32e8d9638dd41a0557c5569d57cf22c9c1"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44e6c85bbdc809383b509d732b06419fb4544dca29ebe18480379633623baafb"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:768939f7c4353c0fac2f7c37897e10b1414b571fd85dd9fc49e6a87e37a2e0d8"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e44961e36cb13c495806d4cac67640ac2866cb99044e210895b506c26ee63d3a"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3ea8bb1ab9558374c0ab591783808511d135a833c3ca64a18ec927f20c4030f0"}, - {file = "coverage-7.6.8-cp311-cp311-win32.whl", hash = "sha256:629a1ba2115dce8bf75a5cce9f2486ae483cb89c0145795603d6554bdc83e801"}, - {file = "coverage-7.6.8-cp311-cp311-win_amd64.whl", hash = "sha256:fb9fc32399dca861584d96eccd6c980b69bbcd7c228d06fb74fe53e007aa8ef9"}, - {file = "coverage-7.6.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:e683e6ecc587643f8cde8f5da6768e9d165cd31edf39ee90ed7034f9ca0eefee"}, - {file = "coverage-7.6.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1defe91d41ce1bd44b40fabf071e6a01a5aa14de4a31b986aa9dfd1b3e3e414a"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7ad66e8e50225ebf4236368cc43c37f59d5e6728f15f6e258c8639fa0dd8e6d"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3fe47da3e4fda5f1abb5709c156eca207eacf8007304ce3019eb001e7a7204cb"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:202a2d645c5a46b84992f55b0a3affe4f0ba6b4c611abec32ee88358db4bb649"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4674f0daa1823c295845b6a740d98a840d7a1c11df00d1fd62614545c1583787"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:74610105ebd6f33d7c10f8907afed696e79c59e3043c5f20eaa3a46fddf33b4c"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:37cda8712145917105e07aab96388ae76e787270ec04bcb9d5cc786d7cbb8443"}, - {file = "coverage-7.6.8-cp312-cp312-win32.whl", hash = "sha256:9e89d5c8509fbd6c03d0dd1972925b22f50db0792ce06324ba069f10787429ad"}, - {file = "coverage-7.6.8-cp312-cp312-win_amd64.whl", hash = "sha256:379c111d3558272a2cae3d8e57e6b6e6f4fe652905692d54bad5ea0ca37c5ad4"}, - {file = "coverage-7.6.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0b0c69f4f724c64dfbfe79f5dfb503b42fe6127b8d479b2677f2b227478db2eb"}, - {file = "coverage-7.6.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c15b32a7aca8038ed7644f854bf17b663bc38e1671b5d6f43f9a2b2bd0c46f63"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63068a11171e4276f6ece913bde059e77c713b48c3a848814a6537f35afb8365"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f4548c5ead23ad13fb7a2c8ea541357474ec13c2b736feb02e19a3085fac002"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b4b4299dd0d2c67caaaf286d58aef5e75b125b95615dda4542561a5a566a1e3"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c9ebfb2507751f7196995142f057d1324afdab56db1d9743aab7f50289abd022"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c1b4474beee02ede1eef86c25ad4600a424fe36cff01a6103cb4533c6bf0169e"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d9fd2547e6decdbf985d579cf3fc78e4c1d662b9b0ff7cc7862baaab71c9cc5b"}, - {file = "coverage-7.6.8-cp313-cp313-win32.whl", hash = "sha256:8aae5aea53cbfe024919715eca696b1a3201886ce83790537d1c3668459c7146"}, - {file = "coverage-7.6.8-cp313-cp313-win_amd64.whl", hash = "sha256:ae270e79f7e169ccfe23284ff5ea2d52a6f401dc01b337efb54b3783e2ce3f28"}, - {file = "coverage-7.6.8-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:de38add67a0af869b0d79c525d3e4588ac1ffa92f39116dbe0ed9753f26eba7d"}, - {file = "coverage-7.6.8-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b07c25d52b1c16ce5de088046cd2432b30f9ad5e224ff17c8f496d9cb7d1d451"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62a66ff235e4c2e37ed3b6104d8b478d767ff73838d1222132a7a026aa548764"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09b9f848b28081e7b975a3626e9081574a7b9196cde26604540582da60235fdf"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:093896e530c38c8e9c996901858ac63f3d4171268db2c9c8b373a228f459bbc5"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9a7b8ac36fd688c8361cbc7bf1cb5866977ece6e0b17c34aa0df58bda4fa18a4"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:38c51297b35b3ed91670e1e4efb702b790002e3245a28c76e627478aa3c10d83"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2e4e0f60cb4bd7396108823548e82fdab72d4d8a65e58e2c19bbbc2f1e2bfa4b"}, - {file = "coverage-7.6.8-cp313-cp313t-win32.whl", hash = "sha256:6535d996f6537ecb298b4e287a855f37deaf64ff007162ec0afb9ab8ba3b8b71"}, - {file = "coverage-7.6.8-cp313-cp313t-win_amd64.whl", hash = "sha256:c79c0685f142ca53256722a384540832420dff4ab15fec1863d7e5bc8691bdcc"}, - {file = "coverage-7.6.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3ac47fa29d8d41059ea3df65bd3ade92f97ee4910ed638e87075b8e8ce69599e"}, - {file = "coverage-7.6.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:24eda3a24a38157eee639ca9afe45eefa8d2420d49468819ac5f88b10de84f4c"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4c81ed2820b9023a9a90717020315e63b17b18c274a332e3b6437d7ff70abe0"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bd55f8fc8fa494958772a2a7302b0354ab16e0b9272b3c3d83cdb5bec5bd1779"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f39e2f3530ed1626c66e7493be7a8423b023ca852aacdc91fb30162c350d2a92"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:716a78a342679cd1177bc8c2fe957e0ab91405bd43a17094324845200b2fddf4"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:177f01eeaa3aee4a5ffb0d1439c5952b53d5010f86e9d2667963e632e30082cc"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:912e95017ff51dc3d7b6e2be158dedc889d9a5cc3382445589ce554f1a34c0ea"}, - {file = "coverage-7.6.8-cp39-cp39-win32.whl", hash = "sha256:4db3ed6a907b555e57cc2e6f14dc3a4c2458cdad8919e40b5357ab9b6db6c43e"}, - {file = "coverage-7.6.8-cp39-cp39-win_amd64.whl", hash = "sha256:428ac484592f780e8cd7b6b14eb568f7c85460c92e2a37cb0c0e5186e1a0d076"}, - {file = "coverage-7.6.8-pp39.pp310-none-any.whl", hash = "sha256:5c52a036535d12590c32c49209e79cabaad9f9ad8aa4cbd875b68c4d67a9cbce"}, - {file = "coverage-7.6.8.tar.gz", hash = "sha256:8b2b8503edb06822c86d82fa64a4a5cb0760bb8f31f26e138ec743f422f37cfc"}, + {file = "coverage-7.6.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:85d9636f72e8991a1706b2b55b06c27545448baf9f6dbf51c4004609aacd7dcb"}, + {file = "coverage-7.6.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:608a7fd78c67bee8936378299a6cb9f5149bb80238c7a566fc3e6717a4e68710"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:96d636c77af18b5cb664ddf12dab9b15a0cfe9c0bde715da38698c8cea748bfa"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d75cded8a3cff93da9edc31446872d2997e327921d8eed86641efafd350e1df1"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7b15f589593110ae767ce997775d645b47e5cbbf54fd322f8ebea6277466cec"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:44349150f6811b44b25574839b39ae35291f6496eb795b7366fef3bd3cf112d3"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:d891c136b5b310d0e702e186d70cd16d1119ea8927347045124cb286b29297e5"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:db1dab894cc139f67822a92910466531de5ea6034ddfd2b11c0d4c6257168073"}, + {file = "coverage-7.6.9-cp310-cp310-win32.whl", hash = "sha256:41ff7b0da5af71a51b53f501a3bac65fb0ec311ebed1632e58fc6107f03b9198"}, + {file = "coverage-7.6.9-cp310-cp310-win_amd64.whl", hash = "sha256:35371f8438028fdccfaf3570b31d98e8d9eda8bb1d6ab9473f5a390969e98717"}, + {file = "coverage-7.6.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:932fc826442132dde42ee52cf66d941f581c685a6313feebed358411238f60f9"}, + {file = "coverage-7.6.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:085161be5f3b30fd9b3e7b9a8c301f935c8313dcf928a07b116324abea2c1c2c"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ccc660a77e1c2bf24ddbce969af9447a9474790160cfb23de6be4fa88e3951c7"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c69e42c892c018cd3c8d90da61d845f50a8243062b19d228189b0224150018a9"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0824a28ec542a0be22f60c6ac36d679e0e262e5353203bea81d44ee81fe9c6d4"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4401ae5fc52ad8d26d2a5d8a7428b0f0c72431683f8e63e42e70606374c311a1"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:98caba4476a6c8d59ec1eb00c7dd862ba9beca34085642d46ed503cc2d440d4b"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ee5defd1733fd6ec08b168bd4f5387d5b322f45ca9e0e6c817ea6c4cd36313e3"}, + {file = "coverage-7.6.9-cp311-cp311-win32.whl", hash = "sha256:f2d1ec60d6d256bdf298cb86b78dd715980828f50c46701abc3b0a2b3f8a0dc0"}, + {file = "coverage-7.6.9-cp311-cp311-win_amd64.whl", hash = "sha256:0d59fd927b1f04de57a2ba0137166d31c1a6dd9e764ad4af552912d70428c92b"}, + {file = "coverage-7.6.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:99e266ae0b5d15f1ca8d278a668df6f51cc4b854513daab5cae695ed7b721cf8"}, + {file = "coverage-7.6.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9901d36492009a0a9b94b20e52ebfc8453bf49bb2b27bca2c9706f8b4f5a554a"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abd3e72dd5b97e3af4246cdada7738ef0e608168de952b837b8dd7e90341f015"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ff74026a461eb0660366fb01c650c1d00f833a086b336bdad7ab00cc952072b3"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65dad5a248823a4996724a88eb51d4b31587aa7aa428562dbe459c684e5787ae"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:22be16571504c9ccea919fcedb459d5ab20d41172056206eb2994e2ff06118a4"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f957943bc718b87144ecaee70762bc2bc3f1a7a53c7b861103546d3a403f0a6"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0ae1387db4aecb1f485fb70a6c0148c6cdaebb6038f1d40089b1fc84a5db556f"}, + {file = "coverage-7.6.9-cp312-cp312-win32.whl", hash = "sha256:1a330812d9cc7ac2182586f6d41b4d0fadf9be9049f350e0efb275c8ee8eb692"}, + {file = "coverage-7.6.9-cp312-cp312-win_amd64.whl", hash = "sha256:b12c6b18269ca471eedd41c1b6a1065b2f7827508edb9a7ed5555e9a56dcfc97"}, + {file = "coverage-7.6.9-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:899b8cd4781c400454f2f64f7776a5d87bbd7b3e7f7bda0cb18f857bb1334664"}, + {file = "coverage-7.6.9-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:61f70dc68bd36810972e55bbbe83674ea073dd1dcc121040a08cdf3416c5349c"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8a289d23d4c46f1a82d5db4abeb40b9b5be91731ee19a379d15790e53031c014"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e216d8044a356fc0337c7a2a0536d6de07888d7bcda76febcb8adc50bdbbd00"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c026eb44f744acaa2bda7493dad903aa5bf5fc4f2554293a798d5606710055d"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e77363e8425325384f9d49272c54045bbed2f478e9dd698dbc65dbc37860eb0a"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:777abfab476cf83b5177b84d7486497e034eb9eaea0d746ce0c1268c71652077"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:447af20e25fdbe16f26e84eb714ba21d98868705cb138252d28bc400381f6ffb"}, + {file = "coverage-7.6.9-cp313-cp313-win32.whl", hash = "sha256:d872ec5aeb086cbea771c573600d47944eea2dcba8be5f3ee649bfe3cb8dc9ba"}, + {file = "coverage-7.6.9-cp313-cp313-win_amd64.whl", hash = "sha256:fd1213c86e48dfdc5a0cc676551db467495a95a662d2396ecd58e719191446e1"}, + {file = "coverage-7.6.9-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ba9e7484d286cd5a43744e5f47b0b3fb457865baf07bafc6bee91896364e1419"}, + {file = "coverage-7.6.9-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e5ea1cf0872ee455c03e5674b5bca5e3e68e159379c1af0903e89f5eba9ccc3a"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d10e07aa2b91835d6abec555ec8b2733347956991901eea6ffac295f83a30e4"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:13a9e2d3ee855db3dd6ea1ba5203316a1b1fd8eaeffc37c5b54987e61e4194ae"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c38bf15a40ccf5619fa2fe8f26106c7e8e080d7760aeccb3722664c8656b030"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:d5275455b3e4627c8e7154feaf7ee0743c2e7af82f6e3b561967b1cca755a0be"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:8f8770dfc6e2c6a2d4569f411015c8d751c980d17a14b0530da2d7f27ffdd88e"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8d2dfa71665a29b153a9681edb1c8d9c1ea50dfc2375fb4dac99ea7e21a0bcd9"}, + {file = "coverage-7.6.9-cp313-cp313t-win32.whl", hash = "sha256:5e6b86b5847a016d0fbd31ffe1001b63355ed309651851295315031ea7eb5a9b"}, + {file = "coverage-7.6.9-cp313-cp313t-win_amd64.whl", hash = "sha256:97ddc94d46088304772d21b060041c97fc16bdda13c6c7f9d8fcd8d5ae0d8611"}, + {file = "coverage-7.6.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:adb697c0bd35100dc690de83154627fbab1f4f3c0386df266dded865fc50a902"}, + {file = "coverage-7.6.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:be57b6d56e49c2739cdf776839a92330e933dd5e5d929966fbbd380c77f060be"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1592791f8204ae9166de22ba7e6705fa4ebd02936c09436a1bb85aabca3e599"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e12ae8cc979cf83d258acb5e1f1cf2f3f83524d1564a49d20b8bec14b637f08"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb5555cff66c4d3d6213a296b360f9e1a8e323e74e0426b6c10ed7f4d021e464"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b9389a429e0e5142e69d5bf4a435dd688c14478a19bb901735cdf75e57b13845"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:592ac539812e9b46046620341498caf09ca21023c41c893e1eb9dbda00a70cbf"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a27801adef24cc30871da98a105f77995e13a25a505a0161911f6aafbd66e678"}, + {file = "coverage-7.6.9-cp39-cp39-win32.whl", hash = "sha256:8e3c3e38930cfb729cb8137d7f055e5a473ddaf1217966aa6238c88bd9fd50e6"}, + {file = "coverage-7.6.9-cp39-cp39-win_amd64.whl", hash = "sha256:e28bf44afa2b187cc9f41749138a64435bf340adfcacb5b2290c070ce99839d4"}, + {file = "coverage-7.6.9-pp39.pp310-none-any.whl", hash = "sha256:f3ca78518bc6bc92828cd11867b121891d75cae4ea9e908d72030609b996db1b"}, + {file = "coverage-7.6.9.tar.gz", hash = "sha256:4a8d8977b0c6ef5aeadcb644da9e69ae0dcfe66ec7f368c89c72e058bd71164d"}, ] [package.dependencies] @@ -770,13 +757,13 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] [[package]] name = "fastapi" -version = "0.115.5" +version = "0.115.6" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" files = [ - {file = "fastapi-0.115.5-py3-none-any.whl", hash = "sha256:596b95adbe1474da47049e802f9a65ab2ffa9c2b07e7efee70eb8a66c9f2f796"}, - {file = "fastapi-0.115.5.tar.gz", hash = "sha256:0e7a4d0dc0d01c68df21887cce0945e72d3c48b9f4f79dfe7a7d53aa08fbb289"}, + {file = "fastapi-0.115.6-py3-none-any.whl", hash = "sha256:e9240b29e36fa8f4bb7290316988e90c381e5092e0cbe84e7818cc3713bcf305"}, + {file = "fastapi-0.115.6.tar.gz", hash = "sha256:9ec46f7addc14ea472958a96aae5b5de65f39721a46aaf5705c480d9a8b76654"}, ] [package.dependencies] @@ -1027,13 +1014,13 @@ test = ["Cython (>=0.29.24)"] [[package]] name = "httpx" -version = "0.28.0" +version = "0.28.1" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpx-0.28.0-py3-none-any.whl", hash = "sha256:dc0b419a0cfeb6e8b34e85167c0da2671206f5095f1baa9663d23bcfd6b535fc"}, - {file = "httpx-0.28.0.tar.gz", hash = "sha256:0858d3bab51ba7e386637f22a61d8ccddaeec5f3fe4209da3a6168dbb91573e0"}, + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, ] [package.dependencies] @@ -1149,13 +1136,13 @@ files = [ [[package]] name = "jinja2" -version = "3.1.4" +version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, - {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, + {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, + {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, ] [package.dependencies] @@ -1166,13 +1153,13 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "loguru" -version = "0.7.2" +version = "0.7.3" description = "Python logging made (stupidly) simple" optional = false -python-versions = ">=3.5" +python-versions = "<4.0,>=3.5" files = [ - {file = "loguru-0.7.2-py3-none-any.whl", hash = "sha256:003d71e3d3ed35f0f8984898359d65b79e5b21943f78af86aa5491210429b8eb"}, - {file = "loguru-0.7.2.tar.gz", hash = "sha256:e671a53522515f34fd406340ee968cb9ecafbc4b36c679da03c18fd8d0bd51ac"}, + {file = "loguru-0.7.3-py3-none-any.whl", hash = "sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c"}, + {file = "loguru-0.7.3.tar.gz", hash = "sha256:19480589e77d47b8d85b2c827ad95d49bf31b0dcde16593892eb51dd18706eb6"}, ] [package.dependencies] @@ -1180,7 +1167,7 @@ colorama = {version = ">=0.3.4", markers = "sys_platform == \"win32\""} win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} [package.extras] -dev = ["Sphinx (==7.2.5)", "colorama (==0.4.5)", "colorama (==0.4.6)", "exceptiongroup (==1.1.3)", "freezegun (==1.1.0)", "freezegun (==1.2.2)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v1.4.1)", "mypy (==v1.5.1)", "pre-commit (==3.4.0)", "pytest (==6.1.2)", "pytest (==7.4.0)", "pytest-cov (==2.12.1)", "pytest-cov (==4.1.0)", "pytest-mypy-plugins (==1.9.3)", "pytest-mypy-plugins (==3.0.0)", "sphinx-autobuild (==2021.3.14)", "sphinx-rtd-theme (==1.3.0)", "tox (==3.27.1)", "tox (==4.11.0)"] +dev = ["Sphinx (==8.1.3)", "build (==1.2.2)", "colorama (==0.4.5)", "colorama (==0.4.6)", "exceptiongroup (==1.1.3)", "freezegun (==1.1.0)", "freezegun (==1.5.0)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v1.13.0)", "mypy (==v1.4.1)", "myst-parser (==4.0.0)", "pre-commit (==4.0.1)", "pytest (==6.1.2)", "pytest (==8.3.2)", "pytest-cov (==2.12.1)", "pytest-cov (==5.0.0)", "pytest-cov (==6.0.0)", "pytest-mypy-plugins (==1.9.3)", "pytest-mypy-plugins (==3.1.0)", "sphinx-rtd-theme (==3.0.2)", "tox (==3.27.1)", "tox (==4.23.2)", "twine (==6.0.1)"] [[package]] name = "markupsafe" @@ -1380,7 +1367,7 @@ url = "../test" [[package]] name = "nonebot2" -version = "2.4.0" +version = "2.4.1" description = "An asynchronous python bot framework." optional = false python-versions = "^3.9" @@ -1418,13 +1405,13 @@ url = "../.." [[package]] name = "nonebug" -version = "0.4.2" +version = "0.4.3" description = "nonebot2 test framework" optional = false python-versions = "<4.0,>=3.9" files = [ - {file = "nonebug-0.4.2-py3-none-any.whl", hash = "sha256:83d9229ec899819e9f5786eabc0c27b9dd0cd5d6e2e7438f59923ab822d5c555"}, - {file = "nonebug-0.4.2.tar.gz", hash = "sha256:002dac00fed1fbff97574f3dffab2237fc41473b3bf3e73d2730ae34895bc137"}, + {file = "nonebug-0.4.3-py3-none-any.whl", hash = "sha256:eb9b2c8ab3d45459a4f00ebdaae90729e9e9628575c0685fca4c871dd4cfd425"}, + {file = "nonebug-0.4.3.tar.gz", hash = "sha256:e9592d2c7a42b76f4a336f98726cba92e1300f6bab155c8822e865919786f10c"}, ] [package.dependencies] @@ -1487,109 +1474,93 @@ files = [ [[package]] name = "propcache" -version = "0.2.0" +version = "0.2.1" description = "Accelerated property cache" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c5869b8fd70b81835a6f187c5fdbe67917a04d7e52b6e7cc4e5fe39d55c39d58"}, - {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:952e0d9d07609d9c5be361f33b0d6d650cd2bae393aabb11d9b719364521984b"}, - {file = "propcache-0.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:33ac8f098df0585c0b53009f039dfd913b38c1d2edafed0cedcc0c32a05aa110"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97e48e8875e6c13909c800fa344cd54cc4b2b0db1d5f911f840458a500fde2c2"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:388f3217649d6d59292b722d940d4d2e1e6a7003259eb835724092a1cca0203a"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f571aea50ba5623c308aa146eb650eebf7dbe0fd8c5d946e28343cb3b5aad577"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3dfafb44f7bb35c0c06eda6b2ab4bfd58f02729e7c4045e179f9a861b07c9850"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3ebe9a75be7ab0b7da2464a77bb27febcb4fab46a34f9288f39d74833db7f61"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d2f0d0f976985f85dfb5f3d685697ef769faa6b71993b46b295cdbbd6be8cc37"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a3dc1a4b165283bd865e8f8cb5f0c64c05001e0718ed06250d8cac9bec115b48"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9e0f07b42d2a50c7dd2d8675d50f7343d998c64008f1da5fef888396b7f84630"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e63e3e1e0271f374ed489ff5ee73d4b6e7c60710e1f76af5f0e1a6117cd26394"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:56bb5c98f058a41bb58eead194b4db8c05b088c93d94d5161728515bd52b052b"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7665f04d0c7f26ff8bb534e1c65068409bf4687aa2534faf7104d7182debb336"}, - {file = "propcache-0.2.0-cp310-cp310-win32.whl", hash = "sha256:7cf18abf9764746b9c8704774d8b06714bcb0a63641518a3a89c7f85cc02c2ad"}, - {file = "propcache-0.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:cfac69017ef97db2438efb854edf24f5a29fd09a536ff3a992b75990720cdc99"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:63f13bf09cc3336eb04a837490b8f332e0db41da66995c9fd1ba04552e516354"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608cce1da6f2672a56b24a015b42db4ac612ee709f3d29f27a00c943d9e851de"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:466c219deee4536fbc83c08d09115249db301550625c7fef1c5563a584c9bc87"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc2db02409338bf36590aa985a461b2c96fce91f8e7e0f14c50c5fcc4f229016"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a6ed8db0a556343d566a5c124ee483ae113acc9a557a807d439bcecc44e7dfbb"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:91997d9cb4a325b60d4e3f20967f8eb08dfcb32b22554d5ef78e6fd1dda743a2"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c7dde9e533c0a49d802b4f3f218fa9ad0a1ce21f2c2eb80d5216565202acab4"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffcad6c564fe6b9b8916c1aefbb37a362deebf9394bd2974e9d84232e3e08504"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:97a58a28bcf63284e8b4d7b460cbee1edaab24634e82059c7b8c09e65284f178"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:945db8ee295d3af9dbdbb698cce9bbc5c59b5c3fe328bbc4387f59a8a35f998d"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:39e104da444a34830751715f45ef9fc537475ba21b7f1f5b0f4d71a3b60d7fe2"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c5ecca8f9bab618340c8e848d340baf68bcd8ad90a8ecd7a4524a81c1764b3db"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c436130cc779806bdf5d5fae0d848713105472b8566b75ff70048c47d3961c5b"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:191db28dc6dcd29d1a3e063c3be0b40688ed76434622c53a284e5427565bbd9b"}, - {file = "propcache-0.2.0-cp311-cp311-win32.whl", hash = "sha256:5f2564ec89058ee7c7989a7b719115bdfe2a2fb8e7a4543b8d1c0cc4cf6478c1"}, - {file = "propcache-0.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6e2e54267980349b723cff366d1e29b138b9a60fa376664a157a342689553f71"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:2ee7606193fb267be4b2e3b32714f2d58cad27217638db98a60f9efb5efeccc2"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:91ee8fc02ca52e24bcb77b234f22afc03288e1dafbb1f88fe24db308910c4ac7"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2e900bad2a8456d00a113cad8c13343f3b1f327534e3589acc2219729237a2e8"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f52a68c21363c45297aca15561812d542f8fc683c85201df0bebe209e349f793"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e41d67757ff4fbc8ef2af99b338bfb955010444b92929e9e55a6d4dcc3c4f09"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a64e32f8bd94c105cc27f42d3b658902b5bcc947ece3c8fe7bc1b05982f60e89"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55346705687dbd7ef0d77883ab4f6fabc48232f587925bdaf95219bae072491e"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00181262b17e517df2cd85656fcd6b4e70946fe62cd625b9d74ac9977b64d8d9"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6994984550eaf25dd7fc7bd1b700ff45c894149341725bb4edc67f0ffa94efa4"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:56295eb1e5f3aecd516d91b00cfd8bf3a13991de5a479df9e27dd569ea23959c"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:439e76255daa0f8151d3cb325f6dd4a3e93043e6403e6491813bcaaaa8733887"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f6475a1b2ecb310c98c28d271a30df74f9dd436ee46d09236a6b750a7599ce57"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3444cdba6628accf384e349014084b1cacd866fbb88433cd9d279d90a54e0b23"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4a9d9b4d0a9b38d1c391bb4ad24aa65f306c6f01b512e10a8a34a2dc5675d348"}, - {file = "propcache-0.2.0-cp312-cp312-win32.whl", hash = "sha256:69d3a98eebae99a420d4b28756c8ce6ea5a29291baf2dc9ff9414b42676f61d5"}, - {file = "propcache-0.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:ad9c9b99b05f163109466638bd30ada1722abb01bbb85c739c50b6dc11f92dc3"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ecddc221a077a8132cf7c747d5352a15ed763b674c0448d811f408bf803d9ad7"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0e53cb83fdd61cbd67202735e6a6687a7b491c8742dfc39c9e01e80354956763"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92fe151145a990c22cbccf9ae15cae8ae9eddabfc949a219c9f667877e40853d"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6a21ef516d36909931a2967621eecb256018aeb11fc48656e3257e73e2e247a"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f88a4095e913f98988f5b338c1d4d5d07dbb0b6bad19892fd447484e483ba6b"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a5b3bb545ead161be780ee85a2b54fdf7092815995661947812dde94a40f6fb"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67aeb72e0f482709991aa91345a831d0b707d16b0257e8ef88a2ad246a7280bf"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c997f8c44ec9b9b0bcbf2d422cc00a1d9b9c681f56efa6ca149a941e5560da2"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a66df3d4992bc1d725b9aa803e8c5a66c010c65c741ad901e260ece77f58d2f"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3ebbcf2a07621f29638799828b8d8668c421bfb94c6cb04269130d8de4fb7136"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1235c01ddaa80da8235741e80815ce381c5267f96cc49b1477fdcf8c047ef325"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3947483a381259c06921612550867b37d22e1df6d6d7e8361264b6d037595f44"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d5bed7f9805cc29c780f3aee05de3262ee7ce1f47083cfe9f77471e9d6777e83"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e4a91d44379f45f5e540971d41e4626dacd7f01004826a18cb048e7da7e96544"}, - {file = "propcache-0.2.0-cp313-cp313-win32.whl", hash = "sha256:f902804113e032e2cdf8c71015651c97af6418363bea8d78dc0911d56c335032"}, - {file = "propcache-0.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:8f188cfcc64fb1266f4684206c9de0e80f54622c3f22a910cbd200478aeae61e"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:53d1bd3f979ed529f0805dd35ddaca330f80a9a6d90bc0121d2ff398f8ed8861"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:83928404adf8fb3d26793665633ea79b7361efa0287dfbd372a7e74311d51ee6"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:77a86c261679ea5f3896ec060be9dc8e365788248cc1e049632a1be682442063"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:218db2a3c297a3768c11a34812e63b3ac1c3234c3a086def9c0fee50d35add1f"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7735e82e3498c27bcb2d17cb65d62c14f1100b71723b68362872bca7d0913d90"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:20a617c776f520c3875cf4511e0d1db847a076d720714ae35ffe0df3e440be68"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67b69535c870670c9f9b14a75d28baa32221d06f6b6fa6f77a0a13c5a7b0a5b9"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4569158070180c3855e9c0791c56be3ceeb192defa2cdf6a3f39e54319e56b89"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:db47514ffdbd91ccdc7e6f8407aac4ee94cc871b15b577c1c324236b013ddd04"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_armv7l.whl", hash = "sha256:2a60ad3e2553a74168d275a0ef35e8c0a965448ffbc3b300ab3a5bb9956c2162"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:662dd62358bdeaca0aee5761de8727cfd6861432e3bb828dc2a693aa0471a563"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:25a1f88b471b3bc911d18b935ecb7115dff3a192b6fef46f0bfaf71ff4f12418"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:f60f0ac7005b9f5a6091009b09a419ace1610e163fa5deaba5ce3484341840e7"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:74acd6e291f885678631b7ebc85d2d4aec458dd849b8c841b57ef04047833bed"}, - {file = "propcache-0.2.0-cp38-cp38-win32.whl", hash = "sha256:d9b6ddac6408194e934002a69bcaadbc88c10b5f38fb9307779d1c629181815d"}, - {file = "propcache-0.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:676135dcf3262c9c5081cc8f19ad55c8a64e3f7282a21266d05544450bffc3a5"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:25c8d773a62ce0451b020c7b29a35cfbc05de8b291163a7a0f3b7904f27253e6"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:375a12d7556d462dc64d70475a9ee5982465fbb3d2b364f16b86ba9135793638"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1ec43d76b9677637a89d6ab86e1fef70d739217fefa208c65352ecf0282be957"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f45eec587dafd4b2d41ac189c2156461ebd0c1082d2fe7013571598abb8505d1"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc092ba439d91df90aea38168e11f75c655880c12782facf5cf9c00f3d42b562"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fa1076244f54bb76e65e22cb6910365779d5c3d71d1f18b275f1dfc7b0d71b4d"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:682a7c79a2fbf40f5dbb1eb6bfe2cd865376deeac65acf9beb607505dced9e12"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e40876731f99b6f3c897b66b803c9e1c07a989b366c6b5b475fafd1f7ba3fb8"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:363ea8cd3c5cb6679f1c2f5f1f9669587361c062e4899fce56758efa928728f8"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:140fbf08ab3588b3468932974a9331aff43c0ab8a2ec2c608b6d7d1756dbb6cb"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:e70fac33e8b4ac63dfc4c956fd7d85a0b1139adcfc0d964ce288b7c527537fea"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b33d7a286c0dc1a15f5fc864cc48ae92a846df287ceac2dd499926c3801054a6"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:f6d5749fdd33d90e34c2efb174c7e236829147a2713334d708746e94c4bde40d"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:22aa8f2272d81d9317ff5756bb108021a056805ce63dd3630e27d042c8092798"}, - {file = "propcache-0.2.0-cp39-cp39-win32.whl", hash = "sha256:73e4b40ea0eda421b115248d7e79b59214411109a5bc47d0d48e4c73e3b8fcf9"}, - {file = "propcache-0.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:9517d5e9e0731957468c29dbfd0f976736a0e55afaea843726e887f36fe017df"}, - {file = "propcache-0.2.0-py3-none-any.whl", hash = "sha256:2ccc28197af5313706511fab3a8b66dcd6da067a1331372c82ea1cb74285e036"}, - {file = "propcache-0.2.0.tar.gz", hash = "sha256:df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6b3f39a85d671436ee3d12c017f8fdea38509e4f25b28eb25877293c98c243f6"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d51fbe4285d5db5d92a929e3e21536ea3dd43732c5b177c7ef03f918dff9f2"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6445804cf4ec763dc70de65a3b0d9954e868609e83850a47ca4f0cb64bd79fea"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9479aa06a793c5aeba49ce5c5692ffb51fcd9a7016e017d555d5e2b0045d212"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9631c5e8b5b3a0fda99cb0d29c18133bca1e18aea9effe55adb3da1adef80d3"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3156628250f46a0895f1f36e1d4fbe062a1af8718ec3ebeb746f1d23f0c5dc4d"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b6fb63ae352e13748289f04f37868099e69dba4c2b3e271c46061e82c745634"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:887d9b0a65404929641a9fabb6452b07fe4572b269d901d622d8a34a4e9043b2"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a96dc1fa45bd8c407a0af03b2d5218392729e1822b0c32e62c5bf7eeb5fb3958"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a7e65eb5c003a303b94aa2c3852ef130230ec79e349632d030e9571b87c4698c"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:999779addc413181912e984b942fbcc951be1f5b3663cd80b2687758f434c583"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:19a0f89a7bb9d8048d9c4370c9c543c396e894c76be5525f5e1ad287f1750ddf"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1ac2f5fe02fa75f56e1ad473f1175e11f475606ec9bd0be2e78e4734ad575034"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:574faa3b79e8ebac7cb1d7930f51184ba1ccf69adfdec53a12f319a06030a68b"}, + {file = "propcache-0.2.1-cp310-cp310-win32.whl", hash = "sha256:03ff9d3f665769b2a85e6157ac8b439644f2d7fd17615a82fa55739bc97863f4"}, + {file = "propcache-0.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:2d3af2e79991102678f53e0dbf4c35de99b6b8b58f29a27ca0325816364caaba"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ffc3cca89bb438fb9c95c13fc874012f7b9466b89328c3c8b1aa93cdcfadd16"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f174bbd484294ed9fdf09437f889f95807e5f229d5d93588d34e92106fbf6717"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:70693319e0b8fd35dd863e3e29513875eb15c51945bf32519ef52927ca883bc3"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b480c6a4e1138e1aa137c0079b9b6305ec6dcc1098a8ca5196283e8a49df95a9"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d27b84d5880f6d8aa9ae3edb253c59d9f6642ffbb2c889b78b60361eed449787"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:857112b22acd417c40fa4595db2fe28ab900c8c5fe4670c7989b1c0230955465"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf6c4150f8c0e32d241436526f3c3f9cbd34429492abddbada2ffcff506c51af"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66d4cfda1d8ed687daa4bc0274fcfd5267873db9a5bc0418c2da19273040eeb7"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c2f992c07c0fca81655066705beae35fc95a2fa7366467366db627d9f2ee097f"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:4a571d97dbe66ef38e472703067021b1467025ec85707d57e78711c085984e54"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:bb6178c241278d5fe853b3de743087be7f5f4c6f7d6d22a3b524d323eecec505"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ad1af54a62ffe39cf34db1aa6ed1a1873bd548f6401db39d8e7cd060b9211f82"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e7048abd75fe40712005bcfc06bb44b9dfcd8e101dda2ecf2f5aa46115ad07ca"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:160291c60081f23ee43d44b08a7e5fb76681221a8e10b3139618c5a9a291b84e"}, + {file = "propcache-0.2.1-cp311-cp311-win32.whl", hash = "sha256:819ce3b883b7576ca28da3861c7e1a88afd08cc8c96908e08a3f4dd64a228034"}, + {file = "propcache-0.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:edc9fc7051e3350643ad929df55c451899bb9ae6d24998a949d2e4c87fb596d3"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:081a430aa8d5e8876c6909b67bd2d937bfd531b0382d3fdedb82612c618bc41a"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d2ccec9ac47cf4e04897619c0e0c1a48c54a71bdf045117d3a26f80d38ab1fb0"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:14d86fe14b7e04fa306e0c43cdbeebe6b2c2156a0c9ce56b815faacc193e320d"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:049324ee97bb67285b49632132db351b41e77833678432be52bdd0289c0e05e4"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1cd9a1d071158de1cc1c71a26014dcdfa7dd3d5f4f88c298c7f90ad6f27bb46d"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98110aa363f1bb4c073e8dcfaefd3a5cea0f0834c2aab23dda657e4dab2f53b5"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:647894f5ae99c4cf6bb82a1bb3a796f6e06af3caa3d32e26d2350d0e3e3faf24"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd3223c15bebe26518d58ccf9a39b93948d3dcb3e57a20480dfdd315356baff"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d71264a80f3fcf512eb4f18f59423fe82d6e346ee97b90625f283df56aee103f"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:e73091191e4280403bde6c9a52a6999d69cdfde498f1fdf629105247599b57ec"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3935bfa5fede35fb202c4b569bb9c042f337ca4ff7bd540a0aa5e37131659348"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f508b0491767bb1f2b87fdfacaba5f7eddc2f867740ec69ece6d1946d29029a6"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1672137af7c46662a1c2be1e8dc78cb6d224319aaa40271c9257d886be4363a6"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b74c261802d3d2b85c9df2dfb2fa81b6f90deeef63c2db9f0e029a3cac50b518"}, + {file = "propcache-0.2.1-cp312-cp312-win32.whl", hash = "sha256:d09c333d36c1409d56a9d29b3a1b800a42c76a57a5a8907eacdbce3f18768246"}, + {file = "propcache-0.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:c214999039d4f2a5b2073ac506bba279945233da8c786e490d411dfc30f855c1"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aca405706e0b0a44cc6bfd41fbe89919a6a56999157f6de7e182a990c36e37bc"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:12d1083f001ace206fe34b6bdc2cb94be66d57a850866f0b908972f90996b3e9"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d93f3307ad32a27bda2e88ec81134b823c240aa3abb55821a8da553eed8d9439"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba278acf14471d36316159c94a802933d10b6a1e117b8554fe0d0d9b75c9d536"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4e6281aedfca15301c41f74d7005e6e3f4ca143584ba696ac69df4f02f40d629"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5b750a8e5a1262434fb1517ddf64b5de58327f1adc3524a5e44c2ca43305eb0b"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf72af5e0fb40e9babf594308911436c8efde3cb5e75b6f206c34ad18be5c052"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2d0a12018b04f4cb820781ec0dffb5f7c7c1d2a5cd22bff7fb055a2cb19ebce"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e800776a79a5aabdb17dcc2346a7d66d0777e942e4cd251defeb084762ecd17d"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:4160d9283bd382fa6c0c2b5e017acc95bc183570cd70968b9202ad6d8fc48dce"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:30b43e74f1359353341a7adb783c8f1b1c676367b011709f466f42fda2045e95"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:58791550b27d5488b1bb52bc96328456095d96206a250d28d874fafe11b3dfaf"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:0f022d381747f0dfe27e99d928e31bc51a18b65bb9e481ae0af1380a6725dd1f"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:297878dc9d0a334358f9b608b56d02e72899f3b8499fc6044133f0d319e2ec30"}, + {file = "propcache-0.2.1-cp313-cp313-win32.whl", hash = "sha256:ddfab44e4489bd79bda09d84c430677fc7f0a4939a73d2bba3073036f487a0a6"}, + {file = "propcache-0.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:556fc6c10989f19a179e4321e5d678db8eb2924131e64652a51fe83e4c3db0e1"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6a9a8c34fb7bb609419a211e59da8887eeca40d300b5ea8e56af98f6fbbb1541"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ae1aa1cd222c6d205853b3013c69cd04515f9d6ab6de4b0603e2e1c33221303e"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:accb6150ce61c9c4b7738d45550806aa2b71c7668c6942f17b0ac182b6142fd4"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5eee736daafa7af6d0a2dc15cc75e05c64f37fc37bafef2e00d77c14171c2097"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7a31fc1e1bd362874863fdeed71aed92d348f5336fd84f2197ba40c59f061bd"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba4cfa1052819d16699e1d55d18c92b6e094d4517c41dd231a8b9f87b6fa681"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f089118d584e859c62b3da0892b88a83d611c2033ac410e929cb6754eec0ed16"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:781e65134efaf88feb447e8c97a51772aa75e48b794352f94cb7ea717dedda0d"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:31f5af773530fd3c658b32b6bdc2d0838543de70eb9a2156c03e410f7b0d3aae"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:a7a078f5d37bee6690959c813977da5291b24286e7b962e62a94cec31aa5188b"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:cea7daf9fc7ae6687cf1e2c049752f19f146fdc37c2cc376e7d0032cf4f25347"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:8b3489ff1ed1e8315674d0775dc7d2195fb13ca17b3808721b54dbe9fd020faf"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:9403db39be1393618dd80c746cb22ccda168efce239c73af13c3763ef56ffc04"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5d97151bc92d2b2578ff7ce779cdb9174337390a535953cbb9452fb65164c587"}, + {file = "propcache-0.2.1-cp39-cp39-win32.whl", hash = "sha256:9caac6b54914bdf41bcc91e7eb9147d331d29235a7c967c150ef5df6464fd1bb"}, + {file = "propcache-0.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:92fc4500fcb33899b05ba73276dfb684a20d31caa567b7cb5252d48f896a91b1"}, + {file = "propcache-0.2.1-py3-none-any.whl", hash = "sha256:52277518d6aae65536e9cea52d4e7fd2f7a66f4aa2d30ed3f2fcea620ace3c54"}, + {file = "propcache-0.2.1.tar.gz", hash = "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64"}, ] [[package]] @@ -1761,13 +1732,13 @@ files = [ [[package]] name = "pytest" -version = "8.3.3" +version = "8.3.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, - {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, + {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, + {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, ] [package.dependencies] @@ -1897,30 +1868,29 @@ files = [ [[package]] name = "quart" -version = "0.19.9" -description = "A Python ASGI web microframework with the same API as Flask" +version = "0.20.0" +description = "A Python ASGI web framework with the same API as Flask" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "quart-0.19.9-py3-none-any.whl", hash = "sha256:8acb8b299c72b66ee9e506ae141498bbbfcc250b5298fbdb712e97f3d7e4082f"}, - {file = "quart-0.19.9.tar.gz", hash = "sha256:30a61a0d7bae1ee13e6e99dc14c929b3c945e372b9445d92d21db053e91e95a5"}, + {file = "quart-0.20.0-py3-none-any.whl", hash = "sha256:003c08f551746710acb757de49d9b768986fd431517d0eb127380b656b98b8f1"}, + {file = "quart-0.20.0.tar.gz", hash = "sha256:08793c206ff832483586f5ae47018c7e40bdd75d886fee3fabbdaa70c2cf505d"}, ] [package.dependencies] aiofiles = "*" blinker = ">=1.6" -click = ">=8.0.0" -flask = ">=3.0.0" +click = ">=8.0" +flask = ">=3.0" hypercorn = ">=0.11.2" -importlib_metadata = {version = "*", markers = "python_version < \"3.10\""} +importlib-metadata = {version = "*", markers = "python_version < \"3.10\""} itsdangerous = "*" jinja2 = "*" markupsafe = "*" -typing_extensions = {version = "*", markers = "python_version < \"3.10\""} -werkzeug = ">=3.0.0" +typing-extensions = {version = "*", markers = "python_version < \"3.10\""} +werkzeug = ">=3.0" [package.extras] -docs = ["pydata_sphinx_theme"] dotenv = ["python-dotenv"] [[package]] @@ -1986,17 +1956,18 @@ full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7 [[package]] name = "taskgroup" -version = "0.0.0a4" +version = "0.2.1" description = "backport of asyncio.TaskGroup, asyncio.Runner and asyncio.timeout" optional = false python-versions = "*" files = [ - {file = "taskgroup-0.0.0a4-py2.py3-none-any.whl", hash = "sha256:5c1bd0e4c06114e7a4128583ab75c987597d5378a33948a3b74c662b90f61277"}, - {file = "taskgroup-0.0.0a4.tar.gz", hash = "sha256:eb08902d221e27661950f2a0320ddf3f939f579279996f81fe30779bca3a159c"}, + {file = "taskgroup-0.2.1-py2.py3-none-any.whl", hash = "sha256:bff020b6e63408d1bcf952486cce05ed4c4e0747743c4762eb10b35726c89ab3"}, + {file = "taskgroup-0.2.1.tar.gz", hash = "sha256:11fa9c2db1037188ac0b60c70fa979243d00b1fee1a6e61e3171c21c1af75f78"}, ] [package.dependencies] exceptiongroup = "*" +typing_extensions = ">=4.12.2,<5" [[package]] name = "tomli" @@ -2072,13 +2043,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.3" +version = "2.3.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, - {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, + {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, + {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, ] [package.extras] @@ -2089,13 +2060,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uvicorn" -version = "0.32.1" +version = "0.34.0" description = "The lightning-fast ASGI server." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "uvicorn-0.32.1-py3-none-any.whl", hash = "sha256:82ad92fd58da0d12af7482ecdb5f2470a04c9c9a53ced65b9bbb4a205377602e"}, - {file = "uvicorn-0.32.1.tar.gz", hash = "sha256:ee9519c246a72b1c084cea8d3b44ed6026e78a4a309cbedae9c37e4cb9fbb175"}, + {file = "uvicorn-0.34.0-py3-none-any.whl", hash = "sha256:023dc038422502fa28a09c7a30bf2b6991512da7dcdb8fd35fe57cfc154126f4"}, + {file = "uvicorn-0.34.0.tar.gz", hash = "sha256:404051050cd7e905de2c9a7e61790943440b3416f49cb409f965d9dcd0fa73e9"}, ] [package.dependencies] @@ -2166,82 +2137,82 @@ test = ["aiohttp (>=3.10.5)", "flake8 (>=5.0,<6.0)", "mypy (>=0.800)", "psutil", [[package]] name = "watchfiles" -version = "1.0.0" +version = "1.0.3" description = "Simple, modern and high performance file watching and code reload in python." optional = false python-versions = ">=3.9" files = [ - {file = "watchfiles-1.0.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:1d19df28f99d6a81730658fbeb3ade8565ff687f95acb59665f11502b441be5f"}, - {file = "watchfiles-1.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:28babb38cf2da8e170b706c4b84aa7e4528a6fa4f3ee55d7a0866456a1662041"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:12ab123135b2f42517f04e720526d41448667ae8249e651385afb5cda31fedc0"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:13a4f9ee0cd25682679eea5c14fc629e2eaa79aab74d963bc4e21f43b8ea1877"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e1d9284cc84de7855fcf83472e51d32daf6f6cecd094160192628bc3fee1b78"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ee5edc939f53466b329bbf2e58333a5461e6c7b50c980fa6117439e2c18b42d"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5dccfc70480087567720e4e36ec381bba1ed68d7e5f368fe40c93b3b1eba0105"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c83a6d33a9eda0af6a7470240d1af487807adc269704fe76a4972dd982d16236"}, - {file = "watchfiles-1.0.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:905f69aad276639eff3893759a07d44ea99560e67a1cf46ff389cd62f88872a2"}, - {file = "watchfiles-1.0.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:09551237645d6bff3972592f2aa5424df9290e7a2e15d63c5f47c48cde585935"}, - {file = "watchfiles-1.0.0-cp310-none-win32.whl", hash = "sha256:d2b39aa8edd9e5f56f99a2a2740a251dc58515398e9ed5a4b3e5ff2827060755"}, - {file = "watchfiles-1.0.0-cp310-none-win_amd64.whl", hash = "sha256:2de52b499e1ab037f1a87cb8ebcb04a819bf087b1015a4cf6dcf8af3c2a2613e"}, - {file = "watchfiles-1.0.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:fbd0ab7a9943bbddb87cbc2bf2f09317e74c77dc55b1f5657f81d04666c25269"}, - {file = "watchfiles-1.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:774ef36b16b7198669ce655d4f75b4c3d370e7f1cbdfb997fb10ee98717e2058"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b4fb98100267e6a5ebaff6aaa5d20aea20240584647470be39fe4823012ac96"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0fc3bf0effa2d8075b70badfdd7fb839d7aa9cea650d17886982840d71fdeabf"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:648e2b6db53eca6ef31245805cd528a16f56fa4cc15aeec97795eaf713c11435"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fa13d604fcb9417ae5f2e3de676e66aa97427d888e83662ad205bed35a313176"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:936f362e7ff28311b16f0b97ec51e8f2cc451763a3264640c6ed40fb252d1ee4"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:245fab124b9faf58430da547512d91734858df13f2ddd48ecfa5e493455ffccb"}, - {file = "watchfiles-1.0.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4ff9c7e84e8b644a8f985c42bcc81457240316f900fc72769aaedec9d088055a"}, - {file = "watchfiles-1.0.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9c9a8d8fd97defe935ef8dd53d562e68942ad65067cd1c54d6ed8a088b1d931d"}, - {file = "watchfiles-1.0.0-cp311-none-win32.whl", hash = "sha256:a0abf173975eb9dd17bb14c191ee79999e650997cc644562f91df06060610e62"}, - {file = "watchfiles-1.0.0-cp311-none-win_amd64.whl", hash = "sha256:2a825ba4b32c214e3855b536eb1a1f7b006511d8e64b8215aac06eb680642d84"}, - {file = "watchfiles-1.0.0-cp311-none-win_arm64.whl", hash = "sha256:a5a7a06cfc65e34fd0a765a7623c5ba14707a0870703888e51d3d67107589817"}, - {file = "watchfiles-1.0.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:28fb64b5843d94e2c2483f7b024a1280662a44409bedee8f2f51439767e2d107"}, - {file = "watchfiles-1.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e3750434c83b61abb3163b49c64b04180b85b4dabb29a294513faec57f2ffdb7"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bedf84835069f51c7b026b3ca04e2e747ea8ed0a77c72006172c72d28c9f69fc"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:90004553be36427c3d06ec75b804233f8f816374165d5225b93abd94ba6e7234"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b46e15c34d4e401e976d6949ad3a74d244600d5c4b88c827a3fdf18691a46359"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:487d15927f1b0bd24e7df921913399bb1ab94424c386bea8b267754d698f8f0e"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1ff236d7a3f4b0a42f699a22fc374ba526bc55048a70cbb299661158e1bb5e1f"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c01446626574561756067f00b37e6b09c8622b0fc1e9fdbc7cbcea328d4e514"}, - {file = "watchfiles-1.0.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b551c465a59596f3d08170bd7e1c532c7260dd90ed8135778038e13c5d48aa81"}, - {file = "watchfiles-1.0.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e1ed613ee107269f66c2df631ec0fc8efddacface85314d392a4131abe299f00"}, - {file = "watchfiles-1.0.0-cp312-none-win32.whl", hash = "sha256:5f75cd42e7e2254117cf37ff0e68c5b3f36c14543756b2da621408349bd9ca7c"}, - {file = "watchfiles-1.0.0-cp312-none-win_amd64.whl", hash = "sha256:cf517701a4a872417f4e02a136e929537743461f9ec6cdb8184d9a04f4843545"}, - {file = "watchfiles-1.0.0-cp312-none-win_arm64.whl", hash = "sha256:8a2127cd68950787ee36753e6d401c8ea368f73beaeb8e54df5516a06d1ecd82"}, - {file = "watchfiles-1.0.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:95de85c254f7fe8cbdf104731f7f87f7f73ae229493bebca3722583160e6b152"}, - {file = "watchfiles-1.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:533a7cbfe700e09780bb31c06189e39c65f06c7f447326fee707fd02f9a6e945"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2218e78e2c6c07b1634a550095ac2a429026b2d5cbcd49a594f893f2bb8c936"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9122b8fdadc5b341315d255ab51d04893f417df4e6c1743b0aac8bf34e96e025"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9272fdbc0e9870dac3b505bce1466d386b4d8d6d2bacf405e603108d50446940"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4a3b33c3aefe9067ebd87846806cd5fc0b017ab70d628aaff077ab9abf4d06b3"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bc338ce9f8846543d428260fa0f9a716626963148edc937d71055d01d81e1525"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ac778a460ea22d63c7e6fb0bc0f5b16780ff0b128f7f06e57aaec63bd339285"}, - {file = "watchfiles-1.0.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:53ae447f06f8f29f5ab40140f19abdab822387a7c426a369eb42184b021e97eb"}, - {file = "watchfiles-1.0.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1f73c2147a453315d672c1ad907abe6d40324e34a185b51e15624bc793f93cc6"}, - {file = "watchfiles-1.0.0-cp313-none-win32.whl", hash = "sha256:eba98901a2eab909dbd79681190b9049acc650f6111fde1845484a4450761e98"}, - {file = "watchfiles-1.0.0-cp313-none-win_amd64.whl", hash = "sha256:d562a6114ddafb09c33246c6ace7effa71ca4b6a2324a47f4b09b6445ea78941"}, - {file = "watchfiles-1.0.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:3d94fd83ed54266d789f287472269c0def9120a2022674990bd24ad989ebd7a0"}, - {file = "watchfiles-1.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48051d1c504448b2fcda71c5e6e3610ae45de6a0b8f5a43b961f250be4bdf5a8"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29cf884ad4285d23453c702ed03d689f9c0e865e3c85d20846d800d4787de00f"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d3572d4c34c4e9c33d25b3da47d9570d5122f8433b9ac6519dca49c2740d23cd"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2c2696611182c85eb0e755b62b456f48debff484b7306b56f05478b843ca8ece"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:550109001920a993a4383b57229c717fa73627d2a4e8fcb7ed33c7f1cddb0c85"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b555a93c15bd2c71081922be746291d776d47521a00703163e5fbe6d2a402399"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:947ccba18a38b85c366dafeac8df2f6176342d5992ca240a9d62588b214d731f"}, - {file = "watchfiles-1.0.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ffd98a299b0a74d1b704ef0ed959efb753e656a4e0425c14e46ae4c3cbdd2919"}, - {file = "watchfiles-1.0.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f8c4f3a1210ed099a99e6a710df4ff2f8069411059ffe30fa5f9467ebed1256b"}, - {file = "watchfiles-1.0.0-cp39-none-win32.whl", hash = "sha256:1e176b6b4119b3f369b2b4e003d53a226295ee862c0962e3afd5a1c15680b4e3"}, - {file = "watchfiles-1.0.0-cp39-none-win_amd64.whl", hash = "sha256:2d9c0518fabf4a3f373b0a94bb9e4ea7a1df18dec45e26a4d182aa8918dee855"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f159ac795785cde4899e0afa539f4c723fb5dd336ce5605bc909d34edd00b79b"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:c3d258d78341d5d54c0c804a5b7faa66cd30ba50b2756a7161db07ce15363b8d"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bbd0311588c2de7f9ea5cf3922ccacfd0ec0c1922870a2be503cc7df1ca8be7"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9a13ac46b545a7d0d50f7641eefe47d1597e7d1783a5d89e09d080e6dff44b0"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2bca898c1dc073912d3db7fa6926cc08be9575add9e84872de2c99c688bac4e"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:06d828fe2adc4ac8a64b875ca908b892a3603d596d43e18f7948f3fef5fc671c"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:074c7618cd6c807dc4eaa0982b4a9d3f8051cd0b72793511848fd64630174b17"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95dc785bc284552d044e561b8f4fe26d01ab5ca40d35852a6572d542adfeb4bc"}, - {file = "watchfiles-1.0.0.tar.gz", hash = "sha256:37566c844c9ce3b5deb964fe1a23378e575e74b114618d211fbda8f59d7b5dab"}, + {file = "watchfiles-1.0.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:1da46bb1eefb5a37a8fb6fd52ad5d14822d67c498d99bda8754222396164ae42"}, + {file = "watchfiles-1.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2b961b86cd3973f5822826017cad7f5a75795168cb645c3a6b30c349094e02e3"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34e87c7b3464d02af87f1059fedda5484e43b153ef519e4085fe1a03dd94801e"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d9dd2b89a16cf7ab9c1170b5863e68de6bf83db51544875b25a5f05a7269e678"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b4691234d31686dca133c920f94e478b548a8e7c750f28dbbc2e4333e0d3da9"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:90b0fe1fcea9bd6e3084b44875e179b4adcc4057a3b81402658d0eb58c98edf8"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0b90651b4cf9e158d01faa0833b073e2e37719264bcee3eac49fc3c74e7d304b"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c2e9fe695ff151b42ab06501820f40d01310fbd58ba24da8923ace79cf6d702d"}, + {file = "watchfiles-1.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:62691f1c0894b001c7cde1195c03b7801aaa794a837bd6eef24da87d1542838d"}, + {file = "watchfiles-1.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:275c1b0e942d335fccb6014d79267d1b9fa45b5ac0639c297f1e856f2f532552"}, + {file = "watchfiles-1.0.3-cp310-cp310-win32.whl", hash = "sha256:06ce08549e49ba69ccc36fc5659a3d0ff4e3a07d542b895b8a9013fcab46c2dc"}, + {file = "watchfiles-1.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:f280b02827adc9d87f764972fbeb701cf5611f80b619c20568e1982a277d6146"}, + {file = "watchfiles-1.0.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ffe709b1d0bc2e9921257569675674cafb3a5f8af689ab9f3f2b3f88775b960f"}, + {file = "watchfiles-1.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:418c5ce332f74939ff60691e5293e27c206c8164ce2b8ce0d9abf013003fb7fe"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f492d2907263d6d0d52f897a68647195bc093dafed14508a8d6817973586b6b"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:48c9f3bc90c556a854f4cab6a79c16974099ccfa3e3e150673d82d47a4bc92c9"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75d3bcfa90454dba8df12adc86b13b6d85fda97d90e708efc036c2760cc6ba44"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5691340f259b8f76b45fb31b98e594d46c36d1dc8285efa7975f7f50230c9093"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e263cc718545b7f897baeac1f00299ab6fabe3e18caaacacb0edf6d5f35513c"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c6cf7709ed3e55704cc06f6e835bf43c03bc8e3cb8ff946bf69a2e0a78d9d77"}, + {file = "watchfiles-1.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:703aa5e50e465be901e0e0f9d5739add15e696d8c26c53bc6fc00eb65d7b9469"}, + {file = "watchfiles-1.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bfcae6aecd9e0cb425f5145afee871465b98b75862e038d42fe91fd753ddd780"}, + {file = "watchfiles-1.0.3-cp311-cp311-win32.whl", hash = "sha256:6a76494d2c5311584f22416c5a87c1e2cb954ff9b5f0988027bc4ef2a8a67181"}, + {file = "watchfiles-1.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:cf745cbfad6389c0e331786e5fe9ae3f06e9d9c2ce2432378e1267954793975c"}, + {file = "watchfiles-1.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:2dcc3f60c445f8ce14156854a072ceb36b83807ed803d37fdea2a50e898635d6"}, + {file = "watchfiles-1.0.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:93436ed550e429da007fbafb723e0769f25bae178fbb287a94cb4ccdf42d3af3"}, + {file = "watchfiles-1.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c18f3502ad0737813c7dad70e3e1cc966cc147fbaeef47a09463bbffe70b0a00"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a5bc3ca468bb58a2ef50441f953e1f77b9a61bd1b8c347c8223403dc9b4ac9a"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0d1ec043f02ca04bf21b1b32cab155ce90c651aaf5540db8eb8ad7f7e645cba8"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f58d3bfafecf3d81c15d99fc0ecf4319e80ac712c77cf0ce2661c8cf8bf84066"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1df924ba82ae9e77340101c28d56cbaff2c991bd6fe8444a545d24075abb0a87"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:632a52dcaee44792d0965c17bdfe5dc0edad5b86d6a29e53d6ad4bf92dc0ff49"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bf4b459d94a0387617a1b499f314aa04d8a64b7a0747d15d425b8c8b151da0"}, + {file = "watchfiles-1.0.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ca94c85911601b097d53caeeec30201736ad69a93f30d15672b967558df02885"}, + {file = "watchfiles-1.0.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:65ab1fb635476f6170b07e8e21db0424de94877e4b76b7feabfe11f9a5fc12b5"}, + {file = "watchfiles-1.0.3-cp312-cp312-win32.whl", hash = "sha256:49bc1bc26abf4f32e132652f4b3bfeec77d8f8f62f57652703ef127e85a3e38d"}, + {file = "watchfiles-1.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:48681c86f2cb08348631fed788a116c89c787fdf1e6381c5febafd782f6c3b44"}, + {file = "watchfiles-1.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:9e080cf917b35b20c889225a13f290f2716748362f6071b859b60b8847a6aa43"}, + {file = "watchfiles-1.0.3-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:e153a690b7255c5ced17895394b4f109d5dcc2a4f35cb809374da50f0e5c456a"}, + {file = "watchfiles-1.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ac1be85fe43b4bf9a251978ce5c3bb30e1ada9784290441f5423a28633a958a7"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2ec98e31e1844eac860e70d9247db9d75440fc8f5f679c37d01914568d18721"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0179252846be03fa97d4d5f8233d1c620ef004855f0717712ae1c558f1974a16"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:995c374e86fa82126c03c5b4630c4e312327ecfe27761accb25b5e1d7ab50ec8"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29b9cb35b7f290db1c31fb2fdf8fc6d3730cfa4bca4b49761083307f441cac5a"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f8dc09ae69af50bead60783180f656ad96bd33ffbf6e7a6fce900f6d53b08f1"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:489b80812f52a8d8c7b0d10f0d956db0efed25df2821c7a934f6143f76938bd6"}, + {file = "watchfiles-1.0.3-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:228e2247de583475d4cebf6b9af5dc9918abb99d1ef5ee737155bb39fb33f3c0"}, + {file = "watchfiles-1.0.3-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1550be1a5cb3be08a3fb84636eaafa9b7119b70c71b0bed48726fd1d5aa9b868"}, + {file = "watchfiles-1.0.3-cp313-cp313-win32.whl", hash = "sha256:16db2d7e12f94818cbf16d4c8938e4d8aaecee23826344addfaaa671a1527b07"}, + {file = "watchfiles-1.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:160eff7d1267d7b025e983ca8460e8cc67b328284967cbe29c05f3c3163711a3"}, + {file = "watchfiles-1.0.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c05b021f7b5aa333124f2a64d56e4cb9963b6efdf44e8d819152237bbd93ba15"}, + {file = "watchfiles-1.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:310505ad305e30cb6c5f55945858cdbe0eb297fc57378f29bacceb534ac34199"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ddff3f8b9fa24a60527c137c852d0d9a7da2a02cf2151650029fdc97c852c974"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:46e86ed457c3486080a72bc837300dd200e18d08183f12b6ca63475ab64ed651"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f79fe7993e230a12172ce7d7c7db061f046f672f2b946431c81aff8f60b2758b"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea2b51c5f38bad812da2ec0cd7eec09d25f521a8b6b6843cbccedd9a1d8a5c15"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fe4e740ea94978b2b2ab308cbf9270a246bcbb44401f77cc8740348cbaeac3d"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9af037d3df7188ae21dc1c7624501f2f90d81be6550904e07869d8d0e6766655"}, + {file = "watchfiles-1.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:52bb50a4c4ca2a689fdba84ba8ecc6a4e6210f03b6af93181bb61c4ec3abaf86"}, + {file = "watchfiles-1.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c14a07bdb475eb696f85c715dbd0f037918ccbb5248290448488a0b4ef201aad"}, + {file = "watchfiles-1.0.3-cp39-cp39-win32.whl", hash = "sha256:be37f9b1f8934cd9e7eccfcb5612af9fb728fecbe16248b082b709a9d1b348bf"}, + {file = "watchfiles-1.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:ef9ec8068cf23458dbf36a08e0c16f0a2df04b42a8827619646637be1769300a"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:84fac88278f42d61c519a6c75fb5296fd56710b05bbdcc74bdf85db409a03780"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:c68be72b1666d93b266714f2d4092d78dc53bd11cf91ed5a3c16527587a52e29"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:889a37e2acf43c377b5124166bece139b4c731b61492ab22e64d371cce0e6e80"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ca05cacf2e5c4a97d02a2878a24020daca21dbb8823b023b978210a75c79098"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:8af4b582d5fc1b8465d1d2483e5e7b880cc1a4e99f6ff65c23d64d070867ac58"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:127de3883bdb29dbd3b21f63126bb8fa6e773b74eaef46521025a9ce390e1073"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:713f67132346bdcb4c12df185c30cf04bdf4bf6ea3acbc3ace0912cab6b7cb8c"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:abd85de513eb83f5ec153a802348e7a5baa4588b818043848247e3e8986094e8"}, + {file = "watchfiles-1.0.3.tar.gz", hash = "sha256:f3ff7da165c99a5412fe5dd2304dd2dbaaaa5da718aad942dcb3a178eaa70c56"}, ] [package.dependencies] @@ -2344,13 +2315,13 @@ watchdog = ["watchdog (>=2.3)"] [[package]] name = "win32-setctime" -version = "1.1.0" +version = "1.2.0" description = "A small Python utility to set file creation time on Windows" optional = false python-versions = ">=3.5" files = [ - {file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"}, - {file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"}, + {file = "win32_setctime-1.2.0-py3-none-any.whl", hash = "sha256:95d644c4e708aba81dc3704a116d8cbc974d70b3bdb8be1d150e36be6e9d1390"}, + {file = "win32_setctime-1.2.0.tar.gz", hash = "sha256:ae1fdf948f5640aae05c511ade119313fb6a30d7eabe25fef9764dca5873c4c0"}, ] [package.extras] @@ -2372,93 +2343,93 @@ h11 = ">=0.9.0,<1" [[package]] name = "yarl" -version = "1.18.0" +version = "1.18.3" description = "Yet another URL library" optional = false python-versions = ">=3.9" files = [ - {file = "yarl-1.18.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:074fee89caab89a97e18ef5f29060ef61ba3cae6cd77673acc54bfdd3214b7b7"}, - {file = "yarl-1.18.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b026cf2c32daf48d90c0c4e406815c3f8f4cfe0c6dfccb094a9add1ff6a0e41a"}, - {file = "yarl-1.18.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ae38bd86eae3ba3d2ce5636cc9e23c80c9db2e9cb557e40b98153ed102b5a736"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:685cc37f3f307c6a8e879986c6d85328f4c637f002e219f50e2ef66f7e062c1d"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8254dbfce84ee5d1e81051ee7a0f1536c108ba294c0fdb5933476398df0654f3"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:20de4a8b04de70c49698dc2390b7fd2d18d424d3b876371f9b775e2b462d4b41"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0a2074a37285570d54b55820687de3d2f2b9ecf1b714e482e48c9e7c0402038"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f576ed278860df2721a5d57da3381040176ef1d07def9688a385c8330db61a1"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3a3709450a574d61be6ac53d582496014342ea34876af8dc17cc16da32826c9a"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:bd80ed29761490c622edde5dd70537ca8c992c2952eb62ed46984f8eff66d6e8"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:32141e13a1d5a48525e519c9197d3f4d9744d818d5c7d6547524cc9eccc8971e"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8b8d3e4e014fb4274f1c5bf61511d2199e263909fb0b8bda2a7428b0894e8dc6"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:701bb4a8f4de191c8c0cc9a1e6d5142f4df880e9d1210e333b829ca9425570ed"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a45d94075ac0647621eaaf693c8751813a3eccac455d423f473ffed38c8ac5c9"}, - {file = "yarl-1.18.0-cp310-cp310-win32.whl", hash = "sha256:34176bfb082add67cb2a20abd85854165540891147f88b687a5ed0dc225750a0"}, - {file = "yarl-1.18.0-cp310-cp310-win_amd64.whl", hash = "sha256:73553bbeea7d6ec88c08ad8027f4e992798f0abc459361bf06641c71972794dc"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b8e8c516dc4e1a51d86ac975b0350735007e554c962281c432eaa5822aa9765c"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2e6b4466714a73f5251d84b471475850954f1fa6acce4d3f404da1d55d644c34"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c893f8c1a6d48b25961e00922724732d00b39de8bb0b451307482dc87bddcd74"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13aaf2bdbc8c86ddce48626b15f4987f22e80d898818d735b20bd58f17292ee8"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd21c0128e301851de51bc607b0a6da50e82dc34e9601f4b508d08cc89ee7929"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:205de377bd23365cd85562c9c6c33844050a93661640fda38e0567d2826b50df"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed69af4fe2a0949b1ea1d012bf065c77b4c7822bad4737f17807af2adb15a73c"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e1c18890091aa3cc8a77967943476b729dc2016f4cfe11e45d89b12519d4a93"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:91b8fb9427e33f83ca2ba9501221ffaac1ecf0407f758c4d2f283c523da185ee"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:536a7a8a53b75b2e98ff96edb2dfb91a26b81c4fed82782035767db5a465be46"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a64619a9c47c25582190af38e9eb382279ad42e1f06034f14d794670796016c0"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c73a6bbc97ba1b5a0c3c992ae93d721c395bdbb120492759b94cc1ac71bc6350"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a173401d7821a2a81c7b47d4e7d5c4021375a1441af0c58611c1957445055056"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7520e799b1f84e095cce919bd6c23c9d49472deeef25fe1ef960b04cca51c3fc"}, - {file = "yarl-1.18.0-cp311-cp311-win32.whl", hash = "sha256:c4cb992d8090d5ae5f7afa6754d7211c578be0c45f54d3d94f7781c495d56716"}, - {file = "yarl-1.18.0-cp311-cp311-win_amd64.whl", hash = "sha256:52c136f348605974c9b1c878addd6b7a60e3bf2245833e370862009b86fa4689"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1ece25e2251c28bab737bdf0519c88189b3dd9492dc086a1d77336d940c28ced"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:454902dc1830d935c90b5b53c863ba2a98dcde0fbaa31ca2ed1ad33b2a7171c6"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:01be8688fc211dc237e628fcc209dda412d35de7642453059a0553747018d075"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d26f1fa9fa2167bb238f6f4b20218eb4e88dd3ef21bb8f97439fa6b5313e30d"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b234a4a9248a9f000b7a5dfe84b8cb6210ee5120ae70eb72a4dcbdb4c528f72f"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe94d1de77c4cd8caff1bd5480e22342dbd54c93929f5943495d9c1e8abe9f42"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b4c90c5363c6b0a54188122b61edb919c2cd1119684999d08cd5e538813a28e"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49a98ecadc5a241c9ba06de08127ee4796e1009555efd791bac514207862b43d"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9106025c7f261f9f5144f9aa7681d43867eed06349a7cfb297a1bc804de2f0d1"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f275ede6199d0f1ed4ea5d55a7b7573ccd40d97aee7808559e1298fe6efc8dbd"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f7edeb1dcc7f50a2c8e08b9dc13a413903b7817e72273f00878cb70e766bdb3b"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c083f6dd6951b86e484ebfc9c3524b49bcaa9c420cb4b2a78ef9f7a512bfcc85"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:80741ec5b471fbdfb997821b2842c59660a1c930ceb42f8a84ba8ca0f25a66aa"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b1a3297b9cad594e1ff0c040d2881d7d3a74124a3c73e00c3c71526a1234a9f7"}, - {file = "yarl-1.18.0-cp312-cp312-win32.whl", hash = "sha256:cd6ab7d6776c186f544f893b45ee0c883542b35e8a493db74665d2e594d3ca75"}, - {file = "yarl-1.18.0-cp312-cp312-win_amd64.whl", hash = "sha256:039c299a0864d1f43c3e31570045635034ea7021db41bf4842693a72aca8df3a"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6fb64dd45453225f57d82c4764818d7a205ee31ce193e9f0086e493916bd4f72"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:3adaaf9c6b1b4fc258584f4443f24d775a2086aee82d1387e48a8b4f3d6aecf6"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:da206d1ec78438a563c5429ab808a2b23ad7bc025c8adbf08540dde202be37d5"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:576d258b21c1db4c6449b1c572c75d03f16a482eb380be8003682bdbe7db2f28"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c60e547c0a375c4bfcdd60eef82e7e0e8698bf84c239d715f5c1278a73050393"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e3818eabaefb90adeb5e0f62f047310079d426387991106d4fbf3519eec7d90a"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5f72421246c21af6a92fbc8c13b6d4c5427dfd949049b937c3b731f2f9076bd"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7fa7d37f2ada0f42e0723632993ed422f2a679af0e200874d9d861720a54f53e"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:42ba84e2ac26a3f252715f8ec17e6fdc0cbf95b9617c5367579fafcd7fba50eb"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:6a49ad0102c0f0ba839628d0bf45973c86ce7b590cdedf7540d5b1833ddc6f00"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:96404e8d5e1bbe36bdaa84ef89dc36f0e75939e060ca5cd45451aba01db02902"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a0509475d714df8f6d498935b3f307cd122c4ca76f7d426c7e1bb791bcd87eda"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:1ff116f0285b5c8b3b9a2680aeca29a858b3b9e0402fc79fd850b32c2bcb9f8b"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e2580c1d7e66e6d29d6e11855e3b1c6381971e0edd9a5066e6c14d79bc8967af"}, - {file = "yarl-1.18.0-cp313-cp313-win32.whl", hash = "sha256:14408cc4d34e202caba7b5ac9cc84700e3421a9e2d1b157d744d101b061a4a88"}, - {file = "yarl-1.18.0-cp313-cp313-win_amd64.whl", hash = "sha256:1db1537e9cb846eb0ff206eac667f627794be8b71368c1ab3207ec7b6f8c5afc"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:fa2c9cb607e0f660d48c54a63de7a9b36fef62f6b8bd50ff592ce1137e73ac7d"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c0f4808644baf0a434a3442df5e0bedf8d05208f0719cedcd499e168b23bfdc4"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7db9584235895a1dffca17e1c634b13870852094f6389b68dcc6338086aa7b08"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:309f8d27d6f93ceeeb80aa6980e883aa57895270f7f41842b92247e65d7aeddf"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:609ffd44fed2ed88d9b4ef62ee860cf86446cf066333ad4ce4123505b819e581"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f172b8b2c72a13a06ea49225a9c47079549036ad1b34afa12d5491b881f5b993"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d89ae7de94631b60d468412c18290d358a9d805182373d804ec839978b120422"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:466d31fd043ef9af822ee3f1df8fdff4e8c199a7f4012c2642006af240eade17"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7609b8462351c4836b3edce4201acb6dd46187b207c589b30a87ffd1813b48dc"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:d9d4f5e471e8dc49b593a80766c2328257e405f943c56a3dc985c125732bc4cf"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:67b336c15e564d76869c9a21316f90edf546809a5796a083b8f57c845056bc01"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b212452b80cae26cb767aa045b051740e464c5129b7bd739c58fbb7deb339e7b"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:38b39b7b3e692b6c92b986b00137a3891eddb66311b229d1940dcbd4f025083c"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a7ee6884a8848792d58b854946b685521f41d8871afa65e0d4a774954e9c9e89"}, - {file = "yarl-1.18.0-cp39-cp39-win32.whl", hash = "sha256:b4095c5019bb889aa866bf12ed4c85c0daea5aafcb7c20d1519f02a1e738f07f"}, - {file = "yarl-1.18.0-cp39-cp39-win_amd64.whl", hash = "sha256:2d90f2e4d16a5b0915ee065218b435d2ef619dd228973b1b47d262a6f7cd8fa5"}, - {file = "yarl-1.18.0-py3-none-any.whl", hash = "sha256:dbf53db46f7cf176ee01d8d98c39381440776fcda13779d269a8ba664f69bec0"}, - {file = "yarl-1.18.0.tar.gz", hash = "sha256:20d95535e7d833889982bfe7cc321b7f63bf8879788fee982c76ae2b24cfb715"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7df647e8edd71f000a5208fe6ff8c382a1de8edfbccdbbfe649d263de07d8c34"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c69697d3adff5aa4f874b19c0e4ed65180ceed6318ec856ebc423aa5850d84f7"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:602d98f2c2d929f8e697ed274fbadc09902c4025c5a9963bf4e9edfc3ab6f7ed"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c654d5207c78e0bd6d749f6dae1dcbbfde3403ad3a4b11f3c5544d9906969dde"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5094d9206c64181d0f6e76ebd8fb2f8fe274950a63890ee9e0ebfd58bf9d787b"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35098b24e0327fc4ebdc8ffe336cee0a87a700c24ffed13161af80124b7dc8e5"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3236da9272872443f81fedc389bace88408f64f89f75d1bdb2256069a8730ccc"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2c08cc9b16f4f4bc522771d96734c7901e7ebef70c6c5c35dd0f10845270bcd"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:80316a8bd5109320d38eef8833ccf5f89608c9107d02d2a7f985f98ed6876990"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:c1e1cc06da1491e6734f0ea1e6294ce00792193c463350626571c287c9a704db"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fea09ca13323376a2fdfb353a5fa2e59f90cd18d7ca4eaa1fd31f0a8b4f91e62"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e3b9fd71836999aad54084906f8663dffcd2a7fb5cdafd6c37713b2e72be1760"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:757e81cae69244257d125ff31663249b3013b5dc0a8520d73694aed497fb195b"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b1771de9944d875f1b98a745bc547e684b863abf8f8287da8466cf470ef52690"}, + {file = "yarl-1.18.3-cp310-cp310-win32.whl", hash = "sha256:8874027a53e3aea659a6d62751800cf6e63314c160fd607489ba5c2edd753cf6"}, + {file = "yarl-1.18.3-cp310-cp310-win_amd64.whl", hash = "sha256:93b2e109287f93db79210f86deb6b9bbb81ac32fc97236b16f7433db7fc437d8"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8503ad47387b8ebd39cbbbdf0bf113e17330ffd339ba1144074da24c545f0069"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:02ddb6756f8f4517a2d5e99d8b2f272488e18dd0bfbc802f31c16c6c20f22193"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:67a283dd2882ac98cc6318384f565bffc751ab564605959df4752d42483ad889"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d980e0325b6eddc81331d3f4551e2a333999fb176fd153e075c6d1c2530aa8a8"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b643562c12680b01e17239be267bc306bbc6aac1f34f6444d1bded0c5ce438ca"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c017a3b6df3a1bd45b9fa49a0f54005e53fbcad16633870104b66fa1a30a29d8"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75674776d96d7b851b6498f17824ba17849d790a44d282929c42dbb77d4f17ae"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ccaa3a4b521b780a7e771cc336a2dba389a0861592bbce09a476190bb0c8b4b3"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2d06d3005e668744e11ed80812e61efd77d70bb7f03e33c1598c301eea20efbb"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:9d41beda9dc97ca9ab0b9888cb71f7539124bc05df02c0cff6e5acc5a19dcc6e"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ba23302c0c61a9999784e73809427c9dbedd79f66a13d84ad1b1943802eaaf59"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6748dbf9bfa5ba1afcc7556b71cda0d7ce5f24768043a02a58846e4a443d808d"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0b0cad37311123211dc91eadcb322ef4d4a66008d3e1bdc404808992260e1a0e"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0fb2171a4486bb075316ee754c6d8382ea6eb8b399d4ec62fde2b591f879778a"}, + {file = "yarl-1.18.3-cp311-cp311-win32.whl", hash = "sha256:61b1a825a13bef4a5f10b1885245377d3cd0bf87cba068e1d9a88c2ae36880e1"}, + {file = "yarl-1.18.3-cp311-cp311-win_amd64.whl", hash = "sha256:b9d60031cf568c627d028239693fd718025719c02c9f55df0a53e587aab951b5"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1dd4bdd05407ced96fed3d7f25dbbf88d2ffb045a0db60dbc247f5b3c5c25d50"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7c33dd1931a95e5d9a772d0ac5e44cac8957eaf58e3c8da8c1414de7dd27c576"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:25b411eddcfd56a2f0cd6a384e9f4f7aa3efee14b188de13048c25b5e91f1640"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436c4fc0a4d66b2badc6c5fc5ef4e47bb10e4fd9bf0c79524ac719a01f3607c2"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e35ef8683211db69ffe129a25d5634319a677570ab6b2eba4afa860f54eeaf75"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84b2deecba4a3f1a398df819151eb72d29bfeb3b69abb145a00ddc8d30094512"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00e5a1fea0fd4f5bfa7440a47eff01d9822a65b4488f7cff83155a0f31a2ecba"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0e883008013c0e4aef84dcfe2a0b172c4d23c2669412cf5b3371003941f72bb"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5a3f356548e34a70b0172d8890006c37be92995f62d95a07b4a42e90fba54272"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ccd17349166b1bee6e529b4add61727d3f55edb7babbe4069b5764c9587a8cc6"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b958ddd075ddba5b09bb0be8a6d9906d2ce933aee81100db289badbeb966f54e"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c7d79f7d9aabd6011004e33b22bc13056a3e3fb54794d138af57f5ee9d9032cb"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4891ed92157e5430874dad17b15eb1fda57627710756c27422200c52d8a4e393"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ce1af883b94304f493698b00d0f006d56aea98aeb49d75ec7d98cd4a777e9285"}, + {file = "yarl-1.18.3-cp312-cp312-win32.whl", hash = "sha256:f91c4803173928a25e1a55b943c81f55b8872f0018be83e3ad4938adffb77dd2"}, + {file = "yarl-1.18.3-cp312-cp312-win_amd64.whl", hash = "sha256:7e2ee16578af3b52ac2f334c3b1f92262f47e02cc6193c598502bd46f5cd1477"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:90adb47ad432332d4f0bc28f83a5963f426ce9a1a8809f5e584e704b82685dcb"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:913829534200eb0f789d45349e55203a091f45c37a2674678744ae52fae23efa"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ef9f7768395923c3039055c14334ba4d926f3baf7b776c923c93d80195624782"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88a19f62ff30117e706ebc9090b8ecc79aeb77d0b1f5ec10d2d27a12bc9f66d0"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e17c9361d46a4d5addf777c6dd5eab0715a7684c2f11b88c67ac37edfba6c482"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a74a13a4c857a84a845505fd2d68e54826a2cd01935a96efb1e9d86c728e186"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41f7ce59d6ee7741af71d82020346af364949314ed3d87553763a2df1829cc58"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f52a265001d830bc425f82ca9eabda94a64a4d753b07d623a9f2863fde532b53"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:82123d0c954dc58db301f5021a01854a85bf1f3bb7d12ae0c01afc414a882ca2"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:2ec9bbba33b2d00999af4631a3397d1fd78290c48e2a3e52d8dd72db3a067ac8"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fbd6748e8ab9b41171bb95c6142faf068f5ef1511935a0aa07025438dd9a9bc1"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:877d209b6aebeb5b16c42cbb377f5f94d9e556626b1bfff66d7b0d115be88d0a"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b464c4ab4bfcb41e3bfd3f1c26600d038376c2de3297760dfe064d2cb7ea8e10"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8d39d351e7faf01483cc7ff7c0213c412e38e5a340238826be7e0e4da450fdc8"}, + {file = "yarl-1.18.3-cp313-cp313-win32.whl", hash = "sha256:61ee62ead9b68b9123ec24bc866cbef297dd266175d53296e2db5e7f797f902d"}, + {file = "yarl-1.18.3-cp313-cp313-win_amd64.whl", hash = "sha256:578e281c393af575879990861823ef19d66e2b1d0098414855dd367e234f5b3c"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:61e5e68cb65ac8f547f6b5ef933f510134a6bf31bb178be428994b0cb46c2a04"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe57328fbc1bfd0bd0514470ac692630f3901c0ee39052ae47acd1d90a436719"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a440a2a624683108a1b454705ecd7afc1c3438a08e890a1513d468671d90a04e"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09c7907c8548bcd6ab860e5f513e727c53b4a714f459b084f6580b49fa1b9cee"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b4f6450109834af88cb4cc5ecddfc5380ebb9c228695afc11915a0bf82116789"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9ca04806f3be0ac6d558fffc2fdf8fcef767e0489d2684a21912cc4ed0cd1b8"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77a6e85b90a7641d2e07184df5557132a337f136250caafc9ccaa4a2a998ca2c"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6333c5a377c8e2f5fae35e7b8f145c617b02c939d04110c76f29ee3676b5f9a5"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0b3c92fa08759dbf12b3a59579a4096ba9af8dd344d9a813fc7f5070d86bbab1"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:4ac515b860c36becb81bb84b667466885096b5fc85596948548b667da3bf9f24"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:045b8482ce9483ada4f3f23b3774f4e1bf4f23a2d5c912ed5170f68efb053318"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:a4bb030cf46a434ec0225bddbebd4b89e6471814ca851abb8696170adb163985"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:54d6921f07555713b9300bee9c50fb46e57e2e639027089b1d795ecd9f7fa910"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1d407181cfa6e70077df3377938c08012d18893f9f20e92f7d2f314a437c30b1"}, + {file = "yarl-1.18.3-cp39-cp39-win32.whl", hash = "sha256:ac36703a585e0929b032fbaab0707b75dc12703766d0b53486eabd5139ebadd5"}, + {file = "yarl-1.18.3-cp39-cp39-win_amd64.whl", hash = "sha256:ba87babd629f8af77f557b61e49e7c7cac36f22f871156b91e10a6e9d4f829e9"}, + {file = "yarl-1.18.3-py3-none-any.whl", hash = "sha256:b57f4f58099328dfb26c6a771d09fb20dbbae81d20cfb66141251ea063bd101b"}, + {file = "yarl-1.18.3.tar.gz", hash = "sha256:ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1"}, ] [package.dependencies] diff --git a/envs/pydantic-v2/poetry.lock b/envs/pydantic-v2/poetry.lock index 884d5fe1f9e3..f797c3eec8c5 100644 --- a/envs/pydantic-v2/poetry.lock +++ b/envs/pydantic-v2/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "aiodns" @@ -38,87 +38,87 @@ files = [ [[package]] name = "aiohttp" -version = "3.11.8" +version = "3.11.11" description = "Async http client/server framework (asyncio)" optional = false python-versions = ">=3.9" files = [ - {file = "aiohttp-3.11.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2d2ca685c6a851ce64e511fbcb906e4dd97d13e567ca7ecb5cb30b184e15dc6d"}, - {file = "aiohttp-3.11.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52913bb8a0a72a57479f54b281300c9d23036aa9aa3ebbc9a32a643484eadfc2"}, - {file = "aiohttp-3.11.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:35dafc70051b6cbd6dafb533b4e3f0df6225a4896be373ef86367b2987409331"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:561b9596a9f90266673ef0b950c27e04ab597cdb53785e2ac91b83b33c31b509"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d479c1fdcc920056a06d04059db52eb8590ecbbb3acdcaeeea26a88ff782e94a"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9ce8eb6444bb6e862feca664ce365afa8e2e32db24dcf1a502719a8a002f9274"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df9bf08eb93611b1d4d6245b6fecf88728e90eece00e00d554e1b0c445557d83"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a20ddaa58fea717177fac9a4a1fb8b39be868aa4fed2af6de4313b7a08f0f71"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9f4aadfea6b48cfa17aef1a68ba6bee5a0246374f5a588e299a4f4ff5bd1c77b"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:aa7deebb4bc5143745e6282139d7b9de50beb6d06609df64d2c993ef496bc7eb"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fe503a76b9e3a13b62e64545693c9463afe9d429e0909120f7bb66de91ed8bc2"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1c5838a68e31712354129add1b5fe32b06aa05275f835130edc650e6288af05f"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:832e58d9454fe501b0d092cdf660c0e34e16005f61acd06e1c79b0fc45019c94"}, - {file = "aiohttp-3.11.8-cp310-cp310-win32.whl", hash = "sha256:00618c37a350884c08e87cf9a6532be274d564227ac49e0b474cf41f27e1f190"}, - {file = "aiohttp-3.11.8-cp310-cp310-win_amd64.whl", hash = "sha256:8eeaac75203da1a54afe1faea3c855a1973026b54929112aa9b67bceadbcb0ca"}, - {file = "aiohttp-3.11.8-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f8dd02b44555893adfe7cc4b3b454fee04f9dcec45cf66ef5bb53ebf393f0505"}, - {file = "aiohttp-3.11.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:658052941324edea3dee1f681375e70779f55e437e07bdfc4b5bbe65ad53cefb"}, - {file = "aiohttp-3.11.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6c829471a9e2266da4a0666f8a9e215f19320f79778af379c1c7db324ac24ed2"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d21951756690f5d86d0215da38eb0fd65def03b5e2a1c08a4a39718a6d0d48f2"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2fa50ddc6b21cc1ae23e13524d6f75b27e279fdf5cf905b2df6fd171891ac4e2"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a5afbd805e449048ecebb1a256176e953d4ca9e48bab387d4d1c8524f1c7a95"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea68db69f2a4ddc24b28b8e754fc0b963ed7f9b9a76137f06fe44643d6821fbd"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80b3ac163145660ce660aed2f1005e6d4de840d39728990b7250525eeec4e4a8"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e9ac0cce897904b77e109e5403ed713187dbdf96832bfd061ac07164264be16c"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:3260c77cff4e35245bc517658bd54d7a64787f71f3c4f723877c82f22835b032"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f7fd9c11ffad6b022bf02a41a70418cb2ab3b33f2c27842a5999e3ab78daf280"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:16bda233a7b159ab08107e8858fedca90a9de287057fab54cafde51bd83f9819"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4867008617bbf86e9fb5b00f72dd0e3a00a579b32233caff834320867f9b7cac"}, - {file = "aiohttp-3.11.8-cp311-cp311-win32.whl", hash = "sha256:17e6b9d8e29e3bfc7f893f327e92c9769d3582cee2fb1652c1431ac3f60115a0"}, - {file = "aiohttp-3.11.8-cp311-cp311-win_amd64.whl", hash = "sha256:7f3be4961a5c2c670f31caab7641a37ea2a97031f0d8ae15bcfd36b6bf273200"}, - {file = "aiohttp-3.11.8-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0e3b5bfef913d6be270c81976fbc0cbf66625cd92663bbb7e03b3adbd6aa4ac6"}, - {file = "aiohttp-3.11.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cb51a81cb637b9a072c9cfae1839e35c6579638861eb3479eb5d6e6ce8bc6782"}, - {file = "aiohttp-3.11.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:dd2ca84e5f7a35f313a62eb7d6a50bac6760b60bafce34586750712731c0aeff"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:47c6663df9446aa848b478413219600da4b54bc0409e1ac4bc80fb1a81501363"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c665ed4b52256614858b20711bbbd2755b0e19ec86870f8ff1645acf9ae9e760"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35d4545e7684da7a954ffc2dce495462cb16a902dffdebe98572408f6aaaee83"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85be3899e6860dd2cd3f4370ded6708e939d00d5ec922a8eb328d114db605a47"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0ed9f1f2697713c48efc9ec483ad5d062e4aa91854f090a3eba0b19c002851d"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c0dbae99737badf3f5e862088a118e28d3b36f03eb608a6382eddfd68178e05b"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:beae08f900b2980af4353a0200eb162b39f276fd8a6e43079a540f83964671f4"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d6f9e5fd1b3ecbaca3e04a15a02d1fa213248608caee99fd5bdddd4759959cf7"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a7def89a41fe32120d89cd4577f5efbab3c52234c5890066ced8a2f7202dff88"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:98f596cf59292e779bc387f22378a3d2c5e052c9fe2bf822ac4f547c6fe57758"}, - {file = "aiohttp-3.11.8-cp312-cp312-win32.whl", hash = "sha256:b64fa6b76b35b695cd3e5c42a4e568cbea8d41c9e59165e2a43da00976e2027e"}, - {file = "aiohttp-3.11.8-cp312-cp312-win_amd64.whl", hash = "sha256:afba47981ff73b1794c00dce774334dcfe62664b3b4f78f278b77d21ce9daf43"}, - {file = "aiohttp-3.11.8-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a81525430da5ca356fae6e889daeb6f5cc0d5f0cef88e59cdde48e2394ea1365"}, - {file = "aiohttp-3.11.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7565689e86a88c1d258351ebd14e343337b76a56ca5c0a2c1db96ec28149386f"}, - {file = "aiohttp-3.11.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d0f9dbe9763c014c408ad51a027dc9582518e992dc63e2ffe359ac1b4840a560"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8ca580edc3ccd7f6ea76ad9cf59f5a8756d338e770b5eda7be26bcda8fa7ef53"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7d141631a7348038fc7b5d1a81b3c9afa9aa056188ded7902fe754028fdea5c5"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64e6b14608a56a4c76c60daac730b0c0eeaf9d10dfc3231f7fc26521a0d628fd"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0983d0ce329f2f9dbeb355c3744bd6333f34e0dc56025b6b7d4f285b90acb51e"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d96b93a46a3742880fa21bcb35c6c40cf27714ec0fb8ec85fe444d73b95131b9"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f4f1779c3142d913c509c2ed1de8b8f920e07a5cd65ac1f57c61cfb6bfded5a4"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:48be7cff468c9c0d86a02e6a826e1fe159094b16d5aa2c17703e7317f791b0f9"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:daea456b79ca2bacc7f062845bbb1139c3b3231fc83169da5a682cf385416dd1"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:c92e763cf641e10ad9342597d20060ba23de5e411aada96660e679e3f9371189"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a750ee5a177e0f873d6b2d7d0fa6e1e7c658fc0ca8ea56438dcba2ac94bedb09"}, - {file = "aiohttp-3.11.8-cp313-cp313-win32.whl", hash = "sha256:4448c9c7f77bad48a6569062c0c16deb77fbb7363de1dc71ed087f66fb3b3c96"}, - {file = "aiohttp-3.11.8-cp313-cp313-win_amd64.whl", hash = "sha256:481075a1949de79a8a6841e0086f2f5f464785c592cf527ed0db2c0cbd0e1ba2"}, - {file = "aiohttp-3.11.8-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:72779bfb34d6d6b51e55a7f4901b410e416b5431738b367d49696928c91a2ca8"}, - {file = "aiohttp-3.11.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e6523f39071a01757048985e4cc22d04aa130bc40d9128503f3a61a3ee98328"}, - {file = "aiohttp-3.11.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:220bbce18b3046973465be45415430f1cab39d7fdc40cbcf0a8c05485c6902fe"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:336bbf7a33dd8cb4a7afb98c70e9935a81e5e88f7ac595ba2e84b1fb5da190d6"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c5e4f1ba5059b85e05c551961a448ce2689c6249ed6a2e2174796842c191d10"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e9f9fd5c672c962389429abd11ed32c9c93f7932fd58584cae1e43951b141c6b"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58bd94ad48143e1d42e05fc055da41de0a9933f378ad87760595b8aec83d317b"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bf52642b12d70d78c18882915201bc5345f7c8f0f2ab8919d99b886aa6475a7"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fee12d8487b0df2b683424cca2a0d8fb7281d5607518d742e98119a74af01026"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:65fd04f1fea668ad1af48ac31b752000e222dccffedcad3de8ccf9d34489ccd3"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:c3f397e0511a0ec4fe331e602fc057dfd336d352062deb9969ebd81e253a149c"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:cf8f05f4abe3288fe2e106e1461fd20d8abf6103886ddfb6d746a5b8fb830d2b"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7d71d4ac0792ff89541179394d303be846a0b6cd3821ae67286ee69ecec16f9f"}, - {file = "aiohttp-3.11.8-cp39-cp39-win32.whl", hash = "sha256:2b6f8716044ae5e5f2a3b4e4b6bfee48e97c8b2a92e56f43aadd728c7fd26b7d"}, - {file = "aiohttp-3.11.8-cp39-cp39-win_amd64.whl", hash = "sha256:da343903214bf9f9d314b913caa499fa19e26d73e6e23a3db7d4898ea6d47028"}, - {file = "aiohttp-3.11.8.tar.gz", hash = "sha256:7bc9d64a2350cbb29a9732334e1a0743cbb6844de1731cbdf5949b235653f3fd"}, + {file = "aiohttp-3.11.11-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a60804bff28662cbcf340a4d61598891f12eea3a66af48ecfdc975ceec21e3c8"}, + {file = "aiohttp-3.11.11-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4b4fa1cb5f270fb3eab079536b764ad740bb749ce69a94d4ec30ceee1b5940d5"}, + {file = "aiohttp-3.11.11-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:731468f555656767cda219ab42e033355fe48c85fbe3ba83a349631541715ba2"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb23d8bb86282b342481cad4370ea0853a39e4a32a0042bb52ca6bdde132df43"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f047569d655f81cb70ea5be942ee5d4421b6219c3f05d131f64088c73bb0917f"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd7659baae9ccf94ae5fe8bfaa2c7bc2e94d24611528395ce88d009107e00c6d"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af01e42ad87ae24932138f154105e88da13ce7d202a6de93fafdafb2883a00ef"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5854be2f3e5a729800bac57a8d76af464e160f19676ab6aea74bde18ad19d438"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6526e5fb4e14f4bbf30411216780c9967c20c5a55f2f51d3abd6de68320cc2f3"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:85992ee30a31835fc482468637b3e5bd085fa8fe9392ba0bdcbdc1ef5e9e3c55"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:88a12ad8ccf325a8a5ed80e6d7c3bdc247d66175afedbe104ee2aaca72960d8e"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:0a6d3fbf2232e3a08c41eca81ae4f1dff3d8f1a30bae415ebe0af2d2458b8a33"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:84a585799c58b795573c7fa9b84c455adf3e1d72f19a2bf498b54a95ae0d194c"}, + {file = "aiohttp-3.11.11-cp310-cp310-win32.whl", hash = "sha256:bfde76a8f430cf5c5584553adf9926534352251d379dcb266ad2b93c54a29745"}, + {file = "aiohttp-3.11.11-cp310-cp310-win_amd64.whl", hash = "sha256:0fd82b8e9c383af11d2b26f27a478640b6b83d669440c0a71481f7c865a51da9"}, + {file = "aiohttp-3.11.11-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ba74ec819177af1ef7f59063c6d35a214a8fde6f987f7661f4f0eecc468a8f76"}, + {file = "aiohttp-3.11.11-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4af57160800b7a815f3fe0eba9b46bf28aafc195555f1824555fa2cfab6c1538"}, + {file = "aiohttp-3.11.11-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ffa336210cf9cd8ed117011085817d00abe4c08f99968deef0013ea283547204"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81b8fe282183e4a3c7a1b72f5ade1094ed1c6345a8f153506d114af5bf8accd9"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3af41686ccec6a0f2bdc66686dc0f403c41ac2089f80e2214a0f82d001052c03"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70d1f9dde0e5dd9e292a6d4d00058737052b01f3532f69c0c65818dac26dc287"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:249cc6912405917344192b9f9ea5cd5b139d49e0d2f5c7f70bdfaf6b4dbf3a2e"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0eb98d90b6690827dcc84c246811feeb4e1eea683c0eac6caed7549be9c84665"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ec82bf1fda6cecce7f7b915f9196601a1bd1a3079796b76d16ae4cce6d0ef89b"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9fd46ce0845cfe28f108888b3ab17abff84ff695e01e73657eec3f96d72eef34"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:bd176afcf8f5d2aed50c3647d4925d0db0579d96f75a31e77cbaf67d8a87742d"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ec2aa89305006fba9ffb98970db6c8221541be7bee4c1d027421d6f6df7d1ce2"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:92cde43018a2e17d48bb09c79e4d4cb0e236de5063ce897a5e40ac7cb4878773"}, + {file = "aiohttp-3.11.11-cp311-cp311-win32.whl", hash = "sha256:aba807f9569455cba566882c8938f1a549f205ee43c27b126e5450dc9f83cc62"}, + {file = "aiohttp-3.11.11-cp311-cp311-win_amd64.whl", hash = "sha256:ae545f31489548c87b0cced5755cfe5a5308d00407000e72c4fa30b19c3220ac"}, + {file = "aiohttp-3.11.11-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e595c591a48bbc295ebf47cb91aebf9bd32f3ff76749ecf282ea7f9f6bb73886"}, + {file = "aiohttp-3.11.11-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3ea1b59dc06396b0b424740a10a0a63974c725b1c64736ff788a3689d36c02d2"}, + {file = "aiohttp-3.11.11-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8811f3f098a78ffa16e0ea36dffd577eb031aea797cbdba81be039a4169e242c"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7227b87a355ce1f4bf83bfae4399b1f5bb42e0259cb9405824bd03d2f4336a"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d40f9da8cabbf295d3a9dae1295c69975b86d941bc20f0a087f0477fa0a66231"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ffb3dc385f6bb1568aa974fe65da84723210e5d9707e360e9ecb51f59406cd2e"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8f5f7515f3552d899c61202d99dcb17d6e3b0de777900405611cd747cecd1b8"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3499c7ffbfd9c6a3d8d6a2b01c26639da7e43d47c7b4f788016226b1e711caa8"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8e2bf8029dbf0810c7bfbc3e594b51c4cc9101fbffb583a3923aea184724203c"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b6212a60e5c482ef90f2d788835387070a88d52cf6241d3916733c9176d39eab"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d119fafe7b634dbfa25a8c597718e69a930e4847f0b88e172744be24515140da"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:6fba278063559acc730abf49845d0e9a9e1ba74f85f0ee6efd5803f08b285853"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:92fc484e34b733704ad77210c7957679c5c3877bd1e6b6d74b185e9320cc716e"}, + {file = "aiohttp-3.11.11-cp312-cp312-win32.whl", hash = "sha256:9f5b3c1ed63c8fa937a920b6c1bec78b74ee09593b3f5b979ab2ae5ef60d7600"}, + {file = "aiohttp-3.11.11-cp312-cp312-win_amd64.whl", hash = "sha256:1e69966ea6ef0c14ee53ef7a3d68b564cc408121ea56c0caa2dc918c1b2f553d"}, + {file = "aiohttp-3.11.11-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:541d823548ab69d13d23730a06f97460f4238ad2e5ed966aaf850d7c369782d9"}, + {file = "aiohttp-3.11.11-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:929f3ed33743a49ab127c58c3e0a827de0664bfcda566108989a14068f820194"}, + {file = "aiohttp-3.11.11-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0882c2820fd0132240edbb4a51eb8ceb6eef8181db9ad5291ab3332e0d71df5f"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b63de12e44935d5aca7ed7ed98a255a11e5cb47f83a9fded7a5e41c40277d104"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa54f8ef31d23c506910c21163f22b124facb573bff73930735cf9fe38bf7dff"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a344d5dc18074e3872777b62f5f7d584ae4344cd6006c17ba12103759d407af3"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b7fb429ab1aafa1f48578eb315ca45bd46e9c37de11fe45c7f5f4138091e2f1"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c341c7d868750e31961d6d8e60ff040fb9d3d3a46d77fd85e1ab8e76c3e9a5c4"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ed9ee95614a71e87f1a70bc81603f6c6760128b140bc4030abe6abaa988f1c3d"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:de8d38f1c2810fa2a4f1d995a2e9c70bb8737b18da04ac2afbf3971f65781d87"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a9b7371665d4f00deb8f32208c7c5e652059b0fda41cf6dbcac6114a041f1cc2"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:620598717fce1b3bd14dd09947ea53e1ad510317c85dda2c9c65b622edc96b12"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bf8d9bfee991d8acc72d060d53860f356e07a50f0e0d09a8dfedea1c554dd0d5"}, + {file = "aiohttp-3.11.11-cp313-cp313-win32.whl", hash = "sha256:9d73ee3725b7a737ad86c2eac5c57a4a97793d9f442599bea5ec67ac9f4bdc3d"}, + {file = "aiohttp-3.11.11-cp313-cp313-win_amd64.whl", hash = "sha256:c7a06301c2fb096bdb0bd25fe2011531c1453b9f2c163c8031600ec73af1cc99"}, + {file = "aiohttp-3.11.11-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3e23419d832d969f659c208557de4a123e30a10d26e1e14b73431d3c13444c2e"}, + {file = "aiohttp-3.11.11-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:21fef42317cf02e05d3b09c028712e1d73a9606f02467fd803f7c1f39cc59add"}, + {file = "aiohttp-3.11.11-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1f21bb8d0235fc10c09ce1d11ffbd40fc50d3f08a89e4cf3a0c503dc2562247a"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1642eceeaa5ab6c9b6dfeaaa626ae314d808188ab23ae196a34c9d97efb68350"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2170816e34e10f2fd120f603e951630f8a112e1be3b60963a1f159f5699059a6"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8be8508d110d93061197fd2d6a74f7401f73b6d12f8822bbcd6d74f2b55d71b1"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4eed954b161e6b9b65f6be446ed448ed3921763cc432053ceb606f89d793927e"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6c9af134da4bc9b3bd3e6a70072509f295d10ee60c697826225b60b9959acdd"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:44167fc6a763d534a6908bdb2592269b4bf30a03239bcb1654781adf5e49caf1"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:479b8c6ebd12aedfe64563b85920525d05d394b85f166b7873c8bde6da612f9c"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:10b4ff0ad793d98605958089fabfa350e8e62bd5d40aa65cdc69d6785859f94e"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:b540bd67cfb54e6f0865ceccd9979687210d7ed1a1cc8c01f8e67e2f1e883d28"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1dac54e8ce2ed83b1f6b1a54005c87dfed139cf3f777fdc8afc76e7841101226"}, + {file = "aiohttp-3.11.11-cp39-cp39-win32.whl", hash = "sha256:568c1236b2fde93b7720f95a890741854c1200fba4a3471ff48b2934d2d93fd3"}, + {file = "aiohttp-3.11.11-cp39-cp39-win_amd64.whl", hash = "sha256:943a8b052e54dfd6439fd7989f67fc6a7f2138d0a2cf0a7de5f18aa4fe7eb3b1"}, + {file = "aiohttp-3.11.11.tar.gz", hash = "sha256:bb49c7f1e6ebf3821a42d81d494f538107610c3a705987f53068546b0e90303e"}, ] [package.dependencies] @@ -139,13 +139,13 @@ speedups = ["Brotli", "aiodns (>=3.2.0)", "brotlicffi"] [[package]] name = "aiosignal" -version = "1.3.1" +version = "1.3.2" description = "aiosignal: a list of registered asynchronous callbacks" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"}, - {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"}, + {file = "aiosignal-1.3.2-py2.py3-none-any.whl", hash = "sha256:45cde58e409a301715980c2b01d0c28bdde3770d8290b5eb2173759d9acb31a5"}, + {file = "aiosignal-1.3.2.tar.gz", hash = "sha256:a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54"}, ] [package.dependencies] @@ -164,24 +164,24 @@ files = [ [[package]] name = "anyio" -version = "4.6.2.post1" +version = "4.7.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" files = [ - {file = "anyio-4.6.2.post1-py3-none-any.whl", hash = "sha256:6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d"}, - {file = "anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c"}, + {file = "anyio-4.7.0-py3-none-any.whl", hash = "sha256:ea60c3723ab42ba6fff7e8ccb0488c898ec538ff4df1f1d5e642c3601d07e352"}, + {file = "anyio-4.7.0.tar.gz", hash = "sha256:2f834749c602966b7d456a7567cafcb309f96482b5081d14ac93ccd457f9dd48"}, ] [package.dependencies] exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" -typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} +typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] -doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"] +doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] trio = ["trio (>=0.26.1)"] [[package]] @@ -228,19 +228,19 @@ files = [ [[package]] name = "attrs" -version = "24.2.0" +version = "24.3.0" description = "Classes Without Boilerplate" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, - {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, + {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, + {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, ] [package.extras] benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] @@ -431,13 +431,13 @@ cffi = ">=1.0.0" [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] @@ -521,127 +521,114 @@ pycparser = "*" [[package]] name = "charset-normalizer" -version = "3.4.0" +version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false -python-versions = ">=3.7.0" +python-versions = ">=3.7" files = [ - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"}, - {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"}, - {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e218488cd232553829be0664c2292d3af2eeeb94b32bea483cf79ac6a694e037"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80ed5e856eb7f30115aaf94e4a08114ccc8813e6ed1b5efa74f9f82e8509858f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b010a7a4fd316c3c484d482922d13044979e78d1861f0e0650423144c616a46a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4532bff1b8421fd0a320463030c7520f56a79c9024a4e88f01c537316019005a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d973f03c0cb71c5ed99037b870f2be986c3c05e63622c017ea9816881d2dd247"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3a3bd0dcd373514dcec91c411ddb9632c0d7d92aed7093b8c3bbb6d69ca74408"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9c3cdf5390dcd29aa8056d13e8e99526cda0305acc038b96b30352aff5ff2bb"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2bdfe3ac2e1bbe5b59a1a63721eb3b95fc9b6817ae4a46debbb4e11f6232428d"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:eab677309cdb30d047996b36d34caeda1dc91149e4fdca0b1a039b3f79d9a807"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win32.whl", hash = "sha256:c0429126cf75e16c4f0ad00ee0eae4242dc652290f940152ca8c75c3a4b6ee8f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:9f0b8b1c6d84c8034a44893aba5e767bf9c7a211e313a9605d9c617d7083829f"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f30bf9fd9be89ecb2360c7d94a711f00c09b976258846efe40db3d05828e8089"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97f68b8d6831127e4787ad15e6757232e14e12060bec17091b85eb1486b91d8d"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7974a0b5ecd505609e3b19742b60cee7aa2aa2fb3151bc917e6e2646d7667dcf"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc54db6c8593ef7d4b2a331b58653356cf04f67c960f584edb7c3d8c97e8f39e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:311f30128d7d333eebd7896965bfcfbd0065f1716ec92bd5638d7748eb6f936a"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:7d053096f67cd1241601111b698f5cad775f97ab25d81567d3f59219b5f1adbd"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:807f52c1f798eef6cf26beb819eeb8819b1622ddfeef9d0977a8502d4db6d534"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:dccbe65bd2f7f7ec22c4ff99ed56faa1e9f785482b9bbd7c717e26fd723a1d1e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:2fb9bd477fdea8684f78791a6de97a953c51831ee2981f8e4f583ff3b9d9687e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:01732659ba9b5b873fc117534143e4feefecf3b2078b0a6a2e925271bb6f4cfa"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win32.whl", hash = "sha256:7a4f97a081603d2050bfaffdefa5b02a9ec823f8348a572e39032caa8404a487"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:7b1bef6280950ee6c177b326508f86cad7ad4dff12454483b51d8b7d673a2c5d"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ecddf25bee22fe4fe3737a399d0d177d72bc22be6913acfab364b40bce1ba83c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c60ca7339acd497a55b0ea5d506b2a2612afb2826560416f6894e8b5770d4a9"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7b2d86dd06bfc2ade3312a83a5c364c7ec2e3498f8734282c6c3d4b07b346b8"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd78cfcda14a1ef52584dbb008f7ac81c1328c0f58184bf9a84c49c605002da6"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e27f48bcd0957c6d4cb9d6fa6b61d192d0b13d5ef563e5f2ae35feafc0d179c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01ad647cdd609225c5350561d084b42ddf732f4eeefe6e678765636791e78b9a"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:619a609aa74ae43d90ed2e89bdd784765de0a25ca761b93e196d938b8fd1dbbd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:89149166622f4db9b4b6a449256291dc87a99ee53151c74cbd82a53c8c2f6ccd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:7709f51f5f7c853f0fb938bcd3bc59cdfdc5203635ffd18bf354f6967ea0f824"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:345b0426edd4e18138d6528aed636de7a9ed169b4aaf9d61a8c19e39d26838ca"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0907f11d019260cdc3f94fbdb23ff9125f6b5d1039b76003b5b0ac9d6a6c9d5b"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win32.whl", hash = "sha256:ea0d8d539afa5eb2728aa1932a988a9a7af94f18582ffae4bc10b3fbdad0626e"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:329ce159e82018d646c7ac45b01a430369d526569ec08516081727a20e9e4af4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b97e690a2118911e39b4042088092771b4ae3fc3aa86518f84b8cf6888dbdb41"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78baa6d91634dfb69ec52a463534bc0df05dbd546209b79a3880a34487f4b84f"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a2bc9f351a75ef49d664206d51f8e5ede9da246602dc2d2726837620ea034b2"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75832c08354f595c760a804588b9357d34ec00ba1c940c15e31e96d902093770"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af291f4fe114be0280cdd29d533696a77b5b49cfde5467176ecab32353395c4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0167ddc8ab6508fe81860a57dd472b2ef4060e8d378f0cc555707126830f2537"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2a75d49014d118e4198bcee5ee0a6f25856b29b12dbf7cd012791f8a6cc5c496"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363e2f92b0f0174b2f8238240a1a30142e3db7b957a5dd5689b0e75fb717cc78"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ab36c8eb7e454e34e60eb55ca5d241a5d18b2c6244f6827a30e451c42410b5f7"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:4c0907b1928a36d5a998d72d64d8eaa7244989f7aaaf947500d3a800c83a3fd6"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04432ad9479fa40ec0f387795ddad4437a2b50417c69fa275e212933519ff294"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win32.whl", hash = "sha256:3bed14e9c89dcb10e8f3a29f9ccac4955aebe93c71ae803af79265c9ca5644c5"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:49402233c892a461407c512a19435d1ce275543138294f7ef013f0b63d5d3765"}, + {file = "charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85"}, + {file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"}, ] [[package]] name = "click" -version = "8.1.7" +version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, + {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, + {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, ] [package.dependencies] @@ -660,73 +647,73 @@ files = [ [[package]] name = "coverage" -version = "7.6.8" +version = "7.6.9" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" files = [ - {file = "coverage-7.6.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b39e6011cd06822eb964d038d5dff5da5d98652b81f5ecd439277b32361a3a50"}, - {file = "coverage-7.6.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:63c19702db10ad79151a059d2d6336fe0c470f2e18d0d4d1a57f7f9713875dcf"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3985b9be361d8fb6b2d1adc9924d01dec575a1d7453a14cccd73225cb79243ee"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:644ec81edec0f4ad17d51c838a7d01e42811054543b76d4ba2c5d6af741ce2a6"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f188a2402f8359cf0c4b1fe89eea40dc13b52e7b4fd4812450da9fcd210181d"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e19122296822deafce89a0c5e8685704c067ae65d45e79718c92df7b3ec3d331"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:13618bed0c38acc418896005732e565b317aa9e98d855a0e9f211a7ffc2d6638"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:193e3bffca48ad74b8c764fb4492dd875038a2f9925530cb094db92bb5e47bed"}, - {file = "coverage-7.6.8-cp310-cp310-win32.whl", hash = "sha256:3988665ee376abce49613701336544041f2117de7b7fbfe91b93d8ff8b151c8e"}, - {file = "coverage-7.6.8-cp310-cp310-win_amd64.whl", hash = "sha256:f56f49b2553d7dd85fd86e029515a221e5c1f8cb3d9c38b470bc38bde7b8445a"}, - {file = "coverage-7.6.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:86cffe9c6dfcfe22e28027069725c7f57f4b868a3f86e81d1c62462764dc46d4"}, - {file = "coverage-7.6.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d82ab6816c3277dc962cfcdc85b1efa0e5f50fb2c449432deaf2398a2928ab94"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13690e923a3932e4fad4c0ebfb9cb5988e03d9dcb4c5150b5fcbf58fd8bddfc4"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4be32da0c3827ac9132bb488d331cb32e8d9638dd41a0557c5569d57cf22c9c1"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44e6c85bbdc809383b509d732b06419fb4544dca29ebe18480379633623baafb"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:768939f7c4353c0fac2f7c37897e10b1414b571fd85dd9fc49e6a87e37a2e0d8"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e44961e36cb13c495806d4cac67640ac2866cb99044e210895b506c26ee63d3a"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3ea8bb1ab9558374c0ab591783808511d135a833c3ca64a18ec927f20c4030f0"}, - {file = "coverage-7.6.8-cp311-cp311-win32.whl", hash = "sha256:629a1ba2115dce8bf75a5cce9f2486ae483cb89c0145795603d6554bdc83e801"}, - {file = "coverage-7.6.8-cp311-cp311-win_amd64.whl", hash = "sha256:fb9fc32399dca861584d96eccd6c980b69bbcd7c228d06fb74fe53e007aa8ef9"}, - {file = "coverage-7.6.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:e683e6ecc587643f8cde8f5da6768e9d165cd31edf39ee90ed7034f9ca0eefee"}, - {file = "coverage-7.6.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1defe91d41ce1bd44b40fabf071e6a01a5aa14de4a31b986aa9dfd1b3e3e414a"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7ad66e8e50225ebf4236368cc43c37f59d5e6728f15f6e258c8639fa0dd8e6d"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3fe47da3e4fda5f1abb5709c156eca207eacf8007304ce3019eb001e7a7204cb"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:202a2d645c5a46b84992f55b0a3affe4f0ba6b4c611abec32ee88358db4bb649"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4674f0daa1823c295845b6a740d98a840d7a1c11df00d1fd62614545c1583787"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:74610105ebd6f33d7c10f8907afed696e79c59e3043c5f20eaa3a46fddf33b4c"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:37cda8712145917105e07aab96388ae76e787270ec04bcb9d5cc786d7cbb8443"}, - {file = "coverage-7.6.8-cp312-cp312-win32.whl", hash = "sha256:9e89d5c8509fbd6c03d0dd1972925b22f50db0792ce06324ba069f10787429ad"}, - {file = "coverage-7.6.8-cp312-cp312-win_amd64.whl", hash = "sha256:379c111d3558272a2cae3d8e57e6b6e6f4fe652905692d54bad5ea0ca37c5ad4"}, - {file = "coverage-7.6.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0b0c69f4f724c64dfbfe79f5dfb503b42fe6127b8d479b2677f2b227478db2eb"}, - {file = "coverage-7.6.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c15b32a7aca8038ed7644f854bf17b663bc38e1671b5d6f43f9a2b2bd0c46f63"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63068a11171e4276f6ece913bde059e77c713b48c3a848814a6537f35afb8365"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f4548c5ead23ad13fb7a2c8ea541357474ec13c2b736feb02e19a3085fac002"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b4b4299dd0d2c67caaaf286d58aef5e75b125b95615dda4542561a5a566a1e3"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c9ebfb2507751f7196995142f057d1324afdab56db1d9743aab7f50289abd022"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c1b4474beee02ede1eef86c25ad4600a424fe36cff01a6103cb4533c6bf0169e"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d9fd2547e6decdbf985d579cf3fc78e4c1d662b9b0ff7cc7862baaab71c9cc5b"}, - {file = "coverage-7.6.8-cp313-cp313-win32.whl", hash = "sha256:8aae5aea53cbfe024919715eca696b1a3201886ce83790537d1c3668459c7146"}, - {file = "coverage-7.6.8-cp313-cp313-win_amd64.whl", hash = "sha256:ae270e79f7e169ccfe23284ff5ea2d52a6f401dc01b337efb54b3783e2ce3f28"}, - {file = "coverage-7.6.8-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:de38add67a0af869b0d79c525d3e4588ac1ffa92f39116dbe0ed9753f26eba7d"}, - {file = "coverage-7.6.8-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b07c25d52b1c16ce5de088046cd2432b30f9ad5e224ff17c8f496d9cb7d1d451"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62a66ff235e4c2e37ed3b6104d8b478d767ff73838d1222132a7a026aa548764"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09b9f848b28081e7b975a3626e9081574a7b9196cde26604540582da60235fdf"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:093896e530c38c8e9c996901858ac63f3d4171268db2c9c8b373a228f459bbc5"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9a7b8ac36fd688c8361cbc7bf1cb5866977ece6e0b17c34aa0df58bda4fa18a4"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:38c51297b35b3ed91670e1e4efb702b790002e3245a28c76e627478aa3c10d83"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2e4e0f60cb4bd7396108823548e82fdab72d4d8a65e58e2c19bbbc2f1e2bfa4b"}, - {file = "coverage-7.6.8-cp313-cp313t-win32.whl", hash = "sha256:6535d996f6537ecb298b4e287a855f37deaf64ff007162ec0afb9ab8ba3b8b71"}, - {file = "coverage-7.6.8-cp313-cp313t-win_amd64.whl", hash = "sha256:c79c0685f142ca53256722a384540832420dff4ab15fec1863d7e5bc8691bdcc"}, - {file = "coverage-7.6.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3ac47fa29d8d41059ea3df65bd3ade92f97ee4910ed638e87075b8e8ce69599e"}, - {file = "coverage-7.6.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:24eda3a24a38157eee639ca9afe45eefa8d2420d49468819ac5f88b10de84f4c"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4c81ed2820b9023a9a90717020315e63b17b18c274a332e3b6437d7ff70abe0"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bd55f8fc8fa494958772a2a7302b0354ab16e0b9272b3c3d83cdb5bec5bd1779"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f39e2f3530ed1626c66e7493be7a8423b023ca852aacdc91fb30162c350d2a92"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:716a78a342679cd1177bc8c2fe957e0ab91405bd43a17094324845200b2fddf4"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:177f01eeaa3aee4a5ffb0d1439c5952b53d5010f86e9d2667963e632e30082cc"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:912e95017ff51dc3d7b6e2be158dedc889d9a5cc3382445589ce554f1a34c0ea"}, - {file = "coverage-7.6.8-cp39-cp39-win32.whl", hash = "sha256:4db3ed6a907b555e57cc2e6f14dc3a4c2458cdad8919e40b5357ab9b6db6c43e"}, - {file = "coverage-7.6.8-cp39-cp39-win_amd64.whl", hash = "sha256:428ac484592f780e8cd7b6b14eb568f7c85460c92e2a37cb0c0e5186e1a0d076"}, - {file = "coverage-7.6.8-pp39.pp310-none-any.whl", hash = "sha256:5c52a036535d12590c32c49209e79cabaad9f9ad8aa4cbd875b68c4d67a9cbce"}, - {file = "coverage-7.6.8.tar.gz", hash = "sha256:8b2b8503edb06822c86d82fa64a4a5cb0760bb8f31f26e138ec743f422f37cfc"}, + {file = "coverage-7.6.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:85d9636f72e8991a1706b2b55b06c27545448baf9f6dbf51c4004609aacd7dcb"}, + {file = "coverage-7.6.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:608a7fd78c67bee8936378299a6cb9f5149bb80238c7a566fc3e6717a4e68710"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:96d636c77af18b5cb664ddf12dab9b15a0cfe9c0bde715da38698c8cea748bfa"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d75cded8a3cff93da9edc31446872d2997e327921d8eed86641efafd350e1df1"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7b15f589593110ae767ce997775d645b47e5cbbf54fd322f8ebea6277466cec"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:44349150f6811b44b25574839b39ae35291f6496eb795b7366fef3bd3cf112d3"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:d891c136b5b310d0e702e186d70cd16d1119ea8927347045124cb286b29297e5"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:db1dab894cc139f67822a92910466531de5ea6034ddfd2b11c0d4c6257168073"}, + {file = "coverage-7.6.9-cp310-cp310-win32.whl", hash = "sha256:41ff7b0da5af71a51b53f501a3bac65fb0ec311ebed1632e58fc6107f03b9198"}, + {file = "coverage-7.6.9-cp310-cp310-win_amd64.whl", hash = "sha256:35371f8438028fdccfaf3570b31d98e8d9eda8bb1d6ab9473f5a390969e98717"}, + {file = "coverage-7.6.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:932fc826442132dde42ee52cf66d941f581c685a6313feebed358411238f60f9"}, + {file = "coverage-7.6.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:085161be5f3b30fd9b3e7b9a8c301f935c8313dcf928a07b116324abea2c1c2c"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ccc660a77e1c2bf24ddbce969af9447a9474790160cfb23de6be4fa88e3951c7"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c69e42c892c018cd3c8d90da61d845f50a8243062b19d228189b0224150018a9"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0824a28ec542a0be22f60c6ac36d679e0e262e5353203bea81d44ee81fe9c6d4"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4401ae5fc52ad8d26d2a5d8a7428b0f0c72431683f8e63e42e70606374c311a1"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:98caba4476a6c8d59ec1eb00c7dd862ba9beca34085642d46ed503cc2d440d4b"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ee5defd1733fd6ec08b168bd4f5387d5b322f45ca9e0e6c817ea6c4cd36313e3"}, + {file = "coverage-7.6.9-cp311-cp311-win32.whl", hash = "sha256:f2d1ec60d6d256bdf298cb86b78dd715980828f50c46701abc3b0a2b3f8a0dc0"}, + {file = "coverage-7.6.9-cp311-cp311-win_amd64.whl", hash = "sha256:0d59fd927b1f04de57a2ba0137166d31c1a6dd9e764ad4af552912d70428c92b"}, + {file = "coverage-7.6.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:99e266ae0b5d15f1ca8d278a668df6f51cc4b854513daab5cae695ed7b721cf8"}, + {file = "coverage-7.6.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9901d36492009a0a9b94b20e52ebfc8453bf49bb2b27bca2c9706f8b4f5a554a"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abd3e72dd5b97e3af4246cdada7738ef0e608168de952b837b8dd7e90341f015"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ff74026a461eb0660366fb01c650c1d00f833a086b336bdad7ab00cc952072b3"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65dad5a248823a4996724a88eb51d4b31587aa7aa428562dbe459c684e5787ae"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:22be16571504c9ccea919fcedb459d5ab20d41172056206eb2994e2ff06118a4"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f957943bc718b87144ecaee70762bc2bc3f1a7a53c7b861103546d3a403f0a6"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0ae1387db4aecb1f485fb70a6c0148c6cdaebb6038f1d40089b1fc84a5db556f"}, + {file = "coverage-7.6.9-cp312-cp312-win32.whl", hash = "sha256:1a330812d9cc7ac2182586f6d41b4d0fadf9be9049f350e0efb275c8ee8eb692"}, + {file = "coverage-7.6.9-cp312-cp312-win_amd64.whl", hash = "sha256:b12c6b18269ca471eedd41c1b6a1065b2f7827508edb9a7ed5555e9a56dcfc97"}, + {file = "coverage-7.6.9-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:899b8cd4781c400454f2f64f7776a5d87bbd7b3e7f7bda0cb18f857bb1334664"}, + {file = "coverage-7.6.9-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:61f70dc68bd36810972e55bbbe83674ea073dd1dcc121040a08cdf3416c5349c"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8a289d23d4c46f1a82d5db4abeb40b9b5be91731ee19a379d15790e53031c014"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e216d8044a356fc0337c7a2a0536d6de07888d7bcda76febcb8adc50bdbbd00"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c026eb44f744acaa2bda7493dad903aa5bf5fc4f2554293a798d5606710055d"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e77363e8425325384f9d49272c54045bbed2f478e9dd698dbc65dbc37860eb0a"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:777abfab476cf83b5177b84d7486497e034eb9eaea0d746ce0c1268c71652077"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:447af20e25fdbe16f26e84eb714ba21d98868705cb138252d28bc400381f6ffb"}, + {file = "coverage-7.6.9-cp313-cp313-win32.whl", hash = "sha256:d872ec5aeb086cbea771c573600d47944eea2dcba8be5f3ee649bfe3cb8dc9ba"}, + {file = "coverage-7.6.9-cp313-cp313-win_amd64.whl", hash = "sha256:fd1213c86e48dfdc5a0cc676551db467495a95a662d2396ecd58e719191446e1"}, + {file = "coverage-7.6.9-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ba9e7484d286cd5a43744e5f47b0b3fb457865baf07bafc6bee91896364e1419"}, + {file = "coverage-7.6.9-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e5ea1cf0872ee455c03e5674b5bca5e3e68e159379c1af0903e89f5eba9ccc3a"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d10e07aa2b91835d6abec555ec8b2733347956991901eea6ffac295f83a30e4"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:13a9e2d3ee855db3dd6ea1ba5203316a1b1fd8eaeffc37c5b54987e61e4194ae"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c38bf15a40ccf5619fa2fe8f26106c7e8e080d7760aeccb3722664c8656b030"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:d5275455b3e4627c8e7154feaf7ee0743c2e7af82f6e3b561967b1cca755a0be"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:8f8770dfc6e2c6a2d4569f411015c8d751c980d17a14b0530da2d7f27ffdd88e"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8d2dfa71665a29b153a9681edb1c8d9c1ea50dfc2375fb4dac99ea7e21a0bcd9"}, + {file = "coverage-7.6.9-cp313-cp313t-win32.whl", hash = "sha256:5e6b86b5847a016d0fbd31ffe1001b63355ed309651851295315031ea7eb5a9b"}, + {file = "coverage-7.6.9-cp313-cp313t-win_amd64.whl", hash = "sha256:97ddc94d46088304772d21b060041c97fc16bdda13c6c7f9d8fcd8d5ae0d8611"}, + {file = "coverage-7.6.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:adb697c0bd35100dc690de83154627fbab1f4f3c0386df266dded865fc50a902"}, + {file = "coverage-7.6.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:be57b6d56e49c2739cdf776839a92330e933dd5e5d929966fbbd380c77f060be"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1592791f8204ae9166de22ba7e6705fa4ebd02936c09436a1bb85aabca3e599"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e12ae8cc979cf83d258acb5e1f1cf2f3f83524d1564a49d20b8bec14b637f08"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb5555cff66c4d3d6213a296b360f9e1a8e323e74e0426b6c10ed7f4d021e464"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b9389a429e0e5142e69d5bf4a435dd688c14478a19bb901735cdf75e57b13845"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:592ac539812e9b46046620341498caf09ca21023c41c893e1eb9dbda00a70cbf"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a27801adef24cc30871da98a105f77995e13a25a505a0161911f6aafbd66e678"}, + {file = "coverage-7.6.9-cp39-cp39-win32.whl", hash = "sha256:8e3c3e38930cfb729cb8137d7f055e5a473ddaf1217966aa6238c88bd9fd50e6"}, + {file = "coverage-7.6.9-cp39-cp39-win_amd64.whl", hash = "sha256:e28bf44afa2b187cc9f41749138a64435bf340adfcacb5b2290c070ce99839d4"}, + {file = "coverage-7.6.9-pp39.pp310-none-any.whl", hash = "sha256:f3ca78518bc6bc92828cd11867b121891d75cae4ea9e908d72030609b996db1b"}, + {file = "coverage-7.6.9.tar.gz", hash = "sha256:4a8d8977b0c6ef5aeadcb644da9e69ae0dcfe66ec7f368c89c72e058bd71164d"}, ] [package.dependencies] @@ -781,13 +768,13 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] [[package]] name = "fastapi" -version = "0.115.5" +version = "0.115.6" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" files = [ - {file = "fastapi-0.115.5-py3-none-any.whl", hash = "sha256:596b95adbe1474da47049e802f9a65ab2ffa9c2b07e7efee70eb8a66c9f2f796"}, - {file = "fastapi-0.115.5.tar.gz", hash = "sha256:0e7a4d0dc0d01c68df21887cce0945e72d3c48b9f4f79dfe7a7d53aa08fbb289"}, + {file = "fastapi-0.115.6-py3-none-any.whl", hash = "sha256:e9240b29e36fa8f4bb7290316988e90c381e5092e0cbe84e7818cc3713bcf305"}, + {file = "fastapi-0.115.6.tar.gz", hash = "sha256:9ec46f7addc14ea472958a96aae5b5de65f39721a46aaf5705c480d9a8b76654"}, ] [package.dependencies] @@ -1038,13 +1025,13 @@ test = ["Cython (>=0.29.24)"] [[package]] name = "httpx" -version = "0.28.0" +version = "0.28.1" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpx-0.28.0-py3-none-any.whl", hash = "sha256:dc0b419a0cfeb6e8b34e85167c0da2671206f5095f1baa9663d23bcfd6b535fc"}, - {file = "httpx-0.28.0.tar.gz", hash = "sha256:0858d3bab51ba7e386637f22a61d8ccddaeec5f3fe4209da3a6168dbb91573e0"}, + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, ] [package.dependencies] @@ -1160,13 +1147,13 @@ files = [ [[package]] name = "jinja2" -version = "3.1.4" +version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, - {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, + {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, + {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, ] [package.dependencies] @@ -1177,13 +1164,13 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "loguru" -version = "0.7.2" +version = "0.7.3" description = "Python logging made (stupidly) simple" optional = false -python-versions = ">=3.5" +python-versions = "<4.0,>=3.5" files = [ - {file = "loguru-0.7.2-py3-none-any.whl", hash = "sha256:003d71e3d3ed35f0f8984898359d65b79e5b21943f78af86aa5491210429b8eb"}, - {file = "loguru-0.7.2.tar.gz", hash = "sha256:e671a53522515f34fd406340ee968cb9ecafbc4b36c679da03c18fd8d0bd51ac"}, + {file = "loguru-0.7.3-py3-none-any.whl", hash = "sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c"}, + {file = "loguru-0.7.3.tar.gz", hash = "sha256:19480589e77d47b8d85b2c827ad95d49bf31b0dcde16593892eb51dd18706eb6"}, ] [package.dependencies] @@ -1191,7 +1178,7 @@ colorama = {version = ">=0.3.4", markers = "sys_platform == \"win32\""} win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} [package.extras] -dev = ["Sphinx (==7.2.5)", "colorama (==0.4.5)", "colorama (==0.4.6)", "exceptiongroup (==1.1.3)", "freezegun (==1.1.0)", "freezegun (==1.2.2)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v1.4.1)", "mypy (==v1.5.1)", "pre-commit (==3.4.0)", "pytest (==6.1.2)", "pytest (==7.4.0)", "pytest-cov (==2.12.1)", "pytest-cov (==4.1.0)", "pytest-mypy-plugins (==1.9.3)", "pytest-mypy-plugins (==3.0.0)", "sphinx-autobuild (==2021.3.14)", "sphinx-rtd-theme (==1.3.0)", "tox (==3.27.1)", "tox (==4.11.0)"] +dev = ["Sphinx (==8.1.3)", "build (==1.2.2)", "colorama (==0.4.5)", "colorama (==0.4.6)", "exceptiongroup (==1.1.3)", "freezegun (==1.1.0)", "freezegun (==1.5.0)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v1.13.0)", "mypy (==v1.4.1)", "myst-parser (==4.0.0)", "pre-commit (==4.0.1)", "pytest (==6.1.2)", "pytest (==8.3.2)", "pytest-cov (==2.12.1)", "pytest-cov (==5.0.0)", "pytest-cov (==6.0.0)", "pytest-mypy-plugins (==1.9.3)", "pytest-mypy-plugins (==3.1.0)", "sphinx-rtd-theme (==3.0.2)", "tox (==3.27.1)", "tox (==4.23.2)", "twine (==6.0.1)"] [[package]] name = "markupsafe" @@ -1391,7 +1378,7 @@ url = "../test" [[package]] name = "nonebot2" -version = "2.4.0" +version = "2.4.1" description = "An asynchronous python bot framework." optional = false python-versions = "^3.9" @@ -1429,13 +1416,13 @@ url = "../.." [[package]] name = "nonebug" -version = "0.4.2" +version = "0.4.3" description = "nonebot2 test framework" optional = false python-versions = "<4.0,>=3.9" files = [ - {file = "nonebug-0.4.2-py3-none-any.whl", hash = "sha256:83d9229ec899819e9f5786eabc0c27b9dd0cd5d6e2e7438f59923ab822d5c555"}, - {file = "nonebug-0.4.2.tar.gz", hash = "sha256:002dac00fed1fbff97574f3dffab2237fc41473b3bf3e73d2730ae34895bc137"}, + {file = "nonebug-0.4.3-py3-none-any.whl", hash = "sha256:eb9b2c8ab3d45459a4f00ebdaae90729e9e9628575c0685fca4c871dd4cfd425"}, + {file = "nonebug-0.4.3.tar.gz", hash = "sha256:e9592d2c7a42b76f4a336f98726cba92e1300f6bab155c8822e865919786f10c"}, ] [package.dependencies] @@ -1498,109 +1485,93 @@ files = [ [[package]] name = "propcache" -version = "0.2.0" +version = "0.2.1" description = "Accelerated property cache" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c5869b8fd70b81835a6f187c5fdbe67917a04d7e52b6e7cc4e5fe39d55c39d58"}, - {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:952e0d9d07609d9c5be361f33b0d6d650cd2bae393aabb11d9b719364521984b"}, - {file = "propcache-0.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:33ac8f098df0585c0b53009f039dfd913b38c1d2edafed0cedcc0c32a05aa110"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97e48e8875e6c13909c800fa344cd54cc4b2b0db1d5f911f840458a500fde2c2"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:388f3217649d6d59292b722d940d4d2e1e6a7003259eb835724092a1cca0203a"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f571aea50ba5623c308aa146eb650eebf7dbe0fd8c5d946e28343cb3b5aad577"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3dfafb44f7bb35c0c06eda6b2ab4bfd58f02729e7c4045e179f9a861b07c9850"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3ebe9a75be7ab0b7da2464a77bb27febcb4fab46a34f9288f39d74833db7f61"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d2f0d0f976985f85dfb5f3d685697ef769faa6b71993b46b295cdbbd6be8cc37"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a3dc1a4b165283bd865e8f8cb5f0c64c05001e0718ed06250d8cac9bec115b48"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9e0f07b42d2a50c7dd2d8675d50f7343d998c64008f1da5fef888396b7f84630"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e63e3e1e0271f374ed489ff5ee73d4b6e7c60710e1f76af5f0e1a6117cd26394"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:56bb5c98f058a41bb58eead194b4db8c05b088c93d94d5161728515bd52b052b"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7665f04d0c7f26ff8bb534e1c65068409bf4687aa2534faf7104d7182debb336"}, - {file = "propcache-0.2.0-cp310-cp310-win32.whl", hash = "sha256:7cf18abf9764746b9c8704774d8b06714bcb0a63641518a3a89c7f85cc02c2ad"}, - {file = "propcache-0.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:cfac69017ef97db2438efb854edf24f5a29fd09a536ff3a992b75990720cdc99"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:63f13bf09cc3336eb04a837490b8f332e0db41da66995c9fd1ba04552e516354"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608cce1da6f2672a56b24a015b42db4ac612ee709f3d29f27a00c943d9e851de"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:466c219deee4536fbc83c08d09115249db301550625c7fef1c5563a584c9bc87"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc2db02409338bf36590aa985a461b2c96fce91f8e7e0f14c50c5fcc4f229016"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a6ed8db0a556343d566a5c124ee483ae113acc9a557a807d439bcecc44e7dfbb"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:91997d9cb4a325b60d4e3f20967f8eb08dfcb32b22554d5ef78e6fd1dda743a2"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c7dde9e533c0a49d802b4f3f218fa9ad0a1ce21f2c2eb80d5216565202acab4"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffcad6c564fe6b9b8916c1aefbb37a362deebf9394bd2974e9d84232e3e08504"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:97a58a28bcf63284e8b4d7b460cbee1edaab24634e82059c7b8c09e65284f178"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:945db8ee295d3af9dbdbb698cce9bbc5c59b5c3fe328bbc4387f59a8a35f998d"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:39e104da444a34830751715f45ef9fc537475ba21b7f1f5b0f4d71a3b60d7fe2"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c5ecca8f9bab618340c8e848d340baf68bcd8ad90a8ecd7a4524a81c1764b3db"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c436130cc779806bdf5d5fae0d848713105472b8566b75ff70048c47d3961c5b"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:191db28dc6dcd29d1a3e063c3be0b40688ed76434622c53a284e5427565bbd9b"}, - {file = "propcache-0.2.0-cp311-cp311-win32.whl", hash = "sha256:5f2564ec89058ee7c7989a7b719115bdfe2a2fb8e7a4543b8d1c0cc4cf6478c1"}, - {file = "propcache-0.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6e2e54267980349b723cff366d1e29b138b9a60fa376664a157a342689553f71"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:2ee7606193fb267be4b2e3b32714f2d58cad27217638db98a60f9efb5efeccc2"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:91ee8fc02ca52e24bcb77b234f22afc03288e1dafbb1f88fe24db308910c4ac7"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2e900bad2a8456d00a113cad8c13343f3b1f327534e3589acc2219729237a2e8"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f52a68c21363c45297aca15561812d542f8fc683c85201df0bebe209e349f793"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e41d67757ff4fbc8ef2af99b338bfb955010444b92929e9e55a6d4dcc3c4f09"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a64e32f8bd94c105cc27f42d3b658902b5bcc947ece3c8fe7bc1b05982f60e89"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55346705687dbd7ef0d77883ab4f6fabc48232f587925bdaf95219bae072491e"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00181262b17e517df2cd85656fcd6b4e70946fe62cd625b9d74ac9977b64d8d9"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6994984550eaf25dd7fc7bd1b700ff45c894149341725bb4edc67f0ffa94efa4"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:56295eb1e5f3aecd516d91b00cfd8bf3a13991de5a479df9e27dd569ea23959c"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:439e76255daa0f8151d3cb325f6dd4a3e93043e6403e6491813bcaaaa8733887"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f6475a1b2ecb310c98c28d271a30df74f9dd436ee46d09236a6b750a7599ce57"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3444cdba6628accf384e349014084b1cacd866fbb88433cd9d279d90a54e0b23"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4a9d9b4d0a9b38d1c391bb4ad24aa65f306c6f01b512e10a8a34a2dc5675d348"}, - {file = "propcache-0.2.0-cp312-cp312-win32.whl", hash = "sha256:69d3a98eebae99a420d4b28756c8ce6ea5a29291baf2dc9ff9414b42676f61d5"}, - {file = "propcache-0.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:ad9c9b99b05f163109466638bd30ada1722abb01bbb85c739c50b6dc11f92dc3"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ecddc221a077a8132cf7c747d5352a15ed763b674c0448d811f408bf803d9ad7"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0e53cb83fdd61cbd67202735e6a6687a7b491c8742dfc39c9e01e80354956763"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92fe151145a990c22cbccf9ae15cae8ae9eddabfc949a219c9f667877e40853d"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6a21ef516d36909931a2967621eecb256018aeb11fc48656e3257e73e2e247a"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f88a4095e913f98988f5b338c1d4d5d07dbb0b6bad19892fd447484e483ba6b"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a5b3bb545ead161be780ee85a2b54fdf7092815995661947812dde94a40f6fb"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67aeb72e0f482709991aa91345a831d0b707d16b0257e8ef88a2ad246a7280bf"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c997f8c44ec9b9b0bcbf2d422cc00a1d9b9c681f56efa6ca149a941e5560da2"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a66df3d4992bc1d725b9aa803e8c5a66c010c65c741ad901e260ece77f58d2f"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3ebbcf2a07621f29638799828b8d8668c421bfb94c6cb04269130d8de4fb7136"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1235c01ddaa80da8235741e80815ce381c5267f96cc49b1477fdcf8c047ef325"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3947483a381259c06921612550867b37d22e1df6d6d7e8361264b6d037595f44"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d5bed7f9805cc29c780f3aee05de3262ee7ce1f47083cfe9f77471e9d6777e83"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e4a91d44379f45f5e540971d41e4626dacd7f01004826a18cb048e7da7e96544"}, - {file = "propcache-0.2.0-cp313-cp313-win32.whl", hash = "sha256:f902804113e032e2cdf8c71015651c97af6418363bea8d78dc0911d56c335032"}, - {file = "propcache-0.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:8f188cfcc64fb1266f4684206c9de0e80f54622c3f22a910cbd200478aeae61e"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:53d1bd3f979ed529f0805dd35ddaca330f80a9a6d90bc0121d2ff398f8ed8861"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:83928404adf8fb3d26793665633ea79b7361efa0287dfbd372a7e74311d51ee6"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:77a86c261679ea5f3896ec060be9dc8e365788248cc1e049632a1be682442063"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:218db2a3c297a3768c11a34812e63b3ac1c3234c3a086def9c0fee50d35add1f"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7735e82e3498c27bcb2d17cb65d62c14f1100b71723b68362872bca7d0913d90"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:20a617c776f520c3875cf4511e0d1db847a076d720714ae35ffe0df3e440be68"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67b69535c870670c9f9b14a75d28baa32221d06f6b6fa6f77a0a13c5a7b0a5b9"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4569158070180c3855e9c0791c56be3ceeb192defa2cdf6a3f39e54319e56b89"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:db47514ffdbd91ccdc7e6f8407aac4ee94cc871b15b577c1c324236b013ddd04"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_armv7l.whl", hash = "sha256:2a60ad3e2553a74168d275a0ef35e8c0a965448ffbc3b300ab3a5bb9956c2162"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:662dd62358bdeaca0aee5761de8727cfd6861432e3bb828dc2a693aa0471a563"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:25a1f88b471b3bc911d18b935ecb7115dff3a192b6fef46f0bfaf71ff4f12418"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:f60f0ac7005b9f5a6091009b09a419ace1610e163fa5deaba5ce3484341840e7"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:74acd6e291f885678631b7ebc85d2d4aec458dd849b8c841b57ef04047833bed"}, - {file = "propcache-0.2.0-cp38-cp38-win32.whl", hash = "sha256:d9b6ddac6408194e934002a69bcaadbc88c10b5f38fb9307779d1c629181815d"}, - {file = "propcache-0.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:676135dcf3262c9c5081cc8f19ad55c8a64e3f7282a21266d05544450bffc3a5"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:25c8d773a62ce0451b020c7b29a35cfbc05de8b291163a7a0f3b7904f27253e6"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:375a12d7556d462dc64d70475a9ee5982465fbb3d2b364f16b86ba9135793638"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1ec43d76b9677637a89d6ab86e1fef70d739217fefa208c65352ecf0282be957"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f45eec587dafd4b2d41ac189c2156461ebd0c1082d2fe7013571598abb8505d1"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc092ba439d91df90aea38168e11f75c655880c12782facf5cf9c00f3d42b562"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fa1076244f54bb76e65e22cb6910365779d5c3d71d1f18b275f1dfc7b0d71b4d"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:682a7c79a2fbf40f5dbb1eb6bfe2cd865376deeac65acf9beb607505dced9e12"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e40876731f99b6f3c897b66b803c9e1c07a989b366c6b5b475fafd1f7ba3fb8"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:363ea8cd3c5cb6679f1c2f5f1f9669587361c062e4899fce56758efa928728f8"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:140fbf08ab3588b3468932974a9331aff43c0ab8a2ec2c608b6d7d1756dbb6cb"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:e70fac33e8b4ac63dfc4c956fd7d85a0b1139adcfc0d964ce288b7c527537fea"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b33d7a286c0dc1a15f5fc864cc48ae92a846df287ceac2dd499926c3801054a6"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:f6d5749fdd33d90e34c2efb174c7e236829147a2713334d708746e94c4bde40d"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:22aa8f2272d81d9317ff5756bb108021a056805ce63dd3630e27d042c8092798"}, - {file = "propcache-0.2.0-cp39-cp39-win32.whl", hash = "sha256:73e4b40ea0eda421b115248d7e79b59214411109a5bc47d0d48e4c73e3b8fcf9"}, - {file = "propcache-0.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:9517d5e9e0731957468c29dbfd0f976736a0e55afaea843726e887f36fe017df"}, - {file = "propcache-0.2.0-py3-none-any.whl", hash = "sha256:2ccc28197af5313706511fab3a8b66dcd6da067a1331372c82ea1cb74285e036"}, - {file = "propcache-0.2.0.tar.gz", hash = "sha256:df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6b3f39a85d671436ee3d12c017f8fdea38509e4f25b28eb25877293c98c243f6"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d51fbe4285d5db5d92a929e3e21536ea3dd43732c5b177c7ef03f918dff9f2"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6445804cf4ec763dc70de65a3b0d9954e868609e83850a47ca4f0cb64bd79fea"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9479aa06a793c5aeba49ce5c5692ffb51fcd9a7016e017d555d5e2b0045d212"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9631c5e8b5b3a0fda99cb0d29c18133bca1e18aea9effe55adb3da1adef80d3"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3156628250f46a0895f1f36e1d4fbe062a1af8718ec3ebeb746f1d23f0c5dc4d"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b6fb63ae352e13748289f04f37868099e69dba4c2b3e271c46061e82c745634"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:887d9b0a65404929641a9fabb6452b07fe4572b269d901d622d8a34a4e9043b2"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a96dc1fa45bd8c407a0af03b2d5218392729e1822b0c32e62c5bf7eeb5fb3958"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a7e65eb5c003a303b94aa2c3852ef130230ec79e349632d030e9571b87c4698c"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:999779addc413181912e984b942fbcc951be1f5b3663cd80b2687758f434c583"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:19a0f89a7bb9d8048d9c4370c9c543c396e894c76be5525f5e1ad287f1750ddf"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1ac2f5fe02fa75f56e1ad473f1175e11f475606ec9bd0be2e78e4734ad575034"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:574faa3b79e8ebac7cb1d7930f51184ba1ccf69adfdec53a12f319a06030a68b"}, + {file = "propcache-0.2.1-cp310-cp310-win32.whl", hash = "sha256:03ff9d3f665769b2a85e6157ac8b439644f2d7fd17615a82fa55739bc97863f4"}, + {file = "propcache-0.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:2d3af2e79991102678f53e0dbf4c35de99b6b8b58f29a27ca0325816364caaba"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ffc3cca89bb438fb9c95c13fc874012f7b9466b89328c3c8b1aa93cdcfadd16"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f174bbd484294ed9fdf09437f889f95807e5f229d5d93588d34e92106fbf6717"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:70693319e0b8fd35dd863e3e29513875eb15c51945bf32519ef52927ca883bc3"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b480c6a4e1138e1aa137c0079b9b6305ec6dcc1098a8ca5196283e8a49df95a9"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d27b84d5880f6d8aa9ae3edb253c59d9f6642ffbb2c889b78b60361eed449787"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:857112b22acd417c40fa4595db2fe28ab900c8c5fe4670c7989b1c0230955465"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf6c4150f8c0e32d241436526f3c3f9cbd34429492abddbada2ffcff506c51af"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66d4cfda1d8ed687daa4bc0274fcfd5267873db9a5bc0418c2da19273040eeb7"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c2f992c07c0fca81655066705beae35fc95a2fa7366467366db627d9f2ee097f"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:4a571d97dbe66ef38e472703067021b1467025ec85707d57e78711c085984e54"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:bb6178c241278d5fe853b3de743087be7f5f4c6f7d6d22a3b524d323eecec505"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ad1af54a62ffe39cf34db1aa6ed1a1873bd548f6401db39d8e7cd060b9211f82"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e7048abd75fe40712005bcfc06bb44b9dfcd8e101dda2ecf2f5aa46115ad07ca"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:160291c60081f23ee43d44b08a7e5fb76681221a8e10b3139618c5a9a291b84e"}, + {file = "propcache-0.2.1-cp311-cp311-win32.whl", hash = "sha256:819ce3b883b7576ca28da3861c7e1a88afd08cc8c96908e08a3f4dd64a228034"}, + {file = "propcache-0.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:edc9fc7051e3350643ad929df55c451899bb9ae6d24998a949d2e4c87fb596d3"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:081a430aa8d5e8876c6909b67bd2d937bfd531b0382d3fdedb82612c618bc41a"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d2ccec9ac47cf4e04897619c0e0c1a48c54a71bdf045117d3a26f80d38ab1fb0"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:14d86fe14b7e04fa306e0c43cdbeebe6b2c2156a0c9ce56b815faacc193e320d"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:049324ee97bb67285b49632132db351b41e77833678432be52bdd0289c0e05e4"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1cd9a1d071158de1cc1c71a26014dcdfa7dd3d5f4f88c298c7f90ad6f27bb46d"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98110aa363f1bb4c073e8dcfaefd3a5cea0f0834c2aab23dda657e4dab2f53b5"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:647894f5ae99c4cf6bb82a1bb3a796f6e06af3caa3d32e26d2350d0e3e3faf24"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd3223c15bebe26518d58ccf9a39b93948d3dcb3e57a20480dfdd315356baff"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d71264a80f3fcf512eb4f18f59423fe82d6e346ee97b90625f283df56aee103f"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:e73091191e4280403bde6c9a52a6999d69cdfde498f1fdf629105247599b57ec"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3935bfa5fede35fb202c4b569bb9c042f337ca4ff7bd540a0aa5e37131659348"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f508b0491767bb1f2b87fdfacaba5f7eddc2f867740ec69ece6d1946d29029a6"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1672137af7c46662a1c2be1e8dc78cb6d224319aaa40271c9257d886be4363a6"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b74c261802d3d2b85c9df2dfb2fa81b6f90deeef63c2db9f0e029a3cac50b518"}, + {file = "propcache-0.2.1-cp312-cp312-win32.whl", hash = "sha256:d09c333d36c1409d56a9d29b3a1b800a42c76a57a5a8907eacdbce3f18768246"}, + {file = "propcache-0.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:c214999039d4f2a5b2073ac506bba279945233da8c786e490d411dfc30f855c1"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aca405706e0b0a44cc6bfd41fbe89919a6a56999157f6de7e182a990c36e37bc"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:12d1083f001ace206fe34b6bdc2cb94be66d57a850866f0b908972f90996b3e9"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d93f3307ad32a27bda2e88ec81134b823c240aa3abb55821a8da553eed8d9439"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba278acf14471d36316159c94a802933d10b6a1e117b8554fe0d0d9b75c9d536"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4e6281aedfca15301c41f74d7005e6e3f4ca143584ba696ac69df4f02f40d629"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5b750a8e5a1262434fb1517ddf64b5de58327f1adc3524a5e44c2ca43305eb0b"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf72af5e0fb40e9babf594308911436c8efde3cb5e75b6f206c34ad18be5c052"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2d0a12018b04f4cb820781ec0dffb5f7c7c1d2a5cd22bff7fb055a2cb19ebce"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e800776a79a5aabdb17dcc2346a7d66d0777e942e4cd251defeb084762ecd17d"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:4160d9283bd382fa6c0c2b5e017acc95bc183570cd70968b9202ad6d8fc48dce"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:30b43e74f1359353341a7adb783c8f1b1c676367b011709f466f42fda2045e95"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:58791550b27d5488b1bb52bc96328456095d96206a250d28d874fafe11b3dfaf"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:0f022d381747f0dfe27e99d928e31bc51a18b65bb9e481ae0af1380a6725dd1f"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:297878dc9d0a334358f9b608b56d02e72899f3b8499fc6044133f0d319e2ec30"}, + {file = "propcache-0.2.1-cp313-cp313-win32.whl", hash = "sha256:ddfab44e4489bd79bda09d84c430677fc7f0a4939a73d2bba3073036f487a0a6"}, + {file = "propcache-0.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:556fc6c10989f19a179e4321e5d678db8eb2924131e64652a51fe83e4c3db0e1"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6a9a8c34fb7bb609419a211e59da8887eeca40d300b5ea8e56af98f6fbbb1541"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ae1aa1cd222c6d205853b3013c69cd04515f9d6ab6de4b0603e2e1c33221303e"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:accb6150ce61c9c4b7738d45550806aa2b71c7668c6942f17b0ac182b6142fd4"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5eee736daafa7af6d0a2dc15cc75e05c64f37fc37bafef2e00d77c14171c2097"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7a31fc1e1bd362874863fdeed71aed92d348f5336fd84f2197ba40c59f061bd"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba4cfa1052819d16699e1d55d18c92b6e094d4517c41dd231a8b9f87b6fa681"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f089118d584e859c62b3da0892b88a83d611c2033ac410e929cb6754eec0ed16"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:781e65134efaf88feb447e8c97a51772aa75e48b794352f94cb7ea717dedda0d"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:31f5af773530fd3c658b32b6bdc2d0838543de70eb9a2156c03e410f7b0d3aae"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:a7a078f5d37bee6690959c813977da5291b24286e7b962e62a94cec31aa5188b"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:cea7daf9fc7ae6687cf1e2c049752f19f146fdc37c2cc376e7d0032cf4f25347"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:8b3489ff1ed1e8315674d0775dc7d2195fb13ca17b3808721b54dbe9fd020faf"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:9403db39be1393618dd80c746cb22ccda168efce239c73af13c3763ef56ffc04"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5d97151bc92d2b2578ff7ce779cdb9174337390a535953cbb9452fb65164c587"}, + {file = "propcache-0.2.1-cp39-cp39-win32.whl", hash = "sha256:9caac6b54914bdf41bcc91e7eb9147d331d29235a7c967c150ef5df6464fd1bb"}, + {file = "propcache-0.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:92fc4500fcb33899b05ba73276dfb684a20d31caa567b7cb5252d48f896a91b1"}, + {file = "propcache-0.2.1-py3-none-any.whl", hash = "sha256:52277518d6aae65536e9cea52d4e7fd2f7a66f4aa2d30ed3f2fcea620ace3c54"}, + {file = "propcache-0.2.1.tar.gz", hash = "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64"}, ] [[package]] @@ -1702,18 +1673,18 @@ files = [ [[package]] name = "pydantic" -version = "2.10.2" +version = "2.10.4" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.10.2-py3-none-any.whl", hash = "sha256:cfb96e45951117c3024e6b67b25cdc33a3cb7b2fa62e239f7af1378358a1d99e"}, - {file = "pydantic-2.10.2.tar.gz", hash = "sha256:2bc2d7f17232e0841cbba4641e65ba1eb6fafb3a08de3a091ff3ce14a197c4fa"}, + {file = "pydantic-2.10.4-py3-none-any.whl", hash = "sha256:597e135ea68be3a37552fb524bc7d0d66dcf93d395acd93a00682f1efcb8ee3d"}, + {file = "pydantic-2.10.4.tar.gz", hash = "sha256:82f12e9723da6de4fe2ba888b5971157b3be7ad914267dea8f05f82b28254f06"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.27.1" +pydantic-core = "2.27.2" typing-extensions = ">=4.12.2" [package.extras] @@ -1722,111 +1693,111 @@ timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.27.1" +version = "2.27.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"}, - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"}, - {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"}, - {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"}, - {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"}, - {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"}, - {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"}, - {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"}, - {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"}, - {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"}, - {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"}, - {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"}, - {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"}, - {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"}, - {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"}, - {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"}, - {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"}, - {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"}, + {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"}, ] [package.dependencies] @@ -1845,13 +1816,13 @@ files = [ [[package]] name = "pytest" -version = "8.3.3" +version = "8.3.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, - {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, + {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, + {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, ] [package.dependencies] @@ -1981,30 +1952,29 @@ files = [ [[package]] name = "quart" -version = "0.19.9" -description = "A Python ASGI web microframework with the same API as Flask" +version = "0.20.0" +description = "A Python ASGI web framework with the same API as Flask" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "quart-0.19.9-py3-none-any.whl", hash = "sha256:8acb8b299c72b66ee9e506ae141498bbbfcc250b5298fbdb712e97f3d7e4082f"}, - {file = "quart-0.19.9.tar.gz", hash = "sha256:30a61a0d7bae1ee13e6e99dc14c929b3c945e372b9445d92d21db053e91e95a5"}, + {file = "quart-0.20.0-py3-none-any.whl", hash = "sha256:003c08f551746710acb757de49d9b768986fd431517d0eb127380b656b98b8f1"}, + {file = "quart-0.20.0.tar.gz", hash = "sha256:08793c206ff832483586f5ae47018c7e40bdd75d886fee3fabbdaa70c2cf505d"}, ] [package.dependencies] aiofiles = "*" blinker = ">=1.6" -click = ">=8.0.0" -flask = ">=3.0.0" +click = ">=8.0" +flask = ">=3.0" hypercorn = ">=0.11.2" -importlib_metadata = {version = "*", markers = "python_version < \"3.10\""} +importlib-metadata = {version = "*", markers = "python_version < \"3.10\""} itsdangerous = "*" jinja2 = "*" markupsafe = "*" -typing_extensions = {version = "*", markers = "python_version < \"3.10\""} -werkzeug = ">=3.0.0" +typing-extensions = {version = "*", markers = "python_version < \"3.10\""} +werkzeug = ">=3.0" [package.extras] -docs = ["pydata_sphinx_theme"] dotenv = ["python-dotenv"] [[package]] @@ -2070,17 +2040,18 @@ full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7 [[package]] name = "taskgroup" -version = "0.0.0a4" +version = "0.2.1" description = "backport of asyncio.TaskGroup, asyncio.Runner and asyncio.timeout" optional = false python-versions = "*" files = [ - {file = "taskgroup-0.0.0a4-py2.py3-none-any.whl", hash = "sha256:5c1bd0e4c06114e7a4128583ab75c987597d5378a33948a3b74c662b90f61277"}, - {file = "taskgroup-0.0.0a4.tar.gz", hash = "sha256:eb08902d221e27661950f2a0320ddf3f939f579279996f81fe30779bca3a159c"}, + {file = "taskgroup-0.2.1-py2.py3-none-any.whl", hash = "sha256:bff020b6e63408d1bcf952486cce05ed4c4e0747743c4762eb10b35726c89ab3"}, + {file = "taskgroup-0.2.1.tar.gz", hash = "sha256:11fa9c2db1037188ac0b60c70fa979243d00b1fee1a6e61e3171c21c1af75f78"}, ] [package.dependencies] exceptiongroup = "*" +typing_extensions = ">=4.12.2,<5" [[package]] name = "tomli" @@ -2156,13 +2127,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.3" +version = "2.3.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, - {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, + {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, + {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, ] [package.extras] @@ -2173,13 +2144,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uvicorn" -version = "0.32.1" +version = "0.34.0" description = "The lightning-fast ASGI server." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "uvicorn-0.32.1-py3-none-any.whl", hash = "sha256:82ad92fd58da0d12af7482ecdb5f2470a04c9c9a53ced65b9bbb4a205377602e"}, - {file = "uvicorn-0.32.1.tar.gz", hash = "sha256:ee9519c246a72b1c084cea8d3b44ed6026e78a4a309cbedae9c37e4cb9fbb175"}, + {file = "uvicorn-0.34.0-py3-none-any.whl", hash = "sha256:023dc038422502fa28a09c7a30bf2b6991512da7dcdb8fd35fe57cfc154126f4"}, + {file = "uvicorn-0.34.0.tar.gz", hash = "sha256:404051050cd7e905de2c9a7e61790943440b3416f49cb409f965d9dcd0fa73e9"}, ] [package.dependencies] @@ -2250,82 +2221,82 @@ test = ["aiohttp (>=3.10.5)", "flake8 (>=5.0,<6.0)", "mypy (>=0.800)", "psutil", [[package]] name = "watchfiles" -version = "1.0.0" +version = "1.0.3" description = "Simple, modern and high performance file watching and code reload in python." optional = false python-versions = ">=3.9" files = [ - {file = "watchfiles-1.0.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:1d19df28f99d6a81730658fbeb3ade8565ff687f95acb59665f11502b441be5f"}, - {file = "watchfiles-1.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:28babb38cf2da8e170b706c4b84aa7e4528a6fa4f3ee55d7a0866456a1662041"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:12ab123135b2f42517f04e720526d41448667ae8249e651385afb5cda31fedc0"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:13a4f9ee0cd25682679eea5c14fc629e2eaa79aab74d963bc4e21f43b8ea1877"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e1d9284cc84de7855fcf83472e51d32daf6f6cecd094160192628bc3fee1b78"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ee5edc939f53466b329bbf2e58333a5461e6c7b50c980fa6117439e2c18b42d"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5dccfc70480087567720e4e36ec381bba1ed68d7e5f368fe40c93b3b1eba0105"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c83a6d33a9eda0af6a7470240d1af487807adc269704fe76a4972dd982d16236"}, - {file = "watchfiles-1.0.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:905f69aad276639eff3893759a07d44ea99560e67a1cf46ff389cd62f88872a2"}, - {file = "watchfiles-1.0.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:09551237645d6bff3972592f2aa5424df9290e7a2e15d63c5f47c48cde585935"}, - {file = "watchfiles-1.0.0-cp310-none-win32.whl", hash = "sha256:d2b39aa8edd9e5f56f99a2a2740a251dc58515398e9ed5a4b3e5ff2827060755"}, - {file = "watchfiles-1.0.0-cp310-none-win_amd64.whl", hash = "sha256:2de52b499e1ab037f1a87cb8ebcb04a819bf087b1015a4cf6dcf8af3c2a2613e"}, - {file = "watchfiles-1.0.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:fbd0ab7a9943bbddb87cbc2bf2f09317e74c77dc55b1f5657f81d04666c25269"}, - {file = "watchfiles-1.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:774ef36b16b7198669ce655d4f75b4c3d370e7f1cbdfb997fb10ee98717e2058"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b4fb98100267e6a5ebaff6aaa5d20aea20240584647470be39fe4823012ac96"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0fc3bf0effa2d8075b70badfdd7fb839d7aa9cea650d17886982840d71fdeabf"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:648e2b6db53eca6ef31245805cd528a16f56fa4cc15aeec97795eaf713c11435"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fa13d604fcb9417ae5f2e3de676e66aa97427d888e83662ad205bed35a313176"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:936f362e7ff28311b16f0b97ec51e8f2cc451763a3264640c6ed40fb252d1ee4"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:245fab124b9faf58430da547512d91734858df13f2ddd48ecfa5e493455ffccb"}, - {file = "watchfiles-1.0.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4ff9c7e84e8b644a8f985c42bcc81457240316f900fc72769aaedec9d088055a"}, - {file = "watchfiles-1.0.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9c9a8d8fd97defe935ef8dd53d562e68942ad65067cd1c54d6ed8a088b1d931d"}, - {file = "watchfiles-1.0.0-cp311-none-win32.whl", hash = "sha256:a0abf173975eb9dd17bb14c191ee79999e650997cc644562f91df06060610e62"}, - {file = "watchfiles-1.0.0-cp311-none-win_amd64.whl", hash = "sha256:2a825ba4b32c214e3855b536eb1a1f7b006511d8e64b8215aac06eb680642d84"}, - {file = "watchfiles-1.0.0-cp311-none-win_arm64.whl", hash = "sha256:a5a7a06cfc65e34fd0a765a7623c5ba14707a0870703888e51d3d67107589817"}, - {file = "watchfiles-1.0.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:28fb64b5843d94e2c2483f7b024a1280662a44409bedee8f2f51439767e2d107"}, - {file = "watchfiles-1.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e3750434c83b61abb3163b49c64b04180b85b4dabb29a294513faec57f2ffdb7"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bedf84835069f51c7b026b3ca04e2e747ea8ed0a77c72006172c72d28c9f69fc"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:90004553be36427c3d06ec75b804233f8f816374165d5225b93abd94ba6e7234"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b46e15c34d4e401e976d6949ad3a74d244600d5c4b88c827a3fdf18691a46359"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:487d15927f1b0bd24e7df921913399bb1ab94424c386bea8b267754d698f8f0e"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1ff236d7a3f4b0a42f699a22fc374ba526bc55048a70cbb299661158e1bb5e1f"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c01446626574561756067f00b37e6b09c8622b0fc1e9fdbc7cbcea328d4e514"}, - {file = "watchfiles-1.0.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b551c465a59596f3d08170bd7e1c532c7260dd90ed8135778038e13c5d48aa81"}, - {file = "watchfiles-1.0.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e1ed613ee107269f66c2df631ec0fc8efddacface85314d392a4131abe299f00"}, - {file = "watchfiles-1.0.0-cp312-none-win32.whl", hash = "sha256:5f75cd42e7e2254117cf37ff0e68c5b3f36c14543756b2da621408349bd9ca7c"}, - {file = "watchfiles-1.0.0-cp312-none-win_amd64.whl", hash = "sha256:cf517701a4a872417f4e02a136e929537743461f9ec6cdb8184d9a04f4843545"}, - {file = "watchfiles-1.0.0-cp312-none-win_arm64.whl", hash = "sha256:8a2127cd68950787ee36753e6d401c8ea368f73beaeb8e54df5516a06d1ecd82"}, - {file = "watchfiles-1.0.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:95de85c254f7fe8cbdf104731f7f87f7f73ae229493bebca3722583160e6b152"}, - {file = "watchfiles-1.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:533a7cbfe700e09780bb31c06189e39c65f06c7f447326fee707fd02f9a6e945"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2218e78e2c6c07b1634a550095ac2a429026b2d5cbcd49a594f893f2bb8c936"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9122b8fdadc5b341315d255ab51d04893f417df4e6c1743b0aac8bf34e96e025"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9272fdbc0e9870dac3b505bce1466d386b4d8d6d2bacf405e603108d50446940"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4a3b33c3aefe9067ebd87846806cd5fc0b017ab70d628aaff077ab9abf4d06b3"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bc338ce9f8846543d428260fa0f9a716626963148edc937d71055d01d81e1525"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ac778a460ea22d63c7e6fb0bc0f5b16780ff0b128f7f06e57aaec63bd339285"}, - {file = "watchfiles-1.0.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:53ae447f06f8f29f5ab40140f19abdab822387a7c426a369eb42184b021e97eb"}, - {file = "watchfiles-1.0.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1f73c2147a453315d672c1ad907abe6d40324e34a185b51e15624bc793f93cc6"}, - {file = "watchfiles-1.0.0-cp313-none-win32.whl", hash = "sha256:eba98901a2eab909dbd79681190b9049acc650f6111fde1845484a4450761e98"}, - {file = "watchfiles-1.0.0-cp313-none-win_amd64.whl", hash = "sha256:d562a6114ddafb09c33246c6ace7effa71ca4b6a2324a47f4b09b6445ea78941"}, - {file = "watchfiles-1.0.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:3d94fd83ed54266d789f287472269c0def9120a2022674990bd24ad989ebd7a0"}, - {file = "watchfiles-1.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48051d1c504448b2fcda71c5e6e3610ae45de6a0b8f5a43b961f250be4bdf5a8"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29cf884ad4285d23453c702ed03d689f9c0e865e3c85d20846d800d4787de00f"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d3572d4c34c4e9c33d25b3da47d9570d5122f8433b9ac6519dca49c2740d23cd"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2c2696611182c85eb0e755b62b456f48debff484b7306b56f05478b843ca8ece"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:550109001920a993a4383b57229c717fa73627d2a4e8fcb7ed33c7f1cddb0c85"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b555a93c15bd2c71081922be746291d776d47521a00703163e5fbe6d2a402399"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:947ccba18a38b85c366dafeac8df2f6176342d5992ca240a9d62588b214d731f"}, - {file = "watchfiles-1.0.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ffd98a299b0a74d1b704ef0ed959efb753e656a4e0425c14e46ae4c3cbdd2919"}, - {file = "watchfiles-1.0.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f8c4f3a1210ed099a99e6a710df4ff2f8069411059ffe30fa5f9467ebed1256b"}, - {file = "watchfiles-1.0.0-cp39-none-win32.whl", hash = "sha256:1e176b6b4119b3f369b2b4e003d53a226295ee862c0962e3afd5a1c15680b4e3"}, - {file = "watchfiles-1.0.0-cp39-none-win_amd64.whl", hash = "sha256:2d9c0518fabf4a3f373b0a94bb9e4ea7a1df18dec45e26a4d182aa8918dee855"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f159ac795785cde4899e0afa539f4c723fb5dd336ce5605bc909d34edd00b79b"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:c3d258d78341d5d54c0c804a5b7faa66cd30ba50b2756a7161db07ce15363b8d"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bbd0311588c2de7f9ea5cf3922ccacfd0ec0c1922870a2be503cc7df1ca8be7"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9a13ac46b545a7d0d50f7641eefe47d1597e7d1783a5d89e09d080e6dff44b0"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2bca898c1dc073912d3db7fa6926cc08be9575add9e84872de2c99c688bac4e"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:06d828fe2adc4ac8a64b875ca908b892a3603d596d43e18f7948f3fef5fc671c"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:074c7618cd6c807dc4eaa0982b4a9d3f8051cd0b72793511848fd64630174b17"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95dc785bc284552d044e561b8f4fe26d01ab5ca40d35852a6572d542adfeb4bc"}, - {file = "watchfiles-1.0.0.tar.gz", hash = "sha256:37566c844c9ce3b5deb964fe1a23378e575e74b114618d211fbda8f59d7b5dab"}, + {file = "watchfiles-1.0.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:1da46bb1eefb5a37a8fb6fd52ad5d14822d67c498d99bda8754222396164ae42"}, + {file = "watchfiles-1.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2b961b86cd3973f5822826017cad7f5a75795168cb645c3a6b30c349094e02e3"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34e87c7b3464d02af87f1059fedda5484e43b153ef519e4085fe1a03dd94801e"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d9dd2b89a16cf7ab9c1170b5863e68de6bf83db51544875b25a5f05a7269e678"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b4691234d31686dca133c920f94e478b548a8e7c750f28dbbc2e4333e0d3da9"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:90b0fe1fcea9bd6e3084b44875e179b4adcc4057a3b81402658d0eb58c98edf8"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0b90651b4cf9e158d01faa0833b073e2e37719264bcee3eac49fc3c74e7d304b"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c2e9fe695ff151b42ab06501820f40d01310fbd58ba24da8923ace79cf6d702d"}, + {file = "watchfiles-1.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:62691f1c0894b001c7cde1195c03b7801aaa794a837bd6eef24da87d1542838d"}, + {file = "watchfiles-1.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:275c1b0e942d335fccb6014d79267d1b9fa45b5ac0639c297f1e856f2f532552"}, + {file = "watchfiles-1.0.3-cp310-cp310-win32.whl", hash = "sha256:06ce08549e49ba69ccc36fc5659a3d0ff4e3a07d542b895b8a9013fcab46c2dc"}, + {file = "watchfiles-1.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:f280b02827adc9d87f764972fbeb701cf5611f80b619c20568e1982a277d6146"}, + {file = "watchfiles-1.0.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ffe709b1d0bc2e9921257569675674cafb3a5f8af689ab9f3f2b3f88775b960f"}, + {file = "watchfiles-1.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:418c5ce332f74939ff60691e5293e27c206c8164ce2b8ce0d9abf013003fb7fe"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f492d2907263d6d0d52f897a68647195bc093dafed14508a8d6817973586b6b"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:48c9f3bc90c556a854f4cab6a79c16974099ccfa3e3e150673d82d47a4bc92c9"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75d3bcfa90454dba8df12adc86b13b6d85fda97d90e708efc036c2760cc6ba44"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5691340f259b8f76b45fb31b98e594d46c36d1dc8285efa7975f7f50230c9093"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e263cc718545b7f897baeac1f00299ab6fabe3e18caaacacb0edf6d5f35513c"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c6cf7709ed3e55704cc06f6e835bf43c03bc8e3cb8ff946bf69a2e0a78d9d77"}, + {file = "watchfiles-1.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:703aa5e50e465be901e0e0f9d5739add15e696d8c26c53bc6fc00eb65d7b9469"}, + {file = "watchfiles-1.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bfcae6aecd9e0cb425f5145afee871465b98b75862e038d42fe91fd753ddd780"}, + {file = "watchfiles-1.0.3-cp311-cp311-win32.whl", hash = "sha256:6a76494d2c5311584f22416c5a87c1e2cb954ff9b5f0988027bc4ef2a8a67181"}, + {file = "watchfiles-1.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:cf745cbfad6389c0e331786e5fe9ae3f06e9d9c2ce2432378e1267954793975c"}, + {file = "watchfiles-1.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:2dcc3f60c445f8ce14156854a072ceb36b83807ed803d37fdea2a50e898635d6"}, + {file = "watchfiles-1.0.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:93436ed550e429da007fbafb723e0769f25bae178fbb287a94cb4ccdf42d3af3"}, + {file = "watchfiles-1.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c18f3502ad0737813c7dad70e3e1cc966cc147fbaeef47a09463bbffe70b0a00"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a5bc3ca468bb58a2ef50441f953e1f77b9a61bd1b8c347c8223403dc9b4ac9a"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0d1ec043f02ca04bf21b1b32cab155ce90c651aaf5540db8eb8ad7f7e645cba8"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f58d3bfafecf3d81c15d99fc0ecf4319e80ac712c77cf0ce2661c8cf8bf84066"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1df924ba82ae9e77340101c28d56cbaff2c991bd6fe8444a545d24075abb0a87"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:632a52dcaee44792d0965c17bdfe5dc0edad5b86d6a29e53d6ad4bf92dc0ff49"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bf4b459d94a0387617a1b499f314aa04d8a64b7a0747d15d425b8c8b151da0"}, + {file = "watchfiles-1.0.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ca94c85911601b097d53caeeec30201736ad69a93f30d15672b967558df02885"}, + {file = "watchfiles-1.0.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:65ab1fb635476f6170b07e8e21db0424de94877e4b76b7feabfe11f9a5fc12b5"}, + {file = "watchfiles-1.0.3-cp312-cp312-win32.whl", hash = "sha256:49bc1bc26abf4f32e132652f4b3bfeec77d8f8f62f57652703ef127e85a3e38d"}, + {file = "watchfiles-1.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:48681c86f2cb08348631fed788a116c89c787fdf1e6381c5febafd782f6c3b44"}, + {file = "watchfiles-1.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:9e080cf917b35b20c889225a13f290f2716748362f6071b859b60b8847a6aa43"}, + {file = "watchfiles-1.0.3-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:e153a690b7255c5ced17895394b4f109d5dcc2a4f35cb809374da50f0e5c456a"}, + {file = "watchfiles-1.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ac1be85fe43b4bf9a251978ce5c3bb30e1ada9784290441f5423a28633a958a7"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2ec98e31e1844eac860e70d9247db9d75440fc8f5f679c37d01914568d18721"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0179252846be03fa97d4d5f8233d1c620ef004855f0717712ae1c558f1974a16"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:995c374e86fa82126c03c5b4630c4e312327ecfe27761accb25b5e1d7ab50ec8"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29b9cb35b7f290db1c31fb2fdf8fc6d3730cfa4bca4b49761083307f441cac5a"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f8dc09ae69af50bead60783180f656ad96bd33ffbf6e7a6fce900f6d53b08f1"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:489b80812f52a8d8c7b0d10f0d956db0efed25df2821c7a934f6143f76938bd6"}, + {file = "watchfiles-1.0.3-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:228e2247de583475d4cebf6b9af5dc9918abb99d1ef5ee737155bb39fb33f3c0"}, + {file = "watchfiles-1.0.3-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1550be1a5cb3be08a3fb84636eaafa9b7119b70c71b0bed48726fd1d5aa9b868"}, + {file = "watchfiles-1.0.3-cp313-cp313-win32.whl", hash = "sha256:16db2d7e12f94818cbf16d4c8938e4d8aaecee23826344addfaaa671a1527b07"}, + {file = "watchfiles-1.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:160eff7d1267d7b025e983ca8460e8cc67b328284967cbe29c05f3c3163711a3"}, + {file = "watchfiles-1.0.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c05b021f7b5aa333124f2a64d56e4cb9963b6efdf44e8d819152237bbd93ba15"}, + {file = "watchfiles-1.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:310505ad305e30cb6c5f55945858cdbe0eb297fc57378f29bacceb534ac34199"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ddff3f8b9fa24a60527c137c852d0d9a7da2a02cf2151650029fdc97c852c974"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:46e86ed457c3486080a72bc837300dd200e18d08183f12b6ca63475ab64ed651"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f79fe7993e230a12172ce7d7c7db061f046f672f2b946431c81aff8f60b2758b"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea2b51c5f38bad812da2ec0cd7eec09d25f521a8b6b6843cbccedd9a1d8a5c15"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fe4e740ea94978b2b2ab308cbf9270a246bcbb44401f77cc8740348cbaeac3d"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9af037d3df7188ae21dc1c7624501f2f90d81be6550904e07869d8d0e6766655"}, + {file = "watchfiles-1.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:52bb50a4c4ca2a689fdba84ba8ecc6a4e6210f03b6af93181bb61c4ec3abaf86"}, + {file = "watchfiles-1.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c14a07bdb475eb696f85c715dbd0f037918ccbb5248290448488a0b4ef201aad"}, + {file = "watchfiles-1.0.3-cp39-cp39-win32.whl", hash = "sha256:be37f9b1f8934cd9e7eccfcb5612af9fb728fecbe16248b082b709a9d1b348bf"}, + {file = "watchfiles-1.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:ef9ec8068cf23458dbf36a08e0c16f0a2df04b42a8827619646637be1769300a"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:84fac88278f42d61c519a6c75fb5296fd56710b05bbdcc74bdf85db409a03780"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:c68be72b1666d93b266714f2d4092d78dc53bd11cf91ed5a3c16527587a52e29"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:889a37e2acf43c377b5124166bece139b4c731b61492ab22e64d371cce0e6e80"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ca05cacf2e5c4a97d02a2878a24020daca21dbb8823b023b978210a75c79098"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:8af4b582d5fc1b8465d1d2483e5e7b880cc1a4e99f6ff65c23d64d070867ac58"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:127de3883bdb29dbd3b21f63126bb8fa6e773b74eaef46521025a9ce390e1073"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:713f67132346bdcb4c12df185c30cf04bdf4bf6ea3acbc3ace0912cab6b7cb8c"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:abd85de513eb83f5ec153a802348e7a5baa4588b818043848247e3e8986094e8"}, + {file = "watchfiles-1.0.3.tar.gz", hash = "sha256:f3ff7da165c99a5412fe5dd2304dd2dbaaaa5da718aad942dcb3a178eaa70c56"}, ] [package.dependencies] @@ -2428,13 +2399,13 @@ watchdog = ["watchdog (>=2.3)"] [[package]] name = "win32-setctime" -version = "1.1.0" +version = "1.2.0" description = "A small Python utility to set file creation time on Windows" optional = false python-versions = ">=3.5" files = [ - {file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"}, - {file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"}, + {file = "win32_setctime-1.2.0-py3-none-any.whl", hash = "sha256:95d644c4e708aba81dc3704a116d8cbc974d70b3bdb8be1d150e36be6e9d1390"}, + {file = "win32_setctime-1.2.0.tar.gz", hash = "sha256:ae1fdf948f5640aae05c511ade119313fb6a30d7eabe25fef9764dca5873c4c0"}, ] [package.extras] @@ -2456,93 +2427,93 @@ h11 = ">=0.9.0,<1" [[package]] name = "yarl" -version = "1.18.0" +version = "1.18.3" description = "Yet another URL library" optional = false python-versions = ">=3.9" files = [ - {file = "yarl-1.18.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:074fee89caab89a97e18ef5f29060ef61ba3cae6cd77673acc54bfdd3214b7b7"}, - {file = "yarl-1.18.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b026cf2c32daf48d90c0c4e406815c3f8f4cfe0c6dfccb094a9add1ff6a0e41a"}, - {file = "yarl-1.18.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ae38bd86eae3ba3d2ce5636cc9e23c80c9db2e9cb557e40b98153ed102b5a736"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:685cc37f3f307c6a8e879986c6d85328f4c637f002e219f50e2ef66f7e062c1d"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8254dbfce84ee5d1e81051ee7a0f1536c108ba294c0fdb5933476398df0654f3"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:20de4a8b04de70c49698dc2390b7fd2d18d424d3b876371f9b775e2b462d4b41"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0a2074a37285570d54b55820687de3d2f2b9ecf1b714e482e48c9e7c0402038"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f576ed278860df2721a5d57da3381040176ef1d07def9688a385c8330db61a1"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3a3709450a574d61be6ac53d582496014342ea34876af8dc17cc16da32826c9a"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:bd80ed29761490c622edde5dd70537ca8c992c2952eb62ed46984f8eff66d6e8"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:32141e13a1d5a48525e519c9197d3f4d9744d818d5c7d6547524cc9eccc8971e"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8b8d3e4e014fb4274f1c5bf61511d2199e263909fb0b8bda2a7428b0894e8dc6"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:701bb4a8f4de191c8c0cc9a1e6d5142f4df880e9d1210e333b829ca9425570ed"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a45d94075ac0647621eaaf693c8751813a3eccac455d423f473ffed38c8ac5c9"}, - {file = "yarl-1.18.0-cp310-cp310-win32.whl", hash = "sha256:34176bfb082add67cb2a20abd85854165540891147f88b687a5ed0dc225750a0"}, - {file = "yarl-1.18.0-cp310-cp310-win_amd64.whl", hash = "sha256:73553bbeea7d6ec88c08ad8027f4e992798f0abc459361bf06641c71972794dc"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b8e8c516dc4e1a51d86ac975b0350735007e554c962281c432eaa5822aa9765c"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2e6b4466714a73f5251d84b471475850954f1fa6acce4d3f404da1d55d644c34"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c893f8c1a6d48b25961e00922724732d00b39de8bb0b451307482dc87bddcd74"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13aaf2bdbc8c86ddce48626b15f4987f22e80d898818d735b20bd58f17292ee8"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd21c0128e301851de51bc607b0a6da50e82dc34e9601f4b508d08cc89ee7929"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:205de377bd23365cd85562c9c6c33844050a93661640fda38e0567d2826b50df"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed69af4fe2a0949b1ea1d012bf065c77b4c7822bad4737f17807af2adb15a73c"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e1c18890091aa3cc8a77967943476b729dc2016f4cfe11e45d89b12519d4a93"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:91b8fb9427e33f83ca2ba9501221ffaac1ecf0407f758c4d2f283c523da185ee"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:536a7a8a53b75b2e98ff96edb2dfb91a26b81c4fed82782035767db5a465be46"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a64619a9c47c25582190af38e9eb382279ad42e1f06034f14d794670796016c0"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c73a6bbc97ba1b5a0c3c992ae93d721c395bdbb120492759b94cc1ac71bc6350"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a173401d7821a2a81c7b47d4e7d5c4021375a1441af0c58611c1957445055056"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7520e799b1f84e095cce919bd6c23c9d49472deeef25fe1ef960b04cca51c3fc"}, - {file = "yarl-1.18.0-cp311-cp311-win32.whl", hash = "sha256:c4cb992d8090d5ae5f7afa6754d7211c578be0c45f54d3d94f7781c495d56716"}, - {file = "yarl-1.18.0-cp311-cp311-win_amd64.whl", hash = "sha256:52c136f348605974c9b1c878addd6b7a60e3bf2245833e370862009b86fa4689"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1ece25e2251c28bab737bdf0519c88189b3dd9492dc086a1d77336d940c28ced"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:454902dc1830d935c90b5b53c863ba2a98dcde0fbaa31ca2ed1ad33b2a7171c6"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:01be8688fc211dc237e628fcc209dda412d35de7642453059a0553747018d075"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d26f1fa9fa2167bb238f6f4b20218eb4e88dd3ef21bb8f97439fa6b5313e30d"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b234a4a9248a9f000b7a5dfe84b8cb6210ee5120ae70eb72a4dcbdb4c528f72f"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe94d1de77c4cd8caff1bd5480e22342dbd54c93929f5943495d9c1e8abe9f42"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b4c90c5363c6b0a54188122b61edb919c2cd1119684999d08cd5e538813a28e"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49a98ecadc5a241c9ba06de08127ee4796e1009555efd791bac514207862b43d"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9106025c7f261f9f5144f9aa7681d43867eed06349a7cfb297a1bc804de2f0d1"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f275ede6199d0f1ed4ea5d55a7b7573ccd40d97aee7808559e1298fe6efc8dbd"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f7edeb1dcc7f50a2c8e08b9dc13a413903b7817e72273f00878cb70e766bdb3b"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c083f6dd6951b86e484ebfc9c3524b49bcaa9c420cb4b2a78ef9f7a512bfcc85"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:80741ec5b471fbdfb997821b2842c59660a1c930ceb42f8a84ba8ca0f25a66aa"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b1a3297b9cad594e1ff0c040d2881d7d3a74124a3c73e00c3c71526a1234a9f7"}, - {file = "yarl-1.18.0-cp312-cp312-win32.whl", hash = "sha256:cd6ab7d6776c186f544f893b45ee0c883542b35e8a493db74665d2e594d3ca75"}, - {file = "yarl-1.18.0-cp312-cp312-win_amd64.whl", hash = "sha256:039c299a0864d1f43c3e31570045635034ea7021db41bf4842693a72aca8df3a"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6fb64dd45453225f57d82c4764818d7a205ee31ce193e9f0086e493916bd4f72"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:3adaaf9c6b1b4fc258584f4443f24d775a2086aee82d1387e48a8b4f3d6aecf6"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:da206d1ec78438a563c5429ab808a2b23ad7bc025c8adbf08540dde202be37d5"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:576d258b21c1db4c6449b1c572c75d03f16a482eb380be8003682bdbe7db2f28"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c60e547c0a375c4bfcdd60eef82e7e0e8698bf84c239d715f5c1278a73050393"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e3818eabaefb90adeb5e0f62f047310079d426387991106d4fbf3519eec7d90a"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5f72421246c21af6a92fbc8c13b6d4c5427dfd949049b937c3b731f2f9076bd"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7fa7d37f2ada0f42e0723632993ed422f2a679af0e200874d9d861720a54f53e"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:42ba84e2ac26a3f252715f8ec17e6fdc0cbf95b9617c5367579fafcd7fba50eb"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:6a49ad0102c0f0ba839628d0bf45973c86ce7b590cdedf7540d5b1833ddc6f00"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:96404e8d5e1bbe36bdaa84ef89dc36f0e75939e060ca5cd45451aba01db02902"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a0509475d714df8f6d498935b3f307cd122c4ca76f7d426c7e1bb791bcd87eda"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:1ff116f0285b5c8b3b9a2680aeca29a858b3b9e0402fc79fd850b32c2bcb9f8b"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e2580c1d7e66e6d29d6e11855e3b1c6381971e0edd9a5066e6c14d79bc8967af"}, - {file = "yarl-1.18.0-cp313-cp313-win32.whl", hash = "sha256:14408cc4d34e202caba7b5ac9cc84700e3421a9e2d1b157d744d101b061a4a88"}, - {file = "yarl-1.18.0-cp313-cp313-win_amd64.whl", hash = "sha256:1db1537e9cb846eb0ff206eac667f627794be8b71368c1ab3207ec7b6f8c5afc"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:fa2c9cb607e0f660d48c54a63de7a9b36fef62f6b8bd50ff592ce1137e73ac7d"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c0f4808644baf0a434a3442df5e0bedf8d05208f0719cedcd499e168b23bfdc4"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7db9584235895a1dffca17e1c634b13870852094f6389b68dcc6338086aa7b08"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:309f8d27d6f93ceeeb80aa6980e883aa57895270f7f41842b92247e65d7aeddf"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:609ffd44fed2ed88d9b4ef62ee860cf86446cf066333ad4ce4123505b819e581"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f172b8b2c72a13a06ea49225a9c47079549036ad1b34afa12d5491b881f5b993"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d89ae7de94631b60d468412c18290d358a9d805182373d804ec839978b120422"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:466d31fd043ef9af822ee3f1df8fdff4e8c199a7f4012c2642006af240eade17"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7609b8462351c4836b3edce4201acb6dd46187b207c589b30a87ffd1813b48dc"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:d9d4f5e471e8dc49b593a80766c2328257e405f943c56a3dc985c125732bc4cf"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:67b336c15e564d76869c9a21316f90edf546809a5796a083b8f57c845056bc01"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b212452b80cae26cb767aa045b051740e464c5129b7bd739c58fbb7deb339e7b"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:38b39b7b3e692b6c92b986b00137a3891eddb66311b229d1940dcbd4f025083c"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a7ee6884a8848792d58b854946b685521f41d8871afa65e0d4a774954e9c9e89"}, - {file = "yarl-1.18.0-cp39-cp39-win32.whl", hash = "sha256:b4095c5019bb889aa866bf12ed4c85c0daea5aafcb7c20d1519f02a1e738f07f"}, - {file = "yarl-1.18.0-cp39-cp39-win_amd64.whl", hash = "sha256:2d90f2e4d16a5b0915ee065218b435d2ef619dd228973b1b47d262a6f7cd8fa5"}, - {file = "yarl-1.18.0-py3-none-any.whl", hash = "sha256:dbf53db46f7cf176ee01d8d98c39381440776fcda13779d269a8ba664f69bec0"}, - {file = "yarl-1.18.0.tar.gz", hash = "sha256:20d95535e7d833889982bfe7cc321b7f63bf8879788fee982c76ae2b24cfb715"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7df647e8edd71f000a5208fe6ff8c382a1de8edfbccdbbfe649d263de07d8c34"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c69697d3adff5aa4f874b19c0e4ed65180ceed6318ec856ebc423aa5850d84f7"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:602d98f2c2d929f8e697ed274fbadc09902c4025c5a9963bf4e9edfc3ab6f7ed"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c654d5207c78e0bd6d749f6dae1dcbbfde3403ad3a4b11f3c5544d9906969dde"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5094d9206c64181d0f6e76ebd8fb2f8fe274950a63890ee9e0ebfd58bf9d787b"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35098b24e0327fc4ebdc8ffe336cee0a87a700c24ffed13161af80124b7dc8e5"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3236da9272872443f81fedc389bace88408f64f89f75d1bdb2256069a8730ccc"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2c08cc9b16f4f4bc522771d96734c7901e7ebef70c6c5c35dd0f10845270bcd"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:80316a8bd5109320d38eef8833ccf5f89608c9107d02d2a7f985f98ed6876990"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:c1e1cc06da1491e6734f0ea1e6294ce00792193c463350626571c287c9a704db"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fea09ca13323376a2fdfb353a5fa2e59f90cd18d7ca4eaa1fd31f0a8b4f91e62"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e3b9fd71836999aad54084906f8663dffcd2a7fb5cdafd6c37713b2e72be1760"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:757e81cae69244257d125ff31663249b3013b5dc0a8520d73694aed497fb195b"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b1771de9944d875f1b98a745bc547e684b863abf8f8287da8466cf470ef52690"}, + {file = "yarl-1.18.3-cp310-cp310-win32.whl", hash = "sha256:8874027a53e3aea659a6d62751800cf6e63314c160fd607489ba5c2edd753cf6"}, + {file = "yarl-1.18.3-cp310-cp310-win_amd64.whl", hash = "sha256:93b2e109287f93db79210f86deb6b9bbb81ac32fc97236b16f7433db7fc437d8"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8503ad47387b8ebd39cbbbdf0bf113e17330ffd339ba1144074da24c545f0069"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:02ddb6756f8f4517a2d5e99d8b2f272488e18dd0bfbc802f31c16c6c20f22193"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:67a283dd2882ac98cc6318384f565bffc751ab564605959df4752d42483ad889"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d980e0325b6eddc81331d3f4551e2a333999fb176fd153e075c6d1c2530aa8a8"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b643562c12680b01e17239be267bc306bbc6aac1f34f6444d1bded0c5ce438ca"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c017a3b6df3a1bd45b9fa49a0f54005e53fbcad16633870104b66fa1a30a29d8"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75674776d96d7b851b6498f17824ba17849d790a44d282929c42dbb77d4f17ae"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ccaa3a4b521b780a7e771cc336a2dba389a0861592bbce09a476190bb0c8b4b3"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2d06d3005e668744e11ed80812e61efd77d70bb7f03e33c1598c301eea20efbb"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:9d41beda9dc97ca9ab0b9888cb71f7539124bc05df02c0cff6e5acc5a19dcc6e"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ba23302c0c61a9999784e73809427c9dbedd79f66a13d84ad1b1943802eaaf59"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6748dbf9bfa5ba1afcc7556b71cda0d7ce5f24768043a02a58846e4a443d808d"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0b0cad37311123211dc91eadcb322ef4d4a66008d3e1bdc404808992260e1a0e"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0fb2171a4486bb075316ee754c6d8382ea6eb8b399d4ec62fde2b591f879778a"}, + {file = "yarl-1.18.3-cp311-cp311-win32.whl", hash = "sha256:61b1a825a13bef4a5f10b1885245377d3cd0bf87cba068e1d9a88c2ae36880e1"}, + {file = "yarl-1.18.3-cp311-cp311-win_amd64.whl", hash = "sha256:b9d60031cf568c627d028239693fd718025719c02c9f55df0a53e587aab951b5"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1dd4bdd05407ced96fed3d7f25dbbf88d2ffb045a0db60dbc247f5b3c5c25d50"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7c33dd1931a95e5d9a772d0ac5e44cac8957eaf58e3c8da8c1414de7dd27c576"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:25b411eddcfd56a2f0cd6a384e9f4f7aa3efee14b188de13048c25b5e91f1640"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436c4fc0a4d66b2badc6c5fc5ef4e47bb10e4fd9bf0c79524ac719a01f3607c2"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e35ef8683211db69ffe129a25d5634319a677570ab6b2eba4afa860f54eeaf75"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84b2deecba4a3f1a398df819151eb72d29bfeb3b69abb145a00ddc8d30094512"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00e5a1fea0fd4f5bfa7440a47eff01d9822a65b4488f7cff83155a0f31a2ecba"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0e883008013c0e4aef84dcfe2a0b172c4d23c2669412cf5b3371003941f72bb"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5a3f356548e34a70b0172d8890006c37be92995f62d95a07b4a42e90fba54272"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ccd17349166b1bee6e529b4add61727d3f55edb7babbe4069b5764c9587a8cc6"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b958ddd075ddba5b09bb0be8a6d9906d2ce933aee81100db289badbeb966f54e"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c7d79f7d9aabd6011004e33b22bc13056a3e3fb54794d138af57f5ee9d9032cb"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4891ed92157e5430874dad17b15eb1fda57627710756c27422200c52d8a4e393"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ce1af883b94304f493698b00d0f006d56aea98aeb49d75ec7d98cd4a777e9285"}, + {file = "yarl-1.18.3-cp312-cp312-win32.whl", hash = "sha256:f91c4803173928a25e1a55b943c81f55b8872f0018be83e3ad4938adffb77dd2"}, + {file = "yarl-1.18.3-cp312-cp312-win_amd64.whl", hash = "sha256:7e2ee16578af3b52ac2f334c3b1f92262f47e02cc6193c598502bd46f5cd1477"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:90adb47ad432332d4f0bc28f83a5963f426ce9a1a8809f5e584e704b82685dcb"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:913829534200eb0f789d45349e55203a091f45c37a2674678744ae52fae23efa"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ef9f7768395923c3039055c14334ba4d926f3baf7b776c923c93d80195624782"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88a19f62ff30117e706ebc9090b8ecc79aeb77d0b1f5ec10d2d27a12bc9f66d0"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e17c9361d46a4d5addf777c6dd5eab0715a7684c2f11b88c67ac37edfba6c482"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a74a13a4c857a84a845505fd2d68e54826a2cd01935a96efb1e9d86c728e186"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41f7ce59d6ee7741af71d82020346af364949314ed3d87553763a2df1829cc58"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f52a265001d830bc425f82ca9eabda94a64a4d753b07d623a9f2863fde532b53"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:82123d0c954dc58db301f5021a01854a85bf1f3bb7d12ae0c01afc414a882ca2"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:2ec9bbba33b2d00999af4631a3397d1fd78290c48e2a3e52d8dd72db3a067ac8"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fbd6748e8ab9b41171bb95c6142faf068f5ef1511935a0aa07025438dd9a9bc1"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:877d209b6aebeb5b16c42cbb377f5f94d9e556626b1bfff66d7b0d115be88d0a"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b464c4ab4bfcb41e3bfd3f1c26600d038376c2de3297760dfe064d2cb7ea8e10"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8d39d351e7faf01483cc7ff7c0213c412e38e5a340238826be7e0e4da450fdc8"}, + {file = "yarl-1.18.3-cp313-cp313-win32.whl", hash = "sha256:61ee62ead9b68b9123ec24bc866cbef297dd266175d53296e2db5e7f797f902d"}, + {file = "yarl-1.18.3-cp313-cp313-win_amd64.whl", hash = "sha256:578e281c393af575879990861823ef19d66e2b1d0098414855dd367e234f5b3c"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:61e5e68cb65ac8f547f6b5ef933f510134a6bf31bb178be428994b0cb46c2a04"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe57328fbc1bfd0bd0514470ac692630f3901c0ee39052ae47acd1d90a436719"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a440a2a624683108a1b454705ecd7afc1c3438a08e890a1513d468671d90a04e"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09c7907c8548bcd6ab860e5f513e727c53b4a714f459b084f6580b49fa1b9cee"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b4f6450109834af88cb4cc5ecddfc5380ebb9c228695afc11915a0bf82116789"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9ca04806f3be0ac6d558fffc2fdf8fcef767e0489d2684a21912cc4ed0cd1b8"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77a6e85b90a7641d2e07184df5557132a337f136250caafc9ccaa4a2a998ca2c"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6333c5a377c8e2f5fae35e7b8f145c617b02c939d04110c76f29ee3676b5f9a5"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0b3c92fa08759dbf12b3a59579a4096ba9af8dd344d9a813fc7f5070d86bbab1"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:4ac515b860c36becb81bb84b667466885096b5fc85596948548b667da3bf9f24"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:045b8482ce9483ada4f3f23b3774f4e1bf4f23a2d5c912ed5170f68efb053318"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:a4bb030cf46a434ec0225bddbebd4b89e6471814ca851abb8696170adb163985"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:54d6921f07555713b9300bee9c50fb46e57e2e639027089b1d795ecd9f7fa910"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1d407181cfa6e70077df3377938c08012d18893f9f20e92f7d2f314a437c30b1"}, + {file = "yarl-1.18.3-cp39-cp39-win32.whl", hash = "sha256:ac36703a585e0929b032fbaab0707b75dc12703766d0b53486eabd5139ebadd5"}, + {file = "yarl-1.18.3-cp39-cp39-win_amd64.whl", hash = "sha256:ba87babd629f8af77f557b61e49e7c7cac36f22f871156b91e10a6e9d4f829e9"}, + {file = "yarl-1.18.3-py3-none-any.whl", hash = "sha256:b57f4f58099328dfb26c6a771d09fb20dbbae81d20cfb66141251ea063bd101b"}, + {file = "yarl-1.18.3.tar.gz", hash = "sha256:ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1"}, ] [package.dependencies] diff --git a/envs/test/poetry.lock b/envs/test/poetry.lock index 41714a39f0e1..7436cee76d65 100644 --- a/envs/test/poetry.lock +++ b/envs/test/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "annotated-types" @@ -13,24 +13,24 @@ files = [ [[package]] name = "anyio" -version = "4.6.2.post1" +version = "4.7.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" files = [ - {file = "anyio-4.6.2.post1-py3-none-any.whl", hash = "sha256:6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d"}, - {file = "anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c"}, + {file = "anyio-4.7.0-py3-none-any.whl", hash = "sha256:ea60c3723ab42ba6fff7e8ccb0488c898ec538ff4df1f1d5e642c3601d07e352"}, + {file = "anyio-4.7.0.tar.gz", hash = "sha256:2f834749c602966b7d456a7567cafcb309f96482b5081d14ac93ccd457f9dd48"}, ] [package.dependencies] exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" -typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} +typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] -doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"] +doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] trio = ["trio (>=0.26.1)"] [[package]] @@ -66,32 +66,32 @@ requests = ">=2.21,<3.0" [[package]] name = "attrs" -version = "24.2.0" +version = "24.3.0" description = "Classes Without Boilerplate" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, - {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, + {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, + {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, ] [package.extras] benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] @@ -175,116 +175,103 @@ pycparser = "*" [[package]] name = "charset-normalizer" -version = "3.4.0" +version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false -python-versions = ">=3.7.0" +python-versions = ">=3.7" files = [ - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"}, - {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"}, - {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e218488cd232553829be0664c2292d3af2eeeb94b32bea483cf79ac6a694e037"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80ed5e856eb7f30115aaf94e4a08114ccc8813e6ed1b5efa74f9f82e8509858f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b010a7a4fd316c3c484d482922d13044979e78d1861f0e0650423144c616a46a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4532bff1b8421fd0a320463030c7520f56a79c9024a4e88f01c537316019005a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d973f03c0cb71c5ed99037b870f2be986c3c05e63622c017ea9816881d2dd247"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3a3bd0dcd373514dcec91c411ddb9632c0d7d92aed7093b8c3bbb6d69ca74408"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9c3cdf5390dcd29aa8056d13e8e99526cda0305acc038b96b30352aff5ff2bb"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2bdfe3ac2e1bbe5b59a1a63721eb3b95fc9b6817ae4a46debbb4e11f6232428d"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:eab677309cdb30d047996b36d34caeda1dc91149e4fdca0b1a039b3f79d9a807"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win32.whl", hash = "sha256:c0429126cf75e16c4f0ad00ee0eae4242dc652290f940152ca8c75c3a4b6ee8f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:9f0b8b1c6d84c8034a44893aba5e767bf9c7a211e313a9605d9c617d7083829f"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f30bf9fd9be89ecb2360c7d94a711f00c09b976258846efe40db3d05828e8089"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97f68b8d6831127e4787ad15e6757232e14e12060bec17091b85eb1486b91d8d"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7974a0b5ecd505609e3b19742b60cee7aa2aa2fb3151bc917e6e2646d7667dcf"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc54db6c8593ef7d4b2a331b58653356cf04f67c960f584edb7c3d8c97e8f39e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:311f30128d7d333eebd7896965bfcfbd0065f1716ec92bd5638d7748eb6f936a"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:7d053096f67cd1241601111b698f5cad775f97ab25d81567d3f59219b5f1adbd"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:807f52c1f798eef6cf26beb819eeb8819b1622ddfeef9d0977a8502d4db6d534"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:dccbe65bd2f7f7ec22c4ff99ed56faa1e9f785482b9bbd7c717e26fd723a1d1e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:2fb9bd477fdea8684f78791a6de97a953c51831ee2981f8e4f583ff3b9d9687e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:01732659ba9b5b873fc117534143e4feefecf3b2078b0a6a2e925271bb6f4cfa"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win32.whl", hash = "sha256:7a4f97a081603d2050bfaffdefa5b02a9ec823f8348a572e39032caa8404a487"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:7b1bef6280950ee6c177b326508f86cad7ad4dff12454483b51d8b7d673a2c5d"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ecddf25bee22fe4fe3737a399d0d177d72bc22be6913acfab364b40bce1ba83c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c60ca7339acd497a55b0ea5d506b2a2612afb2826560416f6894e8b5770d4a9"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7b2d86dd06bfc2ade3312a83a5c364c7ec2e3498f8734282c6c3d4b07b346b8"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd78cfcda14a1ef52584dbb008f7ac81c1328c0f58184bf9a84c49c605002da6"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e27f48bcd0957c6d4cb9d6fa6b61d192d0b13d5ef563e5f2ae35feafc0d179c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01ad647cdd609225c5350561d084b42ddf732f4eeefe6e678765636791e78b9a"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:619a609aa74ae43d90ed2e89bdd784765de0a25ca761b93e196d938b8fd1dbbd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:89149166622f4db9b4b6a449256291dc87a99ee53151c74cbd82a53c8c2f6ccd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:7709f51f5f7c853f0fb938bcd3bc59cdfdc5203635ffd18bf354f6967ea0f824"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:345b0426edd4e18138d6528aed636de7a9ed169b4aaf9d61a8c19e39d26838ca"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0907f11d019260cdc3f94fbdb23ff9125f6b5d1039b76003b5b0ac9d6a6c9d5b"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win32.whl", hash = "sha256:ea0d8d539afa5eb2728aa1932a988a9a7af94f18582ffae4bc10b3fbdad0626e"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:329ce159e82018d646c7ac45b01a430369d526569ec08516081727a20e9e4af4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b97e690a2118911e39b4042088092771b4ae3fc3aa86518f84b8cf6888dbdb41"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78baa6d91634dfb69ec52a463534bc0df05dbd546209b79a3880a34487f4b84f"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a2bc9f351a75ef49d664206d51f8e5ede9da246602dc2d2726837620ea034b2"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75832c08354f595c760a804588b9357d34ec00ba1c940c15e31e96d902093770"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af291f4fe114be0280cdd29d533696a77b5b49cfde5467176ecab32353395c4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0167ddc8ab6508fe81860a57dd472b2ef4060e8d378f0cc555707126830f2537"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2a75d49014d118e4198bcee5ee0a6f25856b29b12dbf7cd012791f8a6cc5c496"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363e2f92b0f0174b2f8238240a1a30142e3db7b957a5dd5689b0e75fb717cc78"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ab36c8eb7e454e34e60eb55ca5d241a5d18b2c6244f6827a30e451c42410b5f7"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:4c0907b1928a36d5a998d72d64d8eaa7244989f7aaaf947500d3a800c83a3fd6"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04432ad9479fa40ec0f387795ddad4437a2b50417c69fa275e212933519ff294"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win32.whl", hash = "sha256:3bed14e9c89dcb10e8f3a29f9ccac4955aebe93c71ae803af79265c9ca5644c5"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:49402233c892a461407c512a19435d1ce275543138294f7ef013f0b63d5d3765"}, + {file = "charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85"}, + {file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"}, ] [[package]] @@ -300,73 +287,73 @@ files = [ [[package]] name = "coverage" -version = "7.6.8" +version = "7.6.9" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" files = [ - {file = "coverage-7.6.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b39e6011cd06822eb964d038d5dff5da5d98652b81f5ecd439277b32361a3a50"}, - {file = "coverage-7.6.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:63c19702db10ad79151a059d2d6336fe0c470f2e18d0d4d1a57f7f9713875dcf"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3985b9be361d8fb6b2d1adc9924d01dec575a1d7453a14cccd73225cb79243ee"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:644ec81edec0f4ad17d51c838a7d01e42811054543b76d4ba2c5d6af741ce2a6"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f188a2402f8359cf0c4b1fe89eea40dc13b52e7b4fd4812450da9fcd210181d"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e19122296822deafce89a0c5e8685704c067ae65d45e79718c92df7b3ec3d331"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:13618bed0c38acc418896005732e565b317aa9e98d855a0e9f211a7ffc2d6638"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:193e3bffca48ad74b8c764fb4492dd875038a2f9925530cb094db92bb5e47bed"}, - {file = "coverage-7.6.8-cp310-cp310-win32.whl", hash = "sha256:3988665ee376abce49613701336544041f2117de7b7fbfe91b93d8ff8b151c8e"}, - {file = "coverage-7.6.8-cp310-cp310-win_amd64.whl", hash = "sha256:f56f49b2553d7dd85fd86e029515a221e5c1f8cb3d9c38b470bc38bde7b8445a"}, - {file = "coverage-7.6.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:86cffe9c6dfcfe22e28027069725c7f57f4b868a3f86e81d1c62462764dc46d4"}, - {file = "coverage-7.6.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d82ab6816c3277dc962cfcdc85b1efa0e5f50fb2c449432deaf2398a2928ab94"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13690e923a3932e4fad4c0ebfb9cb5988e03d9dcb4c5150b5fcbf58fd8bddfc4"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4be32da0c3827ac9132bb488d331cb32e8d9638dd41a0557c5569d57cf22c9c1"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44e6c85bbdc809383b509d732b06419fb4544dca29ebe18480379633623baafb"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:768939f7c4353c0fac2f7c37897e10b1414b571fd85dd9fc49e6a87e37a2e0d8"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e44961e36cb13c495806d4cac67640ac2866cb99044e210895b506c26ee63d3a"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3ea8bb1ab9558374c0ab591783808511d135a833c3ca64a18ec927f20c4030f0"}, - {file = "coverage-7.6.8-cp311-cp311-win32.whl", hash = "sha256:629a1ba2115dce8bf75a5cce9f2486ae483cb89c0145795603d6554bdc83e801"}, - {file = "coverage-7.6.8-cp311-cp311-win_amd64.whl", hash = "sha256:fb9fc32399dca861584d96eccd6c980b69bbcd7c228d06fb74fe53e007aa8ef9"}, - {file = "coverage-7.6.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:e683e6ecc587643f8cde8f5da6768e9d165cd31edf39ee90ed7034f9ca0eefee"}, - {file = "coverage-7.6.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1defe91d41ce1bd44b40fabf071e6a01a5aa14de4a31b986aa9dfd1b3e3e414a"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7ad66e8e50225ebf4236368cc43c37f59d5e6728f15f6e258c8639fa0dd8e6d"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3fe47da3e4fda5f1abb5709c156eca207eacf8007304ce3019eb001e7a7204cb"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:202a2d645c5a46b84992f55b0a3affe4f0ba6b4c611abec32ee88358db4bb649"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4674f0daa1823c295845b6a740d98a840d7a1c11df00d1fd62614545c1583787"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:74610105ebd6f33d7c10f8907afed696e79c59e3043c5f20eaa3a46fddf33b4c"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:37cda8712145917105e07aab96388ae76e787270ec04bcb9d5cc786d7cbb8443"}, - {file = "coverage-7.6.8-cp312-cp312-win32.whl", hash = "sha256:9e89d5c8509fbd6c03d0dd1972925b22f50db0792ce06324ba069f10787429ad"}, - {file = "coverage-7.6.8-cp312-cp312-win_amd64.whl", hash = "sha256:379c111d3558272a2cae3d8e57e6b6e6f4fe652905692d54bad5ea0ca37c5ad4"}, - {file = "coverage-7.6.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0b0c69f4f724c64dfbfe79f5dfb503b42fe6127b8d479b2677f2b227478db2eb"}, - {file = "coverage-7.6.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c15b32a7aca8038ed7644f854bf17b663bc38e1671b5d6f43f9a2b2bd0c46f63"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63068a11171e4276f6ece913bde059e77c713b48c3a848814a6537f35afb8365"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f4548c5ead23ad13fb7a2c8ea541357474ec13c2b736feb02e19a3085fac002"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b4b4299dd0d2c67caaaf286d58aef5e75b125b95615dda4542561a5a566a1e3"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c9ebfb2507751f7196995142f057d1324afdab56db1d9743aab7f50289abd022"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c1b4474beee02ede1eef86c25ad4600a424fe36cff01a6103cb4533c6bf0169e"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d9fd2547e6decdbf985d579cf3fc78e4c1d662b9b0ff7cc7862baaab71c9cc5b"}, - {file = "coverage-7.6.8-cp313-cp313-win32.whl", hash = "sha256:8aae5aea53cbfe024919715eca696b1a3201886ce83790537d1c3668459c7146"}, - {file = "coverage-7.6.8-cp313-cp313-win_amd64.whl", hash = "sha256:ae270e79f7e169ccfe23284ff5ea2d52a6f401dc01b337efb54b3783e2ce3f28"}, - {file = "coverage-7.6.8-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:de38add67a0af869b0d79c525d3e4588ac1ffa92f39116dbe0ed9753f26eba7d"}, - {file = "coverage-7.6.8-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b07c25d52b1c16ce5de088046cd2432b30f9ad5e224ff17c8f496d9cb7d1d451"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62a66ff235e4c2e37ed3b6104d8b478d767ff73838d1222132a7a026aa548764"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09b9f848b28081e7b975a3626e9081574a7b9196cde26604540582da60235fdf"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:093896e530c38c8e9c996901858ac63f3d4171268db2c9c8b373a228f459bbc5"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9a7b8ac36fd688c8361cbc7bf1cb5866977ece6e0b17c34aa0df58bda4fa18a4"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:38c51297b35b3ed91670e1e4efb702b790002e3245a28c76e627478aa3c10d83"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2e4e0f60cb4bd7396108823548e82fdab72d4d8a65e58e2c19bbbc2f1e2bfa4b"}, - {file = "coverage-7.6.8-cp313-cp313t-win32.whl", hash = "sha256:6535d996f6537ecb298b4e287a855f37deaf64ff007162ec0afb9ab8ba3b8b71"}, - {file = "coverage-7.6.8-cp313-cp313t-win_amd64.whl", hash = "sha256:c79c0685f142ca53256722a384540832420dff4ab15fec1863d7e5bc8691bdcc"}, - {file = "coverage-7.6.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3ac47fa29d8d41059ea3df65bd3ade92f97ee4910ed638e87075b8e8ce69599e"}, - {file = "coverage-7.6.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:24eda3a24a38157eee639ca9afe45eefa8d2420d49468819ac5f88b10de84f4c"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4c81ed2820b9023a9a90717020315e63b17b18c274a332e3b6437d7ff70abe0"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bd55f8fc8fa494958772a2a7302b0354ab16e0b9272b3c3d83cdb5bec5bd1779"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f39e2f3530ed1626c66e7493be7a8423b023ca852aacdc91fb30162c350d2a92"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:716a78a342679cd1177bc8c2fe957e0ab91405bd43a17094324845200b2fddf4"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:177f01eeaa3aee4a5ffb0d1439c5952b53d5010f86e9d2667963e632e30082cc"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:912e95017ff51dc3d7b6e2be158dedc889d9a5cc3382445589ce554f1a34c0ea"}, - {file = "coverage-7.6.8-cp39-cp39-win32.whl", hash = "sha256:4db3ed6a907b555e57cc2e6f14dc3a4c2458cdad8919e40b5357ab9b6db6c43e"}, - {file = "coverage-7.6.8-cp39-cp39-win_amd64.whl", hash = "sha256:428ac484592f780e8cd7b6b14eb568f7c85460c92e2a37cb0c0e5186e1a0d076"}, - {file = "coverage-7.6.8-pp39.pp310-none-any.whl", hash = "sha256:5c52a036535d12590c32c49209e79cabaad9f9ad8aa4cbd875b68c4d67a9cbce"}, - {file = "coverage-7.6.8.tar.gz", hash = "sha256:8b2b8503edb06822c86d82fa64a4a5cb0760bb8f31f26e138ec743f422f37cfc"}, + {file = "coverage-7.6.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:85d9636f72e8991a1706b2b55b06c27545448baf9f6dbf51c4004609aacd7dcb"}, + {file = "coverage-7.6.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:608a7fd78c67bee8936378299a6cb9f5149bb80238c7a566fc3e6717a4e68710"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:96d636c77af18b5cb664ddf12dab9b15a0cfe9c0bde715da38698c8cea748bfa"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d75cded8a3cff93da9edc31446872d2997e327921d8eed86641efafd350e1df1"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7b15f589593110ae767ce997775d645b47e5cbbf54fd322f8ebea6277466cec"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:44349150f6811b44b25574839b39ae35291f6496eb795b7366fef3bd3cf112d3"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:d891c136b5b310d0e702e186d70cd16d1119ea8927347045124cb286b29297e5"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:db1dab894cc139f67822a92910466531de5ea6034ddfd2b11c0d4c6257168073"}, + {file = "coverage-7.6.9-cp310-cp310-win32.whl", hash = "sha256:41ff7b0da5af71a51b53f501a3bac65fb0ec311ebed1632e58fc6107f03b9198"}, + {file = "coverage-7.6.9-cp310-cp310-win_amd64.whl", hash = "sha256:35371f8438028fdccfaf3570b31d98e8d9eda8bb1d6ab9473f5a390969e98717"}, + {file = "coverage-7.6.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:932fc826442132dde42ee52cf66d941f581c685a6313feebed358411238f60f9"}, + {file = "coverage-7.6.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:085161be5f3b30fd9b3e7b9a8c301f935c8313dcf928a07b116324abea2c1c2c"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ccc660a77e1c2bf24ddbce969af9447a9474790160cfb23de6be4fa88e3951c7"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c69e42c892c018cd3c8d90da61d845f50a8243062b19d228189b0224150018a9"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0824a28ec542a0be22f60c6ac36d679e0e262e5353203bea81d44ee81fe9c6d4"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4401ae5fc52ad8d26d2a5d8a7428b0f0c72431683f8e63e42e70606374c311a1"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:98caba4476a6c8d59ec1eb00c7dd862ba9beca34085642d46ed503cc2d440d4b"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ee5defd1733fd6ec08b168bd4f5387d5b322f45ca9e0e6c817ea6c4cd36313e3"}, + {file = "coverage-7.6.9-cp311-cp311-win32.whl", hash = "sha256:f2d1ec60d6d256bdf298cb86b78dd715980828f50c46701abc3b0a2b3f8a0dc0"}, + {file = "coverage-7.6.9-cp311-cp311-win_amd64.whl", hash = "sha256:0d59fd927b1f04de57a2ba0137166d31c1a6dd9e764ad4af552912d70428c92b"}, + {file = "coverage-7.6.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:99e266ae0b5d15f1ca8d278a668df6f51cc4b854513daab5cae695ed7b721cf8"}, + {file = "coverage-7.6.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9901d36492009a0a9b94b20e52ebfc8453bf49bb2b27bca2c9706f8b4f5a554a"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abd3e72dd5b97e3af4246cdada7738ef0e608168de952b837b8dd7e90341f015"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ff74026a461eb0660366fb01c650c1d00f833a086b336bdad7ab00cc952072b3"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65dad5a248823a4996724a88eb51d4b31587aa7aa428562dbe459c684e5787ae"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:22be16571504c9ccea919fcedb459d5ab20d41172056206eb2994e2ff06118a4"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f957943bc718b87144ecaee70762bc2bc3f1a7a53c7b861103546d3a403f0a6"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0ae1387db4aecb1f485fb70a6c0148c6cdaebb6038f1d40089b1fc84a5db556f"}, + {file = "coverage-7.6.9-cp312-cp312-win32.whl", hash = "sha256:1a330812d9cc7ac2182586f6d41b4d0fadf9be9049f350e0efb275c8ee8eb692"}, + {file = "coverage-7.6.9-cp312-cp312-win_amd64.whl", hash = "sha256:b12c6b18269ca471eedd41c1b6a1065b2f7827508edb9a7ed5555e9a56dcfc97"}, + {file = "coverage-7.6.9-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:899b8cd4781c400454f2f64f7776a5d87bbd7b3e7f7bda0cb18f857bb1334664"}, + {file = "coverage-7.6.9-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:61f70dc68bd36810972e55bbbe83674ea073dd1dcc121040a08cdf3416c5349c"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8a289d23d4c46f1a82d5db4abeb40b9b5be91731ee19a379d15790e53031c014"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e216d8044a356fc0337c7a2a0536d6de07888d7bcda76febcb8adc50bdbbd00"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c026eb44f744acaa2bda7493dad903aa5bf5fc4f2554293a798d5606710055d"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e77363e8425325384f9d49272c54045bbed2f478e9dd698dbc65dbc37860eb0a"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:777abfab476cf83b5177b84d7486497e034eb9eaea0d746ce0c1268c71652077"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:447af20e25fdbe16f26e84eb714ba21d98868705cb138252d28bc400381f6ffb"}, + {file = "coverage-7.6.9-cp313-cp313-win32.whl", hash = "sha256:d872ec5aeb086cbea771c573600d47944eea2dcba8be5f3ee649bfe3cb8dc9ba"}, + {file = "coverage-7.6.9-cp313-cp313-win_amd64.whl", hash = "sha256:fd1213c86e48dfdc5a0cc676551db467495a95a662d2396ecd58e719191446e1"}, + {file = "coverage-7.6.9-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ba9e7484d286cd5a43744e5f47b0b3fb457865baf07bafc6bee91896364e1419"}, + {file = "coverage-7.6.9-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e5ea1cf0872ee455c03e5674b5bca5e3e68e159379c1af0903e89f5eba9ccc3a"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d10e07aa2b91835d6abec555ec8b2733347956991901eea6ffac295f83a30e4"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:13a9e2d3ee855db3dd6ea1ba5203316a1b1fd8eaeffc37c5b54987e61e4194ae"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c38bf15a40ccf5619fa2fe8f26106c7e8e080d7760aeccb3722664c8656b030"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:d5275455b3e4627c8e7154feaf7ee0743c2e7af82f6e3b561967b1cca755a0be"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:8f8770dfc6e2c6a2d4569f411015c8d751c980d17a14b0530da2d7f27ffdd88e"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8d2dfa71665a29b153a9681edb1c8d9c1ea50dfc2375fb4dac99ea7e21a0bcd9"}, + {file = "coverage-7.6.9-cp313-cp313t-win32.whl", hash = "sha256:5e6b86b5847a016d0fbd31ffe1001b63355ed309651851295315031ea7eb5a9b"}, + {file = "coverage-7.6.9-cp313-cp313t-win_amd64.whl", hash = "sha256:97ddc94d46088304772d21b060041c97fc16bdda13c6c7f9d8fcd8d5ae0d8611"}, + {file = "coverage-7.6.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:adb697c0bd35100dc690de83154627fbab1f4f3c0386df266dded865fc50a902"}, + {file = "coverage-7.6.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:be57b6d56e49c2739cdf776839a92330e933dd5e5d929966fbbd380c77f060be"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1592791f8204ae9166de22ba7e6705fa4ebd02936c09436a1bb85aabca3e599"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e12ae8cc979cf83d258acb5e1f1cf2f3f83524d1564a49d20b8bec14b637f08"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb5555cff66c4d3d6213a296b360f9e1a8e323e74e0426b6c10ed7f4d021e464"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b9389a429e0e5142e69d5bf4a435dd688c14478a19bb901735cdf75e57b13845"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:592ac539812e9b46046620341498caf09ca21023c41c893e1eb9dbda00a70cbf"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a27801adef24cc30871da98a105f77995e13a25a505a0161911f6aafbd66e678"}, + {file = "coverage-7.6.9-cp39-cp39-win32.whl", hash = "sha256:8e3c3e38930cfb729cb8137d7f055e5a473ddaf1217966aa6238c88bd9fd50e6"}, + {file = "coverage-7.6.9-cp39-cp39-win_amd64.whl", hash = "sha256:e28bf44afa2b187cc9f41749138a64435bf340adfcacb5b2290c070ce99839d4"}, + {file = "coverage-7.6.9-pp39.pp310-none-any.whl", hash = "sha256:f3ca78518bc6bc92828cd11867b121891d75cae4ea9e908d72030609b996db1b"}, + {file = "coverage-7.6.9.tar.gz", hash = "sha256:4a8d8977b0c6ef5aeadcb644da9e69ae0dcfe66ec7f368c89c72e058bd71164d"}, ] [package.dependencies] @@ -480,13 +467,13 @@ files = [ [[package]] name = "loguru" -version = "0.7.2" +version = "0.7.3" description = "Python logging made (stupidly) simple" optional = false -python-versions = ">=3.5" +python-versions = "<4.0,>=3.5" files = [ - {file = "loguru-0.7.2-py3-none-any.whl", hash = "sha256:003d71e3d3ed35f0f8984898359d65b79e5b21943f78af86aa5491210429b8eb"}, - {file = "loguru-0.7.2.tar.gz", hash = "sha256:e671a53522515f34fd406340ee968cb9ecafbc4b36c679da03c18fd8d0bd51ac"}, + {file = "loguru-0.7.3-py3-none-any.whl", hash = "sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c"}, + {file = "loguru-0.7.3.tar.gz", hash = "sha256:19480589e77d47b8d85b2c827ad95d49bf31b0dcde16593892eb51dd18706eb6"}, ] [package.dependencies] @@ -494,7 +481,7 @@ colorama = {version = ">=0.3.4", markers = "sys_platform == \"win32\""} win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} [package.extras] -dev = ["Sphinx (==7.2.5)", "colorama (==0.4.5)", "colorama (==0.4.6)", "exceptiongroup (==1.1.3)", "freezegun (==1.1.0)", "freezegun (==1.2.2)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v1.4.1)", "mypy (==v1.5.1)", "pre-commit (==3.4.0)", "pytest (==6.1.2)", "pytest (==7.4.0)", "pytest-cov (==2.12.1)", "pytest-cov (==4.1.0)", "pytest-mypy-plugins (==1.9.3)", "pytest-mypy-plugins (==3.0.0)", "sphinx-autobuild (==2021.3.14)", "sphinx-rtd-theme (==1.3.0)", "tox (==3.27.1)", "tox (==4.11.0)"] +dev = ["Sphinx (==8.1.3)", "build (==1.2.2)", "colorama (==0.4.5)", "colorama (==0.4.6)", "exceptiongroup (==1.1.3)", "freezegun (==1.1.0)", "freezegun (==1.5.0)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v1.13.0)", "mypy (==v1.4.1)", "myst-parser (==4.0.0)", "pre-commit (==4.0.1)", "pytest (==6.1.2)", "pytest (==8.3.2)", "pytest-cov (==2.12.1)", "pytest-cov (==5.0.0)", "pytest-cov (==6.0.0)", "pytest-mypy-plugins (==1.9.3)", "pytest-mypy-plugins (==3.1.0)", "sphinx-rtd-theme (==3.0.2)", "tox (==3.27.1)", "tox (==4.23.2)", "twine (==6.0.1)"] [[package]] name = "markupsafe" @@ -702,13 +689,13 @@ websockets = ["websockets (>=10.0)"] [[package]] name = "nonebug" -version = "0.4.2" +version = "0.4.3" description = "nonebot2 test framework" optional = false python-versions = "<4.0,>=3.9" files = [ - {file = "nonebug-0.4.2-py3-none-any.whl", hash = "sha256:83d9229ec899819e9f5786eabc0c27b9dd0cd5d6e2e7438f59923ab822d5c555"}, - {file = "nonebug-0.4.2.tar.gz", hash = "sha256:002dac00fed1fbff97574f3dffab2237fc41473b3bf3e73d2730ae34895bc137"}, + {file = "nonebug-0.4.3-py3-none-any.whl", hash = "sha256:eb9b2c8ab3d45459a4f00ebdaae90729e9e9628575c0685fca4c871dd4cfd425"}, + {file = "nonebug-0.4.3.tar.gz", hash = "sha256:e9592d2c7a42b76f4a336f98726cba92e1300f6bab155c8822e865919786f10c"}, ] [package.dependencies] @@ -760,109 +747,93 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "propcache" -version = "0.2.0" +version = "0.2.1" description = "Accelerated property cache" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c5869b8fd70b81835a6f187c5fdbe67917a04d7e52b6e7cc4e5fe39d55c39d58"}, - {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:952e0d9d07609d9c5be361f33b0d6d650cd2bae393aabb11d9b719364521984b"}, - {file = "propcache-0.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:33ac8f098df0585c0b53009f039dfd913b38c1d2edafed0cedcc0c32a05aa110"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97e48e8875e6c13909c800fa344cd54cc4b2b0db1d5f911f840458a500fde2c2"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:388f3217649d6d59292b722d940d4d2e1e6a7003259eb835724092a1cca0203a"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f571aea50ba5623c308aa146eb650eebf7dbe0fd8c5d946e28343cb3b5aad577"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3dfafb44f7bb35c0c06eda6b2ab4bfd58f02729e7c4045e179f9a861b07c9850"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3ebe9a75be7ab0b7da2464a77bb27febcb4fab46a34f9288f39d74833db7f61"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d2f0d0f976985f85dfb5f3d685697ef769faa6b71993b46b295cdbbd6be8cc37"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a3dc1a4b165283bd865e8f8cb5f0c64c05001e0718ed06250d8cac9bec115b48"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9e0f07b42d2a50c7dd2d8675d50f7343d998c64008f1da5fef888396b7f84630"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e63e3e1e0271f374ed489ff5ee73d4b6e7c60710e1f76af5f0e1a6117cd26394"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:56bb5c98f058a41bb58eead194b4db8c05b088c93d94d5161728515bd52b052b"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7665f04d0c7f26ff8bb534e1c65068409bf4687aa2534faf7104d7182debb336"}, - {file = "propcache-0.2.0-cp310-cp310-win32.whl", hash = "sha256:7cf18abf9764746b9c8704774d8b06714bcb0a63641518a3a89c7f85cc02c2ad"}, - {file = "propcache-0.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:cfac69017ef97db2438efb854edf24f5a29fd09a536ff3a992b75990720cdc99"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:63f13bf09cc3336eb04a837490b8f332e0db41da66995c9fd1ba04552e516354"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608cce1da6f2672a56b24a015b42db4ac612ee709f3d29f27a00c943d9e851de"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:466c219deee4536fbc83c08d09115249db301550625c7fef1c5563a584c9bc87"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc2db02409338bf36590aa985a461b2c96fce91f8e7e0f14c50c5fcc4f229016"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a6ed8db0a556343d566a5c124ee483ae113acc9a557a807d439bcecc44e7dfbb"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:91997d9cb4a325b60d4e3f20967f8eb08dfcb32b22554d5ef78e6fd1dda743a2"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c7dde9e533c0a49d802b4f3f218fa9ad0a1ce21f2c2eb80d5216565202acab4"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffcad6c564fe6b9b8916c1aefbb37a362deebf9394bd2974e9d84232e3e08504"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:97a58a28bcf63284e8b4d7b460cbee1edaab24634e82059c7b8c09e65284f178"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:945db8ee295d3af9dbdbb698cce9bbc5c59b5c3fe328bbc4387f59a8a35f998d"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:39e104da444a34830751715f45ef9fc537475ba21b7f1f5b0f4d71a3b60d7fe2"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c5ecca8f9bab618340c8e848d340baf68bcd8ad90a8ecd7a4524a81c1764b3db"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c436130cc779806bdf5d5fae0d848713105472b8566b75ff70048c47d3961c5b"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:191db28dc6dcd29d1a3e063c3be0b40688ed76434622c53a284e5427565bbd9b"}, - {file = "propcache-0.2.0-cp311-cp311-win32.whl", hash = "sha256:5f2564ec89058ee7c7989a7b719115bdfe2a2fb8e7a4543b8d1c0cc4cf6478c1"}, - {file = "propcache-0.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6e2e54267980349b723cff366d1e29b138b9a60fa376664a157a342689553f71"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:2ee7606193fb267be4b2e3b32714f2d58cad27217638db98a60f9efb5efeccc2"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:91ee8fc02ca52e24bcb77b234f22afc03288e1dafbb1f88fe24db308910c4ac7"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2e900bad2a8456d00a113cad8c13343f3b1f327534e3589acc2219729237a2e8"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f52a68c21363c45297aca15561812d542f8fc683c85201df0bebe209e349f793"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e41d67757ff4fbc8ef2af99b338bfb955010444b92929e9e55a6d4dcc3c4f09"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a64e32f8bd94c105cc27f42d3b658902b5bcc947ece3c8fe7bc1b05982f60e89"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55346705687dbd7ef0d77883ab4f6fabc48232f587925bdaf95219bae072491e"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00181262b17e517df2cd85656fcd6b4e70946fe62cd625b9d74ac9977b64d8d9"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6994984550eaf25dd7fc7bd1b700ff45c894149341725bb4edc67f0ffa94efa4"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:56295eb1e5f3aecd516d91b00cfd8bf3a13991de5a479df9e27dd569ea23959c"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:439e76255daa0f8151d3cb325f6dd4a3e93043e6403e6491813bcaaaa8733887"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f6475a1b2ecb310c98c28d271a30df74f9dd436ee46d09236a6b750a7599ce57"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3444cdba6628accf384e349014084b1cacd866fbb88433cd9d279d90a54e0b23"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4a9d9b4d0a9b38d1c391bb4ad24aa65f306c6f01b512e10a8a34a2dc5675d348"}, - {file = "propcache-0.2.0-cp312-cp312-win32.whl", hash = "sha256:69d3a98eebae99a420d4b28756c8ce6ea5a29291baf2dc9ff9414b42676f61d5"}, - {file = "propcache-0.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:ad9c9b99b05f163109466638bd30ada1722abb01bbb85c739c50b6dc11f92dc3"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ecddc221a077a8132cf7c747d5352a15ed763b674c0448d811f408bf803d9ad7"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0e53cb83fdd61cbd67202735e6a6687a7b491c8742dfc39c9e01e80354956763"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92fe151145a990c22cbccf9ae15cae8ae9eddabfc949a219c9f667877e40853d"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6a21ef516d36909931a2967621eecb256018aeb11fc48656e3257e73e2e247a"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f88a4095e913f98988f5b338c1d4d5d07dbb0b6bad19892fd447484e483ba6b"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a5b3bb545ead161be780ee85a2b54fdf7092815995661947812dde94a40f6fb"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67aeb72e0f482709991aa91345a831d0b707d16b0257e8ef88a2ad246a7280bf"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c997f8c44ec9b9b0bcbf2d422cc00a1d9b9c681f56efa6ca149a941e5560da2"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a66df3d4992bc1d725b9aa803e8c5a66c010c65c741ad901e260ece77f58d2f"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3ebbcf2a07621f29638799828b8d8668c421bfb94c6cb04269130d8de4fb7136"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1235c01ddaa80da8235741e80815ce381c5267f96cc49b1477fdcf8c047ef325"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3947483a381259c06921612550867b37d22e1df6d6d7e8361264b6d037595f44"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d5bed7f9805cc29c780f3aee05de3262ee7ce1f47083cfe9f77471e9d6777e83"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e4a91d44379f45f5e540971d41e4626dacd7f01004826a18cb048e7da7e96544"}, - {file = "propcache-0.2.0-cp313-cp313-win32.whl", hash = "sha256:f902804113e032e2cdf8c71015651c97af6418363bea8d78dc0911d56c335032"}, - {file = "propcache-0.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:8f188cfcc64fb1266f4684206c9de0e80f54622c3f22a910cbd200478aeae61e"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:53d1bd3f979ed529f0805dd35ddaca330f80a9a6d90bc0121d2ff398f8ed8861"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:83928404adf8fb3d26793665633ea79b7361efa0287dfbd372a7e74311d51ee6"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:77a86c261679ea5f3896ec060be9dc8e365788248cc1e049632a1be682442063"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:218db2a3c297a3768c11a34812e63b3ac1c3234c3a086def9c0fee50d35add1f"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7735e82e3498c27bcb2d17cb65d62c14f1100b71723b68362872bca7d0913d90"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:20a617c776f520c3875cf4511e0d1db847a076d720714ae35ffe0df3e440be68"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67b69535c870670c9f9b14a75d28baa32221d06f6b6fa6f77a0a13c5a7b0a5b9"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4569158070180c3855e9c0791c56be3ceeb192defa2cdf6a3f39e54319e56b89"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:db47514ffdbd91ccdc7e6f8407aac4ee94cc871b15b577c1c324236b013ddd04"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_armv7l.whl", hash = "sha256:2a60ad3e2553a74168d275a0ef35e8c0a965448ffbc3b300ab3a5bb9956c2162"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:662dd62358bdeaca0aee5761de8727cfd6861432e3bb828dc2a693aa0471a563"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:25a1f88b471b3bc911d18b935ecb7115dff3a192b6fef46f0bfaf71ff4f12418"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:f60f0ac7005b9f5a6091009b09a419ace1610e163fa5deaba5ce3484341840e7"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:74acd6e291f885678631b7ebc85d2d4aec458dd849b8c841b57ef04047833bed"}, - {file = "propcache-0.2.0-cp38-cp38-win32.whl", hash = "sha256:d9b6ddac6408194e934002a69bcaadbc88c10b5f38fb9307779d1c629181815d"}, - {file = "propcache-0.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:676135dcf3262c9c5081cc8f19ad55c8a64e3f7282a21266d05544450bffc3a5"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:25c8d773a62ce0451b020c7b29a35cfbc05de8b291163a7a0f3b7904f27253e6"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:375a12d7556d462dc64d70475a9ee5982465fbb3d2b364f16b86ba9135793638"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1ec43d76b9677637a89d6ab86e1fef70d739217fefa208c65352ecf0282be957"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f45eec587dafd4b2d41ac189c2156461ebd0c1082d2fe7013571598abb8505d1"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc092ba439d91df90aea38168e11f75c655880c12782facf5cf9c00f3d42b562"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fa1076244f54bb76e65e22cb6910365779d5c3d71d1f18b275f1dfc7b0d71b4d"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:682a7c79a2fbf40f5dbb1eb6bfe2cd865376deeac65acf9beb607505dced9e12"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e40876731f99b6f3c897b66b803c9e1c07a989b366c6b5b475fafd1f7ba3fb8"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:363ea8cd3c5cb6679f1c2f5f1f9669587361c062e4899fce56758efa928728f8"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:140fbf08ab3588b3468932974a9331aff43c0ab8a2ec2c608b6d7d1756dbb6cb"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:e70fac33e8b4ac63dfc4c956fd7d85a0b1139adcfc0d964ce288b7c527537fea"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b33d7a286c0dc1a15f5fc864cc48ae92a846df287ceac2dd499926c3801054a6"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:f6d5749fdd33d90e34c2efb174c7e236829147a2713334d708746e94c4bde40d"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:22aa8f2272d81d9317ff5756bb108021a056805ce63dd3630e27d042c8092798"}, - {file = "propcache-0.2.0-cp39-cp39-win32.whl", hash = "sha256:73e4b40ea0eda421b115248d7e79b59214411109a5bc47d0d48e4c73e3b8fcf9"}, - {file = "propcache-0.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:9517d5e9e0731957468c29dbfd0f976736a0e55afaea843726e887f36fe017df"}, - {file = "propcache-0.2.0-py3-none-any.whl", hash = "sha256:2ccc28197af5313706511fab3a8b66dcd6da067a1331372c82ea1cb74285e036"}, - {file = "propcache-0.2.0.tar.gz", hash = "sha256:df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6b3f39a85d671436ee3d12c017f8fdea38509e4f25b28eb25877293c98c243f6"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d51fbe4285d5db5d92a929e3e21536ea3dd43732c5b177c7ef03f918dff9f2"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6445804cf4ec763dc70de65a3b0d9954e868609e83850a47ca4f0cb64bd79fea"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9479aa06a793c5aeba49ce5c5692ffb51fcd9a7016e017d555d5e2b0045d212"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9631c5e8b5b3a0fda99cb0d29c18133bca1e18aea9effe55adb3da1adef80d3"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3156628250f46a0895f1f36e1d4fbe062a1af8718ec3ebeb746f1d23f0c5dc4d"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b6fb63ae352e13748289f04f37868099e69dba4c2b3e271c46061e82c745634"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:887d9b0a65404929641a9fabb6452b07fe4572b269d901d622d8a34a4e9043b2"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a96dc1fa45bd8c407a0af03b2d5218392729e1822b0c32e62c5bf7eeb5fb3958"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a7e65eb5c003a303b94aa2c3852ef130230ec79e349632d030e9571b87c4698c"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:999779addc413181912e984b942fbcc951be1f5b3663cd80b2687758f434c583"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:19a0f89a7bb9d8048d9c4370c9c543c396e894c76be5525f5e1ad287f1750ddf"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1ac2f5fe02fa75f56e1ad473f1175e11f475606ec9bd0be2e78e4734ad575034"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:574faa3b79e8ebac7cb1d7930f51184ba1ccf69adfdec53a12f319a06030a68b"}, + {file = "propcache-0.2.1-cp310-cp310-win32.whl", hash = "sha256:03ff9d3f665769b2a85e6157ac8b439644f2d7fd17615a82fa55739bc97863f4"}, + {file = "propcache-0.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:2d3af2e79991102678f53e0dbf4c35de99b6b8b58f29a27ca0325816364caaba"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ffc3cca89bb438fb9c95c13fc874012f7b9466b89328c3c8b1aa93cdcfadd16"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f174bbd484294ed9fdf09437f889f95807e5f229d5d93588d34e92106fbf6717"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:70693319e0b8fd35dd863e3e29513875eb15c51945bf32519ef52927ca883bc3"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b480c6a4e1138e1aa137c0079b9b6305ec6dcc1098a8ca5196283e8a49df95a9"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d27b84d5880f6d8aa9ae3edb253c59d9f6642ffbb2c889b78b60361eed449787"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:857112b22acd417c40fa4595db2fe28ab900c8c5fe4670c7989b1c0230955465"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf6c4150f8c0e32d241436526f3c3f9cbd34429492abddbada2ffcff506c51af"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66d4cfda1d8ed687daa4bc0274fcfd5267873db9a5bc0418c2da19273040eeb7"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c2f992c07c0fca81655066705beae35fc95a2fa7366467366db627d9f2ee097f"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:4a571d97dbe66ef38e472703067021b1467025ec85707d57e78711c085984e54"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:bb6178c241278d5fe853b3de743087be7f5f4c6f7d6d22a3b524d323eecec505"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ad1af54a62ffe39cf34db1aa6ed1a1873bd548f6401db39d8e7cd060b9211f82"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e7048abd75fe40712005bcfc06bb44b9dfcd8e101dda2ecf2f5aa46115ad07ca"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:160291c60081f23ee43d44b08a7e5fb76681221a8e10b3139618c5a9a291b84e"}, + {file = "propcache-0.2.1-cp311-cp311-win32.whl", hash = "sha256:819ce3b883b7576ca28da3861c7e1a88afd08cc8c96908e08a3f4dd64a228034"}, + {file = "propcache-0.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:edc9fc7051e3350643ad929df55c451899bb9ae6d24998a949d2e4c87fb596d3"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:081a430aa8d5e8876c6909b67bd2d937bfd531b0382d3fdedb82612c618bc41a"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d2ccec9ac47cf4e04897619c0e0c1a48c54a71bdf045117d3a26f80d38ab1fb0"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:14d86fe14b7e04fa306e0c43cdbeebe6b2c2156a0c9ce56b815faacc193e320d"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:049324ee97bb67285b49632132db351b41e77833678432be52bdd0289c0e05e4"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1cd9a1d071158de1cc1c71a26014dcdfa7dd3d5f4f88c298c7f90ad6f27bb46d"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98110aa363f1bb4c073e8dcfaefd3a5cea0f0834c2aab23dda657e4dab2f53b5"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:647894f5ae99c4cf6bb82a1bb3a796f6e06af3caa3d32e26d2350d0e3e3faf24"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd3223c15bebe26518d58ccf9a39b93948d3dcb3e57a20480dfdd315356baff"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d71264a80f3fcf512eb4f18f59423fe82d6e346ee97b90625f283df56aee103f"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:e73091191e4280403bde6c9a52a6999d69cdfde498f1fdf629105247599b57ec"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3935bfa5fede35fb202c4b569bb9c042f337ca4ff7bd540a0aa5e37131659348"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f508b0491767bb1f2b87fdfacaba5f7eddc2f867740ec69ece6d1946d29029a6"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1672137af7c46662a1c2be1e8dc78cb6d224319aaa40271c9257d886be4363a6"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b74c261802d3d2b85c9df2dfb2fa81b6f90deeef63c2db9f0e029a3cac50b518"}, + {file = "propcache-0.2.1-cp312-cp312-win32.whl", hash = "sha256:d09c333d36c1409d56a9d29b3a1b800a42c76a57a5a8907eacdbce3f18768246"}, + {file = "propcache-0.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:c214999039d4f2a5b2073ac506bba279945233da8c786e490d411dfc30f855c1"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aca405706e0b0a44cc6bfd41fbe89919a6a56999157f6de7e182a990c36e37bc"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:12d1083f001ace206fe34b6bdc2cb94be66d57a850866f0b908972f90996b3e9"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d93f3307ad32a27bda2e88ec81134b823c240aa3abb55821a8da553eed8d9439"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba278acf14471d36316159c94a802933d10b6a1e117b8554fe0d0d9b75c9d536"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4e6281aedfca15301c41f74d7005e6e3f4ca143584ba696ac69df4f02f40d629"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5b750a8e5a1262434fb1517ddf64b5de58327f1adc3524a5e44c2ca43305eb0b"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf72af5e0fb40e9babf594308911436c8efde3cb5e75b6f206c34ad18be5c052"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2d0a12018b04f4cb820781ec0dffb5f7c7c1d2a5cd22bff7fb055a2cb19ebce"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e800776a79a5aabdb17dcc2346a7d66d0777e942e4cd251defeb084762ecd17d"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:4160d9283bd382fa6c0c2b5e017acc95bc183570cd70968b9202ad6d8fc48dce"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:30b43e74f1359353341a7adb783c8f1b1c676367b011709f466f42fda2045e95"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:58791550b27d5488b1bb52bc96328456095d96206a250d28d874fafe11b3dfaf"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:0f022d381747f0dfe27e99d928e31bc51a18b65bb9e481ae0af1380a6725dd1f"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:297878dc9d0a334358f9b608b56d02e72899f3b8499fc6044133f0d319e2ec30"}, + {file = "propcache-0.2.1-cp313-cp313-win32.whl", hash = "sha256:ddfab44e4489bd79bda09d84c430677fc7f0a4939a73d2bba3073036f487a0a6"}, + {file = "propcache-0.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:556fc6c10989f19a179e4321e5d678db8eb2924131e64652a51fe83e4c3db0e1"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6a9a8c34fb7bb609419a211e59da8887eeca40d300b5ea8e56af98f6fbbb1541"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ae1aa1cd222c6d205853b3013c69cd04515f9d6ab6de4b0603e2e1c33221303e"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:accb6150ce61c9c4b7738d45550806aa2b71c7668c6942f17b0ac182b6142fd4"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5eee736daafa7af6d0a2dc15cc75e05c64f37fc37bafef2e00d77c14171c2097"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7a31fc1e1bd362874863fdeed71aed92d348f5336fd84f2197ba40c59f061bd"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba4cfa1052819d16699e1d55d18c92b6e094d4517c41dd231a8b9f87b6fa681"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f089118d584e859c62b3da0892b88a83d611c2033ac410e929cb6754eec0ed16"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:781e65134efaf88feb447e8c97a51772aa75e48b794352f94cb7ea717dedda0d"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:31f5af773530fd3c658b32b6bdc2d0838543de70eb9a2156c03e410f7b0d3aae"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:a7a078f5d37bee6690959c813977da5291b24286e7b962e62a94cec31aa5188b"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:cea7daf9fc7ae6687cf1e2c049752f19f146fdc37c2cc376e7d0032cf4f25347"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:8b3489ff1ed1e8315674d0775dc7d2195fb13ca17b3808721b54dbe9fd020faf"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:9403db39be1393618dd80c746cb22ccda168efce239c73af13c3763ef56ffc04"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5d97151bc92d2b2578ff7ce779cdb9174337390a535953cbb9452fb65164c587"}, + {file = "propcache-0.2.1-cp39-cp39-win32.whl", hash = "sha256:9caac6b54914bdf41bcc91e7eb9147d331d29235a7c967c150ef5df6464fd1bb"}, + {file = "propcache-0.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:92fc4500fcb33899b05ba73276dfb684a20d31caa567b7cb5252d48f896a91b1"}, + {file = "propcache-0.2.1-py3-none-any.whl", hash = "sha256:52277518d6aae65536e9cea52d4e7fd2f7a66f4aa2d30ed3f2fcea620ace3c54"}, + {file = "propcache-0.2.1.tar.gz", hash = "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64"}, ] [[package]] @@ -878,18 +849,18 @@ files = [ [[package]] name = "pydantic" -version = "2.10.2" +version = "2.10.4" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.10.2-py3-none-any.whl", hash = "sha256:cfb96e45951117c3024e6b67b25cdc33a3cb7b2fa62e239f7af1378358a1d99e"}, - {file = "pydantic-2.10.2.tar.gz", hash = "sha256:2bc2d7f17232e0841cbba4641e65ba1eb6fafb3a08de3a091ff3ce14a197c4fa"}, + {file = "pydantic-2.10.4-py3-none-any.whl", hash = "sha256:597e135ea68be3a37552fb524bc7d0d66dcf93d395acd93a00682f1efcb8ee3d"}, + {file = "pydantic-2.10.4.tar.gz", hash = "sha256:82f12e9723da6de4fe2ba888b5971157b3be7ad914267dea8f05f82b28254f06"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.27.1" +pydantic-core = "2.27.2" typing-extensions = ">=4.12.2" [package.extras] @@ -898,111 +869,111 @@ timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.27.1" +version = "2.27.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"}, - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"}, - {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"}, - {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"}, - {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"}, - {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"}, - {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"}, - {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"}, - {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"}, - {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"}, - {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"}, - {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"}, - {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"}, - {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"}, - {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"}, - {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"}, - {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"}, - {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"}, + {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"}, ] [package.dependencies] @@ -1021,13 +992,13 @@ files = [ [[package]] name = "pytest" -version = "8.3.3" +version = "8.3.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, - {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, + {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, + {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, ] [package.dependencies] @@ -1210,13 +1181,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.3" +version = "2.3.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, - {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, + {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, + {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, ] [package.extras] @@ -1244,13 +1215,13 @@ watchdog = ["watchdog (>=2.3)"] [[package]] name = "win32-setctime" -version = "1.1.0" +version = "1.2.0" description = "A small Python utility to set file creation time on Windows" optional = false python-versions = ">=3.5" files = [ - {file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"}, - {file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"}, + {file = "win32_setctime-1.2.0-py3-none-any.whl", hash = "sha256:95d644c4e708aba81dc3704a116d8cbc974d70b3bdb8be1d150e36be6e9d1390"}, + {file = "win32_setctime-1.2.0.tar.gz", hash = "sha256:ae1fdf948f5640aae05c511ade119313fb6a30d7eabe25fef9764dca5873c4c0"}, ] [package.extras] @@ -1272,93 +1243,93 @@ h11 = ">=0.9.0,<1" [[package]] name = "yarl" -version = "1.18.0" +version = "1.18.3" description = "Yet another URL library" optional = false python-versions = ">=3.9" files = [ - {file = "yarl-1.18.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:074fee89caab89a97e18ef5f29060ef61ba3cae6cd77673acc54bfdd3214b7b7"}, - {file = "yarl-1.18.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b026cf2c32daf48d90c0c4e406815c3f8f4cfe0c6dfccb094a9add1ff6a0e41a"}, - {file = "yarl-1.18.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ae38bd86eae3ba3d2ce5636cc9e23c80c9db2e9cb557e40b98153ed102b5a736"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:685cc37f3f307c6a8e879986c6d85328f4c637f002e219f50e2ef66f7e062c1d"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8254dbfce84ee5d1e81051ee7a0f1536c108ba294c0fdb5933476398df0654f3"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:20de4a8b04de70c49698dc2390b7fd2d18d424d3b876371f9b775e2b462d4b41"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0a2074a37285570d54b55820687de3d2f2b9ecf1b714e482e48c9e7c0402038"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f576ed278860df2721a5d57da3381040176ef1d07def9688a385c8330db61a1"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3a3709450a574d61be6ac53d582496014342ea34876af8dc17cc16da32826c9a"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:bd80ed29761490c622edde5dd70537ca8c992c2952eb62ed46984f8eff66d6e8"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:32141e13a1d5a48525e519c9197d3f4d9744d818d5c7d6547524cc9eccc8971e"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8b8d3e4e014fb4274f1c5bf61511d2199e263909fb0b8bda2a7428b0894e8dc6"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:701bb4a8f4de191c8c0cc9a1e6d5142f4df880e9d1210e333b829ca9425570ed"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a45d94075ac0647621eaaf693c8751813a3eccac455d423f473ffed38c8ac5c9"}, - {file = "yarl-1.18.0-cp310-cp310-win32.whl", hash = "sha256:34176bfb082add67cb2a20abd85854165540891147f88b687a5ed0dc225750a0"}, - {file = "yarl-1.18.0-cp310-cp310-win_amd64.whl", hash = "sha256:73553bbeea7d6ec88c08ad8027f4e992798f0abc459361bf06641c71972794dc"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b8e8c516dc4e1a51d86ac975b0350735007e554c962281c432eaa5822aa9765c"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2e6b4466714a73f5251d84b471475850954f1fa6acce4d3f404da1d55d644c34"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c893f8c1a6d48b25961e00922724732d00b39de8bb0b451307482dc87bddcd74"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13aaf2bdbc8c86ddce48626b15f4987f22e80d898818d735b20bd58f17292ee8"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd21c0128e301851de51bc607b0a6da50e82dc34e9601f4b508d08cc89ee7929"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:205de377bd23365cd85562c9c6c33844050a93661640fda38e0567d2826b50df"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed69af4fe2a0949b1ea1d012bf065c77b4c7822bad4737f17807af2adb15a73c"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e1c18890091aa3cc8a77967943476b729dc2016f4cfe11e45d89b12519d4a93"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:91b8fb9427e33f83ca2ba9501221ffaac1ecf0407f758c4d2f283c523da185ee"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:536a7a8a53b75b2e98ff96edb2dfb91a26b81c4fed82782035767db5a465be46"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a64619a9c47c25582190af38e9eb382279ad42e1f06034f14d794670796016c0"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c73a6bbc97ba1b5a0c3c992ae93d721c395bdbb120492759b94cc1ac71bc6350"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a173401d7821a2a81c7b47d4e7d5c4021375a1441af0c58611c1957445055056"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7520e799b1f84e095cce919bd6c23c9d49472deeef25fe1ef960b04cca51c3fc"}, - {file = "yarl-1.18.0-cp311-cp311-win32.whl", hash = "sha256:c4cb992d8090d5ae5f7afa6754d7211c578be0c45f54d3d94f7781c495d56716"}, - {file = "yarl-1.18.0-cp311-cp311-win_amd64.whl", hash = "sha256:52c136f348605974c9b1c878addd6b7a60e3bf2245833e370862009b86fa4689"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1ece25e2251c28bab737bdf0519c88189b3dd9492dc086a1d77336d940c28ced"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:454902dc1830d935c90b5b53c863ba2a98dcde0fbaa31ca2ed1ad33b2a7171c6"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:01be8688fc211dc237e628fcc209dda412d35de7642453059a0553747018d075"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d26f1fa9fa2167bb238f6f4b20218eb4e88dd3ef21bb8f97439fa6b5313e30d"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b234a4a9248a9f000b7a5dfe84b8cb6210ee5120ae70eb72a4dcbdb4c528f72f"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe94d1de77c4cd8caff1bd5480e22342dbd54c93929f5943495d9c1e8abe9f42"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b4c90c5363c6b0a54188122b61edb919c2cd1119684999d08cd5e538813a28e"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49a98ecadc5a241c9ba06de08127ee4796e1009555efd791bac514207862b43d"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9106025c7f261f9f5144f9aa7681d43867eed06349a7cfb297a1bc804de2f0d1"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f275ede6199d0f1ed4ea5d55a7b7573ccd40d97aee7808559e1298fe6efc8dbd"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f7edeb1dcc7f50a2c8e08b9dc13a413903b7817e72273f00878cb70e766bdb3b"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c083f6dd6951b86e484ebfc9c3524b49bcaa9c420cb4b2a78ef9f7a512bfcc85"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:80741ec5b471fbdfb997821b2842c59660a1c930ceb42f8a84ba8ca0f25a66aa"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b1a3297b9cad594e1ff0c040d2881d7d3a74124a3c73e00c3c71526a1234a9f7"}, - {file = "yarl-1.18.0-cp312-cp312-win32.whl", hash = "sha256:cd6ab7d6776c186f544f893b45ee0c883542b35e8a493db74665d2e594d3ca75"}, - {file = "yarl-1.18.0-cp312-cp312-win_amd64.whl", hash = "sha256:039c299a0864d1f43c3e31570045635034ea7021db41bf4842693a72aca8df3a"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6fb64dd45453225f57d82c4764818d7a205ee31ce193e9f0086e493916bd4f72"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:3adaaf9c6b1b4fc258584f4443f24d775a2086aee82d1387e48a8b4f3d6aecf6"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:da206d1ec78438a563c5429ab808a2b23ad7bc025c8adbf08540dde202be37d5"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:576d258b21c1db4c6449b1c572c75d03f16a482eb380be8003682bdbe7db2f28"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c60e547c0a375c4bfcdd60eef82e7e0e8698bf84c239d715f5c1278a73050393"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e3818eabaefb90adeb5e0f62f047310079d426387991106d4fbf3519eec7d90a"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5f72421246c21af6a92fbc8c13b6d4c5427dfd949049b937c3b731f2f9076bd"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7fa7d37f2ada0f42e0723632993ed422f2a679af0e200874d9d861720a54f53e"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:42ba84e2ac26a3f252715f8ec17e6fdc0cbf95b9617c5367579fafcd7fba50eb"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:6a49ad0102c0f0ba839628d0bf45973c86ce7b590cdedf7540d5b1833ddc6f00"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:96404e8d5e1bbe36bdaa84ef89dc36f0e75939e060ca5cd45451aba01db02902"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a0509475d714df8f6d498935b3f307cd122c4ca76f7d426c7e1bb791bcd87eda"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:1ff116f0285b5c8b3b9a2680aeca29a858b3b9e0402fc79fd850b32c2bcb9f8b"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e2580c1d7e66e6d29d6e11855e3b1c6381971e0edd9a5066e6c14d79bc8967af"}, - {file = "yarl-1.18.0-cp313-cp313-win32.whl", hash = "sha256:14408cc4d34e202caba7b5ac9cc84700e3421a9e2d1b157d744d101b061a4a88"}, - {file = "yarl-1.18.0-cp313-cp313-win_amd64.whl", hash = "sha256:1db1537e9cb846eb0ff206eac667f627794be8b71368c1ab3207ec7b6f8c5afc"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:fa2c9cb607e0f660d48c54a63de7a9b36fef62f6b8bd50ff592ce1137e73ac7d"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c0f4808644baf0a434a3442df5e0bedf8d05208f0719cedcd499e168b23bfdc4"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7db9584235895a1dffca17e1c634b13870852094f6389b68dcc6338086aa7b08"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:309f8d27d6f93ceeeb80aa6980e883aa57895270f7f41842b92247e65d7aeddf"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:609ffd44fed2ed88d9b4ef62ee860cf86446cf066333ad4ce4123505b819e581"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f172b8b2c72a13a06ea49225a9c47079549036ad1b34afa12d5491b881f5b993"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d89ae7de94631b60d468412c18290d358a9d805182373d804ec839978b120422"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:466d31fd043ef9af822ee3f1df8fdff4e8c199a7f4012c2642006af240eade17"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7609b8462351c4836b3edce4201acb6dd46187b207c589b30a87ffd1813b48dc"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:d9d4f5e471e8dc49b593a80766c2328257e405f943c56a3dc985c125732bc4cf"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:67b336c15e564d76869c9a21316f90edf546809a5796a083b8f57c845056bc01"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b212452b80cae26cb767aa045b051740e464c5129b7bd739c58fbb7deb339e7b"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:38b39b7b3e692b6c92b986b00137a3891eddb66311b229d1940dcbd4f025083c"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a7ee6884a8848792d58b854946b685521f41d8871afa65e0d4a774954e9c9e89"}, - {file = "yarl-1.18.0-cp39-cp39-win32.whl", hash = "sha256:b4095c5019bb889aa866bf12ed4c85c0daea5aafcb7c20d1519f02a1e738f07f"}, - {file = "yarl-1.18.0-cp39-cp39-win_amd64.whl", hash = "sha256:2d90f2e4d16a5b0915ee065218b435d2ef619dd228973b1b47d262a6f7cd8fa5"}, - {file = "yarl-1.18.0-py3-none-any.whl", hash = "sha256:dbf53db46f7cf176ee01d8d98c39381440776fcda13779d269a8ba664f69bec0"}, - {file = "yarl-1.18.0.tar.gz", hash = "sha256:20d95535e7d833889982bfe7cc321b7f63bf8879788fee982c76ae2b24cfb715"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7df647e8edd71f000a5208fe6ff8c382a1de8edfbccdbbfe649d263de07d8c34"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c69697d3adff5aa4f874b19c0e4ed65180ceed6318ec856ebc423aa5850d84f7"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:602d98f2c2d929f8e697ed274fbadc09902c4025c5a9963bf4e9edfc3ab6f7ed"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c654d5207c78e0bd6d749f6dae1dcbbfde3403ad3a4b11f3c5544d9906969dde"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5094d9206c64181d0f6e76ebd8fb2f8fe274950a63890ee9e0ebfd58bf9d787b"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35098b24e0327fc4ebdc8ffe336cee0a87a700c24ffed13161af80124b7dc8e5"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3236da9272872443f81fedc389bace88408f64f89f75d1bdb2256069a8730ccc"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2c08cc9b16f4f4bc522771d96734c7901e7ebef70c6c5c35dd0f10845270bcd"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:80316a8bd5109320d38eef8833ccf5f89608c9107d02d2a7f985f98ed6876990"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:c1e1cc06da1491e6734f0ea1e6294ce00792193c463350626571c287c9a704db"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fea09ca13323376a2fdfb353a5fa2e59f90cd18d7ca4eaa1fd31f0a8b4f91e62"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e3b9fd71836999aad54084906f8663dffcd2a7fb5cdafd6c37713b2e72be1760"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:757e81cae69244257d125ff31663249b3013b5dc0a8520d73694aed497fb195b"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b1771de9944d875f1b98a745bc547e684b863abf8f8287da8466cf470ef52690"}, + {file = "yarl-1.18.3-cp310-cp310-win32.whl", hash = "sha256:8874027a53e3aea659a6d62751800cf6e63314c160fd607489ba5c2edd753cf6"}, + {file = "yarl-1.18.3-cp310-cp310-win_amd64.whl", hash = "sha256:93b2e109287f93db79210f86deb6b9bbb81ac32fc97236b16f7433db7fc437d8"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8503ad47387b8ebd39cbbbdf0bf113e17330ffd339ba1144074da24c545f0069"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:02ddb6756f8f4517a2d5e99d8b2f272488e18dd0bfbc802f31c16c6c20f22193"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:67a283dd2882ac98cc6318384f565bffc751ab564605959df4752d42483ad889"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d980e0325b6eddc81331d3f4551e2a333999fb176fd153e075c6d1c2530aa8a8"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b643562c12680b01e17239be267bc306bbc6aac1f34f6444d1bded0c5ce438ca"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c017a3b6df3a1bd45b9fa49a0f54005e53fbcad16633870104b66fa1a30a29d8"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75674776d96d7b851b6498f17824ba17849d790a44d282929c42dbb77d4f17ae"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ccaa3a4b521b780a7e771cc336a2dba389a0861592bbce09a476190bb0c8b4b3"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2d06d3005e668744e11ed80812e61efd77d70bb7f03e33c1598c301eea20efbb"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:9d41beda9dc97ca9ab0b9888cb71f7539124bc05df02c0cff6e5acc5a19dcc6e"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ba23302c0c61a9999784e73809427c9dbedd79f66a13d84ad1b1943802eaaf59"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6748dbf9bfa5ba1afcc7556b71cda0d7ce5f24768043a02a58846e4a443d808d"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0b0cad37311123211dc91eadcb322ef4d4a66008d3e1bdc404808992260e1a0e"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0fb2171a4486bb075316ee754c6d8382ea6eb8b399d4ec62fde2b591f879778a"}, + {file = "yarl-1.18.3-cp311-cp311-win32.whl", hash = "sha256:61b1a825a13bef4a5f10b1885245377d3cd0bf87cba068e1d9a88c2ae36880e1"}, + {file = "yarl-1.18.3-cp311-cp311-win_amd64.whl", hash = "sha256:b9d60031cf568c627d028239693fd718025719c02c9f55df0a53e587aab951b5"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1dd4bdd05407ced96fed3d7f25dbbf88d2ffb045a0db60dbc247f5b3c5c25d50"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7c33dd1931a95e5d9a772d0ac5e44cac8957eaf58e3c8da8c1414de7dd27c576"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:25b411eddcfd56a2f0cd6a384e9f4f7aa3efee14b188de13048c25b5e91f1640"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436c4fc0a4d66b2badc6c5fc5ef4e47bb10e4fd9bf0c79524ac719a01f3607c2"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e35ef8683211db69ffe129a25d5634319a677570ab6b2eba4afa860f54eeaf75"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84b2deecba4a3f1a398df819151eb72d29bfeb3b69abb145a00ddc8d30094512"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00e5a1fea0fd4f5bfa7440a47eff01d9822a65b4488f7cff83155a0f31a2ecba"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0e883008013c0e4aef84dcfe2a0b172c4d23c2669412cf5b3371003941f72bb"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5a3f356548e34a70b0172d8890006c37be92995f62d95a07b4a42e90fba54272"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ccd17349166b1bee6e529b4add61727d3f55edb7babbe4069b5764c9587a8cc6"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b958ddd075ddba5b09bb0be8a6d9906d2ce933aee81100db289badbeb966f54e"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c7d79f7d9aabd6011004e33b22bc13056a3e3fb54794d138af57f5ee9d9032cb"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4891ed92157e5430874dad17b15eb1fda57627710756c27422200c52d8a4e393"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ce1af883b94304f493698b00d0f006d56aea98aeb49d75ec7d98cd4a777e9285"}, + {file = "yarl-1.18.3-cp312-cp312-win32.whl", hash = "sha256:f91c4803173928a25e1a55b943c81f55b8872f0018be83e3ad4938adffb77dd2"}, + {file = "yarl-1.18.3-cp312-cp312-win_amd64.whl", hash = "sha256:7e2ee16578af3b52ac2f334c3b1f92262f47e02cc6193c598502bd46f5cd1477"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:90adb47ad432332d4f0bc28f83a5963f426ce9a1a8809f5e584e704b82685dcb"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:913829534200eb0f789d45349e55203a091f45c37a2674678744ae52fae23efa"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ef9f7768395923c3039055c14334ba4d926f3baf7b776c923c93d80195624782"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88a19f62ff30117e706ebc9090b8ecc79aeb77d0b1f5ec10d2d27a12bc9f66d0"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e17c9361d46a4d5addf777c6dd5eab0715a7684c2f11b88c67ac37edfba6c482"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a74a13a4c857a84a845505fd2d68e54826a2cd01935a96efb1e9d86c728e186"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41f7ce59d6ee7741af71d82020346af364949314ed3d87553763a2df1829cc58"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f52a265001d830bc425f82ca9eabda94a64a4d753b07d623a9f2863fde532b53"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:82123d0c954dc58db301f5021a01854a85bf1f3bb7d12ae0c01afc414a882ca2"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:2ec9bbba33b2d00999af4631a3397d1fd78290c48e2a3e52d8dd72db3a067ac8"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fbd6748e8ab9b41171bb95c6142faf068f5ef1511935a0aa07025438dd9a9bc1"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:877d209b6aebeb5b16c42cbb377f5f94d9e556626b1bfff66d7b0d115be88d0a"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b464c4ab4bfcb41e3bfd3f1c26600d038376c2de3297760dfe064d2cb7ea8e10"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8d39d351e7faf01483cc7ff7c0213c412e38e5a340238826be7e0e4da450fdc8"}, + {file = "yarl-1.18.3-cp313-cp313-win32.whl", hash = "sha256:61ee62ead9b68b9123ec24bc866cbef297dd266175d53296e2db5e7f797f902d"}, + {file = "yarl-1.18.3-cp313-cp313-win_amd64.whl", hash = "sha256:578e281c393af575879990861823ef19d66e2b1d0098414855dd367e234f5b3c"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:61e5e68cb65ac8f547f6b5ef933f510134a6bf31bb178be428994b0cb46c2a04"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe57328fbc1bfd0bd0514470ac692630f3901c0ee39052ae47acd1d90a436719"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a440a2a624683108a1b454705ecd7afc1c3438a08e890a1513d468671d90a04e"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09c7907c8548bcd6ab860e5f513e727c53b4a714f459b084f6580b49fa1b9cee"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b4f6450109834af88cb4cc5ecddfc5380ebb9c228695afc11915a0bf82116789"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9ca04806f3be0ac6d558fffc2fdf8fcef767e0489d2684a21912cc4ed0cd1b8"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77a6e85b90a7641d2e07184df5557132a337f136250caafc9ccaa4a2a998ca2c"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6333c5a377c8e2f5fae35e7b8f145c617b02c939d04110c76f29ee3676b5f9a5"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0b3c92fa08759dbf12b3a59579a4096ba9af8dd344d9a813fc7f5070d86bbab1"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:4ac515b860c36becb81bb84b667466885096b5fc85596948548b667da3bf9f24"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:045b8482ce9483ada4f3f23b3774f4e1bf4f23a2d5c912ed5170f68efb053318"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:a4bb030cf46a434ec0225bddbebd4b89e6471814ca851abb8696170adb163985"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:54d6921f07555713b9300bee9c50fb46e57e2e639027089b1d795ecd9f7fa910"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1d407181cfa6e70077df3377938c08012d18893f9f20e92f7d2f314a437c30b1"}, + {file = "yarl-1.18.3-cp39-cp39-win32.whl", hash = "sha256:ac36703a585e0929b032fbaab0707b75dc12703766d0b53486eabd5139ebadd5"}, + {file = "yarl-1.18.3-cp39-cp39-win_amd64.whl", hash = "sha256:ba87babd629f8af77f557b61e49e7c7cac36f22f871156b91e10a6e9d4f829e9"}, + {file = "yarl-1.18.3-py3-none-any.whl", hash = "sha256:b57f4f58099328dfb26c6a771d09fb20dbbae81d20cfb66141251ea063bd101b"}, + {file = "yarl-1.18.3.tar.gz", hash = "sha256:ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1"}, ] [package.dependencies] diff --git a/poetry.lock b/poetry.lock index 931e8a49a20e..a27f8b4a93df 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "aiodns" @@ -38,87 +38,87 @@ files = [ [[package]] name = "aiohttp" -version = "3.11.8" +version = "3.11.11" description = "Async http client/server framework (asyncio)" optional = true python-versions = ">=3.9" files = [ - {file = "aiohttp-3.11.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2d2ca685c6a851ce64e511fbcb906e4dd97d13e567ca7ecb5cb30b184e15dc6d"}, - {file = "aiohttp-3.11.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52913bb8a0a72a57479f54b281300c9d23036aa9aa3ebbc9a32a643484eadfc2"}, - {file = "aiohttp-3.11.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:35dafc70051b6cbd6dafb533b4e3f0df6225a4896be373ef86367b2987409331"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:561b9596a9f90266673ef0b950c27e04ab597cdb53785e2ac91b83b33c31b509"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d479c1fdcc920056a06d04059db52eb8590ecbbb3acdcaeeea26a88ff782e94a"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9ce8eb6444bb6e862feca664ce365afa8e2e32db24dcf1a502719a8a002f9274"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df9bf08eb93611b1d4d6245b6fecf88728e90eece00e00d554e1b0c445557d83"}, - {file = "aiohttp-3.11.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a20ddaa58fea717177fac9a4a1fb8b39be868aa4fed2af6de4313b7a08f0f71"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9f4aadfea6b48cfa17aef1a68ba6bee5a0246374f5a588e299a4f4ff5bd1c77b"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:aa7deebb4bc5143745e6282139d7b9de50beb6d06609df64d2c993ef496bc7eb"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fe503a76b9e3a13b62e64545693c9463afe9d429e0909120f7bb66de91ed8bc2"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1c5838a68e31712354129add1b5fe32b06aa05275f835130edc650e6288af05f"}, - {file = "aiohttp-3.11.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:832e58d9454fe501b0d092cdf660c0e34e16005f61acd06e1c79b0fc45019c94"}, - {file = "aiohttp-3.11.8-cp310-cp310-win32.whl", hash = "sha256:00618c37a350884c08e87cf9a6532be274d564227ac49e0b474cf41f27e1f190"}, - {file = "aiohttp-3.11.8-cp310-cp310-win_amd64.whl", hash = "sha256:8eeaac75203da1a54afe1faea3c855a1973026b54929112aa9b67bceadbcb0ca"}, - {file = "aiohttp-3.11.8-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f8dd02b44555893adfe7cc4b3b454fee04f9dcec45cf66ef5bb53ebf393f0505"}, - {file = "aiohttp-3.11.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:658052941324edea3dee1f681375e70779f55e437e07bdfc4b5bbe65ad53cefb"}, - {file = "aiohttp-3.11.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6c829471a9e2266da4a0666f8a9e215f19320f79778af379c1c7db324ac24ed2"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d21951756690f5d86d0215da38eb0fd65def03b5e2a1c08a4a39718a6d0d48f2"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2fa50ddc6b21cc1ae23e13524d6f75b27e279fdf5cf905b2df6fd171891ac4e2"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a5afbd805e449048ecebb1a256176e953d4ca9e48bab387d4d1c8524f1c7a95"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea68db69f2a4ddc24b28b8e754fc0b963ed7f9b9a76137f06fe44643d6821fbd"}, - {file = "aiohttp-3.11.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80b3ac163145660ce660aed2f1005e6d4de840d39728990b7250525eeec4e4a8"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e9ac0cce897904b77e109e5403ed713187dbdf96832bfd061ac07164264be16c"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:3260c77cff4e35245bc517658bd54d7a64787f71f3c4f723877c82f22835b032"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f7fd9c11ffad6b022bf02a41a70418cb2ab3b33f2c27842a5999e3ab78daf280"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:16bda233a7b159ab08107e8858fedca90a9de287057fab54cafde51bd83f9819"}, - {file = "aiohttp-3.11.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4867008617bbf86e9fb5b00f72dd0e3a00a579b32233caff834320867f9b7cac"}, - {file = "aiohttp-3.11.8-cp311-cp311-win32.whl", hash = "sha256:17e6b9d8e29e3bfc7f893f327e92c9769d3582cee2fb1652c1431ac3f60115a0"}, - {file = "aiohttp-3.11.8-cp311-cp311-win_amd64.whl", hash = "sha256:7f3be4961a5c2c670f31caab7641a37ea2a97031f0d8ae15bcfd36b6bf273200"}, - {file = "aiohttp-3.11.8-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0e3b5bfef913d6be270c81976fbc0cbf66625cd92663bbb7e03b3adbd6aa4ac6"}, - {file = "aiohttp-3.11.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cb51a81cb637b9a072c9cfae1839e35c6579638861eb3479eb5d6e6ce8bc6782"}, - {file = "aiohttp-3.11.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:dd2ca84e5f7a35f313a62eb7d6a50bac6760b60bafce34586750712731c0aeff"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:47c6663df9446aa848b478413219600da4b54bc0409e1ac4bc80fb1a81501363"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c665ed4b52256614858b20711bbbd2755b0e19ec86870f8ff1645acf9ae9e760"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35d4545e7684da7a954ffc2dce495462cb16a902dffdebe98572408f6aaaee83"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85be3899e6860dd2cd3f4370ded6708e939d00d5ec922a8eb328d114db605a47"}, - {file = "aiohttp-3.11.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0ed9f1f2697713c48efc9ec483ad5d062e4aa91854f090a3eba0b19c002851d"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c0dbae99737badf3f5e862088a118e28d3b36f03eb608a6382eddfd68178e05b"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:beae08f900b2980af4353a0200eb162b39f276fd8a6e43079a540f83964671f4"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d6f9e5fd1b3ecbaca3e04a15a02d1fa213248608caee99fd5bdddd4759959cf7"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a7def89a41fe32120d89cd4577f5efbab3c52234c5890066ced8a2f7202dff88"}, - {file = "aiohttp-3.11.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:98f596cf59292e779bc387f22378a3d2c5e052c9fe2bf822ac4f547c6fe57758"}, - {file = "aiohttp-3.11.8-cp312-cp312-win32.whl", hash = "sha256:b64fa6b76b35b695cd3e5c42a4e568cbea8d41c9e59165e2a43da00976e2027e"}, - {file = "aiohttp-3.11.8-cp312-cp312-win_amd64.whl", hash = "sha256:afba47981ff73b1794c00dce774334dcfe62664b3b4f78f278b77d21ce9daf43"}, - {file = "aiohttp-3.11.8-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a81525430da5ca356fae6e889daeb6f5cc0d5f0cef88e59cdde48e2394ea1365"}, - {file = "aiohttp-3.11.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7565689e86a88c1d258351ebd14e343337b76a56ca5c0a2c1db96ec28149386f"}, - {file = "aiohttp-3.11.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d0f9dbe9763c014c408ad51a027dc9582518e992dc63e2ffe359ac1b4840a560"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8ca580edc3ccd7f6ea76ad9cf59f5a8756d338e770b5eda7be26bcda8fa7ef53"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7d141631a7348038fc7b5d1a81b3c9afa9aa056188ded7902fe754028fdea5c5"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64e6b14608a56a4c76c60daac730b0c0eeaf9d10dfc3231f7fc26521a0d628fd"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0983d0ce329f2f9dbeb355c3744bd6333f34e0dc56025b6b7d4f285b90acb51e"}, - {file = "aiohttp-3.11.8-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d96b93a46a3742880fa21bcb35c6c40cf27714ec0fb8ec85fe444d73b95131b9"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f4f1779c3142d913c509c2ed1de8b8f920e07a5cd65ac1f57c61cfb6bfded5a4"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:48be7cff468c9c0d86a02e6a826e1fe159094b16d5aa2c17703e7317f791b0f9"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:daea456b79ca2bacc7f062845bbb1139c3b3231fc83169da5a682cf385416dd1"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:c92e763cf641e10ad9342597d20060ba23de5e411aada96660e679e3f9371189"}, - {file = "aiohttp-3.11.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a750ee5a177e0f873d6b2d7d0fa6e1e7c658fc0ca8ea56438dcba2ac94bedb09"}, - {file = "aiohttp-3.11.8-cp313-cp313-win32.whl", hash = "sha256:4448c9c7f77bad48a6569062c0c16deb77fbb7363de1dc71ed087f66fb3b3c96"}, - {file = "aiohttp-3.11.8-cp313-cp313-win_amd64.whl", hash = "sha256:481075a1949de79a8a6841e0086f2f5f464785c592cf527ed0db2c0cbd0e1ba2"}, - {file = "aiohttp-3.11.8-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:72779bfb34d6d6b51e55a7f4901b410e416b5431738b367d49696928c91a2ca8"}, - {file = "aiohttp-3.11.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e6523f39071a01757048985e4cc22d04aa130bc40d9128503f3a61a3ee98328"}, - {file = "aiohttp-3.11.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:220bbce18b3046973465be45415430f1cab39d7fdc40cbcf0a8c05485c6902fe"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:336bbf7a33dd8cb4a7afb98c70e9935a81e5e88f7ac595ba2e84b1fb5da190d6"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c5e4f1ba5059b85e05c551961a448ce2689c6249ed6a2e2174796842c191d10"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e9f9fd5c672c962389429abd11ed32c9c93f7932fd58584cae1e43951b141c6b"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58bd94ad48143e1d42e05fc055da41de0a9933f378ad87760595b8aec83d317b"}, - {file = "aiohttp-3.11.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bf52642b12d70d78c18882915201bc5345f7c8f0f2ab8919d99b886aa6475a7"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fee12d8487b0df2b683424cca2a0d8fb7281d5607518d742e98119a74af01026"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:65fd04f1fea668ad1af48ac31b752000e222dccffedcad3de8ccf9d34489ccd3"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:c3f397e0511a0ec4fe331e602fc057dfd336d352062deb9969ebd81e253a149c"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:cf8f05f4abe3288fe2e106e1461fd20d8abf6103886ddfb6d746a5b8fb830d2b"}, - {file = "aiohttp-3.11.8-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7d71d4ac0792ff89541179394d303be846a0b6cd3821ae67286ee69ecec16f9f"}, - {file = "aiohttp-3.11.8-cp39-cp39-win32.whl", hash = "sha256:2b6f8716044ae5e5f2a3b4e4b6bfee48e97c8b2a92e56f43aadd728c7fd26b7d"}, - {file = "aiohttp-3.11.8-cp39-cp39-win_amd64.whl", hash = "sha256:da343903214bf9f9d314b913caa499fa19e26d73e6e23a3db7d4898ea6d47028"}, - {file = "aiohttp-3.11.8.tar.gz", hash = "sha256:7bc9d64a2350cbb29a9732334e1a0743cbb6844de1731cbdf5949b235653f3fd"}, + {file = "aiohttp-3.11.11-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a60804bff28662cbcf340a4d61598891f12eea3a66af48ecfdc975ceec21e3c8"}, + {file = "aiohttp-3.11.11-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4b4fa1cb5f270fb3eab079536b764ad740bb749ce69a94d4ec30ceee1b5940d5"}, + {file = "aiohttp-3.11.11-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:731468f555656767cda219ab42e033355fe48c85fbe3ba83a349631541715ba2"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb23d8bb86282b342481cad4370ea0853a39e4a32a0042bb52ca6bdde132df43"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f047569d655f81cb70ea5be942ee5d4421b6219c3f05d131f64088c73bb0917f"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd7659baae9ccf94ae5fe8bfaa2c7bc2e94d24611528395ce88d009107e00c6d"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af01e42ad87ae24932138f154105e88da13ce7d202a6de93fafdafb2883a00ef"}, + {file = "aiohttp-3.11.11-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5854be2f3e5a729800bac57a8d76af464e160f19676ab6aea74bde18ad19d438"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6526e5fb4e14f4bbf30411216780c9967c20c5a55f2f51d3abd6de68320cc2f3"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:85992ee30a31835fc482468637b3e5bd085fa8fe9392ba0bdcbdc1ef5e9e3c55"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:88a12ad8ccf325a8a5ed80e6d7c3bdc247d66175afedbe104ee2aaca72960d8e"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:0a6d3fbf2232e3a08c41eca81ae4f1dff3d8f1a30bae415ebe0af2d2458b8a33"}, + {file = "aiohttp-3.11.11-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:84a585799c58b795573c7fa9b84c455adf3e1d72f19a2bf498b54a95ae0d194c"}, + {file = "aiohttp-3.11.11-cp310-cp310-win32.whl", hash = "sha256:bfde76a8f430cf5c5584553adf9926534352251d379dcb266ad2b93c54a29745"}, + {file = "aiohttp-3.11.11-cp310-cp310-win_amd64.whl", hash = "sha256:0fd82b8e9c383af11d2b26f27a478640b6b83d669440c0a71481f7c865a51da9"}, + {file = "aiohttp-3.11.11-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ba74ec819177af1ef7f59063c6d35a214a8fde6f987f7661f4f0eecc468a8f76"}, + {file = "aiohttp-3.11.11-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4af57160800b7a815f3fe0eba9b46bf28aafc195555f1824555fa2cfab6c1538"}, + {file = "aiohttp-3.11.11-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ffa336210cf9cd8ed117011085817d00abe4c08f99968deef0013ea283547204"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81b8fe282183e4a3c7a1b72f5ade1094ed1c6345a8f153506d114af5bf8accd9"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3af41686ccec6a0f2bdc66686dc0f403c41ac2089f80e2214a0f82d001052c03"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70d1f9dde0e5dd9e292a6d4d00058737052b01f3532f69c0c65818dac26dc287"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:249cc6912405917344192b9f9ea5cd5b139d49e0d2f5c7f70bdfaf6b4dbf3a2e"}, + {file = "aiohttp-3.11.11-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0eb98d90b6690827dcc84c246811feeb4e1eea683c0eac6caed7549be9c84665"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ec82bf1fda6cecce7f7b915f9196601a1bd1a3079796b76d16ae4cce6d0ef89b"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9fd46ce0845cfe28f108888b3ab17abff84ff695e01e73657eec3f96d72eef34"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:bd176afcf8f5d2aed50c3647d4925d0db0579d96f75a31e77cbaf67d8a87742d"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ec2aa89305006fba9ffb98970db6c8221541be7bee4c1d027421d6f6df7d1ce2"}, + {file = "aiohttp-3.11.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:92cde43018a2e17d48bb09c79e4d4cb0e236de5063ce897a5e40ac7cb4878773"}, + {file = "aiohttp-3.11.11-cp311-cp311-win32.whl", hash = "sha256:aba807f9569455cba566882c8938f1a549f205ee43c27b126e5450dc9f83cc62"}, + {file = "aiohttp-3.11.11-cp311-cp311-win_amd64.whl", hash = "sha256:ae545f31489548c87b0cced5755cfe5a5308d00407000e72c4fa30b19c3220ac"}, + {file = "aiohttp-3.11.11-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e595c591a48bbc295ebf47cb91aebf9bd32f3ff76749ecf282ea7f9f6bb73886"}, + {file = "aiohttp-3.11.11-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3ea1b59dc06396b0b424740a10a0a63974c725b1c64736ff788a3689d36c02d2"}, + {file = "aiohttp-3.11.11-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8811f3f098a78ffa16e0ea36dffd577eb031aea797cbdba81be039a4169e242c"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7227b87a355ce1f4bf83bfae4399b1f5bb42e0259cb9405824bd03d2f4336a"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d40f9da8cabbf295d3a9dae1295c69975b86d941bc20f0a087f0477fa0a66231"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ffb3dc385f6bb1568aa974fe65da84723210e5d9707e360e9ecb51f59406cd2e"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8f5f7515f3552d899c61202d99dcb17d6e3b0de777900405611cd747cecd1b8"}, + {file = "aiohttp-3.11.11-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3499c7ffbfd9c6a3d8d6a2b01c26639da7e43d47c7b4f788016226b1e711caa8"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8e2bf8029dbf0810c7bfbc3e594b51c4cc9101fbffb583a3923aea184724203c"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b6212a60e5c482ef90f2d788835387070a88d52cf6241d3916733c9176d39eab"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d119fafe7b634dbfa25a8c597718e69a930e4847f0b88e172744be24515140da"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:6fba278063559acc730abf49845d0e9a9e1ba74f85f0ee6efd5803f08b285853"}, + {file = "aiohttp-3.11.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:92fc484e34b733704ad77210c7957679c5c3877bd1e6b6d74b185e9320cc716e"}, + {file = "aiohttp-3.11.11-cp312-cp312-win32.whl", hash = "sha256:9f5b3c1ed63c8fa937a920b6c1bec78b74ee09593b3f5b979ab2ae5ef60d7600"}, + {file = "aiohttp-3.11.11-cp312-cp312-win_amd64.whl", hash = "sha256:1e69966ea6ef0c14ee53ef7a3d68b564cc408121ea56c0caa2dc918c1b2f553d"}, + {file = "aiohttp-3.11.11-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:541d823548ab69d13d23730a06f97460f4238ad2e5ed966aaf850d7c369782d9"}, + {file = "aiohttp-3.11.11-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:929f3ed33743a49ab127c58c3e0a827de0664bfcda566108989a14068f820194"}, + {file = "aiohttp-3.11.11-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0882c2820fd0132240edbb4a51eb8ceb6eef8181db9ad5291ab3332e0d71df5f"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b63de12e44935d5aca7ed7ed98a255a11e5cb47f83a9fded7a5e41c40277d104"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa54f8ef31d23c506910c21163f22b124facb573bff73930735cf9fe38bf7dff"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a344d5dc18074e3872777b62f5f7d584ae4344cd6006c17ba12103759d407af3"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b7fb429ab1aafa1f48578eb315ca45bd46e9c37de11fe45c7f5f4138091e2f1"}, + {file = "aiohttp-3.11.11-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c341c7d868750e31961d6d8e60ff040fb9d3d3a46d77fd85e1ab8e76c3e9a5c4"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ed9ee95614a71e87f1a70bc81603f6c6760128b140bc4030abe6abaa988f1c3d"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:de8d38f1c2810fa2a4f1d995a2e9c70bb8737b18da04ac2afbf3971f65781d87"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a9b7371665d4f00deb8f32208c7c5e652059b0fda41cf6dbcac6114a041f1cc2"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:620598717fce1b3bd14dd09947ea53e1ad510317c85dda2c9c65b622edc96b12"}, + {file = "aiohttp-3.11.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bf8d9bfee991d8acc72d060d53860f356e07a50f0e0d09a8dfedea1c554dd0d5"}, + {file = "aiohttp-3.11.11-cp313-cp313-win32.whl", hash = "sha256:9d73ee3725b7a737ad86c2eac5c57a4a97793d9f442599bea5ec67ac9f4bdc3d"}, + {file = "aiohttp-3.11.11-cp313-cp313-win_amd64.whl", hash = "sha256:c7a06301c2fb096bdb0bd25fe2011531c1453b9f2c163c8031600ec73af1cc99"}, + {file = "aiohttp-3.11.11-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3e23419d832d969f659c208557de4a123e30a10d26e1e14b73431d3c13444c2e"}, + {file = "aiohttp-3.11.11-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:21fef42317cf02e05d3b09c028712e1d73a9606f02467fd803f7c1f39cc59add"}, + {file = "aiohttp-3.11.11-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1f21bb8d0235fc10c09ce1d11ffbd40fc50d3f08a89e4cf3a0c503dc2562247a"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1642eceeaa5ab6c9b6dfeaaa626ae314d808188ab23ae196a34c9d97efb68350"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2170816e34e10f2fd120f603e951630f8a112e1be3b60963a1f159f5699059a6"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8be8508d110d93061197fd2d6a74f7401f73b6d12f8822bbcd6d74f2b55d71b1"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4eed954b161e6b9b65f6be446ed448ed3921763cc432053ceb606f89d793927e"}, + {file = "aiohttp-3.11.11-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6c9af134da4bc9b3bd3e6a70072509f295d10ee60c697826225b60b9959acdd"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:44167fc6a763d534a6908bdb2592269b4bf30a03239bcb1654781adf5e49caf1"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:479b8c6ebd12aedfe64563b85920525d05d394b85f166b7873c8bde6da612f9c"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:10b4ff0ad793d98605958089fabfa350e8e62bd5d40aa65cdc69d6785859f94e"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:b540bd67cfb54e6f0865ceccd9979687210d7ed1a1cc8c01f8e67e2f1e883d28"}, + {file = "aiohttp-3.11.11-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1dac54e8ce2ed83b1f6b1a54005c87dfed139cf3f777fdc8afc76e7841101226"}, + {file = "aiohttp-3.11.11-cp39-cp39-win32.whl", hash = "sha256:568c1236b2fde93b7720f95a890741854c1200fba4a3471ff48b2934d2d93fd3"}, + {file = "aiohttp-3.11.11-cp39-cp39-win_amd64.whl", hash = "sha256:943a8b052e54dfd6439fd7989f67fc6a7f2138d0a2cf0a7de5f18aa4fe7eb3b1"}, + {file = "aiohttp-3.11.11.tar.gz", hash = "sha256:bb49c7f1e6ebf3821a42d81d494f538107610c3a705987f53068546b0e90303e"}, ] [package.dependencies] @@ -139,13 +139,13 @@ speedups = ["Brotli", "aiodns (>=3.2.0)", "brotlicffi"] [[package]] name = "aiosignal" -version = "1.3.1" +version = "1.3.2" description = "aiosignal: a list of registered asynchronous callbacks" optional = true -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"}, - {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"}, + {file = "aiosignal-1.3.2-py2.py3-none-any.whl", hash = "sha256:45cde58e409a301715980c2b01d0c28bdde3770d8290b5eb2173759d9acb31a5"}, + {file = "aiosignal-1.3.2.tar.gz", hash = "sha256:a8c255c66fafb1e499c9351d0bf32ff2d8a0321595ebac3b93713656d2436f54"}, ] [package.dependencies] @@ -164,24 +164,24 @@ files = [ [[package]] name = "anyio" -version = "4.6.2.post1" +version = "4.7.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.9" files = [ - {file = "anyio-4.6.2.post1-py3-none-any.whl", hash = "sha256:6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d"}, - {file = "anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c"}, + {file = "anyio-4.7.0-py3-none-any.whl", hash = "sha256:ea60c3723ab42ba6fff7e8ccb0488c898ec538ff4df1f1d5e642c3601d07e352"}, + {file = "anyio-4.7.0.tar.gz", hash = "sha256:2f834749c602966b7d456a7567cafcb309f96482b5081d14ac93ccd457f9dd48"}, ] [package.dependencies] exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" -typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} +typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] -doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"] +doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] trio = ["trio (>=0.26.1)"] [[package]] @@ -228,19 +228,19 @@ files = [ [[package]] name = "attrs" -version = "24.2.0" +version = "24.3.0" description = "Classes Without Boilerplate" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"}, - {file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"}, + {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, + {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, ] [package.extras] benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] @@ -431,13 +431,13 @@ cffi = ">=1.0.0" [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] @@ -532,127 +532,114 @@ files = [ [[package]] name = "charset-normalizer" -version = "3.4.0" +version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false -python-versions = ">=3.7.0" +python-versions = ">=3.7" files = [ - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"}, - {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"}, - {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e218488cd232553829be0664c2292d3af2eeeb94b32bea483cf79ac6a694e037"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80ed5e856eb7f30115aaf94e4a08114ccc8813e6ed1b5efa74f9f82e8509858f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b010a7a4fd316c3c484d482922d13044979e78d1861f0e0650423144c616a46a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4532bff1b8421fd0a320463030c7520f56a79c9024a4e88f01c537316019005a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d973f03c0cb71c5ed99037b870f2be986c3c05e63622c017ea9816881d2dd247"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3a3bd0dcd373514dcec91c411ddb9632c0d7d92aed7093b8c3bbb6d69ca74408"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9c3cdf5390dcd29aa8056d13e8e99526cda0305acc038b96b30352aff5ff2bb"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2bdfe3ac2e1bbe5b59a1a63721eb3b95fc9b6817ae4a46debbb4e11f6232428d"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:eab677309cdb30d047996b36d34caeda1dc91149e4fdca0b1a039b3f79d9a807"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win32.whl", hash = "sha256:c0429126cf75e16c4f0ad00ee0eae4242dc652290f940152ca8c75c3a4b6ee8f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:9f0b8b1c6d84c8034a44893aba5e767bf9c7a211e313a9605d9c617d7083829f"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f30bf9fd9be89ecb2360c7d94a711f00c09b976258846efe40db3d05828e8089"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97f68b8d6831127e4787ad15e6757232e14e12060bec17091b85eb1486b91d8d"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7974a0b5ecd505609e3b19742b60cee7aa2aa2fb3151bc917e6e2646d7667dcf"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc54db6c8593ef7d4b2a331b58653356cf04f67c960f584edb7c3d8c97e8f39e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:311f30128d7d333eebd7896965bfcfbd0065f1716ec92bd5638d7748eb6f936a"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:7d053096f67cd1241601111b698f5cad775f97ab25d81567d3f59219b5f1adbd"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:807f52c1f798eef6cf26beb819eeb8819b1622ddfeef9d0977a8502d4db6d534"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:dccbe65bd2f7f7ec22c4ff99ed56faa1e9f785482b9bbd7c717e26fd723a1d1e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:2fb9bd477fdea8684f78791a6de97a953c51831ee2981f8e4f583ff3b9d9687e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:01732659ba9b5b873fc117534143e4feefecf3b2078b0a6a2e925271bb6f4cfa"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win32.whl", hash = "sha256:7a4f97a081603d2050bfaffdefa5b02a9ec823f8348a572e39032caa8404a487"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:7b1bef6280950ee6c177b326508f86cad7ad4dff12454483b51d8b7d673a2c5d"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ecddf25bee22fe4fe3737a399d0d177d72bc22be6913acfab364b40bce1ba83c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c60ca7339acd497a55b0ea5d506b2a2612afb2826560416f6894e8b5770d4a9"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7b2d86dd06bfc2ade3312a83a5c364c7ec2e3498f8734282c6c3d4b07b346b8"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd78cfcda14a1ef52584dbb008f7ac81c1328c0f58184bf9a84c49c605002da6"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e27f48bcd0957c6d4cb9d6fa6b61d192d0b13d5ef563e5f2ae35feafc0d179c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01ad647cdd609225c5350561d084b42ddf732f4eeefe6e678765636791e78b9a"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:619a609aa74ae43d90ed2e89bdd784765de0a25ca761b93e196d938b8fd1dbbd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:89149166622f4db9b4b6a449256291dc87a99ee53151c74cbd82a53c8c2f6ccd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:7709f51f5f7c853f0fb938bcd3bc59cdfdc5203635ffd18bf354f6967ea0f824"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:345b0426edd4e18138d6528aed636de7a9ed169b4aaf9d61a8c19e39d26838ca"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0907f11d019260cdc3f94fbdb23ff9125f6b5d1039b76003b5b0ac9d6a6c9d5b"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win32.whl", hash = "sha256:ea0d8d539afa5eb2728aa1932a988a9a7af94f18582ffae4bc10b3fbdad0626e"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:329ce159e82018d646c7ac45b01a430369d526569ec08516081727a20e9e4af4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b97e690a2118911e39b4042088092771b4ae3fc3aa86518f84b8cf6888dbdb41"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78baa6d91634dfb69ec52a463534bc0df05dbd546209b79a3880a34487f4b84f"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a2bc9f351a75ef49d664206d51f8e5ede9da246602dc2d2726837620ea034b2"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75832c08354f595c760a804588b9357d34ec00ba1c940c15e31e96d902093770"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af291f4fe114be0280cdd29d533696a77b5b49cfde5467176ecab32353395c4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0167ddc8ab6508fe81860a57dd472b2ef4060e8d378f0cc555707126830f2537"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2a75d49014d118e4198bcee5ee0a6f25856b29b12dbf7cd012791f8a6cc5c496"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363e2f92b0f0174b2f8238240a1a30142e3db7b957a5dd5689b0e75fb717cc78"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ab36c8eb7e454e34e60eb55ca5d241a5d18b2c6244f6827a30e451c42410b5f7"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:4c0907b1928a36d5a998d72d64d8eaa7244989f7aaaf947500d3a800c83a3fd6"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04432ad9479fa40ec0f387795ddad4437a2b50417c69fa275e212933519ff294"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win32.whl", hash = "sha256:3bed14e9c89dcb10e8f3a29f9ccac4955aebe93c71ae803af79265c9ca5644c5"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:49402233c892a461407c512a19435d1ce275543138294f7ef013f0b63d5d3765"}, + {file = "charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85"}, + {file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"}, ] [[package]] name = "click" -version = "8.1.7" +version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, + {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, + {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, ] [package.dependencies] @@ -671,73 +658,73 @@ files = [ [[package]] name = "coverage" -version = "7.6.8" +version = "7.6.9" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" files = [ - {file = "coverage-7.6.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b39e6011cd06822eb964d038d5dff5da5d98652b81f5ecd439277b32361a3a50"}, - {file = "coverage-7.6.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:63c19702db10ad79151a059d2d6336fe0c470f2e18d0d4d1a57f7f9713875dcf"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3985b9be361d8fb6b2d1adc9924d01dec575a1d7453a14cccd73225cb79243ee"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:644ec81edec0f4ad17d51c838a7d01e42811054543b76d4ba2c5d6af741ce2a6"}, - {file = "coverage-7.6.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f188a2402f8359cf0c4b1fe89eea40dc13b52e7b4fd4812450da9fcd210181d"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e19122296822deafce89a0c5e8685704c067ae65d45e79718c92df7b3ec3d331"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:13618bed0c38acc418896005732e565b317aa9e98d855a0e9f211a7ffc2d6638"}, - {file = "coverage-7.6.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:193e3bffca48ad74b8c764fb4492dd875038a2f9925530cb094db92bb5e47bed"}, - {file = "coverage-7.6.8-cp310-cp310-win32.whl", hash = "sha256:3988665ee376abce49613701336544041f2117de7b7fbfe91b93d8ff8b151c8e"}, - {file = "coverage-7.6.8-cp310-cp310-win_amd64.whl", hash = "sha256:f56f49b2553d7dd85fd86e029515a221e5c1f8cb3d9c38b470bc38bde7b8445a"}, - {file = "coverage-7.6.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:86cffe9c6dfcfe22e28027069725c7f57f4b868a3f86e81d1c62462764dc46d4"}, - {file = "coverage-7.6.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d82ab6816c3277dc962cfcdc85b1efa0e5f50fb2c449432deaf2398a2928ab94"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13690e923a3932e4fad4c0ebfb9cb5988e03d9dcb4c5150b5fcbf58fd8bddfc4"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4be32da0c3827ac9132bb488d331cb32e8d9638dd41a0557c5569d57cf22c9c1"}, - {file = "coverage-7.6.8-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44e6c85bbdc809383b509d732b06419fb4544dca29ebe18480379633623baafb"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:768939f7c4353c0fac2f7c37897e10b1414b571fd85dd9fc49e6a87e37a2e0d8"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e44961e36cb13c495806d4cac67640ac2866cb99044e210895b506c26ee63d3a"}, - {file = "coverage-7.6.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3ea8bb1ab9558374c0ab591783808511d135a833c3ca64a18ec927f20c4030f0"}, - {file = "coverage-7.6.8-cp311-cp311-win32.whl", hash = "sha256:629a1ba2115dce8bf75a5cce9f2486ae483cb89c0145795603d6554bdc83e801"}, - {file = "coverage-7.6.8-cp311-cp311-win_amd64.whl", hash = "sha256:fb9fc32399dca861584d96eccd6c980b69bbcd7c228d06fb74fe53e007aa8ef9"}, - {file = "coverage-7.6.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:e683e6ecc587643f8cde8f5da6768e9d165cd31edf39ee90ed7034f9ca0eefee"}, - {file = "coverage-7.6.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1defe91d41ce1bd44b40fabf071e6a01a5aa14de4a31b986aa9dfd1b3e3e414a"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7ad66e8e50225ebf4236368cc43c37f59d5e6728f15f6e258c8639fa0dd8e6d"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3fe47da3e4fda5f1abb5709c156eca207eacf8007304ce3019eb001e7a7204cb"}, - {file = "coverage-7.6.8-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:202a2d645c5a46b84992f55b0a3affe4f0ba6b4c611abec32ee88358db4bb649"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4674f0daa1823c295845b6a740d98a840d7a1c11df00d1fd62614545c1583787"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:74610105ebd6f33d7c10f8907afed696e79c59e3043c5f20eaa3a46fddf33b4c"}, - {file = "coverage-7.6.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:37cda8712145917105e07aab96388ae76e787270ec04bcb9d5cc786d7cbb8443"}, - {file = "coverage-7.6.8-cp312-cp312-win32.whl", hash = "sha256:9e89d5c8509fbd6c03d0dd1972925b22f50db0792ce06324ba069f10787429ad"}, - {file = "coverage-7.6.8-cp312-cp312-win_amd64.whl", hash = "sha256:379c111d3558272a2cae3d8e57e6b6e6f4fe652905692d54bad5ea0ca37c5ad4"}, - {file = "coverage-7.6.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0b0c69f4f724c64dfbfe79f5dfb503b42fe6127b8d479b2677f2b227478db2eb"}, - {file = "coverage-7.6.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c15b32a7aca8038ed7644f854bf17b663bc38e1671b5d6f43f9a2b2bd0c46f63"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63068a11171e4276f6ece913bde059e77c713b48c3a848814a6537f35afb8365"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f4548c5ead23ad13fb7a2c8ea541357474ec13c2b736feb02e19a3085fac002"}, - {file = "coverage-7.6.8-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b4b4299dd0d2c67caaaf286d58aef5e75b125b95615dda4542561a5a566a1e3"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c9ebfb2507751f7196995142f057d1324afdab56db1d9743aab7f50289abd022"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c1b4474beee02ede1eef86c25ad4600a424fe36cff01a6103cb4533c6bf0169e"}, - {file = "coverage-7.6.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d9fd2547e6decdbf985d579cf3fc78e4c1d662b9b0ff7cc7862baaab71c9cc5b"}, - {file = "coverage-7.6.8-cp313-cp313-win32.whl", hash = "sha256:8aae5aea53cbfe024919715eca696b1a3201886ce83790537d1c3668459c7146"}, - {file = "coverage-7.6.8-cp313-cp313-win_amd64.whl", hash = "sha256:ae270e79f7e169ccfe23284ff5ea2d52a6f401dc01b337efb54b3783e2ce3f28"}, - {file = "coverage-7.6.8-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:de38add67a0af869b0d79c525d3e4588ac1ffa92f39116dbe0ed9753f26eba7d"}, - {file = "coverage-7.6.8-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b07c25d52b1c16ce5de088046cd2432b30f9ad5e224ff17c8f496d9cb7d1d451"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62a66ff235e4c2e37ed3b6104d8b478d767ff73838d1222132a7a026aa548764"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09b9f848b28081e7b975a3626e9081574a7b9196cde26604540582da60235fdf"}, - {file = "coverage-7.6.8-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:093896e530c38c8e9c996901858ac63f3d4171268db2c9c8b373a228f459bbc5"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9a7b8ac36fd688c8361cbc7bf1cb5866977ece6e0b17c34aa0df58bda4fa18a4"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:38c51297b35b3ed91670e1e4efb702b790002e3245a28c76e627478aa3c10d83"}, - {file = "coverage-7.6.8-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2e4e0f60cb4bd7396108823548e82fdab72d4d8a65e58e2c19bbbc2f1e2bfa4b"}, - {file = "coverage-7.6.8-cp313-cp313t-win32.whl", hash = "sha256:6535d996f6537ecb298b4e287a855f37deaf64ff007162ec0afb9ab8ba3b8b71"}, - {file = "coverage-7.6.8-cp313-cp313t-win_amd64.whl", hash = "sha256:c79c0685f142ca53256722a384540832420dff4ab15fec1863d7e5bc8691bdcc"}, - {file = "coverage-7.6.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3ac47fa29d8d41059ea3df65bd3ade92f97ee4910ed638e87075b8e8ce69599e"}, - {file = "coverage-7.6.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:24eda3a24a38157eee639ca9afe45eefa8d2420d49468819ac5f88b10de84f4c"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4c81ed2820b9023a9a90717020315e63b17b18c274a332e3b6437d7ff70abe0"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bd55f8fc8fa494958772a2a7302b0354ab16e0b9272b3c3d83cdb5bec5bd1779"}, - {file = "coverage-7.6.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f39e2f3530ed1626c66e7493be7a8423b023ca852aacdc91fb30162c350d2a92"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:716a78a342679cd1177bc8c2fe957e0ab91405bd43a17094324845200b2fddf4"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:177f01eeaa3aee4a5ffb0d1439c5952b53d5010f86e9d2667963e632e30082cc"}, - {file = "coverage-7.6.8-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:912e95017ff51dc3d7b6e2be158dedc889d9a5cc3382445589ce554f1a34c0ea"}, - {file = "coverage-7.6.8-cp39-cp39-win32.whl", hash = "sha256:4db3ed6a907b555e57cc2e6f14dc3a4c2458cdad8919e40b5357ab9b6db6c43e"}, - {file = "coverage-7.6.8-cp39-cp39-win_amd64.whl", hash = "sha256:428ac484592f780e8cd7b6b14eb568f7c85460c92e2a37cb0c0e5186e1a0d076"}, - {file = "coverage-7.6.8-pp39.pp310-none-any.whl", hash = "sha256:5c52a036535d12590c32c49209e79cabaad9f9ad8aa4cbd875b68c4d67a9cbce"}, - {file = "coverage-7.6.8.tar.gz", hash = "sha256:8b2b8503edb06822c86d82fa64a4a5cb0760bb8f31f26e138ec743f422f37cfc"}, + {file = "coverage-7.6.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:85d9636f72e8991a1706b2b55b06c27545448baf9f6dbf51c4004609aacd7dcb"}, + {file = "coverage-7.6.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:608a7fd78c67bee8936378299a6cb9f5149bb80238c7a566fc3e6717a4e68710"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:96d636c77af18b5cb664ddf12dab9b15a0cfe9c0bde715da38698c8cea748bfa"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d75cded8a3cff93da9edc31446872d2997e327921d8eed86641efafd350e1df1"}, + {file = "coverage-7.6.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7b15f589593110ae767ce997775d645b47e5cbbf54fd322f8ebea6277466cec"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:44349150f6811b44b25574839b39ae35291f6496eb795b7366fef3bd3cf112d3"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:d891c136b5b310d0e702e186d70cd16d1119ea8927347045124cb286b29297e5"}, + {file = "coverage-7.6.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:db1dab894cc139f67822a92910466531de5ea6034ddfd2b11c0d4c6257168073"}, + {file = "coverage-7.6.9-cp310-cp310-win32.whl", hash = "sha256:41ff7b0da5af71a51b53f501a3bac65fb0ec311ebed1632e58fc6107f03b9198"}, + {file = "coverage-7.6.9-cp310-cp310-win_amd64.whl", hash = "sha256:35371f8438028fdccfaf3570b31d98e8d9eda8bb1d6ab9473f5a390969e98717"}, + {file = "coverage-7.6.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:932fc826442132dde42ee52cf66d941f581c685a6313feebed358411238f60f9"}, + {file = "coverage-7.6.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:085161be5f3b30fd9b3e7b9a8c301f935c8313dcf928a07b116324abea2c1c2c"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ccc660a77e1c2bf24ddbce969af9447a9474790160cfb23de6be4fa88e3951c7"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c69e42c892c018cd3c8d90da61d845f50a8243062b19d228189b0224150018a9"}, + {file = "coverage-7.6.9-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0824a28ec542a0be22f60c6ac36d679e0e262e5353203bea81d44ee81fe9c6d4"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4401ae5fc52ad8d26d2a5d8a7428b0f0c72431683f8e63e42e70606374c311a1"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:98caba4476a6c8d59ec1eb00c7dd862ba9beca34085642d46ed503cc2d440d4b"}, + {file = "coverage-7.6.9-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ee5defd1733fd6ec08b168bd4f5387d5b322f45ca9e0e6c817ea6c4cd36313e3"}, + {file = "coverage-7.6.9-cp311-cp311-win32.whl", hash = "sha256:f2d1ec60d6d256bdf298cb86b78dd715980828f50c46701abc3b0a2b3f8a0dc0"}, + {file = "coverage-7.6.9-cp311-cp311-win_amd64.whl", hash = "sha256:0d59fd927b1f04de57a2ba0137166d31c1a6dd9e764ad4af552912d70428c92b"}, + {file = "coverage-7.6.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:99e266ae0b5d15f1ca8d278a668df6f51cc4b854513daab5cae695ed7b721cf8"}, + {file = "coverage-7.6.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9901d36492009a0a9b94b20e52ebfc8453bf49bb2b27bca2c9706f8b4f5a554a"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abd3e72dd5b97e3af4246cdada7738ef0e608168de952b837b8dd7e90341f015"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ff74026a461eb0660366fb01c650c1d00f833a086b336bdad7ab00cc952072b3"}, + {file = "coverage-7.6.9-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65dad5a248823a4996724a88eb51d4b31587aa7aa428562dbe459c684e5787ae"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:22be16571504c9ccea919fcedb459d5ab20d41172056206eb2994e2ff06118a4"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f957943bc718b87144ecaee70762bc2bc3f1a7a53c7b861103546d3a403f0a6"}, + {file = "coverage-7.6.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0ae1387db4aecb1f485fb70a6c0148c6cdaebb6038f1d40089b1fc84a5db556f"}, + {file = "coverage-7.6.9-cp312-cp312-win32.whl", hash = "sha256:1a330812d9cc7ac2182586f6d41b4d0fadf9be9049f350e0efb275c8ee8eb692"}, + {file = "coverage-7.6.9-cp312-cp312-win_amd64.whl", hash = "sha256:b12c6b18269ca471eedd41c1b6a1065b2f7827508edb9a7ed5555e9a56dcfc97"}, + {file = "coverage-7.6.9-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:899b8cd4781c400454f2f64f7776a5d87bbd7b3e7f7bda0cb18f857bb1334664"}, + {file = "coverage-7.6.9-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:61f70dc68bd36810972e55bbbe83674ea073dd1dcc121040a08cdf3416c5349c"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8a289d23d4c46f1a82d5db4abeb40b9b5be91731ee19a379d15790e53031c014"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e216d8044a356fc0337c7a2a0536d6de07888d7bcda76febcb8adc50bdbbd00"}, + {file = "coverage-7.6.9-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c026eb44f744acaa2bda7493dad903aa5bf5fc4f2554293a798d5606710055d"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e77363e8425325384f9d49272c54045bbed2f478e9dd698dbc65dbc37860eb0a"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:777abfab476cf83b5177b84d7486497e034eb9eaea0d746ce0c1268c71652077"}, + {file = "coverage-7.6.9-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:447af20e25fdbe16f26e84eb714ba21d98868705cb138252d28bc400381f6ffb"}, + {file = "coverage-7.6.9-cp313-cp313-win32.whl", hash = "sha256:d872ec5aeb086cbea771c573600d47944eea2dcba8be5f3ee649bfe3cb8dc9ba"}, + {file = "coverage-7.6.9-cp313-cp313-win_amd64.whl", hash = "sha256:fd1213c86e48dfdc5a0cc676551db467495a95a662d2396ecd58e719191446e1"}, + {file = "coverage-7.6.9-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ba9e7484d286cd5a43744e5f47b0b3fb457865baf07bafc6bee91896364e1419"}, + {file = "coverage-7.6.9-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e5ea1cf0872ee455c03e5674b5bca5e3e68e159379c1af0903e89f5eba9ccc3a"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d10e07aa2b91835d6abec555ec8b2733347956991901eea6ffac295f83a30e4"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:13a9e2d3ee855db3dd6ea1ba5203316a1b1fd8eaeffc37c5b54987e61e4194ae"}, + {file = "coverage-7.6.9-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c38bf15a40ccf5619fa2fe8f26106c7e8e080d7760aeccb3722664c8656b030"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:d5275455b3e4627c8e7154feaf7ee0743c2e7af82f6e3b561967b1cca755a0be"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:8f8770dfc6e2c6a2d4569f411015c8d751c980d17a14b0530da2d7f27ffdd88e"}, + {file = "coverage-7.6.9-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8d2dfa71665a29b153a9681edb1c8d9c1ea50dfc2375fb4dac99ea7e21a0bcd9"}, + {file = "coverage-7.6.9-cp313-cp313t-win32.whl", hash = "sha256:5e6b86b5847a016d0fbd31ffe1001b63355ed309651851295315031ea7eb5a9b"}, + {file = "coverage-7.6.9-cp313-cp313t-win_amd64.whl", hash = "sha256:97ddc94d46088304772d21b060041c97fc16bdda13c6c7f9d8fcd8d5ae0d8611"}, + {file = "coverage-7.6.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:adb697c0bd35100dc690de83154627fbab1f4f3c0386df266dded865fc50a902"}, + {file = "coverage-7.6.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:be57b6d56e49c2739cdf776839a92330e933dd5e5d929966fbbd380c77f060be"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1592791f8204ae9166de22ba7e6705fa4ebd02936c09436a1bb85aabca3e599"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e12ae8cc979cf83d258acb5e1f1cf2f3f83524d1564a49d20b8bec14b637f08"}, + {file = "coverage-7.6.9-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb5555cff66c4d3d6213a296b360f9e1a8e323e74e0426b6c10ed7f4d021e464"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:b9389a429e0e5142e69d5bf4a435dd688c14478a19bb901735cdf75e57b13845"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:592ac539812e9b46046620341498caf09ca21023c41c893e1eb9dbda00a70cbf"}, + {file = "coverage-7.6.9-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a27801adef24cc30871da98a105f77995e13a25a505a0161911f6aafbd66e678"}, + {file = "coverage-7.6.9-cp39-cp39-win32.whl", hash = "sha256:8e3c3e38930cfb729cb8137d7f055e5a473ddaf1217966aa6238c88bd9fd50e6"}, + {file = "coverage-7.6.9-cp39-cp39-win_amd64.whl", hash = "sha256:e28bf44afa2b187cc9f41749138a64435bf340adfcacb5b2290c070ce99839d4"}, + {file = "coverage-7.6.9-pp39.pp310-none-any.whl", hash = "sha256:f3ca78518bc6bc92828cd11867b121891d75cae4ea9e908d72030609b996db1b"}, + {file = "coverage-7.6.9.tar.gz", hash = "sha256:4a8d8977b0c6ef5aeadcb644da9e69ae0dcfe66ec7f368c89c72e058bd71164d"}, ] [package.dependencies] @@ -803,13 +790,13 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] [[package]] name = "fastapi" -version = "0.115.5" +version = "0.115.6" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = true python-versions = ">=3.8" files = [ - {file = "fastapi-0.115.5-py3-none-any.whl", hash = "sha256:596b95adbe1474da47049e802f9a65ab2ffa9c2b07e7efee70eb8a66c9f2f796"}, - {file = "fastapi-0.115.5.tar.gz", hash = "sha256:0e7a4d0dc0d01c68df21887cce0945e72d3c48b9f4f79dfe7a7d53aa08fbb289"}, + {file = "fastapi-0.115.6-py3-none-any.whl", hash = "sha256:e9240b29e36fa8f4bb7290316988e90c381e5092e0cbe84e7818cc3713bcf305"}, + {file = "fastapi-0.115.6.tar.gz", hash = "sha256:9ec46f7addc14ea472958a96aae5b5de65f39721a46aaf5705c480d9a8b76654"}, ] [package.dependencies] @@ -1076,13 +1063,13 @@ test = ["Cython (>=0.29.24)"] [[package]] name = "httpx" -version = "0.28.0" +version = "0.28.1" description = "The next generation HTTP client." optional = true python-versions = ">=3.8" files = [ - {file = "httpx-0.28.0-py3-none-any.whl", hash = "sha256:dc0b419a0cfeb6e8b34e85167c0da2671206f5095f1baa9663d23bcfd6b535fc"}, - {file = "httpx-0.28.0.tar.gz", hash = "sha256:0858d3bab51ba7e386637f22a61d8ccddaeec5f3fe4209da3a6168dbb91573e0"}, + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, ] [package.dependencies] @@ -1212,13 +1199,13 @@ files = [ [[package]] name = "jinja2" -version = "3.1.4" +version = "3.1.5" description = "A very fast and expressive template engine." optional = true python-versions = ">=3.7" files = [ - {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, - {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, + {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, + {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, ] [package.dependencies] @@ -1229,13 +1216,13 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "loguru" -version = "0.7.2" +version = "0.7.3" description = "Python logging made (stupidly) simple" optional = false -python-versions = ">=3.5" +python-versions = "<4.0,>=3.5" files = [ - {file = "loguru-0.7.2-py3-none-any.whl", hash = "sha256:003d71e3d3ed35f0f8984898359d65b79e5b21943f78af86aa5491210429b8eb"}, - {file = "loguru-0.7.2.tar.gz", hash = "sha256:e671a53522515f34fd406340ee968cb9ecafbc4b36c679da03c18fd8d0bd51ac"}, + {file = "loguru-0.7.3-py3-none-any.whl", hash = "sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c"}, + {file = "loguru-0.7.3.tar.gz", hash = "sha256:19480589e77d47b8d85b2c827ad95d49bf31b0dcde16593892eb51dd18706eb6"}, ] [package.dependencies] @@ -1243,7 +1230,7 @@ colorama = {version = ">=0.3.4", markers = "sys_platform == \"win32\""} win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} [package.extras] -dev = ["Sphinx (==7.2.5)", "colorama (==0.4.5)", "colorama (==0.4.6)", "exceptiongroup (==1.1.3)", "freezegun (==1.1.0)", "freezegun (==1.2.2)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v1.4.1)", "mypy (==v1.5.1)", "pre-commit (==3.4.0)", "pytest (==6.1.2)", "pytest (==7.4.0)", "pytest-cov (==2.12.1)", "pytest-cov (==4.1.0)", "pytest-mypy-plugins (==1.9.3)", "pytest-mypy-plugins (==3.0.0)", "sphinx-autobuild (==2021.3.14)", "sphinx-rtd-theme (==1.3.0)", "tox (==3.27.1)", "tox (==4.11.0)"] +dev = ["Sphinx (==8.1.3)", "build (==1.2.2)", "colorama (==0.4.5)", "colorama (==0.4.6)", "exceptiongroup (==1.1.3)", "freezegun (==1.1.0)", "freezegun (==1.5.0)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v1.13.0)", "mypy (==v1.4.1)", "myst-parser (==4.0.0)", "pre-commit (==4.0.1)", "pytest (==6.1.2)", "pytest (==8.3.2)", "pytest-cov (==2.12.1)", "pytest-cov (==5.0.0)", "pytest-cov (==6.0.0)", "pytest-mypy-plugins (==1.9.3)", "pytest-mypy-plugins (==3.1.0)", "sphinx-rtd-theme (==3.0.2)", "tox (==3.27.1)", "tox (==4.23.2)", "twine (==6.0.1)"] [[package]] name = "markupsafe" @@ -1469,13 +1456,13 @@ url = "envs/test" [[package]] name = "nonebug" -version = "0.4.2" +version = "0.4.3" description = "nonebot2 test framework" optional = false python-versions = "<4.0,>=3.9" files = [ - {file = "nonebug-0.4.2-py3-none-any.whl", hash = "sha256:83d9229ec899819e9f5786eabc0c27b9dd0cd5d6e2e7438f59923ab822d5c555"}, - {file = "nonebug-0.4.2.tar.gz", hash = "sha256:002dac00fed1fbff97574f3dffab2237fc41473b3bf3e73d2730ae34895bc137"}, + {file = "nonebug-0.4.3-py3-none-any.whl", hash = "sha256:eb9b2c8ab3d45459a4f00ebdaae90729e9e9628575c0685fca4c871dd4cfd425"}, + {file = "nonebug-0.4.3.tar.gz", hash = "sha256:e9592d2c7a42b76f4a336f98726cba92e1300f6bab155c8822e865919786f10c"}, ] [package.dependencies] @@ -1614,109 +1601,93 @@ wcwidth = "*" [[package]] name = "propcache" -version = "0.2.0" +version = "0.2.1" description = "Accelerated property cache" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c5869b8fd70b81835a6f187c5fdbe67917a04d7e52b6e7cc4e5fe39d55c39d58"}, - {file = "propcache-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:952e0d9d07609d9c5be361f33b0d6d650cd2bae393aabb11d9b719364521984b"}, - {file = "propcache-0.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:33ac8f098df0585c0b53009f039dfd913b38c1d2edafed0cedcc0c32a05aa110"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97e48e8875e6c13909c800fa344cd54cc4b2b0db1d5f911f840458a500fde2c2"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:388f3217649d6d59292b722d940d4d2e1e6a7003259eb835724092a1cca0203a"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f571aea50ba5623c308aa146eb650eebf7dbe0fd8c5d946e28343cb3b5aad577"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3dfafb44f7bb35c0c06eda6b2ab4bfd58f02729e7c4045e179f9a861b07c9850"}, - {file = "propcache-0.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3ebe9a75be7ab0b7da2464a77bb27febcb4fab46a34f9288f39d74833db7f61"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d2f0d0f976985f85dfb5f3d685697ef769faa6b71993b46b295cdbbd6be8cc37"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a3dc1a4b165283bd865e8f8cb5f0c64c05001e0718ed06250d8cac9bec115b48"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:9e0f07b42d2a50c7dd2d8675d50f7343d998c64008f1da5fef888396b7f84630"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e63e3e1e0271f374ed489ff5ee73d4b6e7c60710e1f76af5f0e1a6117cd26394"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:56bb5c98f058a41bb58eead194b4db8c05b088c93d94d5161728515bd52b052b"}, - {file = "propcache-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7665f04d0c7f26ff8bb534e1c65068409bf4687aa2534faf7104d7182debb336"}, - {file = "propcache-0.2.0-cp310-cp310-win32.whl", hash = "sha256:7cf18abf9764746b9c8704774d8b06714bcb0a63641518a3a89c7f85cc02c2ad"}, - {file = "propcache-0.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:cfac69017ef97db2438efb854edf24f5a29fd09a536ff3a992b75990720cdc99"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:63f13bf09cc3336eb04a837490b8f332e0db41da66995c9fd1ba04552e516354"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608cce1da6f2672a56b24a015b42db4ac612ee709f3d29f27a00c943d9e851de"}, - {file = "propcache-0.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:466c219deee4536fbc83c08d09115249db301550625c7fef1c5563a584c9bc87"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc2db02409338bf36590aa985a461b2c96fce91f8e7e0f14c50c5fcc4f229016"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a6ed8db0a556343d566a5c124ee483ae113acc9a557a807d439bcecc44e7dfbb"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:91997d9cb4a325b60d4e3f20967f8eb08dfcb32b22554d5ef78e6fd1dda743a2"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c7dde9e533c0a49d802b4f3f218fa9ad0a1ce21f2c2eb80d5216565202acab4"}, - {file = "propcache-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffcad6c564fe6b9b8916c1aefbb37a362deebf9394bd2974e9d84232e3e08504"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:97a58a28bcf63284e8b4d7b460cbee1edaab24634e82059c7b8c09e65284f178"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:945db8ee295d3af9dbdbb698cce9bbc5c59b5c3fe328bbc4387f59a8a35f998d"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:39e104da444a34830751715f45ef9fc537475ba21b7f1f5b0f4d71a3b60d7fe2"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c5ecca8f9bab618340c8e848d340baf68bcd8ad90a8ecd7a4524a81c1764b3db"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c436130cc779806bdf5d5fae0d848713105472b8566b75ff70048c47d3961c5b"}, - {file = "propcache-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:191db28dc6dcd29d1a3e063c3be0b40688ed76434622c53a284e5427565bbd9b"}, - {file = "propcache-0.2.0-cp311-cp311-win32.whl", hash = "sha256:5f2564ec89058ee7c7989a7b719115bdfe2a2fb8e7a4543b8d1c0cc4cf6478c1"}, - {file = "propcache-0.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6e2e54267980349b723cff366d1e29b138b9a60fa376664a157a342689553f71"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:2ee7606193fb267be4b2e3b32714f2d58cad27217638db98a60f9efb5efeccc2"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:91ee8fc02ca52e24bcb77b234f22afc03288e1dafbb1f88fe24db308910c4ac7"}, - {file = "propcache-0.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2e900bad2a8456d00a113cad8c13343f3b1f327534e3589acc2219729237a2e8"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f52a68c21363c45297aca15561812d542f8fc683c85201df0bebe209e349f793"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e41d67757ff4fbc8ef2af99b338bfb955010444b92929e9e55a6d4dcc3c4f09"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a64e32f8bd94c105cc27f42d3b658902b5bcc947ece3c8fe7bc1b05982f60e89"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55346705687dbd7ef0d77883ab4f6fabc48232f587925bdaf95219bae072491e"}, - {file = "propcache-0.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00181262b17e517df2cd85656fcd6b4e70946fe62cd625b9d74ac9977b64d8d9"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6994984550eaf25dd7fc7bd1b700ff45c894149341725bb4edc67f0ffa94efa4"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:56295eb1e5f3aecd516d91b00cfd8bf3a13991de5a479df9e27dd569ea23959c"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:439e76255daa0f8151d3cb325f6dd4a3e93043e6403e6491813bcaaaa8733887"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f6475a1b2ecb310c98c28d271a30df74f9dd436ee46d09236a6b750a7599ce57"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3444cdba6628accf384e349014084b1cacd866fbb88433cd9d279d90a54e0b23"}, - {file = "propcache-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4a9d9b4d0a9b38d1c391bb4ad24aa65f306c6f01b512e10a8a34a2dc5675d348"}, - {file = "propcache-0.2.0-cp312-cp312-win32.whl", hash = "sha256:69d3a98eebae99a420d4b28756c8ce6ea5a29291baf2dc9ff9414b42676f61d5"}, - {file = "propcache-0.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:ad9c9b99b05f163109466638bd30ada1722abb01bbb85c739c50b6dc11f92dc3"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ecddc221a077a8132cf7c747d5352a15ed763b674c0448d811f408bf803d9ad7"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0e53cb83fdd61cbd67202735e6a6687a7b491c8742dfc39c9e01e80354956763"}, - {file = "propcache-0.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92fe151145a990c22cbccf9ae15cae8ae9eddabfc949a219c9f667877e40853d"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6a21ef516d36909931a2967621eecb256018aeb11fc48656e3257e73e2e247a"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f88a4095e913f98988f5b338c1d4d5d07dbb0b6bad19892fd447484e483ba6b"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a5b3bb545ead161be780ee85a2b54fdf7092815995661947812dde94a40f6fb"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67aeb72e0f482709991aa91345a831d0b707d16b0257e8ef88a2ad246a7280bf"}, - {file = "propcache-0.2.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c997f8c44ec9b9b0bcbf2d422cc00a1d9b9c681f56efa6ca149a941e5560da2"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a66df3d4992bc1d725b9aa803e8c5a66c010c65c741ad901e260ece77f58d2f"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3ebbcf2a07621f29638799828b8d8668c421bfb94c6cb04269130d8de4fb7136"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1235c01ddaa80da8235741e80815ce381c5267f96cc49b1477fdcf8c047ef325"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3947483a381259c06921612550867b37d22e1df6d6d7e8361264b6d037595f44"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d5bed7f9805cc29c780f3aee05de3262ee7ce1f47083cfe9f77471e9d6777e83"}, - {file = "propcache-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e4a91d44379f45f5e540971d41e4626dacd7f01004826a18cb048e7da7e96544"}, - {file = "propcache-0.2.0-cp313-cp313-win32.whl", hash = "sha256:f902804113e032e2cdf8c71015651c97af6418363bea8d78dc0911d56c335032"}, - {file = "propcache-0.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:8f188cfcc64fb1266f4684206c9de0e80f54622c3f22a910cbd200478aeae61e"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:53d1bd3f979ed529f0805dd35ddaca330f80a9a6d90bc0121d2ff398f8ed8861"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:83928404adf8fb3d26793665633ea79b7361efa0287dfbd372a7e74311d51ee6"}, - {file = "propcache-0.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:77a86c261679ea5f3896ec060be9dc8e365788248cc1e049632a1be682442063"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:218db2a3c297a3768c11a34812e63b3ac1c3234c3a086def9c0fee50d35add1f"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7735e82e3498c27bcb2d17cb65d62c14f1100b71723b68362872bca7d0913d90"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:20a617c776f520c3875cf4511e0d1db847a076d720714ae35ffe0df3e440be68"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67b69535c870670c9f9b14a75d28baa32221d06f6b6fa6f77a0a13c5a7b0a5b9"}, - {file = "propcache-0.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4569158070180c3855e9c0791c56be3ceeb192defa2cdf6a3f39e54319e56b89"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:db47514ffdbd91ccdc7e6f8407aac4ee94cc871b15b577c1c324236b013ddd04"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_armv7l.whl", hash = "sha256:2a60ad3e2553a74168d275a0ef35e8c0a965448ffbc3b300ab3a5bb9956c2162"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:662dd62358bdeaca0aee5761de8727cfd6861432e3bb828dc2a693aa0471a563"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:25a1f88b471b3bc911d18b935ecb7115dff3a192b6fef46f0bfaf71ff4f12418"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:f60f0ac7005b9f5a6091009b09a419ace1610e163fa5deaba5ce3484341840e7"}, - {file = "propcache-0.2.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:74acd6e291f885678631b7ebc85d2d4aec458dd849b8c841b57ef04047833bed"}, - {file = "propcache-0.2.0-cp38-cp38-win32.whl", hash = "sha256:d9b6ddac6408194e934002a69bcaadbc88c10b5f38fb9307779d1c629181815d"}, - {file = "propcache-0.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:676135dcf3262c9c5081cc8f19ad55c8a64e3f7282a21266d05544450bffc3a5"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:25c8d773a62ce0451b020c7b29a35cfbc05de8b291163a7a0f3b7904f27253e6"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:375a12d7556d462dc64d70475a9ee5982465fbb3d2b364f16b86ba9135793638"}, - {file = "propcache-0.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1ec43d76b9677637a89d6ab86e1fef70d739217fefa208c65352ecf0282be957"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f45eec587dafd4b2d41ac189c2156461ebd0c1082d2fe7013571598abb8505d1"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc092ba439d91df90aea38168e11f75c655880c12782facf5cf9c00f3d42b562"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fa1076244f54bb76e65e22cb6910365779d5c3d71d1f18b275f1dfc7b0d71b4d"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:682a7c79a2fbf40f5dbb1eb6bfe2cd865376deeac65acf9beb607505dced9e12"}, - {file = "propcache-0.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e40876731f99b6f3c897b66b803c9e1c07a989b366c6b5b475fafd1f7ba3fb8"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:363ea8cd3c5cb6679f1c2f5f1f9669587361c062e4899fce56758efa928728f8"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:140fbf08ab3588b3468932974a9331aff43c0ab8a2ec2c608b6d7d1756dbb6cb"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:e70fac33e8b4ac63dfc4c956fd7d85a0b1139adcfc0d964ce288b7c527537fea"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b33d7a286c0dc1a15f5fc864cc48ae92a846df287ceac2dd499926c3801054a6"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:f6d5749fdd33d90e34c2efb174c7e236829147a2713334d708746e94c4bde40d"}, - {file = "propcache-0.2.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:22aa8f2272d81d9317ff5756bb108021a056805ce63dd3630e27d042c8092798"}, - {file = "propcache-0.2.0-cp39-cp39-win32.whl", hash = "sha256:73e4b40ea0eda421b115248d7e79b59214411109a5bc47d0d48e4c73e3b8fcf9"}, - {file = "propcache-0.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:9517d5e9e0731957468c29dbfd0f976736a0e55afaea843726e887f36fe017df"}, - {file = "propcache-0.2.0-py3-none-any.whl", hash = "sha256:2ccc28197af5313706511fab3a8b66dcd6da067a1331372c82ea1cb74285e036"}, - {file = "propcache-0.2.0.tar.gz", hash = "sha256:df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6b3f39a85d671436ee3d12c017f8fdea38509e4f25b28eb25877293c98c243f6"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d51fbe4285d5db5d92a929e3e21536ea3dd43732c5b177c7ef03f918dff9f2"}, + {file = "propcache-0.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6445804cf4ec763dc70de65a3b0d9954e868609e83850a47ca4f0cb64bd79fea"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9479aa06a793c5aeba49ce5c5692ffb51fcd9a7016e017d555d5e2b0045d212"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9631c5e8b5b3a0fda99cb0d29c18133bca1e18aea9effe55adb3da1adef80d3"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3156628250f46a0895f1f36e1d4fbe062a1af8718ec3ebeb746f1d23f0c5dc4d"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b6fb63ae352e13748289f04f37868099e69dba4c2b3e271c46061e82c745634"}, + {file = "propcache-0.2.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:887d9b0a65404929641a9fabb6452b07fe4572b269d901d622d8a34a4e9043b2"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a96dc1fa45bd8c407a0af03b2d5218392729e1822b0c32e62c5bf7eeb5fb3958"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:a7e65eb5c003a303b94aa2c3852ef130230ec79e349632d030e9571b87c4698c"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:999779addc413181912e984b942fbcc951be1f5b3663cd80b2687758f434c583"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:19a0f89a7bb9d8048d9c4370c9c543c396e894c76be5525f5e1ad287f1750ddf"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1ac2f5fe02fa75f56e1ad473f1175e11f475606ec9bd0be2e78e4734ad575034"}, + {file = "propcache-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:574faa3b79e8ebac7cb1d7930f51184ba1ccf69adfdec53a12f319a06030a68b"}, + {file = "propcache-0.2.1-cp310-cp310-win32.whl", hash = "sha256:03ff9d3f665769b2a85e6157ac8b439644f2d7fd17615a82fa55739bc97863f4"}, + {file = "propcache-0.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:2d3af2e79991102678f53e0dbf4c35de99b6b8b58f29a27ca0325816364caaba"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:1ffc3cca89bb438fb9c95c13fc874012f7b9466b89328c3c8b1aa93cdcfadd16"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f174bbd484294ed9fdf09437f889f95807e5f229d5d93588d34e92106fbf6717"}, + {file = "propcache-0.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:70693319e0b8fd35dd863e3e29513875eb15c51945bf32519ef52927ca883bc3"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b480c6a4e1138e1aa137c0079b9b6305ec6dcc1098a8ca5196283e8a49df95a9"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d27b84d5880f6d8aa9ae3edb253c59d9f6642ffbb2c889b78b60361eed449787"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:857112b22acd417c40fa4595db2fe28ab900c8c5fe4670c7989b1c0230955465"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf6c4150f8c0e32d241436526f3c3f9cbd34429492abddbada2ffcff506c51af"}, + {file = "propcache-0.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66d4cfda1d8ed687daa4bc0274fcfd5267873db9a5bc0418c2da19273040eeb7"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c2f992c07c0fca81655066705beae35fc95a2fa7366467366db627d9f2ee097f"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:4a571d97dbe66ef38e472703067021b1467025ec85707d57e78711c085984e54"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:bb6178c241278d5fe853b3de743087be7f5f4c6f7d6d22a3b524d323eecec505"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ad1af54a62ffe39cf34db1aa6ed1a1873bd548f6401db39d8e7cd060b9211f82"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e7048abd75fe40712005bcfc06bb44b9dfcd8e101dda2ecf2f5aa46115ad07ca"}, + {file = "propcache-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:160291c60081f23ee43d44b08a7e5fb76681221a8e10b3139618c5a9a291b84e"}, + {file = "propcache-0.2.1-cp311-cp311-win32.whl", hash = "sha256:819ce3b883b7576ca28da3861c7e1a88afd08cc8c96908e08a3f4dd64a228034"}, + {file = "propcache-0.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:edc9fc7051e3350643ad929df55c451899bb9ae6d24998a949d2e4c87fb596d3"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:081a430aa8d5e8876c6909b67bd2d937bfd531b0382d3fdedb82612c618bc41a"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d2ccec9ac47cf4e04897619c0e0c1a48c54a71bdf045117d3a26f80d38ab1fb0"}, + {file = "propcache-0.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:14d86fe14b7e04fa306e0c43cdbeebe6b2c2156a0c9ce56b815faacc193e320d"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:049324ee97bb67285b49632132db351b41e77833678432be52bdd0289c0e05e4"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1cd9a1d071158de1cc1c71a26014dcdfa7dd3d5f4f88c298c7f90ad6f27bb46d"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98110aa363f1bb4c073e8dcfaefd3a5cea0f0834c2aab23dda657e4dab2f53b5"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:647894f5ae99c4cf6bb82a1bb3a796f6e06af3caa3d32e26d2350d0e3e3faf24"}, + {file = "propcache-0.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd3223c15bebe26518d58ccf9a39b93948d3dcb3e57a20480dfdd315356baff"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d71264a80f3fcf512eb4f18f59423fe82d6e346ee97b90625f283df56aee103f"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:e73091191e4280403bde6c9a52a6999d69cdfde498f1fdf629105247599b57ec"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3935bfa5fede35fb202c4b569bb9c042f337ca4ff7bd540a0aa5e37131659348"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f508b0491767bb1f2b87fdfacaba5f7eddc2f867740ec69ece6d1946d29029a6"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:1672137af7c46662a1c2be1e8dc78cb6d224319aaa40271c9257d886be4363a6"}, + {file = "propcache-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b74c261802d3d2b85c9df2dfb2fa81b6f90deeef63c2db9f0e029a3cac50b518"}, + {file = "propcache-0.2.1-cp312-cp312-win32.whl", hash = "sha256:d09c333d36c1409d56a9d29b3a1b800a42c76a57a5a8907eacdbce3f18768246"}, + {file = "propcache-0.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:c214999039d4f2a5b2073ac506bba279945233da8c786e490d411dfc30f855c1"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aca405706e0b0a44cc6bfd41fbe89919a6a56999157f6de7e182a990c36e37bc"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:12d1083f001ace206fe34b6bdc2cb94be66d57a850866f0b908972f90996b3e9"}, + {file = "propcache-0.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d93f3307ad32a27bda2e88ec81134b823c240aa3abb55821a8da553eed8d9439"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba278acf14471d36316159c94a802933d10b6a1e117b8554fe0d0d9b75c9d536"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4e6281aedfca15301c41f74d7005e6e3f4ca143584ba696ac69df4f02f40d629"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5b750a8e5a1262434fb1517ddf64b5de58327f1adc3524a5e44c2ca43305eb0b"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf72af5e0fb40e9babf594308911436c8efde3cb5e75b6f206c34ad18be5c052"}, + {file = "propcache-0.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2d0a12018b04f4cb820781ec0dffb5f7c7c1d2a5cd22bff7fb055a2cb19ebce"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e800776a79a5aabdb17dcc2346a7d66d0777e942e4cd251defeb084762ecd17d"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:4160d9283bd382fa6c0c2b5e017acc95bc183570cd70968b9202ad6d8fc48dce"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:30b43e74f1359353341a7adb783c8f1b1c676367b011709f466f42fda2045e95"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:58791550b27d5488b1bb52bc96328456095d96206a250d28d874fafe11b3dfaf"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:0f022d381747f0dfe27e99d928e31bc51a18b65bb9e481ae0af1380a6725dd1f"}, + {file = "propcache-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:297878dc9d0a334358f9b608b56d02e72899f3b8499fc6044133f0d319e2ec30"}, + {file = "propcache-0.2.1-cp313-cp313-win32.whl", hash = "sha256:ddfab44e4489bd79bda09d84c430677fc7f0a4939a73d2bba3073036f487a0a6"}, + {file = "propcache-0.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:556fc6c10989f19a179e4321e5d678db8eb2924131e64652a51fe83e4c3db0e1"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6a9a8c34fb7bb609419a211e59da8887eeca40d300b5ea8e56af98f6fbbb1541"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ae1aa1cd222c6d205853b3013c69cd04515f9d6ab6de4b0603e2e1c33221303e"}, + {file = "propcache-0.2.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:accb6150ce61c9c4b7738d45550806aa2b71c7668c6942f17b0ac182b6142fd4"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5eee736daafa7af6d0a2dc15cc75e05c64f37fc37bafef2e00d77c14171c2097"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7a31fc1e1bd362874863fdeed71aed92d348f5336fd84f2197ba40c59f061bd"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba4cfa1052819d16699e1d55d18c92b6e094d4517c41dd231a8b9f87b6fa681"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f089118d584e859c62b3da0892b88a83d611c2033ac410e929cb6754eec0ed16"}, + {file = "propcache-0.2.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:781e65134efaf88feb447e8c97a51772aa75e48b794352f94cb7ea717dedda0d"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:31f5af773530fd3c658b32b6bdc2d0838543de70eb9a2156c03e410f7b0d3aae"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:a7a078f5d37bee6690959c813977da5291b24286e7b962e62a94cec31aa5188b"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:cea7daf9fc7ae6687cf1e2c049752f19f146fdc37c2cc376e7d0032cf4f25347"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:8b3489ff1ed1e8315674d0775dc7d2195fb13ca17b3808721b54dbe9fd020faf"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:9403db39be1393618dd80c746cb22ccda168efce239c73af13c3763ef56ffc04"}, + {file = "propcache-0.2.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5d97151bc92d2b2578ff7ce779cdb9174337390a535953cbb9452fb65164c587"}, + {file = "propcache-0.2.1-cp39-cp39-win32.whl", hash = "sha256:9caac6b54914bdf41bcc91e7eb9147d331d29235a7c967c150ef5df6464fd1bb"}, + {file = "propcache-0.2.1-cp39-cp39-win_amd64.whl", hash = "sha256:92fc4500fcb33899b05ba73276dfb684a20d31caa567b7cb5252d48f896a91b1"}, + {file = "propcache-0.2.1-py3-none-any.whl", hash = "sha256:52277518d6aae65536e9cea52d4e7fd2f7a66f4aa2d30ed3f2fcea620ace3c54"}, + {file = "propcache-0.2.1.tar.gz", hash = "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64"}, ] [[package]] @@ -1818,18 +1789,18 @@ files = [ [[package]] name = "pydantic" -version = "2.10.2" +version = "2.10.4" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.10.2-py3-none-any.whl", hash = "sha256:cfb96e45951117c3024e6b67b25cdc33a3cb7b2fa62e239f7af1378358a1d99e"}, - {file = "pydantic-2.10.2.tar.gz", hash = "sha256:2bc2d7f17232e0841cbba4641e65ba1eb6fafb3a08de3a091ff3ce14a197c4fa"}, + {file = "pydantic-2.10.4-py3-none-any.whl", hash = "sha256:597e135ea68be3a37552fb524bc7d0d66dcf93d395acd93a00682f1efcb8ee3d"}, + {file = "pydantic-2.10.4.tar.gz", hash = "sha256:82f12e9723da6de4fe2ba888b5971157b3be7ad914267dea8f05f82b28254f06"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.27.1" +pydantic-core = "2.27.2" typing-extensions = ">=4.12.2" [package.extras] @@ -1838,111 +1809,111 @@ timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.27.1" +version = "2.27.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"}, - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"}, - {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"}, - {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"}, - {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"}, - {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"}, - {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"}, - {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"}, - {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"}, - {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"}, - {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"}, - {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"}, - {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"}, - {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"}, - {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"}, - {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"}, - {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"}, - {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"}, + {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"}, ] [package.dependencies] @@ -1961,13 +1932,13 @@ files = [ [[package]] name = "pytest" -version = "8.3.3" +version = "8.3.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, - {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, + {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, + {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, ] [package.dependencies] @@ -2097,30 +2068,29 @@ files = [ [[package]] name = "quart" -version = "0.19.9" -description = "A Python ASGI web microframework with the same API as Flask" +version = "0.20.0" +description = "A Python ASGI web framework with the same API as Flask" optional = true -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "quart-0.19.9-py3-none-any.whl", hash = "sha256:8acb8b299c72b66ee9e506ae141498bbbfcc250b5298fbdb712e97f3d7e4082f"}, - {file = "quart-0.19.9.tar.gz", hash = "sha256:30a61a0d7bae1ee13e6e99dc14c929b3c945e372b9445d92d21db053e91e95a5"}, + {file = "quart-0.20.0-py3-none-any.whl", hash = "sha256:003c08f551746710acb757de49d9b768986fd431517d0eb127380b656b98b8f1"}, + {file = "quart-0.20.0.tar.gz", hash = "sha256:08793c206ff832483586f5ae47018c7e40bdd75d886fee3fabbdaa70c2cf505d"}, ] [package.dependencies] aiofiles = "*" blinker = ">=1.6" -click = ">=8.0.0" -flask = ">=3.0.0" +click = ">=8.0" +flask = ">=3.0" hypercorn = ">=0.11.2" -importlib_metadata = {version = "*", markers = "python_version < \"3.10\""} +importlib-metadata = {version = "*", markers = "python_version < \"3.10\""} itsdangerous = "*" jinja2 = "*" markupsafe = "*" -typing_extensions = {version = "*", markers = "python_version < \"3.10\""} -werkzeug = ">=3.0.0" +typing-extensions = {version = "*", markers = "python_version < \"3.10\""} +werkzeug = ">=3.0" [package.extras] -docs = ["pydata_sphinx_theme"] dotenv = ["python-dotenv"] [[package]] @@ -2146,29 +2116,29 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "ruff" -version = "0.8.1" +version = "0.8.4" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.8.1-py3-none-linux_armv6l.whl", hash = "sha256:fae0805bd514066f20309f6742f6ee7904a773eb9e6c17c45d6b1600ca65c9b5"}, - {file = "ruff-0.8.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b8a4f7385c2285c30f34b200ca5511fcc865f17578383db154e098150ce0a087"}, - {file = "ruff-0.8.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:cd054486da0c53e41e0086e1730eb77d1f698154f910e0cd9e0d64274979a209"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2029b8c22da147c50ae577e621a5bfbc5d1fed75d86af53643d7a7aee1d23871"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2666520828dee7dfc7e47ee4ea0d928f40de72056d929a7c5292d95071d881d1"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:333c57013ef8c97a53892aa56042831c372e0bb1785ab7026187b7abd0135ad5"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:288326162804f34088ac007139488dcb43de590a5ccfec3166396530b58fb89d"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b12c39b9448632284561cbf4191aa1b005882acbc81900ffa9f9f471c8ff7e26"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:364e6674450cbac8e998f7b30639040c99d81dfb5bbc6dfad69bc7a8f916b3d1"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b22346f845fec132aa39cd29acb94451d030c10874408dbf776af3aaeb53284c"}, - {file = "ruff-0.8.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b2f2f7a7e7648a2bfe6ead4e0a16745db956da0e3a231ad443d2a66a105c04fa"}, - {file = "ruff-0.8.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:adf314fc458374c25c5c4a4a9270c3e8a6a807b1bec018cfa2813d6546215540"}, - {file = "ruff-0.8.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a885d68342a231b5ba4d30b8c6e1b1ee3a65cf37e3d29b3c74069cdf1ee1e3c9"}, - {file = "ruff-0.8.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d2c16e3508c8cc73e96aa5127d0df8913d2290098f776416a4b157657bee44c5"}, - {file = "ruff-0.8.1-py3-none-win32.whl", hash = "sha256:93335cd7c0eaedb44882d75a7acb7df4b77cd7cd0d2255c93b28791716e81790"}, - {file = "ruff-0.8.1-py3-none-win_amd64.whl", hash = "sha256:2954cdbe8dfd8ab359d4a30cd971b589d335a44d444b6ca2cb3d1da21b75e4b6"}, - {file = "ruff-0.8.1-py3-none-win_arm64.whl", hash = "sha256:55873cc1a473e5ac129d15eccb3c008c096b94809d693fc7053f588b67822737"}, - {file = "ruff-0.8.1.tar.gz", hash = "sha256:3583db9a6450364ed5ca3f3b4225958b24f78178908d5c4bc0f46251ccca898f"}, + {file = "ruff-0.8.4-py3-none-linux_armv6l.whl", hash = "sha256:58072f0c06080276804c6a4e21a9045a706584a958e644353603d36ca1eb8a60"}, + {file = "ruff-0.8.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ffb60904651c00a1e0b8df594591770018a0f04587f7deeb3838344fe3adabac"}, + {file = "ruff-0.8.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:6ddf5d654ac0d44389f6bf05cee4caeefc3132a64b58ea46738111d687352296"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e248b1f0fa2749edd3350a2a342b67b43a2627434c059a063418e3d375cfe643"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bf197b98ed86e417412ee3b6c893f44c8864f816451441483253d5ff22c0e81e"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c41319b85faa3aadd4d30cb1cffdd9ac6b89704ff79f7664b853785b48eccdf3"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:9f8402b7c4f96463f135e936d9ab77b65711fcd5d72e5d67597b543bbb43cf3f"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4e56b3baa9c23d324ead112a4fdf20db9a3f8f29eeabff1355114dd96014604"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:736272574e97157f7edbbb43b1d046125fce9e7d8d583d5d65d0c9bf2c15addf"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5fe710ab6061592521f902fca7ebcb9fabd27bc7c57c764298b1c1f15fff720"}, + {file = "ruff-0.8.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:13e9ec6d6b55f6da412d59953d65d66e760d583dd3c1c72bf1f26435b5bfdbae"}, + {file = "ruff-0.8.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:97d9aefef725348ad77d6db98b726cfdb075a40b936c7984088804dfd38268a7"}, + {file = "ruff-0.8.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ab78e33325a6f5374e04c2ab924a3367d69a0da36f8c9cb6b894a62017506111"}, + {file = "ruff-0.8.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:8ef06f66f4a05c3ddbc9121a8b0cecccd92c5bf3dd43b5472ffe40b8ca10f0f8"}, + {file = "ruff-0.8.4-py3-none-win32.whl", hash = "sha256:552fb6d861320958ca5e15f28b20a3d071aa83b93caee33a87b471f99a6c0835"}, + {file = "ruff-0.8.4-py3-none-win_amd64.whl", hash = "sha256:f21a1143776f8656d7f364bd264a9d60f01b7f52243fbe90e7670c0dfe0cf65d"}, + {file = "ruff-0.8.4-py3-none-win_arm64.whl", hash = "sha256:9183dd615d8df50defa8b1d9a074053891ba39025cf5ae88e8bcb52edcc4bf08"}, + {file = "ruff-0.8.4.tar.gz", hash = "sha256:0d5f89f254836799af1615798caa5f80b7f935d7a670fad66c5007928e57ace8"}, ] [[package]] @@ -2213,17 +2183,18 @@ full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7 [[package]] name = "taskgroup" -version = "0.0.0a4" +version = "0.2.1" description = "backport of asyncio.TaskGroup, asyncio.Runner and asyncio.timeout" optional = true python-versions = "*" files = [ - {file = "taskgroup-0.0.0a4-py2.py3-none-any.whl", hash = "sha256:5c1bd0e4c06114e7a4128583ab75c987597d5378a33948a3b74c662b90f61277"}, - {file = "taskgroup-0.0.0a4.tar.gz", hash = "sha256:eb08902d221e27661950f2a0320ddf3f939f579279996f81fe30779bca3a159c"}, + {file = "taskgroup-0.2.1-py2.py3-none-any.whl", hash = "sha256:bff020b6e63408d1bcf952486cce05ed4c4e0747743c4762eb10b35726c89ab3"}, + {file = "taskgroup-0.2.1.tar.gz", hash = "sha256:11fa9c2db1037188ac0b60c70fa979243d00b1fee1a6e61e3171c21c1af75f78"}, ] [package.dependencies] exceptiongroup = "*" +typing_extensions = ">=4.12.2,<5" [[package]] name = "tomli" @@ -2299,13 +2270,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.3" +version = "2.3.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, - {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, + {file = "urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df"}, + {file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"}, ] [package.extras] @@ -2316,13 +2287,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "uvicorn" -version = "0.32.1" +version = "0.34.0" description = "The lightning-fast ASGI server." optional = true -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "uvicorn-0.32.1-py3-none-any.whl", hash = "sha256:82ad92fd58da0d12af7482ecdb5f2470a04c9c9a53ced65b9bbb4a205377602e"}, - {file = "uvicorn-0.32.1.tar.gz", hash = "sha256:ee9519c246a72b1c084cea8d3b44ed6026e78a4a309cbedae9c37e4cb9fbb175"}, + {file = "uvicorn-0.34.0-py3-none-any.whl", hash = "sha256:023dc038422502fa28a09c7a30bf2b6991512da7dcdb8fd35fe57cfc154126f4"}, + {file = "uvicorn-0.34.0.tar.gz", hash = "sha256:404051050cd7e905de2c9a7e61790943440b3416f49cb409f965d9dcd0fa73e9"}, ] [package.dependencies] @@ -2413,82 +2384,82 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [[package]] name = "watchfiles" -version = "1.0.0" +version = "1.0.3" description = "Simple, modern and high performance file watching and code reload in python." optional = true python-versions = ">=3.9" files = [ - {file = "watchfiles-1.0.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:1d19df28f99d6a81730658fbeb3ade8565ff687f95acb59665f11502b441be5f"}, - {file = "watchfiles-1.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:28babb38cf2da8e170b706c4b84aa7e4528a6fa4f3ee55d7a0866456a1662041"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:12ab123135b2f42517f04e720526d41448667ae8249e651385afb5cda31fedc0"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:13a4f9ee0cd25682679eea5c14fc629e2eaa79aab74d963bc4e21f43b8ea1877"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e1d9284cc84de7855fcf83472e51d32daf6f6cecd094160192628bc3fee1b78"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ee5edc939f53466b329bbf2e58333a5461e6c7b50c980fa6117439e2c18b42d"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5dccfc70480087567720e4e36ec381bba1ed68d7e5f368fe40c93b3b1eba0105"}, - {file = "watchfiles-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c83a6d33a9eda0af6a7470240d1af487807adc269704fe76a4972dd982d16236"}, - {file = "watchfiles-1.0.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:905f69aad276639eff3893759a07d44ea99560e67a1cf46ff389cd62f88872a2"}, - {file = "watchfiles-1.0.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:09551237645d6bff3972592f2aa5424df9290e7a2e15d63c5f47c48cde585935"}, - {file = "watchfiles-1.0.0-cp310-none-win32.whl", hash = "sha256:d2b39aa8edd9e5f56f99a2a2740a251dc58515398e9ed5a4b3e5ff2827060755"}, - {file = "watchfiles-1.0.0-cp310-none-win_amd64.whl", hash = "sha256:2de52b499e1ab037f1a87cb8ebcb04a819bf087b1015a4cf6dcf8af3c2a2613e"}, - {file = "watchfiles-1.0.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:fbd0ab7a9943bbddb87cbc2bf2f09317e74c77dc55b1f5657f81d04666c25269"}, - {file = "watchfiles-1.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:774ef36b16b7198669ce655d4f75b4c3d370e7f1cbdfb997fb10ee98717e2058"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b4fb98100267e6a5ebaff6aaa5d20aea20240584647470be39fe4823012ac96"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0fc3bf0effa2d8075b70badfdd7fb839d7aa9cea650d17886982840d71fdeabf"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:648e2b6db53eca6ef31245805cd528a16f56fa4cc15aeec97795eaf713c11435"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fa13d604fcb9417ae5f2e3de676e66aa97427d888e83662ad205bed35a313176"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:936f362e7ff28311b16f0b97ec51e8f2cc451763a3264640c6ed40fb252d1ee4"}, - {file = "watchfiles-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:245fab124b9faf58430da547512d91734858df13f2ddd48ecfa5e493455ffccb"}, - {file = "watchfiles-1.0.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4ff9c7e84e8b644a8f985c42bcc81457240316f900fc72769aaedec9d088055a"}, - {file = "watchfiles-1.0.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9c9a8d8fd97defe935ef8dd53d562e68942ad65067cd1c54d6ed8a088b1d931d"}, - {file = "watchfiles-1.0.0-cp311-none-win32.whl", hash = "sha256:a0abf173975eb9dd17bb14c191ee79999e650997cc644562f91df06060610e62"}, - {file = "watchfiles-1.0.0-cp311-none-win_amd64.whl", hash = "sha256:2a825ba4b32c214e3855b536eb1a1f7b006511d8e64b8215aac06eb680642d84"}, - {file = "watchfiles-1.0.0-cp311-none-win_arm64.whl", hash = "sha256:a5a7a06cfc65e34fd0a765a7623c5ba14707a0870703888e51d3d67107589817"}, - {file = "watchfiles-1.0.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:28fb64b5843d94e2c2483f7b024a1280662a44409bedee8f2f51439767e2d107"}, - {file = "watchfiles-1.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e3750434c83b61abb3163b49c64b04180b85b4dabb29a294513faec57f2ffdb7"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bedf84835069f51c7b026b3ca04e2e747ea8ed0a77c72006172c72d28c9f69fc"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:90004553be36427c3d06ec75b804233f8f816374165d5225b93abd94ba6e7234"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b46e15c34d4e401e976d6949ad3a74d244600d5c4b88c827a3fdf18691a46359"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:487d15927f1b0bd24e7df921913399bb1ab94424c386bea8b267754d698f8f0e"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1ff236d7a3f4b0a42f699a22fc374ba526bc55048a70cbb299661158e1bb5e1f"}, - {file = "watchfiles-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c01446626574561756067f00b37e6b09c8622b0fc1e9fdbc7cbcea328d4e514"}, - {file = "watchfiles-1.0.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b551c465a59596f3d08170bd7e1c532c7260dd90ed8135778038e13c5d48aa81"}, - {file = "watchfiles-1.0.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e1ed613ee107269f66c2df631ec0fc8efddacface85314d392a4131abe299f00"}, - {file = "watchfiles-1.0.0-cp312-none-win32.whl", hash = "sha256:5f75cd42e7e2254117cf37ff0e68c5b3f36c14543756b2da621408349bd9ca7c"}, - {file = "watchfiles-1.0.0-cp312-none-win_amd64.whl", hash = "sha256:cf517701a4a872417f4e02a136e929537743461f9ec6cdb8184d9a04f4843545"}, - {file = "watchfiles-1.0.0-cp312-none-win_arm64.whl", hash = "sha256:8a2127cd68950787ee36753e6d401c8ea368f73beaeb8e54df5516a06d1ecd82"}, - {file = "watchfiles-1.0.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:95de85c254f7fe8cbdf104731f7f87f7f73ae229493bebca3722583160e6b152"}, - {file = "watchfiles-1.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:533a7cbfe700e09780bb31c06189e39c65f06c7f447326fee707fd02f9a6e945"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2218e78e2c6c07b1634a550095ac2a429026b2d5cbcd49a594f893f2bb8c936"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9122b8fdadc5b341315d255ab51d04893f417df4e6c1743b0aac8bf34e96e025"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9272fdbc0e9870dac3b505bce1466d386b4d8d6d2bacf405e603108d50446940"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4a3b33c3aefe9067ebd87846806cd5fc0b017ab70d628aaff077ab9abf4d06b3"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bc338ce9f8846543d428260fa0f9a716626963148edc937d71055d01d81e1525"}, - {file = "watchfiles-1.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ac778a460ea22d63c7e6fb0bc0f5b16780ff0b128f7f06e57aaec63bd339285"}, - {file = "watchfiles-1.0.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:53ae447f06f8f29f5ab40140f19abdab822387a7c426a369eb42184b021e97eb"}, - {file = "watchfiles-1.0.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1f73c2147a453315d672c1ad907abe6d40324e34a185b51e15624bc793f93cc6"}, - {file = "watchfiles-1.0.0-cp313-none-win32.whl", hash = "sha256:eba98901a2eab909dbd79681190b9049acc650f6111fde1845484a4450761e98"}, - {file = "watchfiles-1.0.0-cp313-none-win_amd64.whl", hash = "sha256:d562a6114ddafb09c33246c6ace7effa71ca4b6a2324a47f4b09b6445ea78941"}, - {file = "watchfiles-1.0.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:3d94fd83ed54266d789f287472269c0def9120a2022674990bd24ad989ebd7a0"}, - {file = "watchfiles-1.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48051d1c504448b2fcda71c5e6e3610ae45de6a0b8f5a43b961f250be4bdf5a8"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29cf884ad4285d23453c702ed03d689f9c0e865e3c85d20846d800d4787de00f"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d3572d4c34c4e9c33d25b3da47d9570d5122f8433b9ac6519dca49c2740d23cd"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2c2696611182c85eb0e755b62b456f48debff484b7306b56f05478b843ca8ece"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:550109001920a993a4383b57229c717fa73627d2a4e8fcb7ed33c7f1cddb0c85"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b555a93c15bd2c71081922be746291d776d47521a00703163e5fbe6d2a402399"}, - {file = "watchfiles-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:947ccba18a38b85c366dafeac8df2f6176342d5992ca240a9d62588b214d731f"}, - {file = "watchfiles-1.0.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ffd98a299b0a74d1b704ef0ed959efb753e656a4e0425c14e46ae4c3cbdd2919"}, - {file = "watchfiles-1.0.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f8c4f3a1210ed099a99e6a710df4ff2f8069411059ffe30fa5f9467ebed1256b"}, - {file = "watchfiles-1.0.0-cp39-none-win32.whl", hash = "sha256:1e176b6b4119b3f369b2b4e003d53a226295ee862c0962e3afd5a1c15680b4e3"}, - {file = "watchfiles-1.0.0-cp39-none-win_amd64.whl", hash = "sha256:2d9c0518fabf4a3f373b0a94bb9e4ea7a1df18dec45e26a4d182aa8918dee855"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f159ac795785cde4899e0afa539f4c723fb5dd336ce5605bc909d34edd00b79b"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:c3d258d78341d5d54c0c804a5b7faa66cd30ba50b2756a7161db07ce15363b8d"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bbd0311588c2de7f9ea5cf3922ccacfd0ec0c1922870a2be503cc7df1ca8be7"}, - {file = "watchfiles-1.0.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9a13ac46b545a7d0d50f7641eefe47d1597e7d1783a5d89e09d080e6dff44b0"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2bca898c1dc073912d3db7fa6926cc08be9575add9e84872de2c99c688bac4e"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:06d828fe2adc4ac8a64b875ca908b892a3603d596d43e18f7948f3fef5fc671c"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:074c7618cd6c807dc4eaa0982b4a9d3f8051cd0b72793511848fd64630174b17"}, - {file = "watchfiles-1.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95dc785bc284552d044e561b8f4fe26d01ab5ca40d35852a6572d542adfeb4bc"}, - {file = "watchfiles-1.0.0.tar.gz", hash = "sha256:37566c844c9ce3b5deb964fe1a23378e575e74b114618d211fbda8f59d7b5dab"}, + {file = "watchfiles-1.0.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:1da46bb1eefb5a37a8fb6fd52ad5d14822d67c498d99bda8754222396164ae42"}, + {file = "watchfiles-1.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2b961b86cd3973f5822826017cad7f5a75795168cb645c3a6b30c349094e02e3"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34e87c7b3464d02af87f1059fedda5484e43b153ef519e4085fe1a03dd94801e"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d9dd2b89a16cf7ab9c1170b5863e68de6bf83db51544875b25a5f05a7269e678"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2b4691234d31686dca133c920f94e478b548a8e7c750f28dbbc2e4333e0d3da9"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:90b0fe1fcea9bd6e3084b44875e179b4adcc4057a3b81402658d0eb58c98edf8"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0b90651b4cf9e158d01faa0833b073e2e37719264bcee3eac49fc3c74e7d304b"}, + {file = "watchfiles-1.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c2e9fe695ff151b42ab06501820f40d01310fbd58ba24da8923ace79cf6d702d"}, + {file = "watchfiles-1.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:62691f1c0894b001c7cde1195c03b7801aaa794a837bd6eef24da87d1542838d"}, + {file = "watchfiles-1.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:275c1b0e942d335fccb6014d79267d1b9fa45b5ac0639c297f1e856f2f532552"}, + {file = "watchfiles-1.0.3-cp310-cp310-win32.whl", hash = "sha256:06ce08549e49ba69ccc36fc5659a3d0ff4e3a07d542b895b8a9013fcab46c2dc"}, + {file = "watchfiles-1.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:f280b02827adc9d87f764972fbeb701cf5611f80b619c20568e1982a277d6146"}, + {file = "watchfiles-1.0.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ffe709b1d0bc2e9921257569675674cafb3a5f8af689ab9f3f2b3f88775b960f"}, + {file = "watchfiles-1.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:418c5ce332f74939ff60691e5293e27c206c8164ce2b8ce0d9abf013003fb7fe"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f492d2907263d6d0d52f897a68647195bc093dafed14508a8d6817973586b6b"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:48c9f3bc90c556a854f4cab6a79c16974099ccfa3e3e150673d82d47a4bc92c9"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:75d3bcfa90454dba8df12adc86b13b6d85fda97d90e708efc036c2760cc6ba44"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5691340f259b8f76b45fb31b98e594d46c36d1dc8285efa7975f7f50230c9093"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e263cc718545b7f897baeac1f00299ab6fabe3e18caaacacb0edf6d5f35513c"}, + {file = "watchfiles-1.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c6cf7709ed3e55704cc06f6e835bf43c03bc8e3cb8ff946bf69a2e0a78d9d77"}, + {file = "watchfiles-1.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:703aa5e50e465be901e0e0f9d5739add15e696d8c26c53bc6fc00eb65d7b9469"}, + {file = "watchfiles-1.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bfcae6aecd9e0cb425f5145afee871465b98b75862e038d42fe91fd753ddd780"}, + {file = "watchfiles-1.0.3-cp311-cp311-win32.whl", hash = "sha256:6a76494d2c5311584f22416c5a87c1e2cb954ff9b5f0988027bc4ef2a8a67181"}, + {file = "watchfiles-1.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:cf745cbfad6389c0e331786e5fe9ae3f06e9d9c2ce2432378e1267954793975c"}, + {file = "watchfiles-1.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:2dcc3f60c445f8ce14156854a072ceb36b83807ed803d37fdea2a50e898635d6"}, + {file = "watchfiles-1.0.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:93436ed550e429da007fbafb723e0769f25bae178fbb287a94cb4ccdf42d3af3"}, + {file = "watchfiles-1.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c18f3502ad0737813c7dad70e3e1cc966cc147fbaeef47a09463bbffe70b0a00"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a5bc3ca468bb58a2ef50441f953e1f77b9a61bd1b8c347c8223403dc9b4ac9a"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0d1ec043f02ca04bf21b1b32cab155ce90c651aaf5540db8eb8ad7f7e645cba8"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f58d3bfafecf3d81c15d99fc0ecf4319e80ac712c77cf0ce2661c8cf8bf84066"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1df924ba82ae9e77340101c28d56cbaff2c991bd6fe8444a545d24075abb0a87"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:632a52dcaee44792d0965c17bdfe5dc0edad5b86d6a29e53d6ad4bf92dc0ff49"}, + {file = "watchfiles-1.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bf4b459d94a0387617a1b499f314aa04d8a64b7a0747d15d425b8c8b151da0"}, + {file = "watchfiles-1.0.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ca94c85911601b097d53caeeec30201736ad69a93f30d15672b967558df02885"}, + {file = "watchfiles-1.0.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:65ab1fb635476f6170b07e8e21db0424de94877e4b76b7feabfe11f9a5fc12b5"}, + {file = "watchfiles-1.0.3-cp312-cp312-win32.whl", hash = "sha256:49bc1bc26abf4f32e132652f4b3bfeec77d8f8f62f57652703ef127e85a3e38d"}, + {file = "watchfiles-1.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:48681c86f2cb08348631fed788a116c89c787fdf1e6381c5febafd782f6c3b44"}, + {file = "watchfiles-1.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:9e080cf917b35b20c889225a13f290f2716748362f6071b859b60b8847a6aa43"}, + {file = "watchfiles-1.0.3-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:e153a690b7255c5ced17895394b4f109d5dcc2a4f35cb809374da50f0e5c456a"}, + {file = "watchfiles-1.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ac1be85fe43b4bf9a251978ce5c3bb30e1ada9784290441f5423a28633a958a7"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2ec98e31e1844eac860e70d9247db9d75440fc8f5f679c37d01914568d18721"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0179252846be03fa97d4d5f8233d1c620ef004855f0717712ae1c558f1974a16"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:995c374e86fa82126c03c5b4630c4e312327ecfe27761accb25b5e1d7ab50ec8"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29b9cb35b7f290db1c31fb2fdf8fc6d3730cfa4bca4b49761083307f441cac5a"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f8dc09ae69af50bead60783180f656ad96bd33ffbf6e7a6fce900f6d53b08f1"}, + {file = "watchfiles-1.0.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:489b80812f52a8d8c7b0d10f0d956db0efed25df2821c7a934f6143f76938bd6"}, + {file = "watchfiles-1.0.3-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:228e2247de583475d4cebf6b9af5dc9918abb99d1ef5ee737155bb39fb33f3c0"}, + {file = "watchfiles-1.0.3-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1550be1a5cb3be08a3fb84636eaafa9b7119b70c71b0bed48726fd1d5aa9b868"}, + {file = "watchfiles-1.0.3-cp313-cp313-win32.whl", hash = "sha256:16db2d7e12f94818cbf16d4c8938e4d8aaecee23826344addfaaa671a1527b07"}, + {file = "watchfiles-1.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:160eff7d1267d7b025e983ca8460e8cc67b328284967cbe29c05f3c3163711a3"}, + {file = "watchfiles-1.0.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c05b021f7b5aa333124f2a64d56e4cb9963b6efdf44e8d819152237bbd93ba15"}, + {file = "watchfiles-1.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:310505ad305e30cb6c5f55945858cdbe0eb297fc57378f29bacceb534ac34199"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ddff3f8b9fa24a60527c137c852d0d9a7da2a02cf2151650029fdc97c852c974"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:46e86ed457c3486080a72bc837300dd200e18d08183f12b6ca63475ab64ed651"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f79fe7993e230a12172ce7d7c7db061f046f672f2b946431c81aff8f60b2758b"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea2b51c5f38bad812da2ec0cd7eec09d25f521a8b6b6843cbccedd9a1d8a5c15"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fe4e740ea94978b2b2ab308cbf9270a246bcbb44401f77cc8740348cbaeac3d"}, + {file = "watchfiles-1.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9af037d3df7188ae21dc1c7624501f2f90d81be6550904e07869d8d0e6766655"}, + {file = "watchfiles-1.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:52bb50a4c4ca2a689fdba84ba8ecc6a4e6210f03b6af93181bb61c4ec3abaf86"}, + {file = "watchfiles-1.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c14a07bdb475eb696f85c715dbd0f037918ccbb5248290448488a0b4ef201aad"}, + {file = "watchfiles-1.0.3-cp39-cp39-win32.whl", hash = "sha256:be37f9b1f8934cd9e7eccfcb5612af9fb728fecbe16248b082b709a9d1b348bf"}, + {file = "watchfiles-1.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:ef9ec8068cf23458dbf36a08e0c16f0a2df04b42a8827619646637be1769300a"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:84fac88278f42d61c519a6c75fb5296fd56710b05bbdcc74bdf85db409a03780"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:c68be72b1666d93b266714f2d4092d78dc53bd11cf91ed5a3c16527587a52e29"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:889a37e2acf43c377b5124166bece139b4c731b61492ab22e64d371cce0e6e80"}, + {file = "watchfiles-1.0.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ca05cacf2e5c4a97d02a2878a24020daca21dbb8823b023b978210a75c79098"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:8af4b582d5fc1b8465d1d2483e5e7b880cc1a4e99f6ff65c23d64d070867ac58"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:127de3883bdb29dbd3b21f63126bb8fa6e773b74eaef46521025a9ce390e1073"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:713f67132346bdcb4c12df185c30cf04bdf4bf6ea3acbc3ace0912cab6b7cb8c"}, + {file = "watchfiles-1.0.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:abd85de513eb83f5ec153a802348e7a5baa4588b818043848247e3e8986094e8"}, + {file = "watchfiles-1.0.3.tar.gz", hash = "sha256:f3ff7da165c99a5412fe5dd2304dd2dbaaaa5da718aad942dcb3a178eaa70c56"}, ] [package.dependencies] @@ -2602,13 +2573,13 @@ watchdog = ["watchdog (>=2.3)"] [[package]] name = "win32-setctime" -version = "1.1.0" +version = "1.2.0" description = "A small Python utility to set file creation time on Windows" optional = false python-versions = ">=3.5" files = [ - {file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"}, - {file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"}, + {file = "win32_setctime-1.2.0-py3-none-any.whl", hash = "sha256:95d644c4e708aba81dc3704a116d8cbc974d70b3bdb8be1d150e36be6e9d1390"}, + {file = "win32_setctime-1.2.0.tar.gz", hash = "sha256:ae1fdf948f5640aae05c511ade119313fb6a30d7eabe25fef9764dca5873c4c0"}, ] [package.extras] @@ -2630,93 +2601,93 @@ h11 = ">=0.9.0,<1" [[package]] name = "yarl" -version = "1.18.0" +version = "1.18.3" description = "Yet another URL library" optional = false python-versions = ">=3.9" files = [ - {file = "yarl-1.18.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:074fee89caab89a97e18ef5f29060ef61ba3cae6cd77673acc54bfdd3214b7b7"}, - {file = "yarl-1.18.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b026cf2c32daf48d90c0c4e406815c3f8f4cfe0c6dfccb094a9add1ff6a0e41a"}, - {file = "yarl-1.18.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ae38bd86eae3ba3d2ce5636cc9e23c80c9db2e9cb557e40b98153ed102b5a736"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:685cc37f3f307c6a8e879986c6d85328f4c637f002e219f50e2ef66f7e062c1d"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8254dbfce84ee5d1e81051ee7a0f1536c108ba294c0fdb5933476398df0654f3"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:20de4a8b04de70c49698dc2390b7fd2d18d424d3b876371f9b775e2b462d4b41"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0a2074a37285570d54b55820687de3d2f2b9ecf1b714e482e48c9e7c0402038"}, - {file = "yarl-1.18.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f576ed278860df2721a5d57da3381040176ef1d07def9688a385c8330db61a1"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3a3709450a574d61be6ac53d582496014342ea34876af8dc17cc16da32826c9a"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:bd80ed29761490c622edde5dd70537ca8c992c2952eb62ed46984f8eff66d6e8"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:32141e13a1d5a48525e519c9197d3f4d9744d818d5c7d6547524cc9eccc8971e"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8b8d3e4e014fb4274f1c5bf61511d2199e263909fb0b8bda2a7428b0894e8dc6"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:701bb4a8f4de191c8c0cc9a1e6d5142f4df880e9d1210e333b829ca9425570ed"}, - {file = "yarl-1.18.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:a45d94075ac0647621eaaf693c8751813a3eccac455d423f473ffed38c8ac5c9"}, - {file = "yarl-1.18.0-cp310-cp310-win32.whl", hash = "sha256:34176bfb082add67cb2a20abd85854165540891147f88b687a5ed0dc225750a0"}, - {file = "yarl-1.18.0-cp310-cp310-win_amd64.whl", hash = "sha256:73553bbeea7d6ec88c08ad8027f4e992798f0abc459361bf06641c71972794dc"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b8e8c516dc4e1a51d86ac975b0350735007e554c962281c432eaa5822aa9765c"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2e6b4466714a73f5251d84b471475850954f1fa6acce4d3f404da1d55d644c34"}, - {file = "yarl-1.18.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c893f8c1a6d48b25961e00922724732d00b39de8bb0b451307482dc87bddcd74"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13aaf2bdbc8c86ddce48626b15f4987f22e80d898818d735b20bd58f17292ee8"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd21c0128e301851de51bc607b0a6da50e82dc34e9601f4b508d08cc89ee7929"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:205de377bd23365cd85562c9c6c33844050a93661640fda38e0567d2826b50df"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed69af4fe2a0949b1ea1d012bf065c77b4c7822bad4737f17807af2adb15a73c"}, - {file = "yarl-1.18.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e1c18890091aa3cc8a77967943476b729dc2016f4cfe11e45d89b12519d4a93"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:91b8fb9427e33f83ca2ba9501221ffaac1ecf0407f758c4d2f283c523da185ee"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:536a7a8a53b75b2e98ff96edb2dfb91a26b81c4fed82782035767db5a465be46"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a64619a9c47c25582190af38e9eb382279ad42e1f06034f14d794670796016c0"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c73a6bbc97ba1b5a0c3c992ae93d721c395bdbb120492759b94cc1ac71bc6350"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a173401d7821a2a81c7b47d4e7d5c4021375a1441af0c58611c1957445055056"}, - {file = "yarl-1.18.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7520e799b1f84e095cce919bd6c23c9d49472deeef25fe1ef960b04cca51c3fc"}, - {file = "yarl-1.18.0-cp311-cp311-win32.whl", hash = "sha256:c4cb992d8090d5ae5f7afa6754d7211c578be0c45f54d3d94f7781c495d56716"}, - {file = "yarl-1.18.0-cp311-cp311-win_amd64.whl", hash = "sha256:52c136f348605974c9b1c878addd6b7a60e3bf2245833e370862009b86fa4689"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1ece25e2251c28bab737bdf0519c88189b3dd9492dc086a1d77336d940c28ced"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:454902dc1830d935c90b5b53c863ba2a98dcde0fbaa31ca2ed1ad33b2a7171c6"}, - {file = "yarl-1.18.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:01be8688fc211dc237e628fcc209dda412d35de7642453059a0553747018d075"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d26f1fa9fa2167bb238f6f4b20218eb4e88dd3ef21bb8f97439fa6b5313e30d"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b234a4a9248a9f000b7a5dfe84b8cb6210ee5120ae70eb72a4dcbdb4c528f72f"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe94d1de77c4cd8caff1bd5480e22342dbd54c93929f5943495d9c1e8abe9f42"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b4c90c5363c6b0a54188122b61edb919c2cd1119684999d08cd5e538813a28e"}, - {file = "yarl-1.18.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49a98ecadc5a241c9ba06de08127ee4796e1009555efd791bac514207862b43d"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9106025c7f261f9f5144f9aa7681d43867eed06349a7cfb297a1bc804de2f0d1"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f275ede6199d0f1ed4ea5d55a7b7573ccd40d97aee7808559e1298fe6efc8dbd"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f7edeb1dcc7f50a2c8e08b9dc13a413903b7817e72273f00878cb70e766bdb3b"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c083f6dd6951b86e484ebfc9c3524b49bcaa9c420cb4b2a78ef9f7a512bfcc85"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:80741ec5b471fbdfb997821b2842c59660a1c930ceb42f8a84ba8ca0f25a66aa"}, - {file = "yarl-1.18.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b1a3297b9cad594e1ff0c040d2881d7d3a74124a3c73e00c3c71526a1234a9f7"}, - {file = "yarl-1.18.0-cp312-cp312-win32.whl", hash = "sha256:cd6ab7d6776c186f544f893b45ee0c883542b35e8a493db74665d2e594d3ca75"}, - {file = "yarl-1.18.0-cp312-cp312-win_amd64.whl", hash = "sha256:039c299a0864d1f43c3e31570045635034ea7021db41bf4842693a72aca8df3a"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6fb64dd45453225f57d82c4764818d7a205ee31ce193e9f0086e493916bd4f72"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:3adaaf9c6b1b4fc258584f4443f24d775a2086aee82d1387e48a8b4f3d6aecf6"}, - {file = "yarl-1.18.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:da206d1ec78438a563c5429ab808a2b23ad7bc025c8adbf08540dde202be37d5"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:576d258b21c1db4c6449b1c572c75d03f16a482eb380be8003682bdbe7db2f28"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c60e547c0a375c4bfcdd60eef82e7e0e8698bf84c239d715f5c1278a73050393"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e3818eabaefb90adeb5e0f62f047310079d426387991106d4fbf3519eec7d90a"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5f72421246c21af6a92fbc8c13b6d4c5427dfd949049b937c3b731f2f9076bd"}, - {file = "yarl-1.18.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7fa7d37f2ada0f42e0723632993ed422f2a679af0e200874d9d861720a54f53e"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:42ba84e2ac26a3f252715f8ec17e6fdc0cbf95b9617c5367579fafcd7fba50eb"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:6a49ad0102c0f0ba839628d0bf45973c86ce7b590cdedf7540d5b1833ddc6f00"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:96404e8d5e1bbe36bdaa84ef89dc36f0e75939e060ca5cd45451aba01db02902"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a0509475d714df8f6d498935b3f307cd122c4ca76f7d426c7e1bb791bcd87eda"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:1ff116f0285b5c8b3b9a2680aeca29a858b3b9e0402fc79fd850b32c2bcb9f8b"}, - {file = "yarl-1.18.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e2580c1d7e66e6d29d6e11855e3b1c6381971e0edd9a5066e6c14d79bc8967af"}, - {file = "yarl-1.18.0-cp313-cp313-win32.whl", hash = "sha256:14408cc4d34e202caba7b5ac9cc84700e3421a9e2d1b157d744d101b061a4a88"}, - {file = "yarl-1.18.0-cp313-cp313-win_amd64.whl", hash = "sha256:1db1537e9cb846eb0ff206eac667f627794be8b71368c1ab3207ec7b6f8c5afc"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:fa2c9cb607e0f660d48c54a63de7a9b36fef62f6b8bd50ff592ce1137e73ac7d"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c0f4808644baf0a434a3442df5e0bedf8d05208f0719cedcd499e168b23bfdc4"}, - {file = "yarl-1.18.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7db9584235895a1dffca17e1c634b13870852094f6389b68dcc6338086aa7b08"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:309f8d27d6f93ceeeb80aa6980e883aa57895270f7f41842b92247e65d7aeddf"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:609ffd44fed2ed88d9b4ef62ee860cf86446cf066333ad4ce4123505b819e581"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f172b8b2c72a13a06ea49225a9c47079549036ad1b34afa12d5491b881f5b993"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d89ae7de94631b60d468412c18290d358a9d805182373d804ec839978b120422"}, - {file = "yarl-1.18.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:466d31fd043ef9af822ee3f1df8fdff4e8c199a7f4012c2642006af240eade17"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:7609b8462351c4836b3edce4201acb6dd46187b207c589b30a87ffd1813b48dc"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:d9d4f5e471e8dc49b593a80766c2328257e405f943c56a3dc985c125732bc4cf"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:67b336c15e564d76869c9a21316f90edf546809a5796a083b8f57c845056bc01"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:b212452b80cae26cb767aa045b051740e464c5129b7bd739c58fbb7deb339e7b"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:38b39b7b3e692b6c92b986b00137a3891eddb66311b229d1940dcbd4f025083c"}, - {file = "yarl-1.18.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a7ee6884a8848792d58b854946b685521f41d8871afa65e0d4a774954e9c9e89"}, - {file = "yarl-1.18.0-cp39-cp39-win32.whl", hash = "sha256:b4095c5019bb889aa866bf12ed4c85c0daea5aafcb7c20d1519f02a1e738f07f"}, - {file = "yarl-1.18.0-cp39-cp39-win_amd64.whl", hash = "sha256:2d90f2e4d16a5b0915ee065218b435d2ef619dd228973b1b47d262a6f7cd8fa5"}, - {file = "yarl-1.18.0-py3-none-any.whl", hash = "sha256:dbf53db46f7cf176ee01d8d98c39381440776fcda13779d269a8ba664f69bec0"}, - {file = "yarl-1.18.0.tar.gz", hash = "sha256:20d95535e7d833889982bfe7cc321b7f63bf8879788fee982c76ae2b24cfb715"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7df647e8edd71f000a5208fe6ff8c382a1de8edfbccdbbfe649d263de07d8c34"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c69697d3adff5aa4f874b19c0e4ed65180ceed6318ec856ebc423aa5850d84f7"}, + {file = "yarl-1.18.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:602d98f2c2d929f8e697ed274fbadc09902c4025c5a9963bf4e9edfc3ab6f7ed"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c654d5207c78e0bd6d749f6dae1dcbbfde3403ad3a4b11f3c5544d9906969dde"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5094d9206c64181d0f6e76ebd8fb2f8fe274950a63890ee9e0ebfd58bf9d787b"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35098b24e0327fc4ebdc8ffe336cee0a87a700c24ffed13161af80124b7dc8e5"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3236da9272872443f81fedc389bace88408f64f89f75d1bdb2256069a8730ccc"}, + {file = "yarl-1.18.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2c08cc9b16f4f4bc522771d96734c7901e7ebef70c6c5c35dd0f10845270bcd"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:80316a8bd5109320d38eef8833ccf5f89608c9107d02d2a7f985f98ed6876990"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:c1e1cc06da1491e6734f0ea1e6294ce00792193c463350626571c287c9a704db"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fea09ca13323376a2fdfb353a5fa2e59f90cd18d7ca4eaa1fd31f0a8b4f91e62"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:e3b9fd71836999aad54084906f8663dffcd2a7fb5cdafd6c37713b2e72be1760"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:757e81cae69244257d125ff31663249b3013b5dc0a8520d73694aed497fb195b"}, + {file = "yarl-1.18.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b1771de9944d875f1b98a745bc547e684b863abf8f8287da8466cf470ef52690"}, + {file = "yarl-1.18.3-cp310-cp310-win32.whl", hash = "sha256:8874027a53e3aea659a6d62751800cf6e63314c160fd607489ba5c2edd753cf6"}, + {file = "yarl-1.18.3-cp310-cp310-win_amd64.whl", hash = "sha256:93b2e109287f93db79210f86deb6b9bbb81ac32fc97236b16f7433db7fc437d8"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8503ad47387b8ebd39cbbbdf0bf113e17330ffd339ba1144074da24c545f0069"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:02ddb6756f8f4517a2d5e99d8b2f272488e18dd0bfbc802f31c16c6c20f22193"}, + {file = "yarl-1.18.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:67a283dd2882ac98cc6318384f565bffc751ab564605959df4752d42483ad889"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d980e0325b6eddc81331d3f4551e2a333999fb176fd153e075c6d1c2530aa8a8"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b643562c12680b01e17239be267bc306bbc6aac1f34f6444d1bded0c5ce438ca"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c017a3b6df3a1bd45b9fa49a0f54005e53fbcad16633870104b66fa1a30a29d8"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75674776d96d7b851b6498f17824ba17849d790a44d282929c42dbb77d4f17ae"}, + {file = "yarl-1.18.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ccaa3a4b521b780a7e771cc336a2dba389a0861592bbce09a476190bb0c8b4b3"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2d06d3005e668744e11ed80812e61efd77d70bb7f03e33c1598c301eea20efbb"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:9d41beda9dc97ca9ab0b9888cb71f7539124bc05df02c0cff6e5acc5a19dcc6e"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ba23302c0c61a9999784e73809427c9dbedd79f66a13d84ad1b1943802eaaf59"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:6748dbf9bfa5ba1afcc7556b71cda0d7ce5f24768043a02a58846e4a443d808d"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0b0cad37311123211dc91eadcb322ef4d4a66008d3e1bdc404808992260e1a0e"}, + {file = "yarl-1.18.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0fb2171a4486bb075316ee754c6d8382ea6eb8b399d4ec62fde2b591f879778a"}, + {file = "yarl-1.18.3-cp311-cp311-win32.whl", hash = "sha256:61b1a825a13bef4a5f10b1885245377d3cd0bf87cba068e1d9a88c2ae36880e1"}, + {file = "yarl-1.18.3-cp311-cp311-win_amd64.whl", hash = "sha256:b9d60031cf568c627d028239693fd718025719c02c9f55df0a53e587aab951b5"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1dd4bdd05407ced96fed3d7f25dbbf88d2ffb045a0db60dbc247f5b3c5c25d50"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7c33dd1931a95e5d9a772d0ac5e44cac8957eaf58e3c8da8c1414de7dd27c576"}, + {file = "yarl-1.18.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:25b411eddcfd56a2f0cd6a384e9f4f7aa3efee14b188de13048c25b5e91f1640"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:436c4fc0a4d66b2badc6c5fc5ef4e47bb10e4fd9bf0c79524ac719a01f3607c2"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e35ef8683211db69ffe129a25d5634319a677570ab6b2eba4afa860f54eeaf75"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84b2deecba4a3f1a398df819151eb72d29bfeb3b69abb145a00ddc8d30094512"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00e5a1fea0fd4f5bfa7440a47eff01d9822a65b4488f7cff83155a0f31a2ecba"}, + {file = "yarl-1.18.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d0e883008013c0e4aef84dcfe2a0b172c4d23c2669412cf5b3371003941f72bb"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5a3f356548e34a70b0172d8890006c37be92995f62d95a07b4a42e90fba54272"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ccd17349166b1bee6e529b4add61727d3f55edb7babbe4069b5764c9587a8cc6"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b958ddd075ddba5b09bb0be8a6d9906d2ce933aee81100db289badbeb966f54e"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c7d79f7d9aabd6011004e33b22bc13056a3e3fb54794d138af57f5ee9d9032cb"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4891ed92157e5430874dad17b15eb1fda57627710756c27422200c52d8a4e393"}, + {file = "yarl-1.18.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ce1af883b94304f493698b00d0f006d56aea98aeb49d75ec7d98cd4a777e9285"}, + {file = "yarl-1.18.3-cp312-cp312-win32.whl", hash = "sha256:f91c4803173928a25e1a55b943c81f55b8872f0018be83e3ad4938adffb77dd2"}, + {file = "yarl-1.18.3-cp312-cp312-win_amd64.whl", hash = "sha256:7e2ee16578af3b52ac2f334c3b1f92262f47e02cc6193c598502bd46f5cd1477"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:90adb47ad432332d4f0bc28f83a5963f426ce9a1a8809f5e584e704b82685dcb"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:913829534200eb0f789d45349e55203a091f45c37a2674678744ae52fae23efa"}, + {file = "yarl-1.18.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ef9f7768395923c3039055c14334ba4d926f3baf7b776c923c93d80195624782"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88a19f62ff30117e706ebc9090b8ecc79aeb77d0b1f5ec10d2d27a12bc9f66d0"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e17c9361d46a4d5addf777c6dd5eab0715a7684c2f11b88c67ac37edfba6c482"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a74a13a4c857a84a845505fd2d68e54826a2cd01935a96efb1e9d86c728e186"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41f7ce59d6ee7741af71d82020346af364949314ed3d87553763a2df1829cc58"}, + {file = "yarl-1.18.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f52a265001d830bc425f82ca9eabda94a64a4d753b07d623a9f2863fde532b53"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:82123d0c954dc58db301f5021a01854a85bf1f3bb7d12ae0c01afc414a882ca2"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:2ec9bbba33b2d00999af4631a3397d1fd78290c48e2a3e52d8dd72db3a067ac8"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fbd6748e8ab9b41171bb95c6142faf068f5ef1511935a0aa07025438dd9a9bc1"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:877d209b6aebeb5b16c42cbb377f5f94d9e556626b1bfff66d7b0d115be88d0a"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b464c4ab4bfcb41e3bfd3f1c26600d038376c2de3297760dfe064d2cb7ea8e10"}, + {file = "yarl-1.18.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8d39d351e7faf01483cc7ff7c0213c412e38e5a340238826be7e0e4da450fdc8"}, + {file = "yarl-1.18.3-cp313-cp313-win32.whl", hash = "sha256:61ee62ead9b68b9123ec24bc866cbef297dd266175d53296e2db5e7f797f902d"}, + {file = "yarl-1.18.3-cp313-cp313-win_amd64.whl", hash = "sha256:578e281c393af575879990861823ef19d66e2b1d0098414855dd367e234f5b3c"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:61e5e68cb65ac8f547f6b5ef933f510134a6bf31bb178be428994b0cb46c2a04"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe57328fbc1bfd0bd0514470ac692630f3901c0ee39052ae47acd1d90a436719"}, + {file = "yarl-1.18.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a440a2a624683108a1b454705ecd7afc1c3438a08e890a1513d468671d90a04e"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09c7907c8548bcd6ab860e5f513e727c53b4a714f459b084f6580b49fa1b9cee"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b4f6450109834af88cb4cc5ecddfc5380ebb9c228695afc11915a0bf82116789"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9ca04806f3be0ac6d558fffc2fdf8fcef767e0489d2684a21912cc4ed0cd1b8"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77a6e85b90a7641d2e07184df5557132a337f136250caafc9ccaa4a2a998ca2c"}, + {file = "yarl-1.18.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6333c5a377c8e2f5fae35e7b8f145c617b02c939d04110c76f29ee3676b5f9a5"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0b3c92fa08759dbf12b3a59579a4096ba9af8dd344d9a813fc7f5070d86bbab1"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_armv7l.whl", hash = "sha256:4ac515b860c36becb81bb84b667466885096b5fc85596948548b667da3bf9f24"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:045b8482ce9483ada4f3f23b3774f4e1bf4f23a2d5c912ed5170f68efb053318"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:a4bb030cf46a434ec0225bddbebd4b89e6471814ca851abb8696170adb163985"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:54d6921f07555713b9300bee9c50fb46e57e2e639027089b1d795ecd9f7fa910"}, + {file = "yarl-1.18.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1d407181cfa6e70077df3377938c08012d18893f9f20e92f7d2f314a437c30b1"}, + {file = "yarl-1.18.3-cp39-cp39-win32.whl", hash = "sha256:ac36703a585e0929b032fbaab0707b75dc12703766d0b53486eabd5139ebadd5"}, + {file = "yarl-1.18.3-cp39-cp39-win_amd64.whl", hash = "sha256:ba87babd629f8af77f557b61e49e7c7cac36f22f871156b91e10a6e9d4f829e9"}, + {file = "yarl-1.18.3-py3-none-any.whl", hash = "sha256:b57f4f58099328dfb26c6a771d09fb20dbbae81d20cfb66141251ea063bd101b"}, + {file = "yarl-1.18.3.tar.gz", hash = "sha256:ac1801c45cbf77b6c99242eeff4fffb5e4e73a800b5c4ad4fc0be5def634d2e1"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index 4dc703974442..e9e364ddb9ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nonebot2" -version = "2.4.0" +version = "2.4.1" description = "An asynchronous python bot framework." authors = ["yanyongyu "] license = "MIT" diff --git a/website/versioned_docs/version-2.3.1/README.md b/website/versioned_docs/version-2.3.1/README.md deleted file mode 100644 index 28d1d57a5a08..000000000000 --- a/website/versioned_docs/version-2.3.1/README.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 0 -id: index -slug: / ---- - -# 概览 - -NoneBot2 是一个现代、跨平台、可扩展的 Python 聊天机器人框架(下称 NoneBot),它基于 Python 的类型注解和异步优先特性(兼容同步),能够为你的需求实现提供便捷灵活的支持。同时,NoneBot 拥有大量的开发者为其开发插件,用户无需编写任何代码,仅需完成环境配置及插件安装,就可以正常使用 NoneBot。 - -需要注意的是,NoneBot 仅支持 **Python 3.9 以上版本** - -## 特色 - -### 异步优先 - -NoneBot 基于 Python [asyncio](https://docs.python.org/zh-cn/3/library/asyncio.html) 编写,并在异步机制的基础上进行了一定程度的同步函数兼容。 - -### 完整的类型注解 - -NoneBot 参考 [PEP 484](https://www.python.org/dev/peps/pep-0484/) 等 PEP 完整实现了类型注解,通过 Pyright(Pylance) 检查。配合编辑器的类型推导功能,能将绝大多数的 Bug 杜绝在编辑器中([编辑器支持](./editor-support))。 - -### 开箱即用 - -NoneBot 提供了使用便捷、具有交互式功能的命令行工具--`nb-cli`,使得用户初次接触 NoneBot 时更容易上手。使用方法请阅读本文档[指南](./quick-start.mdx)以及 [CLI 文档](https://cli.nonebot.dev/)。 - -### 插件系统 - -插件系统是 NoneBot 的核心,通过它可以实现机器人的模块化以及功能扩展,便于维护和管理。 - -### 依赖注入系统 - -NoneBot 采用了一套自行定义的依赖注入系统,可以让事件的处理过程更加的简洁、清晰,增加代码的可读性,减少代码冗余。 - -#### 什么是依赖注入 - -[**『依赖注入』**](https://zh.wikipedia.org/wiki/%E6%8E%A7%E5%88%B6%E5%8F%8D%E8%BD%AC)意思是,在编程中,有一种方法可以让你的代码声明它工作和使用所需要的东西,即**『依赖』**。 - -系统(在这里是指 NoneBot)将负责做任何需要的事情,为你的代码提供这些必要依赖(即**『注入』**依赖性) - -这在你有以下情形的需求时非常有用: - -- 这部分代码拥有共享的逻辑(同样的代码逻辑多次重复) -- 共享数据库以及网络请求连接会话 - - 比如 `httpx.AsyncClient`、`aiohttp.ClientSession` 和 `sqlalchemy.Session` -- 机器人用户权限检查以及认证 -- 还有更多... - -它在完成上述工作的同时,还能尽量减少代码的耦合和重复 diff --git a/website/versioned_docs/version-2.3.1/advanced/adapter.md b/website/versioned_docs/version-2.3.1/advanced/adapter.md deleted file mode 100644 index 61f52a69a354..000000000000 --- a/website/versioned_docs/version-2.3.1/advanced/adapter.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -sidebar_position: 1 -description: 注册适配器与指定平台交互 - -options: - menu: - - category: advanced - weight: 20 ---- - -# 使用适配器 - -适配器 (Adapter) 是机器人与平台交互的核心桥梁,它负责在驱动器和机器人插件之间转换与传递消息。 - -## 适配器功能与组成 - -适配器通常有两种功能,分别是**接收事件**和**调用平台接口**。其中,接收事件是指将驱动器收到的事件消息转换为 NoneBot 定义的事件模型,然后交由机器人插件处理;调用平台接口是指将机器人插件调用平台接口的数据转换为平台指定的格式,然后交由驱动器发送,并接收接口返回数据。 - -为了实现这两种功能,适配器通常由四个部分组成: - -- **Adapter**:负责转换事件和调用接口,正确创建 Bot 对象并注册到 NoneBot 中。 -- **Bot**:负责存储平台机器人相关信息,并提供回复事件的方法。 -- **Event**:负责定义事件内容,以及事件主体对象。 -- **Message**:负责正确序列化消息,以便机器人插件处理。 - -## 注册适配器 - -在使用适配器之前,我们需要先将适配器注册到驱动器中,这样适配器就可以通过驱动器接收事件和调用接口了。我们以 Console 适配器为例,来看看如何注册适配器: - -```python {2,5} title=bot.py -import nonebot -from nonebot.adapters.console import Adapter - -driver = nonebot.get_driver() -driver.register_adapter(Adapter) -``` - -我们首先需要从适配器模块中导入所需要的适配器类,然后通过驱动器的 `register_adapter` 方法将适配器注册到驱动器中即可。如果我们需要多平台支持,可以多次调用 `register_adapter` 方法来注册多个适配器。 - -## 获取已注册的适配器 - -NoneBot 提供了 `get_adapter` 方法来获取已注册的适配器,我们可以通过适配器的名称或类型来获取指定的适配器实例: - -```python -import nonebot -from nonebot.adapters.console import Adapter - -adapters = nonebot.get_adapters() -console_adapter = nonebot.get_adapter(Adapter) -console_adapter = nonebot.get_adapter(Adapter.get_name()) -``` - -## 获取 Bot 对象 - -当前所有适配器已连接的 Bot 对象可以通过 `get_bots` 方法获取,这是一个以机器人 ID 为键的字典: - -```python -import nonebot - -bots = nonebot.get_bots() -``` - -我们也可以通过 `get_bot` 方法获取指定 ID 的 Bot 对象。如果省略 ID 参数,将会返回所有 Bot 中的第一个: - -```python -import nonebot - -bot = nonebot.get_bot("bot_id") -``` - -如果需要获取指定适配器连接的 Bot 对象,我们可以通过适配器的 `bots` 属性获取,这也是一个以机器人 ID 为键的字典: - -```python -import nonebot -from nonebot.adapters.console import Adapter - -console_adapter = nonebot.get_adapter(Adapter) -bots = console_adapter.bots -``` - -Bot 对象都具有一个 `self_id` 属性,它是机器人的唯一 ID,由适配器填写,通常为机器人的帐号 ID 或者 APP ID。 - -## 获取事件通用信息 - -适配器的所有事件模型均继承自 `Event` 基类,在[事件类型与重载](../appendices/overload.md)一节中,我们也提到了如何使用基类抽象方法来获取事件通用信息。基类能提供如下信息: - -### 事件类型 - -事件类型通常为 `meta_event`、`message`、`notice`、`request`。 - -```python -type: str = event.get_type() -``` - -### 事件名称 - -事件名称由适配器定义,通常用于日志记录。 - -```python -name: str = event.get_event_name() -``` - -### 事件描述 - -事件描述由适配器定义,通常用于日志记录。 - -```python -description: str = event.get_event_description() -``` - -### 事件日志字符串 - -事件日志字符串由事件名称和事件描述组成,用于日志记录。 - -```python -log: str = event.get_log_string() -``` - -### 事件主体 ID - -事件主体 ID 通常为机器人用户 ID。 - -```python -user_id: str = event.get_user_id() -``` - -### 事件会话 ID - -事件会话 ID 通常为机器人用户 ID 与群聊/频道 ID 组合而成。 - -```python -session_id: str = event.get_session_id() -``` - -### 事件消息 - -如果事件包含消息,则可以通过该方法获取,否则会产生异常。 - -```python -message: Message = event.get_message() -``` - -### 事件纯文本消息 - -通常为事件消息的纯文本内容,如果事件不包含消息,则会产生异常。 - -```python -text: str = event.get_plaintext() -``` - -### 事件是否与机器人有关 - -由适配器实现的判断,通常将事件目标主体为机器人、消息中包含“@机器人”或以“机器人的昵称”开始视为与机器人有关。 - -```python -is_tome: bool = event.is_tome() -``` - -## 更多 - -官方支持的适配器和社区贡献的适配器均可在[商店](/store/adapters)中查看。如果你想要开发自己的适配器,可以参考[开发文档](../developer/adapter-writing.md)。欢迎通过商店发布你的适配器。 diff --git a/website/versioned_docs/version-2.3.1/advanced/dependency.mdx b/website/versioned_docs/version-2.3.1/advanced/dependency.mdx deleted file mode 100644 index 3efc35cd2263..000000000000 --- a/website/versioned_docs/version-2.3.1/advanced/dependency.mdx +++ /dev/null @@ -1,1320 +0,0 @@ ---- -sidebar_position: 6 -description: 通过依赖注入获取上下文信息 - -options: - menu: - - category: advanced - weight: 70 ---- - -# 依赖注入 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -在事件处理流程中,事件响应器具有自己独立的上下文,例如:当前的事件、机器人等信息。在 NoneBot 中,这些信息通过依赖注入的方式提供给事件处理函数,可以让代码更加整洁可读、提升复用能力。 - -在了解如何使用依赖注入获取上下文信息之前,我们需要先了解两个概念: - -- `Dependent`:使用依赖注入的函数或其他任意可调用对象。如:事件处理函数、自定义的依赖函数等。 -- `Dependency`:依赖注入的对象。如:当前事件、机器人等。 - -在之前的文档中,我们已经多次使用了依赖注入来获取事件信息。通过对函数参数依照一定规则填写类型注解,即可获得想要的上下文信息。任何一个事件处理函数在添加到事件处理流程时,都会根据一定规则提前将其解析成一个 `Dependent` 对象,方便运行时进行注入。如果遇到无法解析的参数,将会抛出 `ValueError("Unknown parameter")` 的异常。整个依赖注入系统可以分为两部分: - -- 参数解析 - - 依据一定规则解析函数参数,识别 `Dependency` 依赖。 - - 生成 `Dependent` 对象。 -- 执行 - - 根据已经解析的 `Dependency` 依赖,执行调用。 - - 将所有 `Dependency` 的返回值根据参数名传入并调用 `Dependent` 。 - -:::danger 警告 -在依赖注入中,类型注解是非常重要的,因为它不仅可以决定依赖注入的对象,还可以触发[重载机制](../appendices/overload.md#重载)。如果类型注解与实际获得数据类型不一致,将会跳过当前 `Dependent` 对象(即事件处理函数)。 -::: - -:::tip 提示 -如果对于依赖注入的解析流程有疑问,可以调整[日志等级配置项](../appendices/config.mdx#log-level)为 `TRACE`,查看依赖解析日志。 -::: - -## 同步支持 - -对于依赖注入系统中的 `Dependent` 或者 `Dependency` 对象,均支持同步类型的函数或可调用对象。例如: - -```python {6,10} -from nonebot import on_command -from nonebot.params import Depends - -matcher = on_command("foo") - -def dependency() -> str: - return "something" - -@matcher.handle() -def _(result: str = Depends(dependency)): - ... -``` - -## 非依赖参数 - -在依赖注入解析中,任何无法解析的参数如果带有默认值,将会被视为非依赖参数。这些参数在依赖运行时将不会被注入而使用函数默认值。例如: - -```python -async def _(foo: str = "bar"): ... -``` - -## 类型依赖注入 - -这一类的依赖注入仅需要在函数参数中添加对应的类型注解即可。 - -### Bot - -获取当前事件的 Bot 对象。 - -通过标注参数为 `Bot` 类型,或者一系列 `Bot` 类型,即可获取到当前事件的 Bot 对象。为兼容性考虑,如果参数名为 `bot` 且无类型注解,也会视为 Bot 依赖注入。 - -Bot 依赖注入支持重载(即:可以标注参数为子类型)且具有[重载优先检查权](../appendices/overload.md#重载)。 - - - - -```python -from nonebot.adapters import Bot -from nonebot.adapters.console import Bot as ConsoleBot -from nonebot.adapters.onebot.v11 import Bot as OneBotV11Bot - -async def _(foo: Bot): ... -async def _(foo: ConsoleBot | OneBotV11Bot): ... -async def _(bot): ... # 兼容性处理 -``` - - - - -```python -from typing import Union - -from nonebot.adapters import Bot -from nonebot.adapters.console import Bot as ConsoleBot -from nonebot.adapters.onebot.v11 import Bot as OneBotV11Bot - -async def _(foo: Bot): ... -async def _(foo: Union[ConsoleBot, OneBotV11Bot]): ... -async def _(bot): ... # 兼容性处理 -``` - - - - -### Event - -获取当前事件。 - -通过标注参数为 `Event` 类型,或者一系列 `Event` 类型,即可获取到当前事件。为兼容性考虑,如果参数名为 `event` 且无类型注解,也会视为 Event 依赖注入。 - -Event 依赖注入支持重载(即:可以标注参数为子类型)且具有[重载优先检查权](../appendices/overload.md#重载)。 - - - - -```python -from nonebot.adapters import Event -from nonebot.adapters.onebot.v11 import PrivateMessageEvent, GroupMessageEvent - -async def _(foo: Event): ... -async def _(foo: PrivateMessageEvent | GroupMessageEvent): ... -async def _(event): ... # 兼容性处理 -``` - - - - -```python -from typing import Union - -from nonebot.adapters import Event -from nonebot.adapters.onebot.v11 import PrivateMessageEvent, GroupMessageEvent - -async def _(foo: Event): ... -async def _(foo: Union[PrivateMessageEvent, GroupMessageEvent]): ... -async def _(event): ... # 兼容性处理 -``` - - - - -### State - -获取当前[会话状态](../appendices/session-state.md)。 - -通过标注参数为 `T_State` 类型,即可获取到当前会话状态。为兼容性考虑,如果参数名为 `state` 且无类型注解,也会视为 State 依赖注入。 - -```python -from nonebot.typing import T_State - -async def _(foo: T_State): ... -``` - -### Matcher - -获取当前事件响应器实例。常用于使用[事件响应器操作](../appendices/session-control.mdx)。 - -通过标注参数为 `Matcher` 类型,或者一系列 `Matcher` 类型,即可获取到当前事件。为兼容性考虑,如果参数名为 `matcher` 且无类型注解,也会视为 Matcher 依赖注入。 - -Matcher 依赖注入支持重载(即:可以标注参数为子类型)且具有[重载优先检查权](../appendices/overload.md#重载)。 - -```python -from nonebot.matcher import Matcher - -async def _(foo: Matcher): ... -async def _(matcher): ... # 兼容性处理 -``` - -### Exception - -获取事件响应器运行中抛出的异常。该依赖注入目前仅在事件响应器运行后处理 Hook 中可用。 - -通过标注参数为异常类型,或者一系列异常类型,即可获取到事件响应器运行中抛出的异常。 - - - - -```python {5,8} -from nonebot.message import run_postprocessor -from nonebot.exception import ActionFailed, NetworkError - -@run_postprocessor -async def _(e: Exception): ... - -@run_postprocessor -async def _(e: ActionFailed | NetworkError): ... -``` - - - - -```python {6,9} -from typing import Union -from nonebot.message import run_postprocessor -from nonebot.exception import ActionFailed, NetworkError - -@run_postprocessor -async def _(e: Exception): ... - -@run_postprocessor -async def _(e: Union[ActionFailed, NetworkError]): ... -``` - - - - -## 子依赖 - -在依赖注入系统中,我们可以定义一个子依赖,来执行自定义的操作,提高代码复用性以及处理性能。 - -### 定义子依赖 - -子依赖使用 `Depends` 标记进行定义,其参数即依赖的函数或可调用对象,同样会被解析为 `Dependent` 对象,将会在依赖注入期间执行。我们来看一个例子: - - - - -```python {5,15} -from typing import Annotated - -from nonebot import on_command -from nonebot.adapters import Event -from nonebot.params import Depends - -test = on_command("test") - -async def check(event: Event) -> Event: - if event.get_user_id() in BLACKLIST: - await test.finish() - return event - -@test.handle() -async def _(event: Annotated[Event, Depends(check)]): - ... -``` - - - - -```python {3,13} -from nonebot import on_command -from nonebot.adapters import Event -from nonebot.params import Depends - -test = on_command("test") - -async def check(event: Event) -> Event: - if event.get_user_id() in BLACKLIST: - await test.finish() - return event - -@test.handle() -async def _(event: Event = Depends(check)): - ... -``` - - - - -在上面的代码中,我们使用 `Depends` 标记定义了一个子依赖 `check`。它判断事件主体用户是否在黑名单中,如果在,则直接结束事件处理流程。如果不在,则返回事件对象,以便事件处理函数可以继续执行。 - -通过将 `Depends` 包裹的子依赖作为参数的默认值,我们就可以在执行事件处理函数之前执行子依赖,并将其返回值作为参数传入事件处理函数。子依赖和普通的事件处理函数并没有区别,同样可以使用依赖注入,并且可以返回任何类型的值。但需要注意的是,如果事件处理函数参数的类型注解与子依赖返回值的类型**不一致**,将会触发[重载](../appendices/overload.md)而跳过当前事件处理函数。 - -特别的,我们可以为 `Dependent` 对象定义一系列前置子依赖,它们会在参数执行前被顺序执行,且返回值将会被忽略,例如: - -```python {11} -from nonebot import on_command -from nonebot.adapters import Event -from nonebot.params import Depends - -test = on_command("test") - -async def check(event: Event): - if event.get_user_id() in BLACKLIST: - await test.finish() - -@test.handle(parameterless=[Depends(check)]) -async def _(): - ... -``` - -### 依赖缓存 - -NoneBot 在执行子依赖时,会将其返回值缓存起来。当我们在使用子依赖时,`Depends` 具有一个参数 `use_cache`,默认为 `True`。此时在事件处理流程中,多次使用同一个子依赖时,将会使用缓存中的结果而不会重复执行。这在很多情景中非常有用,例如: - - - - -```python {7} -import random -from typing import Annotated - -async def random_result() -> int: - return random.randint(1, 100) - -async def _(x: Annotated[int, Depends(random_result)]): - print(x) -``` - - - - -```python {6} -import random - -async def random_result() -> int: - return random.randint(1, 100) - -async def _(x: int = Depends(random_result)): - print(x) -``` - - - - -此时,在同一事件处理流程中,这个随机函数的返回值将会保持一致。如果我们希望每次都重新执行子依赖,可以将 `use_cache` 设置为 `False`。 - - - - -```python {7} -import random -from typing import Annotated - -async def random_result() -> int: - return random.randint(1, 100) - -async def _(x: Annotated[int, Depends(random_result, use_cache=False)]): - print(x) -``` - - - - -```python {6} -import random - -async def random_result() -> int: - return random.randint(1, 100) - -async def _(x: int = Depends(random_result, use_cache=False)): - print(x) -``` - - - - -:::tip 提示 -缓存的生命周期与当前接收到的事件相同。接收到事件后,子依赖在首次执行时缓存,在该事件处理完成后,缓存就会被清除。 -::: - -### 类型转换与校验 - -在依赖注入系统中,我们可以对子依赖的返回值进行自动类型转换与校验。这个功能由 Pydantic 支持,因此我们通过参数类型注解自动使用 Pydantic 支持的类型转换。例如: - - - - -```python {6,9} -from typing import Annotated - -from nonebot.params import Depends -from nonebot.adapters import Event - -def get_user_id(event: Event) -> str: - return event.get_user_id() - -async def _(user_id: Annotated[int, Depends(get_user_id, validate=True)]): - print(user_id) -``` - - - - -```python {4,7} -from nonebot.params import Depends -from nonebot.adapters import Event - -def get_user_id(event: Event) -> str: - return event.get_user_id() - -async def _(user_id: int = Depends(get_user_id, validate=True)): - print(user_id) -``` - - - - -在进行类型自动转换的同时,Pydantic 还支持对数据进行更多的限制,如:大于、小于、长度等。使用方法如下: - - - - -```python {7,10} -from typing import Annotated - -from pydantic import Field -from nonebot.params import Depends -from nonebot.adapters import Event - -def get_user_id(event: Event) -> str: - return event.get_user_id() - -async def _(user_id: Annotated[int, Depends(get_user_id, validate=Field(gt=100))]): - print(user_id) -``` - - - - -```python {5,8} -from pydantic import Field -from nonebot.params import Depends -from nonebot.adapters import Event - -def get_user_id(event: Event) -> str: - return event.get_user_id() - -async def _(user_id: int = Depends(get_user_id, validate=Field(gt=100))): - print(user_id) -``` - - - - -### 类作为依赖 - -在前面的事例中,我们使用了函数作为子依赖。实际上,我们还可以使用类作为依赖。当我们在实例化一个类的时候,其实我们就在调用它,类本身也是一个可调用对象。例如: - - - - -```python {16} -from typing import Annotated -from dataclasses import dataclass - -from nonebot.params import Depends -from nonebot.adapters import Event -from nonebot.typing import T_State - -def get_context(state: T_State) -> dict: - return state.setdefault("context", {}) - -@dataclass -class ClassDependency: - event: Event - context: dict = Depends(get_context) - -async def _(data: Annotated[ClassDependency, Depends(ClassDependency)]): - print(data.event, data.context) -``` - - - - -```python {15} -from dataclasses import dataclass - -from nonebot.params import Depends -from nonebot.adapters import Event -from nonebot.typing import T_State - -def get_context(state: T_State) -> dict: - return state.setdefault("context", {}) - -@dataclass -class ClassDependency: - event: Event - context: dict = Depends(get_context) - -async def _(data: ClassDependency = Depends(ClassDependency)): - print(data.event, data.context) -``` - - - - -可以看到,我们使用 `dataclass` 定义了一个类。由于这个类的 `__init__` 方法可以被依赖注入系统解析,因此,我们可以将其作为子依赖进行声明。特别地,对于类依赖,`Depends` 的参数可以为空,NoneBot 将会使用参数的类型注解进行解析与推断: - - - - -```python -from typing import Annotated - -async def _(data: Annotated[ClassDependency, Depends()]): - print(data.event, data.context) -``` - - - - -```python -async def _(data: ClassDependency = Depends()): - print(data.event, data.context) -``` - - - - -### 生成器作为依赖 - -NoneBot 的依赖注入支持依赖项在事件处理流程结束后进行一些额外的工作,比如数据库 session 或者网络 IO 的关闭,互斥锁的解锁等等。同时,由于[依赖缓存](#依赖缓存)的存在,我们可以通过这种方式来实现共享一个 session 等功能。 - -要实现上述功能,我们可以用生成器函数作为依赖项,我们用 `yield` 关键字取代 `return` 关键字,并在 `yield` 之后进行额外的工作。 - -我们可以看下述代码段, 使用 `httpx.AsyncClient` 异步网络 IO,并在事件处理流程中共用一个 client: - - - - -```python {15} -from typing import Annotated -from collections.abc import AsyncGenerator - -import httpx -from nonebot.params import Depends - -async def get_client() -> AsyncGenerator[httpx.AsyncClient, None]: - try: - async with httpx.AsyncClient() as client: - yield client - finally: - # 在这里进行额外的工作 - - -@test.handle() -async def _(x: Annotated[httpx.AsyncClient, Depends(get_client)]): - resp = await x.get("https://nonebot.dev") -``` - - - - -```python {15} -from collections.abc import AsyncGenerator - -import httpx -from nonebot.params import Depends - -async def get_client() -> AsyncGenerator[httpx.AsyncClient, None]: - try: - async with httpx.AsyncClient() as client: - yield client - finally: - # 在这里进行额外的工作 - - -@test.handle() -async def _(x: httpx.AsyncClient = Depends(get_client)): - resp = await x.get("https://nonebot.dev") -``` - - - - -:::caution 注意 -生成器作为依赖时,其中只能进行一次 `yield`,否则将会触发异常。如果对此有疑问并想探究原因,可以参考 [contextmanager](https://docs.python.org/zh-cn/3/library/contextlib.html#contextlib.contextmanager) 和 [asynccontextmanager](https://docs.python.org/zh-cn/3/library/contextlib.html#contextlib.asynccontextmanager) 文档。事实上,NoneBot 内部就使用了这两个装饰器。 -::: - -### 可调用对象作为依赖 - -在 Python 里,为类定义 `__call__` 方法就可以使得这个类的实例成为一个可调用对象。因此,我们也可以将定义了 `__call__` 方法的类的实例作为依赖。事实上,NoneBot 的[内置响应规则](./matcher.md#内置响应规则)就广泛使用了这种方式,以 `is_type` 规则为例: - -```python -from nonebot.adapters import Event - -class IsTypeRule: - def __init__(self, *types: type[Event]): - self.types = types - - async def __call__(self, event: Event) -> bool: - return isinstance(event, self.types) -``` - -我们在使用 `is_type` 时,即实例化了 `IsTypeRule` 类,然后将实例作为响应规则依赖项传入。 - -## 其他依赖注入 - -这一类的依赖注入通常基于子依赖编写,为我们开发者提供更方便的途径获取上下文信息。 - -### EventType - -获取当前事件的类型。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import EventType - -async def _(foo: Annotated[str, EventType()]): ... -``` - - - - -```python {3} -from nonebot.params import EventType - -async def _(foo: str = EventType()): ... -``` - - - - -### EventMessage - -获取当前事件的消息。 - - - - -```python {5} -from typing import Annotated -from nonebot.adapters import Message -from nonebot.params import EventMessage - -async def _(foo: Annotated[Message, EventMessage()]): ... -``` - - - - -```python {4} -from nonebot.adapters import Message -from nonebot.params import EventMessage - -async def _(foo: Message = EventMessage()): ... -``` - - - - -### EventPlainText - -获取当前事件的消息纯文本部分。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import EventPlainText - -async def _(foo: Annotated[str, EventPlainText()]): ... -``` - - - - -```python {3} -from nonebot.params import EventPlainText - -async def _(foo: str = EventPlainText()): ... -``` - - - - -### EventToMe - -获取当前事件是否与机器人相关。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import EventToMe - -async def _(foo: Annotated[bool, EventToMe()]): ... -``` - - - - -```python {3} -from nonebot.params import EventToMe - -async def _(foo: bool = EventToMe()): ... -``` - - - - -### Command - -获取当前命令型消息的元组形式命令名。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import Command - -async def _(foo: Annotated[tuple[str, ...], Command()]): ... -``` - - - - -```python {4} -from nonebot.params import Command - -async def _(foo: tuple[str, ...] = Command()): ... -``` - - - - -:::tip 提示 -命令详情只能在**触发命令型事件响应器时**获取。如果在事件处理后续流程中获取,则会获取到不同的值。 -::: - -### RawCommand - -获取当前命令型消息的文本形式命令名。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import RawCommand - -async def _(foo: Annotated[str, RawCommand()]): ... -``` - - - - -```python {3} -from nonebot.params import RawCommand - -async def _(foo: str = RawCommand()): ... -``` - - - - -:::tip 提示 -命令详情只能在**触发命令型事件响应器时**获取。如果在事件处理后续流程中获取,则会获取到不同的值。 -::: - -### CommandArg - -获取命令型消息命令后跟随的参数。 - - - - -```python {5} -from typing import Annotated -from nonebot.adapters import Message -from nonebot.params import CommandArg - -async def _(foo: Annotated[Message, CommandArg()]): ... -``` - - - - -```python {4} -from nonebot.adapters import Message -from nonebot.params import CommandArg - -async def _(foo: Message = CommandArg()): ... -``` - - - - -:::tip 提示 -命令详情只能在**触发命令型事件响应器时**获取。如果在事件处理后续流程中获取,则会获取到不同的值。 -::: - -### CommandStart - -获取命令型消息命令前缀。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import CommandStart - -async def _(foo: Annotated[str, CommandStart()]): ... -``` - - - - -```python {3} -from nonebot.params import CommandStart - -async def _(foo: str = CommandStart()): ... -``` - - - - -:::tip 提示 -命令详情只能在**触发命令型事件响应器时**获取。如果在事件处理后续流程中获取,则会获取到不同的值。 -::: - -### CommandWhitespace - -获取命令型消息命令与参数间空白符。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import CommandWhitespace - -async def _(foo: Annotated[str, CommandWhitespace()]): ... -``` - - - - -```python {3} -from nonebot.params import CommandWhitespace - -async def _(foo: str = CommandWhitespace()): ... -``` - - - - -:::tip 提示 -命令详情只能在**触发命令型事件响应器时**获取。如果在事件处理后续流程中获取,则会获取到不同的值。 -::: - -### ShellCommandArgv - -获取 shell 命令解析前的参数列表,列表中可能包含文本字符串和富文本消息段(如:图片)。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import ShellCommandArgs - -async def _(foo: Annotated[list[str | MessageSegment], ShellCommandArgv()]): ... -``` - -```python {4} -from nonebot.params import ShellCommandArgs - -async def _(foo: list[str | MessageSegment] = ShellCommandArgv()): ... -``` - - - - -```python {4} -from typing import Union, Annotated -from nonebot.params import ShellCommandArgs - -async def _(foo: Annotated[list[Union[str, MessageSegment]], ShellCommandArgv()]): ... -``` - -```python {4} -from typing import Union -from nonebot.params import ShellCommandArgs - -async def _(foo: list[Union[str, MessageSegment]] = ShellCommandArgv()): ... -``` - - - - -### ShellCommandArgs - -获取 shell 命令解析后的参数 Namespace,支持 MessageSegment 富文本(如:图片)。 - -:::tip 提示 -如果参数解析成功,则为 parser 返回的 Namespace;如果参数解析失败,则为 [`ParserExit`](../api/exception.md#ParserExit) 异常,并携带错误码与错误信息。通过重载机制即可处理两种不同的情况。 - -由于 `ArgumentParser` 在解析到 `--help` 参数时也会抛出异常,这种情况下错误码为 `0` 且错误信息即为帮助信息。 -::: - - - - -```python {14,22} -from typing import Annotated - -from nonebot import on_shell_command -from nonebot.exception import ParserExit -from nonebot.params import ShellCommandArgs -from nonebot.rule import Namespace, ArgumentParser - -parser = ArgumentParser("demo") -# parser.add_argument ... -matcher = on_shell_command("cmd", parser=parser) - -# 解析失败 -@matcher.handle() -async def _(foo: Annotated[ParserExit, ShellCommandArgs()]): - if foo.status == 0: - foo.message # help message - else: - foo.message # error message - -# 解析成功 -@matcher.handle() -async def _(foo: Annotated[Namespace, ShellCommandArgs()]): - arg_dict = vars(foo) -``` - - - - -```python {12,20} -from nonebot import on_shell_command -from nonebot.exception import ParserExit -from nonebot.params import ShellCommandArgs -from nonebot.rule import Namespace, ArgumentParser - -parser = ArgumentParser("demo") -# parser.add_argument ... -matcher = on_shell_command("cmd", parser=parser) - -# 解析失败 -@matcher.handle() -async def _(foo: ParserExit = ShellCommandArgs()): - if foo.status == 0: - foo.message # help message - else: - foo.message # error message - -# 解析成功 -@matcher.handle() -async def _(foo: Namespace = ShellCommandArgs()): - arg_dict = vars(foo) -``` - - - - -### RegexMatched - -获取正则匹配结果的对象。 - - - - -```python {5} -from re import Match -from typing import Annotated -from nonebot.params import RegexMatched - -async def _(foo: Annotated[Match[str], RegexMatched()]): ... -``` - - - - -```python {4} -from re import Match -from nonebot.params import RegexMatched - -async def _(foo: Match[str] = RegexMatched()): ... -``` - - - - -### RegexStr - -获取正则匹配结果的文本。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import RegexStr - -async def _(foo: Annotated[str, RegexStr()]): ... -``` - - - - -```python {3} -from nonebot.params import RegexStr - -async def _(foo: str = RegexStr()): ... -``` - - - - -### RegexGroup - -获取正则匹配结果的 group 元组。 - - - - -```python {4} -from typing import Any, Annotated -from nonebot.params import RegexGroup - -async def _(foo: Annotated[tuple[Any, ...], RegexGroup()]): ... -``` - - - - -```python {4} -from typing import Any -from nonebot.params import RegexGroup - -async def _(foo: tuple[Any, ...] = RegexGroup()): ... -``` - - - - -### RegexDict - -获取正则匹配结果的 group 字典。 - - - - -```python {4} -from typing import Any, Annotated -from nonebot.params import RegexDict - -async def _(foo: Annotated[dict[str, Any], RegexDict()]): ... -``` - - - - -```python {4} -from typing import Any -from nonebot.params import RegexDict - -async def _(foo: dict[str, Any] = RegexDict()): ... -``` - - - - -### Startswith - -获取触发响应器的消息前缀字符串。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import Startswith - -async def _(foo: Annotated[str, Startswith()]): ... -``` - - - - -```python {3} -from nonebot.params import Startswith - -async def _(foo: str = Startswith()): ... -``` - - - - -### Endswith - -获取触发响应器的消息后缀字符串。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import Endswith - -async def _(foo: Annotated[str, Endswith()]): ... -``` - - - - -```python {3} -from nonebot.params import Endswith - -async def _(foo: str = Endswith()): ... -``` - - - - -### Fullmatch - -获取触发响应器的消息字符串。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import Fullmatch - -async def _(foo: Annotated[str, Fullmatch()]): ... -``` - - - - -```python {3} -from nonebot.params import Fullmatch - -async def _(foo: str = Fullmatch()): ... -``` - - - - -### Keyword - -获取触发响应器的关键字字符串。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import Keyword - -async def _(foo: Annotated[str, Keyword()]): ... -``` - - - - -```python {3} -from nonebot.params import Keyword - -async def _(foo: str = Keyword()): ... -``` - - - - -### Received - -获取某次 `receive` 接收的事件。 - - - - -```python {7} -from typing import Annotated - -from nonebot.adapters import Event -from nonebot.params import Received - -@matcher.receive("id") -async def _(foo: Annotated[Event, Received("id")]): ... -``` - - - - -```python {5} -from nonebot.adapters import Event -from nonebot.params import Received - -@matcher.receive("id") -async def _(foo: Event = Received("id")): ... -``` - - - - -### LastReceived - -获取最近一次 `receive` 接收的事件。 - - - - -```python {7} -from typing import Annotated - -from nonebot.adapters import Event -from nonebot.params import LastReceived - -@matcher.receive("any") -async def _(foo: Annotated[Event, LastReceived()]): ... -``` - - - - -```python {5} -from nonebot.adapters import Event -from nonebot.params import LastReceived - -@matcher.receive("any") -async def _(foo: Event = LastReceived()): ... -``` - - - - -### Arg - -获取某次 `got` 接收的参数。如果 `Arg` 参数留空,则使用函数的参数名作为要获取的参数。 - - - - -```python {7,8} -from typing import Annotated - -from nonebot.params import Arg -from nonebot.adapters import Message - -@matcher.got("key") -async def _(key: Annotated[Message, Arg()]): ... -async def _(foo: Annotated[Message, Arg("key")]): ... -``` - - - - -```python {5,6} -from nonebot.params import Arg -from nonebot.adapters import Message - -@matcher.got("key") -async def _(key: Message = Arg()): ... -async def _(foo: Message = Arg("key")): ... -``` - - - - -### ArgStr - -获取某次 `got` 接收的参数,并转换为字符串。如果 `Arg` 参数留空,则使用函数的参数名作为要获取的参数。 - - - - -```python {6,7} -from typing import Annotated - -from nonebot.params import ArgStr - -@matcher.got("key") -async def _(key: Annotated[str, ArgStr()]): ... -async def _(foo: Annotated[str, ArgStr("key")]): ... -``` - - - - -```python {4,5} -from nonebot.params import ArgStr - -@matcher.got("key") -async def _(key: str = ArgStr()): ... -async def _(foo: str = ArgStr("key")): ... -``` - - - - -### ArgPlainText - -获取某次 `got` 接收的参数的纯文本部分。如果 `Arg` 参数留空,则使用函数的参数名作为要获取的参数。 - - - - -```python {6,7} -from typing import Annotated - -from nonebot.params import ArgPlainText - -@matcher.got("key") -async def _(key: Annotated[str, ArgPlainText()]): ... -async def _(foo: Annotated[str, ArgPlainText("key")]): ... -``` - - - - -```python {4,5} -from nonebot.params import ArgPlainText - -@matcher.got("key") -async def _(key: str = ArgPlainText()): ... -async def _(foo: str = ArgPlainText("key")): ... -``` - - - diff --git a/website/versioned_docs/version-2.3.1/advanced/driver.md b/website/versioned_docs/version-2.3.1/advanced/driver.md deleted file mode 100644 index 222921de1bf9..000000000000 --- a/website/versioned_docs/version-2.3.1/advanced/driver.md +++ /dev/null @@ -1,287 +0,0 @@ ---- -sidebar_position: 0 -description: 选择合适的驱动器运行机器人 - -options: - menu: - - category: advanced - weight: 10 ---- - -# 选择驱动器 - -驱动器 (Driver) 是机器人运行的基石,它是机器人初始化的第一步,主要负责数据收发。 - -:::important 提示 -驱动器的选择通常与机器人所使用的协议适配器相关,如果不知道该选择哪个驱动器,可以先阅读相关协议适配器文档说明。 -::: - -:::tip 提示 -如何**安装**驱动器请参考[安装驱动器](../tutorial/store.mdx#安装驱动器)。 -::: - -## 驱动器类型 - -驱动器类型大体上可以分为两种: - -- `Forward`:即客户端型驱动器,多用于使用 HTTP 轮询,连接 WebSocket 服务器等情形。 -- `Reverse`:即服务端型驱动器,多用于使用 WebHook,接收 WebSocket 客户端连接等情形。 - -客户端型驱动器可以分为以下两种: - -1. 异步发送 HTTP 请求,自定义 `HTTP Method`、`URL`、`Header`、`Body`、`Cookie`、`Proxy`、`Timeout` 等。 -2. 异步建立 WebSocket 连接上下文,自定义 `WebSocket URL`、`Header`、`Cookie`、`Proxy`、`Timeout` 等。 - -服务端型驱动器目前有: - -1. ASGI 应用框架,具有以下功能: - - 协议适配器自定义 HTTP 上报地址以及对上报数据处理的回调函数。 - - 协议适配器自定义 WebSocket 连接请求地址以及对 WebSocket 请求处理的回调函数。 - - 用户可以向 ASGI 应用添加任何服务端相关功能,如:[添加自定义路由](./routing.md)。 - -## 配置驱动器 - -驱动器的配置方法已经在[配置](../appendices/config.mdx)章节中简单进行了介绍,这里将详细介绍驱动器配置的格式。 - -NoneBot 中的客户端和服务端型驱动器可以相互配合使用,但服务端型驱动器**仅能选择一个**。所有驱动器模块都会包含一个 `Driver` 子类,即驱动器类,他可以作为驱动器单独运行。同时,客户端驱动器模块中还会提供一个 `Mixin` 子类,用于在与其他驱动器配合使用时加载。因此,驱动器配置格式采用特殊语法:`[:][+[:]]*`。 - -其中,`` 代表**驱动器模块路径**;`` 代表**驱动器类名**,默认为 `Driver`;`` 代表**驱动器混入类名**,默认为 `Mixin`。即,我们需要选择一个主要驱动器,然后在其基础上配合使用其他驱动器的功能。主要驱动器可以为客户端或服务端类型,但混入类驱动器只能为客户端类型。 - -特别的,为了简化内置驱动器模块路径,我们可以使用 `~` 符号作为内置驱动器模块路径的前缀,如 `~fastapi` 代表使用内置驱动器 `fastapi`。NoneBot 内置了多个驱动器适配,但需要安装额外依赖才能使用,具体请参考[安装驱动器](../tutorial/store.mdx#安装驱动器)。常见的驱动器配置如下: - -```dotenv -DRIVER=~fastapi -DRIVER=~aiohttp -DRIVER=~httpx+~websockets -DRIVER=~fastapi+~httpx+~websockets -``` - -## 获取驱动器 - -在 NoneBot 框架初始化完成后,我们就可以通过 `get_driver()` 方法获取全局驱动器实例: - -```python -from nonebot import get_driver - -driver = get_driver() -``` - -## 内置驱动器 - -### None - -**类型:**服务端驱动器 - -NoneBot 内置的空驱动器,不提供任何收发数据功能,可以在不需要外部网络连接时使用。 - -```env -DRIVER=~none -``` - -### FastAPI(默认) - -**类型:**ASGI 服务端驱动器 - -> FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints. - -[FastAPI](https://fastapi.tiangolo.com/) 是一个易上手、高性能的异步 Web 框架,具有极佳的编写体验。 FastAPI 可以通过类型注解、依赖注入等方式实现输入参数校验、自动生成 API 文档等功能,也可以挂载其他 ASGI、WSGI 应用。 - -```env -DRIVER=~fastapi -``` - -#### FastAPI 配置项 - -##### `fastapi_openapi_url` - -类型:`str | None` -默认值:`None` -说明:`FastAPI` 提供的 `OpenAPI` JSON 定义地址,如果为 `None`,则不提供 `OpenAPI` JSON 定义。 - -##### `fastapi_docs_url` - -类型:`str | None` -默认值:`None` -说明:`FastAPI` 提供的 `Swagger` 文档地址,如果为 `None`,则不提供 `Swagger` 文档。 - -##### `fastapi_redoc_url` - -类型:`str | None` -默认值:`None` -说明:`FastAPI` 提供的 `ReDoc` 文档地址,如果为 `None`,则不提供 `ReDoc` 文档。 - -##### `fastapi_include_adapter_schema` - -类型:`bool` -默认值:`True` -说明:`FastAPI` 提供的 `OpenAPI` JSON 定义中是否包含适配器路由的 `Schema`。 - -##### `fastapi_reload` - -:::caution 警告 -不推荐开启该配置项,在 Windows 平台上开启该功能有可能会造成预料之外的影响!替代方案:使用 `nb-cli` 命令行工具以及参数 `--reload` 启动 NoneBot。 - -```bash -nb run --reload -``` - -开启该功能后,在 uvicorn 运行时(FastAPI 提供的 ASGI 底层,即 reload 功能的实际来源),asyncio 使用的事件循环会被 uvicorn 从默认的 `ProactorEventLoop` 强制切换到 `SelectorEventLoop`。 - -> 相关信息参考 [uvicorn#529](https://github.com/encode/uvicorn/issues/529),[uvicorn#1070](https://github.com/encode/uvicorn/pull/1070),[uvicorn#1257](https://github.com/encode/uvicorn/pull/1257) - -后者(`SelectorEventLoop`)在 Windows 平台的可使用性不如前者(`ProactorEventLoop`),包括但不限于 - -1. 不支持创建子进程 -2. 最多只支持 512 个套接字 -3. ... - -> 具体信息参考 [Python 文档](https://docs.python.org/zh-cn/3/library/asyncio-platforms.html#windows) - -所以,一些使用了 asyncio 的库因此可能无法正常工作,如: - -1. [playwright](https://playwright.dev/python/docs/library#incompatible-with-selectoreventloop-of-asyncio-on-windows) - -如果在开启该功能后,原本**正常运行**的代码报错,且打印的异常堆栈信息和 asyncio 有关(异常一般为 `NotImplementedError`), -你可能就需要考虑相关库对事件循环的支持,以及是否启用该功能。 -::: - -类型:`bool` -默认值:`False` -说明:是否开启 `uvicorn` 的 `reload` 功能,需要在机器人入口文件提供 ASGI 应用路径。 - -```python title=bot.py -app = nonebot.get_asgi() -nonebot.run(app="bot:app") -``` - -##### `fastapi_reload_dirs` - -类型:`List[str] | None` -默认值:`None` -说明:重载监控文件夹列表,默认为 uvicorn 默认值 - -##### `fastapi_reload_delay` - -类型:`float | None` -默认值:`None` -说明:重载延迟,默认为 uvicorn 默认值 - -##### `fastapi_reload_includes` - -类型:`List[str] | None` -默认值:`None` -说明:要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -##### `fastapi_reload_excludes` - -类型:`List[str] | None` -默认值:`None` -说明:不要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -##### `fastapi_extra` - -类型:`Dist[str, Any]` -默认值:`{}` -说明:传递给 `FastAPI` 的其他参数 - -### Quart - -**类型:**ASGI 服务端驱动器 - -> Quart is an asyncio reimplementation of the popular Flask microframework API. - -[Quart](https://quart.palletsprojects.com/) 是一个类 Flask 的异步版本,拥有与 Flask 非常相似的接口和使用方法。 - -```env -DRIVER=~quart -``` - -#### Quart 配置项 - -##### `quart_reload` - -:::caution 警告 -不推荐开启该配置项,在 Windows 平台上开启该功能有可能会造成预料之外的影响!替代方案:使用 `nb-cli` 命令行工具以及参数 `--reload` 启动 NoneBot。 - -```bash -nb run --reload -``` - -::: - -类型:`bool` -默认值:`False` -说明:是否开启 `uvicorn` 的 `reload` 功能,需要在机器人入口文件提供 ASGI 应用路径。 - -```python title=bot.py -app = nonebot.get_asgi() -nonebot.run(app="bot:app") -``` - -##### `quart_reload_dirs` - -类型:`List[str] | None` -默认值:`None` -说明:重载监控文件夹列表,默认为 uvicorn 默认值 - -##### `quart_reload_delay` - -类型:`float | None` -默认值:`None` -说明:重载延迟,默认为 uvicorn 默认值 - -##### `quart_reload_includes` - -类型:`List[str] | None` -默认值:`None` -说明:要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -##### `quart_reload_excludes` - -类型:`List[str] | None` -默认值:`None` -说明:不要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -##### `quart_extra` - -类型:`Dist[str, Any]` -默认值:`{}` -说明:传递给 `Quart` 的其他参数 - -### HTTPX - -**类型:**HTTP 客户端驱动器 - -:::caution 注意 -本驱动器仅支持 HTTP 请求,不支持 WebSocket 连接请求。 -::: - -> [HTTPX](https://www.python-httpx.org/) is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2. - -```env -DRIVER=~httpx -``` - -### websockets - -**类型:**WebSocket 客户端驱动器 - -:::caution 注意 -本驱动器仅支持 WebSocket 连接请求,不支持 HTTP 请求。 -::: - -> [websockets](https://websockets.readthedocs.io/) is a library for building WebSocket servers and clients in Python with a focus on correctness, simplicity, robustness, and performance. - -```env -DRIVER=~websockets -``` - -### AIOHTTP - -**类型:**HTTP/WebSocket 客户端驱动器 - -> [AIOHTTP](https://docs.aiohttp.org/): Asynchronous HTTP Client/Server for asyncio and Python. - -```env -DRIVER=~aiohttp -``` diff --git a/website/versioned_docs/version-2.3.1/advanced/matcher-provider.md b/website/versioned_docs/version-2.3.1/advanced/matcher-provider.md deleted file mode 100644 index 6af8f003c8e9..000000000000 --- a/website/versioned_docs/version-2.3.1/advanced/matcher-provider.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -sidebar_position: 10 -description: 自定义事件响应器存储 - -options: - menu: - - category: advanced - weight: 110 ---- - -# 事件响应器存储 - -事件响应器是 NoneBot 处理事件的核心,它们默认存储在一个字典中。在进入会话状态后,事件响应器将会转为临时响应器,作为最高优先级同样存储于该字典中。因此,事件响应器的存储类似于会话存储,它决定了整个 NoneBot 对事件的处理行为。 - -NoneBot 默认使用 Python 的字典将事件响应器存储于内存中,但是我们也可以自定义事件响应器存储,将事件响应器存储于其他地方,例如 Redis 等。这样我们就可以实现持久化、在多实例间共享会话状态等功能。 - -## 编写存储提供者 - -事件响应器的存储提供者 `MatcherProvider` 抽象类继承自 `MutableMapping[int, list[type[Matcher]]]`,即以优先级为键,以事件响应器列表为值的映射。我们可以方便地进行逐优先级事件传播。 - -编写一个自定义的存储提供者,只需要继承并实现 `MatcherProvider` 抽象类: - -```python -from nonebot.matcher import MatcherProvider - -class CustomProvider(MatcherProvider): - ... -``` - -## 设置存储提供者 - -我们可以通过 `matchers.set_provider` 方法设置存储提供者: - -```python {3} -from nonebot.matcher import matchers - -matchers.set_provider(CustomProvider) - -assert isinstance(matchers.provider, CustomProvider) -``` diff --git a/website/versioned_docs/version-2.3.1/advanced/matcher.md b/website/versioned_docs/version-2.3.1/advanced/matcher.md deleted file mode 100644 index 635f2a1d3bdb..000000000000 --- a/website/versioned_docs/version-2.3.1/advanced/matcher.md +++ /dev/null @@ -1,338 +0,0 @@ ---- -sidebar_position: 5 -description: 事件响应器组成与内置响应规则 - -options: - menu: - - category: advanced - weight: 60 ---- - -# 事件响应器进阶 - -在[指南](../tutorial/matcher.md)与[深入](../appendices/rule.md)中,我们已经介绍了事件响应器的基本用法以及响应规则、权限控制等功能。在这一节中,我们将介绍事件响应器的组成,内置的响应规则,与第三方响应规则拓展。 - -:::tip 提示 -事件响应器允许继承,你可以通过直接继承 `Matcher` 类来创建一个新的事件响应器。 -::: - -## 事件响应器组成 - -### 事件响应器类型 - -事件响应器类型 `type` 即是该响应器所要响应的事件类型,只有在接收到的事件类型与该响应器的类型相同时,才会触发该响应器。如果类型为空字符串 `""`,则响应器将会响应所有类型的事件。事件响应器类型的检查在所有其他检查(权限控制、响应规则)之前进行。 - -NoneBot 内置了四种常用事件类型:`meta_event`、`message`、`notice`、`request`,分别对应元事件、消息、通知、请求。通常情况下,协议适配器会将事件合理地分类至这四种类型中。如果有其他类型的事件需要响应,可以自行定义新的类型。 - -### 事件触发权限 - -事件触发权限 `permission` 是一个 `Permission` 对象,这在[权限控制](../appendices/permission.mdx)一节中已经介绍过。事件触发权限会在事件响应器的类型检查通过后进行检查,如果权限检查通过,则执行响应规则检查。 - -### 事件响应规则 - -事件响应规则 `rule` 是一个 `Rule` 对象,这在[响应规则](../appendices/rule.md)一节中已经介绍过。事件响应器的响应规则会在事件响应器的权限检查通过后进行匹配,如果响应规则检查通过,则触发该响应器。 - -### 响应优先级 - -响应优先级 `priority` 是一个正整数,用于指定响应器的优先级。响应器的优先级越小,越先被触发。如果响应器的优先级相同,则按照响应器的注册顺序进行触发。 - -### 阻断 - -阻断 `block` 是一个布尔值,用于指定响应器是否阻断事件的传播。如果阻断为 `True`,则在该响应器被触发后,事件将不会再传播给其他下一优先级的响应器。 - -NoneBot 内置的事件响应器中,所有非 `command` 规则的 `message` 类型的事件响应器都会阻断事件传递,其他则不会。 - -在部分情况中,可以使用 [`stop_propagation`](../appendices/session-control.mdx#stop_propagation) 方法动态阻止事件传播,该方法需要 handler 在参数中获取 matcher 实例后调用方法。 - -### 有效期 - -事件响应器的有效期分为 `temp` 和 `expire_time` 。`temp` 是一个布尔值,用于指定响应器是否为临时响应器。如果为 `True`,则该响应器在被触发后会被自动销毁。`expire_time` 是一个 `datetime` 对象,用于指定响应器的过期时间。如果 `expire_time` 不为 `None`,则在该时间点后,该响应器会被自动销毁。 - -### 默认状态 - -事件响应器的默认状态 `default_state` 是一个 `dict` 对象,用于指定响应器的默认状态。在响应器被触发时,响应器将会初始化默认状态然后开始执行事件处理流程。 - -## 基本辅助函数 - -NoneBot 为四种类型的事件响应器提供了五个基本的辅助函数: - -- `on`:创建任何类型的事件响应器。 -- `on_metaevent`:创建元事件响应器。 -- `on_message`:创建消息事件响应器。 -- `on_request`:创建请求事件响应器。 -- `on_notice`:创建通知事件响应器。 - -除了 `on` 函数具有一个 `type` 参数外,其余参数均相同: - -- `rule`:响应规则,可以是 `Rule` 对象或者 `RuleChecker` 函数。 -- `permission`:事件触发权限,可以是 `Permission` 对象或者 `PermissionChecker` 函数。 -- `handlers`:事件处理函数列表。 -- `temp`:是否为临时响应器。 -- `expire_time`:响应器的过期时间。 -- `priority`:响应器的优先级。 -- `block`:是否阻断事件传播。 -- `state`:响应器的默认状态。 - -在消息类型的事件响应器的基础上,NoneBot 还内置了一些常用的响应规则,并结合为辅助函数来方便我们快速创建指定功能的响应器。下面我们逐个介绍。 - -## 内置响应规则 - -### `startswith` - -`startswith` 响应规则用于匹配消息纯文本部分的开头是否与指定字符串(或一系列字符串)相同。可选参数 `ignorecase` 用于指定是否忽略大小写,默认为 `False`。 - -例如,我们可以创建一个匹配消息开头为 `!` 或者 `/` 的规则: - -```python -from nonebot.rule import startswith - -rule = startswith(("!", "/"), ignorecase=False) -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_startswith - -matcher = on_startswith(("!", "/"), ignorecase=False) -``` - -### `endswith` - -`endswith` 响应规则用于匹配消息纯文本部分的结尾是否与指定字符串(或一系列字符串)相同。可选参数 `ignorecase` 用于指定是否忽略大小写,默认为 `False`。 - -例如,我们可以创建一个匹配消息结尾为 `.` 或者 `。` 的规则: - -```python -from nonebot.rule import endswith - -rule = endswith((".", "。"), ignorecase=False) -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_endswith - -matcher = on_endswith((".", "。"), ignorecase=False) -``` - -### `fullmatch` - -`fullmatch` 响应规则用于匹配消息纯文本部分是否与指定字符串(或一系列字符串)完全相同。可选参数 `ignorecase` 用于指定是否忽略大小写,默认为 `False`。 - -例如,我们可以创建一个匹配消息为 `ping` 或者 `pong` 的规则: - -```python -from nonebot.rule import fullmatch - -rule = fullmatch(("ping", "pong"), ignorecase=False) -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_fullmatch - -matcher = on_fullmatch(("ping", "pong"), ignorecase=False) -``` - -### `keyword` - -`keyword` 响应规则用于匹配消息纯文本部分是否包含指定字符串(或一系列字符串)。 - -例如,我们可以创建一个匹配消息中包含 `hello` 或者 `hi` 的规则: - -```python -from nonebot.rule import keyword - -rule = keyword("hello", "hi") -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_keyword - -matcher = on_keyword({"hello", "hi"}) -``` - -### `command` - -`command` 是最常用的响应规则,它用于匹配消息是否为命令。它会根据配置中的 [Command Start 和 Command Separator](../appendices/config.mdx#command-start-和-command-separator) 来判断消息是否为命令。 - -例如,当我们配置了 `Command Start` 为 `/`,`Command Separator` 为 `.` 时: - -```python -from nonebot.rule import command - -# 匹配 "/help" 或者 "/帮助" 开头的消息 -rule = command("help", "帮助") -# 匹配 "/help.cmd" 开头的消息 -rule = command(("help", "cmd")) -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_command - -matcher = on_command("help", aliases={"帮助"}) -``` - -此外,`command` 响应规则默认允许消息命令与参数间不加空格,如果需要严格匹配命令与参数间的空白符,可以使用 `command` 函数的 `force_whitespace` 参数。`force_whitespace` 参数可以是 bool 类型或者具体的字符串,默认为 `False`。如果为 `True`,则命令与参数间必须有任意个数的空白符;如果为字符串,则命令与参数间必须有且与给定字符串一致的空白符。 - -```python -rule = command("help", force_whitespace=True) -rule = command("help", force_whitespace=" ") -``` - -命令解析后的结果可以通过 [`Command`](./dependency.mdx#command)、[`RawCommand`](./dependency.mdx#rawcommand)、[`CommandArg`](./dependency.mdx#commandarg)、[`CommandStart`](./dependency.mdx#commandstart)、[`CommandWhitespace`](./dependency.mdx#commandwhitespace) 依赖注入获取。 - -### `shell_command` - -`shell_command` 响应规则用于匹配类 shell 命令形式的消息。它首先与 [`command`](#command) 响应规则一样进行命令匹配,如果匹配成功,则会进行进一步的参数解析。参数解析采用 `argparse` 标准库进行,在此基础上添加了消息序列 `Message` 支持。 - -例如,我们可以创建一个匹配 `/cmd` 命令并且带有 `-v` 选项与默认 `-h` 帮助选项的规则: - -```python -from nonebot.rule import shell_command, ArgumentParser - -parser = ArgumentParser() -parser.add_argument("-v", "--verbose", action="store_true") - -rule = shell_command("cmd", parser=parser) -``` - -更多关于 `argparse` 的使用方法请参考 [argparse 文档](https://docs.python.org/zh-cn/3/library/argparse.html)。我们也可以选择不提供 `parser` 参数,这样 `shell_command` 将不会解析参数,但会提供参数列表 `argv`。 - -直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_shell_command -from nonebot.rule import ArgumentParser - -parser = ArgumentParser() -parser.add_argument("-v", "--verbose", action="store_true") - -matcher = on_shell_command("cmd", parser=parser) -``` - -参数解析后的结果可以通过 [`ShellCommandArgv`](./dependency.mdx#shellcommandargv)、[`ShellCommandArgs`](./dependency.mdx#shellcommandargs) 依赖注入获取。 - -### `regex` - -`regex` 响应规则用于匹配消息是否与指定正则表达式匹配。 - -:::tip 提示 -正则表达式匹配使用 search 而非 match,如需从头匹配请使用 `r"^xxx"` 模式来确保匹配开头。 -::: - -例如,我们可以创建一个匹配消息中包含字母并且忽略大小写的规则: - -```python -from nonebot.rule import regex - -rule = regex(r"[a-z]+", flags=re.IGNORECASE) -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_regex - -matcher = on_regex(r"[a-z]+", flags=re.IGNORECASE) -``` - -正则匹配后的结果可以通过 [`RegexStr`](./dependency.mdx#regexstr)、[`RegexGroup`](./dependency.mdx#regexgroup)、[`RegexDict`](./dependency.mdx#regexdict) 依赖注入获取。 - -### `to_me` - -`to_me` 响应规则用于匹配事件是否与机器人相关。 - -例如: - -```python -from nonebot.rule import to_me - -rule = to_me() -``` - -### `is_type` - -`is_type` 响应规则用于匹配事件类型是否为指定类型(或者一系列类型)。 - -例如,我们可以创建一个匹配 OneBot v11 私聊和群聊消息事件的规则: - -```python -from nonebot.rule import is_type -from nonebot.adapters.onebot.v11 import PrivateMessageEvent, GroupMessageEvent - -rule = is_type(PrivateMessageEvent, GroupMessageEvent) -``` - -## 响应器组 - -为了更方便的管理一系列功能相近的响应器,NoneBot 提供了两种响应器组,它们可以帮助我们进行响应器的统一管理。 - -### `CommandGroup` - -`CommandGroup` 可以用于管理一系列具有相同前置命令的子命令响应器。 - -例如,我们创建 `/cmd`、`/cmd.sub`、`/cmd.help` 三个命令,他们具有相同的优先级: - -```python -from nonebot import CommandGroup - -group = CommandGroup("cmd", priority=10) - -cmd = group.command(tuple()) -sub_cmd = group.command("sub") -help_cmd = group.command("help") -``` - -命令别名 aliases 默认不会添加 `CommandGroup` 设定的前缀,如果需要为 aliases 添加前缀,可以添加 `prefix_aliases=True` 参数: - -```python -from nonebot import CommandGroup - -group = CommandGroup("cmd", prefix_aliases=True) - -cmd = group.command(tuple()) -help_cmd = group.command("help", aliases={"帮助"}) -``` - -这样就能成功匹配 `/cmd`、`/cmd.help`、`/cmd.帮助` 命令。如果未设置,将默认匹配 `/cmd`、`/cmd.help`、`/帮助` 命令。 - -### `MatcherGroup` - -`MatcherGroup` 可以用于管理一系列具有相同属性的响应器。 - -例如,我们创建一个具有相同响应规则的响应器组: - -```python -from nonebot.rule import to_me -from nonebot import MatcherGroup - -group = MatcherGroup(rule=to_me()) - -matcher1 = group.on_message() -matcher2 = group.on_message() -``` - -## 第三方响应规则 - -### Alconna - -[`nonebot-plugin-alconna`](https://github.com/nonebot/plugin-alconna) 是一类提供了拓展响应规则的插件。 -该插件使用 [Alconna](https://github.com/ArcletProject/Alconna) 作为命令解析器, -是一个简单、灵活、高效的命令参数解析器, 并且不局限于解析命令式字符串。 - -该插件提供了一类新的事件响应器辅助函数 `on_alconna`,以及 `AlconnaResult` 等依赖注入函数。 - -基于 `Alconna` 的特性,该插件同时提供了一系列便捷的消息段标注。 -标注可用于在 `Alconna` 中匹配消息中除 text 外的其他消息段,也可用于快速创建各适配器下的消息段。所有标注位于 `nonebot_plugin_alconna.adapters` 中。 - -该插件同时通过提供 `UniMessage` (通用消息模型) 实现了**跨平台接收和发送消息**的功能。 - -详情请阅读最佳实践中的 [命令解析拓展](../best-practice/alconna/README.mdx) 章节。 diff --git a/website/versioned_docs/version-2.3.1/advanced/plugin-info.md b/website/versioned_docs/version-2.3.1/advanced/plugin-info.md deleted file mode 100644 index 5f45dc7d45fe..000000000000 --- a/website/versioned_docs/version-2.3.1/advanced/plugin-info.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -sidebar_position: 2 -description: 填写与获取插件相关的信息 - -options: - menu: - - category: advanced - weight: 30 ---- - -# 插件信息 - -NoneBot 是一个插件化的框架,可以通过加载插件来扩展功能。同时,我们也可以通过 NoneBot 的插件系统来获取相关信息,例如插件的名称、使用方法,用于收集帮助信息等。下面我们将介绍如何为插件添加元数据,以及如何获取插件信息。 - -## 插件元数据 - -在 NoneBot 中,插件 [`Plugin`](../api/plugin/model.md#Plugin) 对象中存储了插件系统所需要的一系列信息。包括插件的索引名称、插件模块、插件中的事件响应器、插件父子关系等。通常,只有插件开发者才需要关心这些信息,而插件使用者或者机器人用户想要看到的是插件使用方法等帮助信息。因此,我们可以为插件添加插件元数据 `PluginMetadata`,它允许插件开发者为插件添加一些额外的信息。这些信息编写于插件模块的顶层,可以直接通过源码查看,或者通过 NoneBot 插件系统获取收集到的信息,通过其他方式发送给机器人用户等。 - -现在,假设我们有一个插件 `example`, 它的模块结构如下: - -```tree {4-6} title=Project -📦 awesome-bot -├── 📂 awesome_bot -│ └── 📂 plugins -| └── 📂 example -| ├── 📜 __init__.py -| └── 📜 config.py -├── 📜 pyproject.toml -└── 📜 README.md -``` - -我们需要在插件顶层模块 `example/__init__.py` 中添加插件元数据,如下所示: - -```python {1,5-12} title=example/__init__.py -from nonebot.plugin import PluginMetadata - -from .config import Config - -__plugin_meta__ = PluginMetadata( - name="示例插件", - description="这是一个示例插件", - usage="没什么用", - type="application", - config=Config, - extra={}, -) -``` - -我们可以看到,插件元数据 `PluginMetadata` 有三个基本属性:插件名称、插件描述、插件使用方法。除此之外,还有几个可选的属性(具体填写见[发布插件](../developer/plugin-publishing.mdx#填写插件元数据)章节): - -- `type`:插件类别,发布插件必填。当前有效类别有:`library`(为其他插件编写提供功能),`application`(向机器人用户提供功能); -- `homepage`:插件项目主页,发布插件必填; -- `config`:插件的[配置类](../appendices/config.mdx#插件配置),如无配置类可不填; -- `supported_adapters`:支持的适配器模块名集合,若插件可以保证兼容所有适配器(即仅使用基本适配器功能)可不填写; -- `extra`:一个字典,可以用于存储任意信息。其他插件可以通过约定 `extra` 字典的键名来达成收集某些特殊信息的目的。 - -请注意,这里的**插件名称**是供使用者或机器人用户查看的,与插件索引名称无关。**插件索引名称(插件模块名称)**仅用于 NoneBot 插件系统**内部索引**。 - -## 获取插件信息 - -NoneBot 提供了多种获取插件对象的方法,例如获取当前所有已导入的插件: - -```python -import nonebot - -plugins: set[Plugin] = nonebot.get_loaded_plugins() -``` - -也可以通过插件索引名称获取插件对象: - -```python -import nonebot - -plugin: Plugin | None = nonebot.get_plugin("example") -``` - -或者通过模块路径获取插件对象: - -```python -import nonebot - -plugin: Plugin | None = nonebot.get_plugin_by_module_name("awesome_bot.plugins.example") -``` - -如果需要获取所有当前声明的插件名称(可能还未加载),可以使用 `get_available_plugin_names` 函数: - -```python -import nonebot - -plugin_names: set[str] = nonebot.get_available_plugin_names() -``` - -插件对象 `Plugin` 中包含了多个属性: - -- `name`:插件索引名称 -- `module`:插件模块 -- `module_name`:插件模块路径 -- `manager`:插件管理器 -- `matcher`:插件中定义的事件响应器 -- `parent_plugin`:插件的父插件 -- `sub_plugins`:插件的子插件集合 -- `metadata`:插件元数据 - -通过这些属性以及插件元数据,我们就可以收集所需要的插件信息了。 diff --git a/website/versioned_docs/version-2.3.1/advanced/plugin-nesting.md b/website/versioned_docs/version-2.3.1/advanced/plugin-nesting.md deleted file mode 100644 index 0a306d280ca9..000000000000 --- a/website/versioned_docs/version-2.3.1/advanced/plugin-nesting.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -sidebar_position: 3 -description: 编写与加载嵌套插件 - -options: - menu: - - category: advanced - weight: 40 ---- - -# 嵌套插件 - -NoneBot 支持嵌套插件,即一个插件可以包含其他插件。通过这种方式,我们可以将一个大型插件拆分成多个功能子插件,使得插件更加清晰、易于维护。我们可以直接在插件中使用 NoneBot 加载插件的方法来加载子插件。 - -## 创建嵌套插件 - -我们可以在使用 `nb-cli` 命令[创建插件](../tutorial/create-plugin.md#创建插件)时,选择直接通过模板创建一个嵌套插件: - -```bash -$ nb plugin create -[?] 插件名称: parent -[?] 使用嵌套插件? (y/N) Y -[?] 输出目录: awesome_bot/plugins -``` - -或者使用 `nb plugin create --sub-plugin` 选项直接创建一个嵌套插件。 - -## 已有插件 - -如果你已经有一个插件,想要在其中嵌套加载子插件,可以在插件的 `__init__.py` 中添加如下代码: - -```python title=parent/__init__.py -import nonebot -from pathlib import Path - -sub_plugins = nonebot.load_plugins( - str(Path(__file__).parent.joinpath("plugins").resolve()) -) -``` - -这样,`parent` 插件就会加载 `parent/plugins` 目录下的所有插件。NoneBot 会正确识别这些插件的父子关系,你可以在 `parent` 的插件信息中看到这些子插件的信息,也可以在子插件信息中看到它们的父插件信息。 diff --git a/website/versioned_docs/version-2.3.1/advanced/requiring.md b/website/versioned_docs/version-2.3.1/advanced/requiring.md deleted file mode 100644 index 1a9fe4b072d7..000000000000 --- a/website/versioned_docs/version-2.3.1/advanced/requiring.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -sidebar_position: 4 -description: 使用其他插件提供的功能 - -options: - menu: - - category: advanced - weight: 50 ---- - -# 跨插件访问 - -NoneBot 插件化系统的设计使得插件之间可以功能独立、各司其职,我们可以更好地维护和扩展插件。但是,有时候我们可能需要在不同插件之间调用功能。NoneBot 生态中就有一类插件,它们专为其他插件提供功能支持,如:[定时任务插件](../best-practice/scheduler.md)、[数据存储插件](../best-practice/data-storing.md)等。这时候我们就需要在插件之间进行跨插件访问。 - -## 插件跟踪 - -由于 NoneBot 插件系统通过 [Import Hooks](https://docs.python.org/3/reference/import.html#import-hooks) 的方式实现插件加载与跟踪管理,因此我们**不能**在 NoneBot 跟踪插件前进行模块 import,这会导致插件加载失败。即,我们不能在使用 NoneBot 提供的加载插件方法前,直接使用 `import` 语句导入插件。 - -对于在项目目录下的插件,我们通常直接使用 `load_from_toml` 等方法一次性加载所有插件。由于这些插件已经被声明,即便插件导入顺序不同,NoneBot 也能正确跟踪插件。此时,我们不需要对跨插件访问进行特殊处理。但当我们使用了外部插件,如果没有事先声明或加载插件,NoneBot 并不会将其当作插件进行跟踪,可能会出现意料之外的错误出现。 - -简单来说,我们必须在 `import` 外部插件之前,确保依赖的外部插件已经被声明或加载。 - -## 插件依赖声明 - -NoneBot 提供了一种方法来确保我们依赖的插件已经被正确加载,即使用 `require` 函数。通过 `require` 函数,我们可以在当前插件中声明依赖的插件,NoneBot 会在加载当前插件时,检查依赖的插件是否已经被加载,如果没有,会尝试优先加载依赖的插件。 - -假设我们有一个插件 `a` 依赖于插件 `b`,我们可以在插件 `a` 中使用 `require` 函数声明其依赖于插件 `b`: - -```python {3} title=a/__init__.py -from nonebot import require - -require("b") - -from b import some_function -``` - -其中,`require` 函数的参数为插件索引名称或者外部插件的模块名称。在完成依赖声明后,我们可以在插件 `a` 中直接导入插件 `b` 所提供的功能。 diff --git a/website/versioned_docs/version-2.3.1/advanced/routing.md b/website/versioned_docs/version-2.3.1/advanced/routing.md deleted file mode 100644 index efa1ac55925d..000000000000 --- a/website/versioned_docs/version-2.3.1/advanced/routing.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -sidebar_position: 9 -description: 添加服务端路由规则 - -options: - menu: - - category: advanced - weight: 100 ---- - -# 添加路由 - -在[驱动器](./driver.md)一节中,我们了解了驱动器的两种类型。既然驱动器可以作为服务端运行,那么我们就可以向驱动器添加路由规则,从而实现自定义的 API 接口等功能。在添加路由规则时,我们需要注意驱动器的类型,详情可以参考[选择驱动器](./driver.md#配置驱动器)。 - -NoneBot 中,我们可以通过两种途径向 ASGI 驱动器添加路由规则: - -1. 通过 NoneBot 的兼容层建立路由规则。 -2. 直接向 ASGI 应用添加路由规则。 - -这两种途径各有优劣,前者可以在各种服务端型驱动器下运行,但并不能直接使用 ASGI 应用框架提供的特性与功能;后者直接使用 ASGI 应用,更自由、功能完整,但只能在特定类型驱动器下运行。 - -在向驱动器添加路由规则时,我们需要注意驱动器是否为服务端类型,我们可以通过以下方式判断: - -```python -from nonebot import get_driver -from nonebot.drivers import ASGIMixin - -# highlight-next-line -can_use = isinstance(get_driver(), ASGIMixin) -``` - -## 通过兼容层添加路由 - -NoneBot 兼容层定义了两个数据类 `HTTPServerSetup` 和 `WebSocketServerSetup`,分别用于定义 HTTP 服务端和 WebSocket 服务端的路由规则。 - -### HTTP 路由 - -`HTTPServerSetup` 具有四个属性: - -- `path`:路由路径,不支持特殊占位表达式。类型为 `URL`。 -- `method`:请求方法。类型为 `str`。 -- `name`:路由名称,不可重复。类型为 `str`。 -- `handle_func`:路由处理函数。类型为 `Callable[[Request], Awaitable[Response]]`。 - -例如,我们添加一个 `/hello` 的路由,当请求方法为 `GET` 时,返回 `200 OK` 以及返回体信息: - -```python -from nonebot import get_driver -from nonebot.drivers import URL, Request, Response, ASGIMixin, HTTPServerSetup - -async def hello(request: Request) -> Response: - return Response(200, content="Hello, world!") - -if isinstance((driver := get_driver()), ASGIMixin): - driver.setup_http_server( - HTTPServerSetup( - path=URL("/hello"), - method="GET", - name="hello", - handle_func=hello, - ) - ) -``` - -对于 `Request` 和 `Response` 的详细信息,可以参考 [API 文档](../api/drivers/index.md)。 - -### WebSocket 路由 - -`WebSocketServerSetup` 具有三个属性: - -- `path`:路由路径,不支持特殊占位表达式。类型为 `URL`。 -- `name`:路由名称,不可重复。类型为 `str`。 -- `handle_func`:路由处理函数。类型为 `Callable[[WebSocket], Awaitable[Any]]`。 - -例如,我们添加一个 `/ws` 的路由,发送所有接收到的数据: - -```python -from nonebot import get_driver -from nonebot.drivers import URL, ASGIMixin, WebSocket, WebSocketServerSetup - -async def ws_handler(ws: WebSocket): - await ws.accept() - try: - while True: - data = await ws.receive() - await ws.send(data) - except WebSocketClosed as e: - # handle closed - ... - finally: - with contextlib.suppress(Exception): - await websocket.close() - # do some cleanup - -if isinstance((driver := get_driver()), ASGIMixin): - driver.setup_websocket_server( - WebSocketServerSetup( - path=URL("/ws"), - name="ws", - handle_func=ws_handler, - ) - ) -``` - -对于 `WebSocket` 的详细信息,可以参考 [API 文档](../api/drivers/index.md)。 - -## 使用 ASGI 应用添加路由 - -### 获取 ASGI 应用 - -NoneBot 服务端类型的驱动器具有两个属性 `server_app` 和 `asgi`,分别对应驱动框架应用和 ASGI 应用。通常情况下,这两个应用是同一个对象。我们可以通过 `get_app()` 方法快速获取: - -```python -import nonebot - -app = nonebot.get_app() -asgi = nonebot.get_asgi() -``` - -### 添加路由规则 - -在获取到了 ASGI 应用后,我们就可以直接使用 ASGI 应用框架提供的功能来添加路由规则了。这里我们以 [FastAPI](./driver.md#fastapi默认) 为例,演示如何添加路由规则。 - -在下面的代码中,我们添加了一个 `GET` 类型的 `/api` 路由,具体方法参考 [FastAPI 文档](https://fastapi.tiangolo.com/)。 - -```python -import nonebot -from fastapi import FastAPI - -app: FastAPI = nonebot.get_app() - -@app.get("/api") -async def custom_api(): - return {"message": "Hello, world!"} -``` diff --git a/website/versioned_docs/version-2.3.1/advanced/runtime-hook.md b/website/versioned_docs/version-2.3.1/advanced/runtime-hook.md deleted file mode 100644 index 6e3c1c414733..000000000000 --- a/website/versioned_docs/version-2.3.1/advanced/runtime-hook.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -sidebar_position: 8 -description: 在特定的生命周期中执行代码 - -options: - menu: - - category: advanced - weight: 90 ---- - -# 钩子函数 - -> [钩子编程](https://zh.wikipedia.org/wiki/%E9%92%A9%E5%AD%90%E7%BC%96%E7%A8%8B)(hooking),也称作“挂钩”,是计算机程序设计术语,指通过拦截软件模块间的函数调用、消息传递、事件传递来修改或扩展操作系统、应用程序或其他软件组件的行为的各种技术。处理被拦截的函数调用、事件、消息的代码,被称为钩子(hook)。 - -在 NoneBot 中有一系列预定义的钩子函数,可以分为两类:**全局钩子函数**和**事件处理钩子函数**,这些钩子函数可以用装饰器的形式来使用。 - -## 全局钩子函数 - -全局钩子函数是指 NoneBot 针对其本身运行过程的钩子函数。 - -这些钩子函数是由驱动器来运行的,故需要先[获得全局驱动器](./driver.md#获取驱动器)。 - -### 启动准备 - -这个钩子函数会在 NoneBot 启动时运行。很多时候,我们并不希望在模块被导入时就执行一些耗时操作,如:连接数据库,这时候我们可以在这个钩子函数中进行这些操作。 - -```python -from nonebot import get_driver - -driver = get_driver() - -@driver.on_startup -async def do_something(): - pass -``` - -### 终止处理 - -这个钩子函数会在 NoneBot 终止时运行。我们可以在这个钩子函数中进行一些清理工作,如:关闭数据库连接。 - -```python -from nonebot import get_driver - -driver = get_driver() - -@driver.on_shutdown -async def do_something(): - pass -``` - -### Bot 连接处理 - -这个钩子函数会在任何协议适配器连接 `Bot` 对象至 NoneBot 时运行。支持依赖注入,可以直接注入 `Bot` 对象。 - -```python -from nonebot import get_driver - -driver = get_driver() - -@driver.on_bot_connect -async def do_something(bot: Bot): - pass -``` - -### Bot 断开处理 - -这个钩子函数会在 `Bot` 断开与 NoneBot 的连接时运行。支持依赖注入,可以直接注入 `Bot` 对象。 - -```python -from nonebot import get_driver - -driver = get_driver() - -@driver.on_bot_disconnect -async def do_something(bot: Bot): - pass -``` - -## 事件处理钩子函数 - -这些钩子函数指的是影响 NoneBot 进行**事件处理**的函数, 这些函数可以跟普通的事件处理函数一样接受相应的参数。 - -### 事件预处理 - -这个钩子函数会在 NoneBot 接收到新的事件时运行。支持依赖注入,可以注入 `Bot` 对象、事件、会话状态。在这个钩子函数内抛出 `nonebot.exception.IgnoredException` 会使 NoneBot 忽略该事件。 - -```python -from nonebot.exception import IgnoredException -from nonebot.message import event_preprocessor - -@event_preprocessor -async def do_something(event: Event): - if not event.is_tome(): - raise IgnoredException("some reason") -``` - -### 事件后处理 - -这个钩子函数会在 NoneBot 处理事件完成后运行。支持依赖注入,可以注入 `Bot` 对象、事件、会话状态。 - -```python -from nonebot.message import event_postprocessor - -@event_postprocessor -async def do_something(event: Event): - pass -``` - -### 运行预处理 - -这个钩子函数会在 NoneBot 运行事件响应器前运行。支持依赖注入,可以注入 `Bot` 对象、事件、事件响应器、会话状态。在这个钩子函数内抛出 `nonebot.exception.IgnoredException` 也会使 NoneBot 忽略本次运行。 - -```python -from nonebot.message import run_preprocessor -from nonebot.exception import IgnoredException - -@run_preprocessor -async def do_something(event: Event, matcher: Matcher): - if not event.is_tome(): - raise IgnoredException("some reason") -``` - -### 运行后处理 - -这个钩子函数会在 NoneBot 运行事件响应器后运行。支持依赖注入,可以注入 `Bot` 对象、事件、事件响应器、会话状态、运行中产生的异常。 - -```python -from nonebot.message import run_postprocessor - -@run_postprocessor -async def do_something(event: Event, matcher: Matcher, exception: Optional[Exception]): - pass -``` - -### 平台接口调用钩子 - -这个钩子函数会在 `Bot` 对象调用平台接口时运行。在这个钩子函数中,我们可以通过引起 `MockApiException` 异常来阻止 `Bot` 对象调用平台接口并返回指定的结果。 - -```python -from nonebot.adapters import Bot -from nonebot.exception import MockApiException - -@Bot.on_calling_api -async def handle_api_call(bot: Bot, api: str, data: Dict[str, Any]): - if api == "send_msg": - raise MockApiException(result={"message_id": 123}) -``` - -### 平台接口调用后钩子 - -这个钩子函数会在 `Bot` 对象调用平台接口后运行。在这个钩子函数中,我们可以通过引起 `MockApiException` 异常来忽略平台接口返回的结果并返回指定的结果。 - -```python -from nonebot.adapters import Bot -from nonebot.exception import MockApiException - -@Bot.on_called_api -async def handle_api_result( - bot: Bot, exception: Optional[Exception], api: str, data: Dict[str, Any], result: Any -): - if not exception and api == "send_msg": - raise MockApiException(result={**result, "message_id": 123}) -``` diff --git a/website/versioned_docs/version-2.3.1/advanced/session-updating.md b/website/versioned_docs/version-2.3.1/advanced/session-updating.md deleted file mode 100644 index f804ba964c22..000000000000 --- a/website/versioned_docs/version-2.3.1/advanced/session-updating.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -sidebar_position: 7 -description: 控制会话响应对象 - -options: - menu: - - category: advanced - weight: 80 ---- - -# 会话更新 - -在 NoneBot 中,在某个事件响应器对事件响应后,即是进入了会话状态,会话状态会持续到整个事件响应流程结束。会话过程中,机器人可以与用户进行多次交互。每次需要等待用户事件时,NoneBot 将会复制一个新的临时事件响应器,并更新该事件响应器使其响应当前会话主体的消息,这个过程称为会话更新。 - -会话更新分为两部分:**更新[事件响应器类型](./matcher.md#事件响应器类型)**和**更新[事件触发权限](./matcher.md#事件触发权限)**。 - -## 更新事件响应器类型 - -通常情况下,与机器人用户进行的会话都是通过消息事件进行的,因此会话更新后的默认响应事件类型为 `message`。如果希望接收一个特定类型的消息,比如 `notice` 等,我们需要自定义响应事件类型更新函数。响应事件类型更新函数是一个 `Dependent`,可以使用依赖注入。 - -```python {3-5} -foo = on_message() - -@foo.type_updater -async def _() -> str: - return "notice" -``` - -在注册了上述响应事件类型更新函数后,当我们需要等待用户事件时,将只会响应 `notice` 类型的事件。如果希望在会话过程中的不同阶段响应不同类型的事件,我们就需要使用更复杂的逻辑来更新响应事件类型(如:根据会话状态),这里将不再展示。 - -## 更新事件触发权限 - -会话通常是由机器人与用户进行的一对一交互,因此会话更新后的默认触发权限为当前事件的会话 ID。这个会话 ID 由协议适配器生成,通常由用户 ID 和群 ID 等组成。如果希望实现更复杂的会话功能(如:多用户同时参与的会话),我们需要自定义触发权限更新函数。触发权限更新函数是一个 `Dependent`,可以使用依赖注入。 - -```python {5-7} -from nonebot.permission import User - -foo = on_message() - -@foo.permission_updater -async def _(event: Event, matcher: Matcher) -> Permission: - return Permission(User.from_event(event, perm=matcher.permission)) -``` - -上述权限更新函数是默认的权限更新函数,它将会话的触发权限更新为当前事件的会话 ID。如果我们希望响应多个用户的消息,我们可以如下修改: - -```python {5-7} -from nonebot.permission import USER - -foo = on_message() - -@foo.permission_updater -async def _(matcher: Matcher) -> Permission: - return USER("session1", "session2", perm=matcher.permission) -``` - -请注意,此处为全大写字母的 `USER` 权限,它可以匹配多个会话 ID。通过这种方式,我们可以实现多用户同时参与的会话。 - -我们已经了解了如何控制会话的更新,相信你已经能够实现更复杂的会话功能了,例如多人小游戏等等。欢迎将你的作品分享到[插件商店](/store/plugins)。 diff --git a/website/versioned_docs/version-2.3.1/api/.gitkeep b/website/versioned_docs/version-2.3.1/api/.gitkeep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/website/versioned_docs/version-2.3.1/api/adapters/_category_.json b/website/versioned_docs/version-2.3.1/api/adapters/_category_.json deleted file mode 100644 index a2253e3dcae3..000000000000 --- a/website/versioned_docs/version-2.3.1/api/adapters/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "position": 15 -} diff --git a/website/versioned_docs/version-2.3.1/api/adapters/index.md b/website/versioned_docs/version-2.3.1/api/adapters/index.md deleted file mode 100644 index 92819fd750e0..000000000000 --- a/website/versioned_docs/version-2.3.1/api/adapters/index.md +++ /dev/null @@ -1,878 +0,0 @@ ---- -sidebar_position: 0 -description: nonebot.adapters 模块 ---- - -# nonebot.adapters - -本模块定义了协议适配基类,各协议请继承以下基类。 - -使用 [Driver.register_adapter](../drivers/index.md#Driver-register-adapter) 注册适配器。 - -## _abstract class_ `Bot(adapter, self_id)` {#Bot} - -- **说明** - - Bot 基类。 - - 用于处理上报消息,并提供 API 调用接口。 - -- **参数** - - - `adapter` ([Adapter](#Adapter)): 协议适配器实例 - - - `self_id` (str): 机器人 ID - -### _instance-var_ `adapter` {#Bot-adapter} - -- **类型:** [Adapter](#Adapter) - -- **说明:** 协议适配器实例 - -### _instance-var_ `self_id` {#Bot-self-id} - -- **类型:** str - -- **说明:** 机器人 ID - -### _property_ `type` {#Bot-type} - -- **类型:** str - -- **说明:** 协议适配器名称 - -### _property_ `config` {#Bot-config} - -- **类型:** [Config](../config.md#Config) - -- **说明:** 全局 NoneBot 配置 - -### _async method_ `call_api(api, **data)` {#Bot-call-api} - -- **说明:** 调用机器人 API 接口,可以通过该函数或直接通过 bot 属性进行调用 - -- **参数** - - - `api` (str): API 名称 - - - `**data` (Any): API 数据 - -- **返回** - - - Any - -- **用法** - - ```python - await bot.call_api("send_msg", message="hello world") - await bot.send_msg(message="hello world") - ``` - -### _abstract async method_ `send(event, message, **kwargs)` {#Bot-send} - -- **说明:** 调用机器人基础发送消息接口 - -- **参数** - - - `event` ([Event](#Event)): 上报事件 - - - `message` (str | [Message](#Message) | [MessageSegment](#MessageSegment)): 要发送的消息 - - - `**kwargs` (Any): 任意额外参数 - -- **返回** - - - Any - -### _classmethod_ `on_calling_api(func)` {#Bot-on-calling-api} - -- **说明** - - 调用 api 预处理。 - - 钩子函数参数: - - - bot: 当前 bot 对象 - - api: 调用的 api 名称 - - data: api 调用的参数字典 - -- **参数** - - - `func` ([T_CallingAPIHook](../typing.md#T-CallingAPIHook)) - -- **返回** - - - [T_CallingAPIHook](../typing.md#T-CallingAPIHook) - -### _classmethod_ `on_called_api(func)` {#Bot-on-called-api} - -- **说明** - - 调用 api 后处理。 - - 钩子函数参数: - - - bot: 当前 bot 对象 - - exception: 调用 api 时发生的错误 - - api: 调用的 api 名称 - - data: api 调用的参数字典 - - result: api 调用的返回 - -- **参数** - - - `func` ([T_CalledAPIHook](../typing.md#T-CalledAPIHook)) - -- **返回** - - - [T_CalledAPIHook](../typing.md#T-CalledAPIHook) - -## _abstract class_ `Event()` {#Event} - -- **说明:** Event 基类。提供获取关键信息的方法,其余信息可直接获取。 - -- **参数** - - auto - -### _abstract method_ `get_type()` {#Event-get-type} - -- **说明:** 获取事件类型的方法,类型通常为 NoneBot 内置的四种类型。 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract method_ `get_event_name()` {#Event-get-event-name} - -- **说明:** 获取事件名称的方法。 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract method_ `get_event_description()` {#Event-get-event-description} - -- **说明:** 获取事件描述的方法,通常为事件具体内容。 - -- **参数** - - empty - -- **返回** - - - str - -### _method_ `get_log_string()` {#Event-get-log-string} - -- **说明** - - 获取事件日志信息的方法。 - - 通常你不需要修改这个方法,只有当希望 NoneBot 隐藏该事件日志时, - 可以抛出 `NoLogException` 异常。 - -- **参数** - - empty - -- **返回** - - - str - -- **异常** - - - NoLogException: 希望 NoneBot 隐藏该事件日志 - -### _abstract method_ `get_user_id()` {#Event-get-user-id} - -- **说明:** 获取事件主体 id 的方法,通常是用户 id 。 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract method_ `get_session_id()` {#Event-get-session-id} - -- **说明:** 获取会话 id 的方法,用于判断当前事件属于哪一个会话, 通常是用户 id、群组 id 组合。 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract method_ `get_message()` {#Event-get-message} - -- **说明:** 获取事件消息内容的方法。 - -- **参数** - - empty - -- **返回** - - - [Message](#Message) - -### _method_ `get_plaintext()` {#Event-get-plaintext} - -- **说明** - - 获取消息纯文本的方法。 - - 通常不需要修改,默认通过 `get_message().extract_plain_text` 获取。 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract method_ `is_tome()` {#Event-is-tome} - -- **说明:** 获取事件是否与机器人有关的方法。 - -- **参数** - - empty - -- **返回** - - - bool - -## _abstract class_ `Adapter(driver, **kwargs)` {#Adapter} - -- **说明** - - 协议适配器基类。 - - 通常,在 Adapter 中编写协议通信相关代码,如: 建立通信连接、处理接收与发送 data 等。 - -- **参数** - - - `driver` ([Driver](../drivers/index.md#Driver)): [Driver](../drivers/index.md#Driver) 实例 - - - `**kwargs` (Any): 其他由 [Driver.register_adapter](../drivers/index.md#Driver-register-adapter) 传入的额外参数 - -### _instance-var_ `driver` {#Adapter-driver} - -- **类型:** [Driver](../drivers/index.md#Driver) - -- **说明:** 实例 - -### _instance-var_ `bots` {#Adapter-bots} - -- **类型:** dict[str, [Bot](#Bot)] - -- **说明:** 本协议适配器已建立连接的 [Bot](#Bot) 实例 - -### _abstract classmethod_ `get_name()` {#Adapter-get-name} - -- **说明:** 当前协议适配器的名称 - -- **参数** - - empty - -- **返回** - - - str - -### _property_ `config` {#Adapter-config} - -- **类型:** [Config](../config.md#Config) - -- **说明:** 全局 NoneBot 配置 - -### _method_ `bot_connect(bot)` {#Adapter-bot-connect} - -- **说明** - - 告知 NoneBot 建立了一个新的 [Bot](#Bot) 连接。 - - 当有新的 [Bot](#Bot) 实例连接建立成功时调用。 - -- **参数** - - - `bot` ([Bot](#Bot)): [Bot](#Bot) 实例 - -- **返回** - - - None - -### _method_ `bot_disconnect(bot)` {#Adapter-bot-disconnect} - -- **说明** - - 告知 NoneBot [Bot](#Bot) 连接已断开。 - - 当有 [Bot](#Bot) 实例连接断开时调用。 - -- **参数** - - - `bot` ([Bot](#Bot)): [Bot](#Bot) 实例 - -- **返回** - - - None - -### _method_ `setup_http_server(setup)` {#Adapter-setup-http-server} - -- **说明:** 设置一个 HTTP 服务器路由配置 - -- **参数** - - - `setup` ([HTTPServerSetup](../drivers/index.md#HTTPServerSetup)) - -- **返回** - - - untyped - -### _method_ `setup_websocket_server(setup)` {#Adapter-setup-websocket-server} - -- **说明:** 设置一个 WebSocket 服务器路由配置 - -- **参数** - - - `setup` ([WebSocketServerSetup](../drivers/index.md#WebSocketServerSetup)) - -- **返回** - - - untyped - -### _async method_ `request(setup)` {#Adapter-request} - -- **说明:** 进行一个 HTTP 客户端请求 - -- **参数** - - - `setup` ([Request](../drivers/index.md#Request)) - -- **返回** - - - [Response](../drivers/index.md#Response) - -### _method_ `websocket(setup)` {#Adapter-websocket} - -- **说明:** 建立一个 WebSocket 客户端连接请求 - -- **参数** - - - `setup` ([Request](../drivers/index.md#Request)) - -- **返回** - - - AsyncGenerator[[WebSocket](../drivers/index.md#WebSocket), None] - -### _method_ `on_ready(func)` {#Adapter-on-ready} - -- **参数** - - - `func` (LIFESPAN_FUNC) - -- **返回** - - - LIFESPAN_FUNC - -## _abstract class_ `Message()` {#Message} - -- **说明:** 消息序列 - -- **参数** - - - `message`: 消息内容 - -### _classmethod_ `template(format_string)` {#Message-template} - -- **说明** - - 创建消息模板。 - - 用法和 `str.format` 大致相同,支持以 `Message` 对象作为消息模板并输出消息对象。 - 并且提供了拓展的格式化控制符, - 可以通过该消息类型的 `MessageSegment` 工厂方法创建消息。 - -- **参数** - - - `format_string` (str | TM): 格式化模板 - -- **返回** - - - [MessageTemplate](#MessageTemplate)[Self]: 消息格式化器 - -### _abstract classmethod_ `get_segment_class()` {#Message-get-segment-class} - -- **说明:** 获取消息段类型 - -- **参数** - - empty - -- **返回** - - - type[TMS] - -### _abstract staticmethod_ `_construct(msg)` {#Message--construct} - -- **说明:** 构造消息数组 - -- **参数** - - - `msg` (str) - -- **返回** - - - Iterable[TMS] - -### _method_ `__getitem__(args)` {#Message---getitem--} - -- **重载** - - **1.** `(args) -> Self` - - - **参数** - - - `args` (str): 消息段类型 - - - **返回** - - - Self: 所有类型为 `args` 的消息段 - - **2.** `(args) -> TMS` - - - **参数** - - - `args` (tuple[str, int]): 消息段类型和索引 - - - **返回** - - - TMS: 类型为 `args[0]` 的消息段第 `args[1]` 个 - - **3.** `(args) -> Self` - - - **参数** - - - `args` (tuple[str, slice]): 消息段类型和切片 - - - **返回** - - - Self: 类型为 `args[0]` 的消息段切片 `args[1]` - - **4.** `(args) -> TMS` - - - **参数** - - - `args` (int): 索引 - - - **返回** - - - TMS: 第 `args` 个消息段 - - **5.** `(args) -> Self` - - - **参数** - - - `args` (slice): 切片 - - - **返回** - - - Self: 消息切片 `args` - -### _method_ `__contains__(value)` {#Message---contains--} - -- **说明:** 检查消息段是否存在 - -- **参数** - - - `value` (TMS | str): 消息段或消息段类型 - -- **返回** - - - bool: 消息内是否存在给定消息段或给定类型的消息段 - -### _method_ `has(value)` {#Message-has} - -- **说明:** 与 [`__contains__`](#Message---contains--) 相同 - -- **参数** - - - `value` (TMS | str) - -- **返回** - - - bool - -### _method_ `index(value, *args)` {#Message-index} - -- **说明:** 索引消息段 - -- **参数** - - - `value` (TMS | str): 消息段或者消息段类型 - - - `*args` (SupportsIndex) - - - `arg`: start 与 end - -- **返回** - - - int: 索引 index - -- **异常** - - - ValueError: 消息段不存在 - -### _method_ `get(type_, count=None)` {#Message-get} - -- **说明:** 获取指定类型的消息段 - -- **参数** - - - `type_` (str): 消息段类型 - - - `count` (int | None): 获取个数 - -- **返回** - - - Self: 构建的新消息 - -### _method_ `count(value)` {#Message-count} - -- **说明:** 计算指定消息段的个数 - -- **参数** - - - `value` (TMS | str): 消息段或消息段类型 - -- **返回** - - - int: 个数 - -### _method_ `only(value)` {#Message-only} - -- **说明:** 检查消息中是否仅包含指定消息段 - -- **参数** - - - `value` (TMS | str): 指定消息段或消息段类型 - -- **返回** - - - bool: 是否仅包含指定消息段 - -### _method_ `append(obj)` {#Message-append} - -- **说明:** 添加一个消息段到消息数组末尾。 - -- **参数** - - - `obj` (str | TMS): 要添加的消息段 - -- **返回** - - - Self - -### _method_ `extend(obj)` {#Message-extend} - -- **说明:** 拼接一个消息数组或多个消息段到消息数组末尾。 - -- **参数** - - - `obj` (Self | Iterable[TMS]): 要添加的消息数组 - -- **返回** - - - Self - -### _method_ `join(iterable)` {#Message-join} - -- **说明:** 将多个消息连接并将自身作为分割 - -- **参数** - - - `iterable` (Iterable[TMS | Self]): 要连接的消息 - -- **返回** - - - Self: 连接后的消息 - -### _method_ `copy()` {#Message-copy} - -- **说明:** 深拷贝消息 - -- **参数** - - empty - -- **返回** - - - Self - -### _method_ `include(*types)` {#Message-include} - -- **说明:** 过滤消息 - -- **参数** - - - `*types` (str): 包含的消息段类型 - -- **返回** - - - Self: 新构造的消息 - -### _method_ `exclude(*types)` {#Message-exclude} - -- **说明:** 过滤消息 - -- **参数** - - - `*types` (str): 不包含的消息段类型 - -- **返回** - - - Self: 新构造的消息 - -### _method_ `extract_plain_text()` {#Message-extract-plain-text} - -- **说明:** 提取消息内纯文本消息 - -- **参数** - - empty - -- **返回** - - - str - -## _abstract class_ `MessageSegment()` {#MessageSegment} - -- **说明:** 消息段基类 - -- **参数** - - auto - -### _instance-var_ `type` {#MessageSegment-type} - -- **类型:** str - -- **说明:** 消息段类型 - -### _class-var_ `data` {#MessageSegment-data} - -- **类型:** dict[str, Any] - -- **说明:** 消息段数据 - -### _abstract classmethod_ `get_message_class()` {#MessageSegment-get-message-class} - -- **说明:** 获取消息数组类型 - -- **参数** - - empty - -- **返回** - - - type[TM] - -### _abstract method_ `__str__()` {#MessageSegment---str--} - -- **说明:** 该消息段所代表的 str,在命令匹配部分使用 - -- **参数** - - empty - -- **返回** - - - str - -### _method_ `__add__(other)` {#MessageSegment---add--} - -- **参数** - - - `other` (str | TMS | Iterable[TMS]) - -- **返回** - - - TM - -### _method_ `get(key, default=None)` {#MessageSegment-get} - -- **参数** - - - `key` (str) - - - `default` (Any) - -- **返回** - - - untyped - -### _method_ `keys()` {#MessageSegment-keys} - -- **参数** - - empty - -- **返回** - - - untyped - -### _method_ `values()` {#MessageSegment-values} - -- **参数** - - empty - -- **返回** - - - untyped - -### _method_ `items()` {#MessageSegment-items} - -- **参数** - - empty - -- **返回** - - - untyped - -### _method_ `join(iterable)` {#MessageSegment-join} - -- **参数** - - - `iterable` (Iterable[TMS | TM]) - -- **返回** - - - TM - -### _method_ `copy()` {#MessageSegment-copy} - -- **参数** - - empty - -- **返回** - - - Self - -### _abstract method_ `is_text()` {#MessageSegment-is-text} - -- **说明:** 当前消息段是否为纯文本 - -- **参数** - - empty - -- **返回** - - - bool - -## _class_ `MessageTemplate(template, factory=str, private_getattr=False)` {#MessageTemplate} - -- **说明:** 消息模板格式化实现类。 - -- **参数** - - - `template` (str | TM): 模板 - - - `factory` (type[str] | type[TM]): 消息类型工厂,默认为 `str` - - - `private_getattr` (bool): 是否允许在模板中访问私有属性,默认为 `False` - -### _method_ `add_format_spec(spec, name=None)` {#MessageTemplate-add-format-spec} - -- **参数** - - - `spec` (FormatSpecFunc_T) - - - `name` (str | None) - -- **返回** - - - FormatSpecFunc_T - -### _method_ `format(*args, **kwargs)` {#MessageTemplate-format} - -- **说明:** 根据传入参数和模板生成消息对象 - -- **参数** - - - `*args` - - - `**kwargs` - -- **返回** - - - TF - -### _method_ `format_map(mapping)` {#MessageTemplate-format-map} - -- **说明:** 根据传入字典和模板生成消息对象, 在传入字段名不是有效标识符时有用 - -- **参数** - - - `mapping` (Mapping[str, Any]) - -- **返回** - - - TF - -### _method_ `vformat(format_string, args, kwargs)` {#MessageTemplate-vformat} - -- **参数** - - - `format_string` (str) - - - `args` (Sequence[Any]) - - - `kwargs` (Mapping[str, Any]) - -- **返回** - - - TF - -### _method_ `get_field(field_name, args, kwargs)` {#MessageTemplate-get-field} - -- **参数** - - - `field_name` (str) - - - `args` (Sequence[Any]) - - - `kwargs` (Mapping[str, Any]) - -- **返回** - - - tuple[Any, int | str] - -### _method_ `format_field(value, format_spec)` {#MessageTemplate-format-field} - -- **参数** - - - `value` (Any) - - - `format_spec` (str) - -- **返回** - - - Any diff --git a/website/versioned_docs/version-2.3.1/api/compat.md b/website/versioned_docs/version-2.3.1/api/compat.md deleted file mode 100644 index 6e2d5af66d67..000000000000 --- a/website/versioned_docs/version-2.3.1/api/compat.md +++ /dev/null @@ -1,218 +0,0 @@ ---- -sidebar_position: 16 -description: nonebot.compat 模块 ---- - -# nonebot.compat - -本模块为 Pydantic 版本兼容层模块 - -为兼容 Pydantic V1 与 V2 版本,定义了一系列兼容函数与类供使用。 - -## _var_ `Required` {#Required} - -- **类型:** untyped - -- **说明:** Alias of Ellipsis for compatibility with pydantic v1 - -## _library-attr_ `PydanticUndefined` {#PydanticUndefined} - -- **说明:** Pydantic Undefined object - -## _library-attr_ `PydanticUndefinedType` {#PydanticUndefinedType} - -- **说明:** Pydantic Undefined type - -## _var_ `DEFAULT_CONFIG` {#DEFAULT-CONFIG} - -- **类型:** untyped - -- **说明:** Default config for validations - -## _class_ `FieldInfo(default=PydanticUndefined, **kwargs)` {#FieldInfo} - -- **说明:** FieldInfo class with extra property for compatibility with pydantic v1 - -- **参数** - - - `default` (Any) - - - `**kwargs` (Any) - -### _property_ `extra` {#FieldInfo-extra} - -- **类型:** dict[str, Any] - -- **说明** - - Extra data that is not part of the standard pydantic fields. - - For compatibility with pydantic v1. - -## _class_ `ModelField()` {#ModelField} - -- **说明:** ModelField class for compatibility with pydantic v1 - -- **参数** - - auto - -### _instance-var_ `name` {#ModelField-name} - -- **类型:** str - -- **说明:** The name of the field. - -### _instance-var_ `annotation` {#ModelField-annotation} - -- **类型:** Any - -- **说明:** The annotation of the field. - -### _instance-var_ `field_info` {#ModelField-field-info} - -- **类型:** FieldInfo - -- **说明:** The FieldInfo of the field. - -### _classmethod_ `construct(name, annotation, field_info=None)` {#ModelField-construct} - -- **说明:** Construct a ModelField from given infos. - -- **参数** - - - `name` (str) - - - `annotation` (Any) - - - `field_info` (FieldInfo | None) - -- **返回** - - - Self - -### _method_ `get_default()` {#ModelField-get-default} - -- **说明:** Get the default value of the field. - -- **参数** - - empty - -- **返回** - - - Any - -## _def_ `extract_field_info(field_info)` {#extract-field-info} - -- **说明:** Get FieldInfo init kwargs from a FieldInfo instance. - -- **参数** - - - `field_info` (BaseFieldInfo) - -- **返回** - - - dict[str, Any] - -## _def_ `model_field_validate(model_field, value, config=None)` {#model-field-validate} - -- **说明:** Validate the value pass to the field. - -- **参数** - - - `model_field` (ModelField) - - - `value` (Any) - - - `config` (ConfigDict | None) - -- **返回** - - - Any - -## _def_ `model_fields(model)` {#model-fields} - -- **说明:** Get field list of a model. - -- **参数** - - - `model` (type[BaseModel]) - -- **返回** - - - list[ModelField] - -## _def_ `model_config(model)` {#model-config} - -- **说明:** Get config of a model. - -- **参数** - - - `model` (type[BaseModel]) - -- **返回** - - - Any - -## _def_ `model_dump(model, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)` {#model-dump} - -- **参数** - - - `model` (BaseModel) - - - `include` (set[str] | None) - - - `exclude` (set[str] | None) - - - `by_alias` (bool) - - - `exclude_unset` (bool) - - - `exclude_defaults` (bool) - - - `exclude_none` (bool) - -- **返回** - - - dict[str, Any] - -## _def_ `type_validate_python(type_, data)` {#type-validate-python} - -- **说明:** Validate data with given type. - -- **参数** - - - `type_` (type[T]) - - - `data` (Any) - -- **返回** - - - T - -## _def_ `type_validate_json(type_, data)` {#type-validate-json} - -- **说明:** Validate JSON with given type. - -- **参数** - - - `type_` (type[T]) - - - `data` (str | bytes) - -- **返回** - - - T - -## _def_ `custom_validation(class_)` {#custom-validation} - -- **说明:** Use pydantic v1 like validator generator in pydantic v2 - -- **参数** - - - `class_` (type[CVC]) - -- **返回** - - - type[CVC] diff --git a/website/versioned_docs/version-2.3.1/api/config.md b/website/versioned_docs/version-2.3.1/api/config.md deleted file mode 100644 index 5c027282fe35..000000000000 --- a/website/versioned_docs/version-2.3.1/api/config.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -sidebar_position: 1 -description: nonebot.config 模块 ---- - -# nonebot.config - -本模块定义了 NoneBot 本身运行所需的配置项。 - -NoneBot 使用 [`pydantic`](https://pydantic-docs.helpmanual.io/) 以及 -[`python-dotenv`](https://saurabh-kumar.com/python-dotenv/) 来读取配置。 - -配置项需符合特殊格式或 json 序列化格式 -详情见 [`pydantic Field Type`](https://pydantic-docs.helpmanual.io/usage/types/) 文档。 - -## _class_ `Env(_env_file=ENV_FILE_SENTINEL, _env_file_encoding=None, _env_nested_delimiter=None, **values)` {#Env} - -- **说明** - - 运行环境配置。大小写不敏感。 - - 将会从 **环境变量** > **dotenv 配置文件** 的优先级读取环境信息。 - -- **参数** - - - `_env_file` (DOTENV_TYPE | None) - - - `_env_file_encoding` (str | None) - - - `_env_nested_delimiter` (str | None) - - - `**values` (Any) - -### _class-var_ `environment` {#Env-environment} - -- **类型:** str - -- **说明** - - 当前环境名。 - - NoneBot 将从 `.env.{environment}` 文件中加载配置。 - -## _class_ `Config(_env_file=ENV_FILE_SENTINEL, _env_file_encoding=None, _env_nested_delimiter=None, **values)` {#Config} - -- **说明** - - NoneBot 主要配置。大小写不敏感。 - - 除了 NoneBot 的配置项外,还可以自行添加配置项到 `.env.{environment}` 文件中。 - 这些配置将会在 json 反序列化后一起带入 `Config` 类中。 - - 配置方法参考: [配置](https://nonebot.dev/docs/appendices/config) - -- **参数** - - - `_env_file` (DOTENV_TYPE | None) - - - `_env_file_encoding` (str | None) - - - `_env_nested_delimiter` (str | None) - - - `**values` (Any) - -### _class-var_ `driver` {#Config-driver} - -- **类型:** str - -- **说明** - - NoneBot 运行所使用的 `Driver` 。继承自 [Driver](drivers/index.md#Driver) 。 - - 配置格式为 `[:][+[:]]*`。 - - `~` 为 `nonebot.drivers.` 的缩写。 - - 配置方法参考: [配置驱动器](https://nonebot.dev/docs/advanced/driver#%E9%85%8D%E7%BD%AE%E9%A9%B1%E5%8A%A8%E5%99%A8) - -### _class-var_ `host` {#Config-host} - -- **类型:** IPvAnyAddress - -- **说明:** NoneBot [ReverseDriver](drivers/index.md#ReverseDriver) 服务端监听的 IP/主机名。 - -### _class-var_ `port` {#Config-port} - -- **类型:** int - -- **说明:** NoneBot [ReverseDriver](drivers/index.md#ReverseDriver) 服务端监听的端口。 - -### _class-var_ `log_level` {#Config-log-level} - -- **类型:** int | str - -- **说明** - - NoneBot 日志输出等级,可以为 `int` 类型等级或等级名称。 - - 参考 [记录日志](https://nonebot.dev/docs/appendices/log),[loguru 日志等级](https://loguru.readthedocs.io/en/stable/api/logger.html#levels)。 - - :::tip 提示 - 日志等级名称应为大写,如 `INFO`。 - ::: - -- **用法** - - ```conf - LOG_LEVEL=25 - LOG_LEVEL=INFO - ``` - -### _class-var_ `api_timeout` {#Config-api-timeout} - -- **类型:** float | None - -- **说明:** API 请求超时时间,单位: 秒。 - -### _class-var_ `superusers` {#Config-superusers} - -- **类型:** set[str] - -- **说明:** 机器人超级用户。 - -- **用法** - - ```conf - SUPERUSERS=["12345789"] - ``` - -### _class-var_ `nickname` {#Config-nickname} - -- **类型:** set[str] - -- **说明:** 机器人昵称。 - -### _class-var_ `command_start` {#Config-command-start} - -- **类型:** set[str] - -- **说明** - - 命令的起始标记,用于判断一条消息是不是命令。 - - 参考[命令响应规则](https://nonebot.dev/docs/advanced/matcher#command)。 - -- **用法** - - ```conf - COMMAND_START=["/", ""] - ``` - -### _class-var_ `command_sep` {#Config-command-sep} - -- **类型:** set[str] - -- **说明** - - 命令的分隔标记,用于将文本形式的命令切分为元组(实际的命令名)。 - - 参考[命令响应规则](https://nonebot.dev/docs/advanced/matcher#command)。 - -- **用法** - - ```conf - COMMAND_SEP=["."] - ``` - -### _class-var_ `session_expire_timeout` {#Config-session-expire-timeout} - -- **类型:** timedelta - -- **说明:** 等待用户回复的超时时间。 - -- **用法** - - ```conf - SESSION_EXPIRE_TIMEOUT=[-][DD]D[,][HH:MM:]SS[.ffffff] - SESSION_EXPIRE_TIMEOUT=[±]P[DD]DT[HH]H[MM]M[SS]S # ISO 8601 - ``` diff --git a/website/versioned_docs/version-2.3.1/api/consts.md b/website/versioned_docs/version-2.3.1/api/consts.md deleted file mode 100644 index a3119daa9031..000000000000 --- a/website/versioned_docs/version-2.3.1/api/consts.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -sidebar_position: 9 -description: nonebot.consts 模块 ---- - -# nonebot.consts - -本模块包含了 NoneBot 事件处理过程中使用到的常量。 - -## _var_ `RECEIVE_KEY` {#RECEIVE-KEY} - -- **类型:** Literal['\_receive\_\{id\}'] - -- **说明:** `receive` 存储 key - -## _var_ `LAST_RECEIVE_KEY` {#LAST-RECEIVE-KEY} - -- **类型:** Literal['\_last\_receive'] - -- **说明:** `last_receive` 存储 key - -## _var_ `ARG_KEY` {#ARG-KEY} - -- **类型:** Literal['\{key\}'] - -- **说明:** `arg` 存储 key - -## _var_ `REJECT_TARGET` {#REJECT-TARGET} - -- **类型:** Literal['\_current\_target'] - -- **说明:** 当前 `reject` 目标存储 key - -## _var_ `REJECT_CACHE_TARGET` {#REJECT-CACHE-TARGET} - -- **类型:** Literal['\_next\_target'] - -- **说明:** 下一个 `reject` 目标存储 key - -## _var_ `PREFIX_KEY` {#PREFIX-KEY} - -- **类型:** Literal['\_prefix'] - -- **说明:** 命令前缀存储 key - -## _var_ `CMD_KEY` {#CMD-KEY} - -- **类型:** Literal['command'] - -- **说明:** 命令元组存储 key - -## _var_ `RAW_CMD_KEY` {#RAW-CMD-KEY} - -- **类型:** Literal['raw\_command'] - -- **说明:** 命令文本存储 key - -## _var_ `CMD_ARG_KEY` {#CMD-ARG-KEY} - -- **类型:** Literal['command\_arg'] - -- **说明:** 命令参数存储 key - -## _var_ `CMD_START_KEY` {#CMD-START-KEY} - -- **类型:** Literal['command\_start'] - -- **说明:** 命令开头存储 key - -## _var_ `CMD_WHITESPACE_KEY` {#CMD-WHITESPACE-KEY} - -- **类型:** Literal['command\_whitespace'] - -- **说明:** 命令与参数间空白符存储 key - -## _var_ `SHELL_ARGS` {#SHELL-ARGS} - -- **类型:** Literal['\_args'] - -- **说明:** shell 命令 parse 后参数字典存储 key - -## _var_ `SHELL_ARGV` {#SHELL-ARGV} - -- **类型:** Literal['\_argv'] - -- **说明:** shell 命令原始参数列表存储 key - -## _var_ `REGEX_MATCHED` {#REGEX-MATCHED} - -- **类型:** Literal['\_matched'] - -- **说明:** 正则匹配结果存储 key - -## _var_ `STARTSWITH_KEY` {#STARTSWITH-KEY} - -- **类型:** Literal['\_startswith'] - -- **说明:** 响应触发前缀 key - -## _var_ `ENDSWITH_KEY` {#ENDSWITH-KEY} - -- **类型:** Literal['\_endswith'] - -- **说明:** 响应触发后缀 key - -## _var_ `FULLMATCH_KEY` {#FULLMATCH-KEY} - -- **类型:** Literal['\_fullmatch'] - -- **说明:** 响应触发完整消息 key - -## _var_ `KEYWORD_KEY` {#KEYWORD-KEY} - -- **类型:** Literal['\_keyword'] - -- **说明:** 响应触发关键字 key diff --git a/website/versioned_docs/version-2.3.1/api/dependencies/_category_.json b/website/versioned_docs/version-2.3.1/api/dependencies/_category_.json deleted file mode 100644 index 6bd1772ab64d..000000000000 --- a/website/versioned_docs/version-2.3.1/api/dependencies/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "position": 13 -} diff --git a/website/versioned_docs/version-2.3.1/api/dependencies/index.md b/website/versioned_docs/version-2.3.1/api/dependencies/index.md deleted file mode 100644 index 4798cbbc4edf..000000000000 --- a/website/versioned_docs/version-2.3.1/api/dependencies/index.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -sidebar_position: 0 -description: nonebot.dependencies 模块 ---- - -# nonebot.dependencies - -本模块模块实现了依赖注入的定义与处理。 - -## _abstract class_ `Param(*args, validate=False, **kwargs)` {#Param} - -- **说明** - - 依赖注入的基本单元 —— 参数。 - - 继承自 `pydantic.fields.FieldInfo`,用于描述参数信息(不包括参数名)。 - -- **参数** - - - `*args` - - - `validate` (bool) - - - `**kwargs` (Any) - -## _class_ `Dependent()` {#Dependent} - -- **说明:** 依赖注入容器 - -- **参数** - - - `call`: 依赖注入的可调用对象,可以是任何 Callable 对象 - - - `pre_checkers`: 依赖注入解析前的参数检查 - - - `params`: 具名参数列表 - - - `parameterless`: 匿名参数列表 - - - `allow_types`: 允许的参数类型 - -### _staticmethod_ `parse_params(call, allow_types)` {#Dependent-parse-params} - -- **参数** - - - `call` (\_DependentCallable[R]) - - - `allow_types` (tuple[type[Param], ...]) - -- **返回** - - - tuple[[ModelField](../compat.md#ModelField), ...] - -### _staticmethod_ `parse_parameterless(parameterless, allow_types)` {#Dependent-parse-parameterless} - -- **参数** - - - `parameterless` (tuple[Any, ...]) - - - `allow_types` (tuple[type[Param], ...]) - -- **返回** - - - tuple[Param, ...] - -### _classmethod_ `parse(*, call, parameterless=None, allow_types)` {#Dependent-parse} - -- **参数** - - - `call` (\_DependentCallable[R]) - - - `parameterless` (Iterable[Any] | None) - - - `allow_types` (Iterable[type[Param]]) - -- **返回** - - - Dependent[R] - -### _async method_ `check(**params)` {#Dependent-check} - -- **参数** - - - `**params` (Any) - -- **返回** - - - None - -### _async method_ `solve(**params)` {#Dependent-solve} - -- **参数** - - - `**params` (Any) - -- **返回** - - - dict[str, Any] diff --git a/website/versioned_docs/version-2.3.1/api/dependencies/utils.md b/website/versioned_docs/version-2.3.1/api/dependencies/utils.md deleted file mode 100644 index d227d6fb374b..000000000000 --- a/website/versioned_docs/version-2.3.1/api/dependencies/utils.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -sidebar_position: 1 -description: nonebot.dependencies.utils 模块 ---- - -# nonebot.dependencies.utils - -## _def_ `get_typed_signature(call)` {#get-typed-signature} - -- **说明:** 获取可调用对象签名 - -- **参数** - - - `call` ((...) -> Any) - -- **返回** - - - inspect.Signature - -## _def_ `get_typed_annotation(param, globalns)` {#get-typed-annotation} - -- **说明:** 获取参数的类型注解 - -- **参数** - - - `param` (inspect.Parameter) - - - `globalns` (dict[str, Any]) - -- **返回** - - - Any - -## _def_ `check_field_type(field, value)` {#check-field-type} - -- **说明:** 检查字段类型是否匹配 - -- **参数** - - - `field` ([ModelField](../compat.md#ModelField)) - - - `value` (Any) - -- **返回** - - - Any diff --git a/website/versioned_docs/version-2.3.1/api/drivers/_category_.json b/website/versioned_docs/version-2.3.1/api/drivers/_category_.json deleted file mode 100644 index 3714fde8831d..000000000000 --- a/website/versioned_docs/version-2.3.1/api/drivers/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "position": 14 -} diff --git a/website/versioned_docs/version-2.3.1/api/drivers/aiohttp.md b/website/versioned_docs/version-2.3.1/api/drivers/aiohttp.md deleted file mode 100644 index 352e10532d2b..000000000000 --- a/website/versioned_docs/version-2.3.1/api/drivers/aiohttp.md +++ /dev/null @@ -1,204 +0,0 @@ ---- -sidebar_position: 2 -description: nonebot.drivers.aiohttp 模块 ---- - -# nonebot.drivers.aiohttp - -[AIOHTTP](https://aiohttp.readthedocs.io/en/stable/) 驱动适配器。 - -```bash -nb driver install aiohttp -# 或者 -pip install nonebot2[aiohttp] -``` - -:::tip 提示 -本驱动仅支持客户端连接 -::: - -## _class_ `Session(params=None, headers=None, cookies=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#Session} - -- **参数** - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `version` (str | [HTTPVersion](index.md#HTTPVersion)) - - - `timeout` (float | None) - - - `proxy` (str | None) - -### _async method_ `request(setup)` {#Session-request} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - [Response](index.md#Response) - -### _async method_ `setup()` {#Session-setup} - -- **参数** - - empty - -- **返回** - - - None - -### _async method_ `close()` {#Session-close} - -- **参数** - - empty - -- **返回** - - - None - -## _class_ `Mixin()` {#Mixin} - -- **说明:** AIOHTTP Mixin - -- **参数** - - auto - -### _async method_ `request(setup)` {#Mixin-request} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - [Response](index.md#Response) - -### _method_ `websocket(setup)` {#Mixin-websocket} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - AsyncGenerator[[WebSocket](index.md#WebSocket), None] - -### _method_ `get_session(params=None, headers=None, cookies=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#Mixin-get-session} - -- **参数** - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `version` (str | [HTTPVersion](index.md#HTTPVersion)) - - - `timeout` (float | None) - - - `proxy` (str | None) - -- **返回** - - - Session - -## _class_ `WebSocket(*, request, session, websocket)` {#WebSocket} - -- **说明:** AIOHTTP Websocket Wrapper - -- **参数** - - - `request` ([Request](index.md#Request)) - - - `session` (aiohttp.ClientSession) - - - `websocket` (aiohttp.ClientWebSocketResponse) - -### _async method_ `accept()` {#WebSocket-accept} - -- **参数** - - empty - -- **返回** - - - untyped - -### _async method_ `close(code=1000, reason="")` {#WebSocket-close} - -- **参数** - - - `code` (int) - - - `reason` (str) - -- **返回** - - - untyped - -### _async method_ `receive()` {#WebSocket-receive} - -- **参数** - - empty - -- **返回** - - - str - -### _async method_ `receive_text()` {#WebSocket-receive-text} - -- **参数** - - empty - -- **返回** - - - str - -### _async method_ `receive_bytes()` {#WebSocket-receive-bytes} - -- **参数** - - empty - -- **返回** - - - bytes - -### _async method_ `send_text(data)` {#WebSocket-send-text} - -- **参数** - - - `data` (str) - -- **返回** - - - None - -### _async method_ `send_bytes(data)` {#WebSocket-send-bytes} - -- **参数** - - - `data` (bytes) - -- **返回** - - - None - -## _class_ `Driver(env, config)` {#Driver} - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` ([Config](../config.md#Config)) diff --git a/website/versioned_docs/version-2.3.1/api/drivers/fastapi.md b/website/versioned_docs/version-2.3.1/api/drivers/fastapi.md deleted file mode 100644 index 4bb653740e51..000000000000 --- a/website/versioned_docs/version-2.3.1/api/drivers/fastapi.md +++ /dev/null @@ -1,242 +0,0 @@ ---- -sidebar_position: 1 -description: nonebot.drivers.fastapi 模块 ---- - -# nonebot.drivers.fastapi - -[FastAPI](https://fastapi.tiangolo.com/) 驱动适配 - -```bash -nb driver install fastapi -# 或者 -pip install nonebot2[fastapi] -``` - -:::tip 提示 -本驱动仅支持服务端连接 -::: - -## _class_ `Config()` {#Config} - -- **说明:** FastAPI 驱动框架设置,详情参考 FastAPI 文档 - -- **参数** - - auto - -### _class-var_ `fastapi_openapi_url` {#Config-fastapi-openapi-url} - -- **类型:** str | None - -- **说明:** `openapi.json` 地址,默认为 `None` 即关闭 - -### _class-var_ `fastapi_docs_url` {#Config-fastapi-docs-url} - -- **类型:** str | None - -- **说明:** `swagger` 地址,默认为 `None` 即关闭 - -### _class-var_ `fastapi_redoc_url` {#Config-fastapi-redoc-url} - -- **类型:** str | None - -- **说明:** `redoc` 地址,默认为 `None` 即关闭 - -### _class-var_ `fastapi_include_adapter_schema` {#Config-fastapi-include-adapter-schema} - -- **类型:** bool - -- **说明:** 是否包含适配器路由的 schema,默认为 `True` - -### _class-var_ `fastapi_reload` {#Config-fastapi-reload} - -- **类型:** bool - -- **说明:** 开启/关闭冷重载 - -### _class-var_ `fastapi_reload_dirs` {#Config-fastapi-reload-dirs} - -- **类型:** list[str] | None - -- **说明:** 重载监控文件夹列表,默认为 uvicorn 默认值 - -### _class-var_ `fastapi_reload_delay` {#Config-fastapi-reload-delay} - -- **类型:** float - -- **说明:** 重载延迟,默认为 uvicorn 默认值 - -### _class-var_ `fastapi_reload_includes` {#Config-fastapi-reload-includes} - -- **类型:** list[str] | None - -- **说明:** 要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -### _class-var_ `fastapi_reload_excludes` {#Config-fastapi-reload-excludes} - -- **类型:** list[str] | None - -- **说明:** 不要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -### _class-var_ `fastapi_extra` {#Config-fastapi-extra} - -- **类型:** dict[str, Any] - -- **说明:** 传递给 `FastAPI` 的其他参数。 - -## _class_ `Driver(env, config)` {#Driver} - -- **说明:** FastAPI 驱动框架。 - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` (NoneBotConfig) - -### _property_ `type` {#Driver-type} - -- **类型:** str - -- **说明:** 驱动名称: `fastapi` - -### _property_ `server_app` {#Driver-server-app} - -- **类型:** FastAPI - -- **说明:** `FastAPI APP` 对象 - -### _property_ `asgi` {#Driver-asgi} - -- **类型:** FastAPI - -- **说明:** `FastAPI APP` 对象 - -### _property_ `logger` {#Driver-logger} - -- **类型:** logging.Logger - -- **说明:** fastapi 使用的 logger - -### _method_ `setup_http_server(setup)` {#Driver-setup-http-server} - -- **参数** - - - `setup` ([HTTPServerSetup](index.md#HTTPServerSetup)) - -- **返回** - - - untyped - -### _method_ `setup_websocket_server(setup)` {#Driver-setup-websocket-server} - -- **参数** - - - `setup` ([WebSocketServerSetup](index.md#WebSocketServerSetup)) - -- **返回** - - - None - -### _method_ `run(host=None, port=None, *args, app=None, **kwargs)` {#Driver-run} - -- **说明:** 使用 `uvicorn` 启动 FastAPI - -- **参数** - - - `host` (str | None) - - - `port` (int | None) - - - `*args` - - - `app` (str | None) - - - `**kwargs` - -- **返回** - - - untyped - -## _class_ `FastAPIWebSocket(*, request, websocket)` {#FastAPIWebSocket} - -- **说明:** FastAPI WebSocket Wrapper - -- **参数** - - - `request` (BaseRequest) - - - `websocket` ([WebSocket](index.md#WebSocket)) - -### _async method_ `accept()` {#FastAPIWebSocket-accept} - -- **参数** - - empty - -- **返回** - - - None - -### _async method_ `close(code=status.WS_1000_NORMAL_CLOSURE, reason="")` {#FastAPIWebSocket-close} - -- **参数** - - - `code` (int) - - - `reason` (str) - -- **返回** - - - None - -### _async method_ `receive()` {#FastAPIWebSocket-receive} - -- **参数** - - empty - -- **返回** - - - str | bytes - -### _async method_ `receive_text()` {#FastAPIWebSocket-receive-text} - -- **参数** - - empty - -- **返回** - - - str - -### _async method_ `receive_bytes()` {#FastAPIWebSocket-receive-bytes} - -- **参数** - - empty - -- **返回** - - - bytes - -### _async method_ `send_text(data)` {#FastAPIWebSocket-send-text} - -- **参数** - - - `data` (str) - -- **返回** - - - None - -### _async method_ `send_bytes(data)` {#FastAPIWebSocket-send-bytes} - -- **参数** - - - `data` (bytes) - -- **返回** - - - None diff --git a/website/versioned_docs/version-2.3.1/api/drivers/httpx.md b/website/versioned_docs/version-2.3.1/api/drivers/httpx.md deleted file mode 100644 index f2f304ec426e..000000000000 --- a/website/versioned_docs/version-2.3.1/api/drivers/httpx.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -sidebar_position: 3 -description: nonebot.drivers.httpx 模块 ---- - -# nonebot.drivers.httpx - -[HTTPX](https://www.python-httpx.org/) 驱动适配 - -```bash -nb driver install httpx -# 或者 -pip install nonebot2[httpx] -``` - -:::tip 提示 -本驱动仅支持客户端 HTTP 连接 -::: - -## _class_ `Session(params=None, headers=None, cookies=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#Session} - -- **参数** - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `version` (str | [HTTPVersion](index.md#HTTPVersion)) - - - `timeout` (float | None) - - - `proxy` (str | None) - -### _async method_ `request(setup)` {#Session-request} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - [Response](index.md#Response) - -### _async method_ `setup()` {#Session-setup} - -- **参数** - - empty - -- **返回** - - - None - -### _async method_ `close()` {#Session-close} - -- **参数** - - empty - -- **返回** - - - None - -## _class_ `Mixin()` {#Mixin} - -- **说明:** HTTPX Mixin - -- **参数** - - auto - -### _async method_ `request(setup)` {#Mixin-request} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - [Response](index.md#Response) - -### _method_ `get_session(params=None, headers=None, cookies=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#Mixin-get-session} - -- **参数** - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `version` (str | [HTTPVersion](index.md#HTTPVersion)) - - - `timeout` (float | None) - - - `proxy` (str | None) - -- **返回** - - - Session - -## _class_ `Driver(env, config)` {#Driver} - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` ([Config](../config.md#Config)) diff --git a/website/versioned_docs/version-2.3.1/api/drivers/index.md b/website/versioned_docs/version-2.3.1/api/drivers/index.md deleted file mode 100644 index add6dfb27f66..000000000000 --- a/website/versioned_docs/version-2.3.1/api/drivers/index.md +++ /dev/null @@ -1,596 +0,0 @@ ---- -sidebar_position: 0 -description: nonebot.drivers 模块 ---- - -# nonebot.drivers - -本模块定义了驱动适配器基类。 - -各驱动请继承以下基类。 - -## _abstract class_ `Mixin()` {#Mixin} - -- **说明:** 可与其他驱动器共用的混入基类。 - -- **参数** - - auto - -### _abstract property_ `type` {#Mixin-type} - -- **类型:** str - -- **说明:** 混入驱动类型名称 - -## _abstract class_ `Driver(env, config)` {#Driver} - -- **说明** - - 驱动器基类。 - - 驱动器控制框架的启动和停止,适配器的注册,以及机器人生命周期管理。 - -- **参数** - - - `env` ([Env](../config.md#Env)): 包含环境信息的 Env 对象 - - - `config` ([Config](../config.md#Config)): 包含配置信息的 Config 对象 - -### _instance-var_ `env` {#Driver-env} - -- **类型:** str - -- **说明:** 环境名称 - -### _instance-var_ `config` {#Driver-config} - -- **类型:** [Config](../config.md#Config) - -- **说明:** 全局配置对象 - -### _property_ `bots` {#Driver-bots} - -- **类型:** dict[str, [Bot](../adapters/index.md#Bot)] - -- **说明:** 获取当前所有已连接的 Bot - -### _method_ `register_adapter(adapter, **kwargs)` {#Driver-register-adapter} - -- **说明:** 注册一个协议适配器 - -- **参数** - - - `adapter` (type[[Adapter](../adapters/index.md#Adapter)]): 适配器类 - - - `**kwargs`: 其他传递给适配器的参数 - -- **返回** - - - None - -### _abstract property_ `type` {#Driver-type} - -- **类型:** str - -- **说明:** 驱动类型名称 - -### _abstract property_ `logger` {#Driver-logger} - -- **类型:** untyped - -- **说明:** 驱动专属 logger 日志记录器 - -### _abstract method_ `run(*args, **kwargs)` {#Driver-run} - -- **说明:** 启动驱动框架 - -- **参数** - - - `*args` - - - `**kwargs` - -- **返回** - - - untyped - -### _method_ `on_startup(func)` {#Driver-on-startup} - -- **说明:** 注册一个启动时执行的函数 - -- **参数** - - - `func` (LIFESPAN_FUNC) - -- **返回** - - - LIFESPAN_FUNC - -### _method_ `on_shutdown(func)` {#Driver-on-shutdown} - -- **说明:** 注册一个停止时执行的函数 - -- **参数** - - - `func` (LIFESPAN_FUNC) - -- **返回** - - - LIFESPAN_FUNC - -### _classmethod_ `on_bot_connect(func)` {#Driver-on-bot-connect} - -- **说明** - - 装饰一个函数使他在 bot 连接成功时执行。 - - 钩子函数参数: - - - bot: 当前连接上的 Bot 对象 - -- **参数** - - - `func` ([T_BotConnectionHook](../typing.md#T-BotConnectionHook)) - -- **返回** - - - [T_BotConnectionHook](../typing.md#T-BotConnectionHook) - -### _classmethod_ `on_bot_disconnect(func)` {#Driver-on-bot-disconnect} - -- **说明** - - 装饰一个函数使他在 bot 连接断开时执行。 - - 钩子函数参数: - - - bot: 当前连接上的 Bot 对象 - -- **参数** - - - `func` ([T_BotDisconnectionHook](../typing.md#T-BotDisconnectionHook)) - -- **返回** - - - [T_BotDisconnectionHook](../typing.md#T-BotDisconnectionHook) - -## _class_ `Cookies(cookies=None)` {#Cookies} - -- **参数** - - - `cookies` (CookieTypes) - -### _method_ `set(name, value, domain="", path="/")` {#Cookies-set} - -- **参数** - - - `name` (str) - - - `value` (str) - - - `domain` (str) - - - `path` (str) - -- **返回** - - - None - -### _method_ `get(name, default=None, domain=None, path=None)` {#Cookies-get} - -- **参数** - - - `name` (str) - - - `default` (str | None) - - - `domain` (str | None) - - - `path` (str | None) - -- **返回** - - - str | None - -### _method_ `delete(name, domain=None, path=None)` {#Cookies-delete} - -- **参数** - - - `name` (str) - - - `domain` (str | None) - - - `path` (str | None) - -- **返回** - - - None - -### _method_ `clear(domain=None, path=None)` {#Cookies-clear} - -- **参数** - - - `domain` (str | None) - - - `path` (str | None) - -- **返回** - - - None - -### _method_ `update(cookies=None)` {#Cookies-update} - -- **参数** - - - `cookies` (CookieTypes) - -- **返回** - - - None - -### _method_ `as_header(request)` {#Cookies-as-header} - -- **参数** - - - `request` (Request) - -- **返回** - - - dict[str, str] - -## _class_ `Request(method, url, *, params=None, headers=None, cookies=None, content=None, data=None, json=None, files=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#Request} - -- **参数** - - - `method` (str | bytes) - - - `url` (URL | str | RawURL) - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `content` (ContentTypes) - - - `data` (DataTypes) - - - `json` (Any) - - - `files` (FilesTypes) - - - `version` (str | HTTPVersion) - - - `timeout` (float | None) - - - `proxy` (str | None) - -## _class_ `Response(status_code, *, headers=None, content=None, request=None)` {#Response} - -- **参数** - - - `status_code` (int) - - - `headers` (HeaderTypes) - - - `content` (ContentTypes) - - - `request` (Request | None) - -## _abstract class_ `ASGIMixin()` {#ASGIMixin} - -- **说明** - - ASGI 服务端基类。 - - 将后端框架封装,以满足适配器使用。 - -- **参数** - - auto - -### _abstract property_ `server_app` {#ASGIMixin-server-app} - -- **类型:** Any - -- **说明:** 驱动 APP 对象 - -### _abstract property_ `asgi` {#ASGIMixin-asgi} - -- **类型:** Any - -- **说明:** 驱动 ASGI 对象 - -### _abstract method_ `setup_http_server(setup)` {#ASGIMixin-setup-http-server} - -- **说明:** 设置一个 HTTP 服务器路由配置 - -- **参数** - - - `setup` ([HTTPServerSetup](#HTTPServerSetup)) - -- **返回** - - - None - -### _abstract method_ `setup_websocket_server(setup)` {#ASGIMixin-setup-websocket-server} - -- **说明:** 设置一个 WebSocket 服务器路由配置 - -- **参数** - - - `setup` ([WebSocketServerSetup](#WebSocketServerSetup)) - -- **返回** - - - None - -## _abstract class_ `WebSocket(*, request)` {#WebSocket} - -- **参数** - - - `request` (Request) - -### _abstract property_ `closed` {#WebSocket-closed} - -- **类型:** bool - -- **说明:** 连接是否已经关闭 - -### _abstract async method_ `accept()` {#WebSocket-accept} - -- **说明:** 接受 WebSocket 连接请求 - -- **参数** - - empty - -- **返回** - - - None - -### _abstract async method_ `close(code=1000, reason="")` {#WebSocket-close} - -- **说明:** 关闭 WebSocket 连接请求 - -- **参数** - - - `code` (int) - - - `reason` (str) - -- **返回** - - - None - -### _abstract async method_ `receive()` {#WebSocket-receive} - -- **说明:** 接收一条 WebSocket text/bytes 信息 - -- **参数** - - empty - -- **返回** - - - str | bytes - -### _abstract async method_ `receive_text()` {#WebSocket-receive-text} - -- **说明:** 接收一条 WebSocket text 信息 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract async method_ `receive_bytes()` {#WebSocket-receive-bytes} - -- **说明:** 接收一条 WebSocket binary 信息 - -- **参数** - - empty - -- **返回** - - - bytes - -### _async method_ `send(data)` {#WebSocket-send} - -- **说明:** 发送一条 WebSocket text/bytes 信息 - -- **参数** - - - `data` (str | bytes) - -- **返回** - - - None - -### _abstract async method_ `send_text(data)` {#WebSocket-send-text} - -- **说明:** 发送一条 WebSocket text 信息 - -- **参数** - - - `data` (str) - -- **返回** - - - None - -### _abstract async method_ `send_bytes(data)` {#WebSocket-send-bytes} - -- **说明:** 发送一条 WebSocket binary 信息 - -- **参数** - - - `data` (bytes) - -- **返回** - - - None - -## _enum_ `HTTPVersion` {#HTTPVersion} - -- **说明:** An enumeration. - -- **参数** - - auto - - - `H10: '1.0'` - - - `H11: '1.1'` - - - `H2: '2'` - -## _abstract class_ `ForwardMixin()` {#ForwardMixin} - -- **说明:** 客户端混入基类。 - -- **参数** - - auto - -## _abstract class_ `ReverseMixin()` {#ReverseMixin} - -- **说明:** 服务端混入基类。 - -- **参数** - - auto - -## _var_ `ForwardDriver` {#ForwardDriver} - -- **类型:** ForwardMixin - -- **说明** - - 支持客户端请求的驱动器。 - - **Deprecated**,请使用 [ForwardMixin](#ForwardMixin) 或其子类代替。 - -## _var_ `ReverseDriver` {#ReverseDriver} - -- **类型:** ReverseMixin - -- **说明** - - 支持服务端请求的驱动器。 - - **Deprecated**,请使用 [ReverseMixin](#ReverseMixin) 或其子类代替。 - -## _def_ `combine_driver(driver, *mixins)` {#combine-driver} - -- **说明:** 将一个驱动器和多个混入类合并。 - -- **重载** - - **1.** `(driver) -> type[D]` - - - **参数** - - - `driver` (type[D]) - - - **返回** - - - type[D] - - **2.** `(driver, _m, *mixins) -> type[CombinedDriver]` - - - **参数** - - - `driver` (type[D]) - - - `_m` (type[[Mixin](#Mixin)]) - - - `*mixins` (type[[Mixin](#Mixin)]) - - - **返回** - - - type[CombinedDriver] - -## _abstract class_ `HTTPClientMixin()` {#HTTPClientMixin} - -- **说明:** HTTP 客户端混入基类。 - -- **参数** - - auto - -### _abstract async method_ `request(setup)` {#HTTPClientMixin-request} - -- **说明:** 发送一个 HTTP 请求 - -- **参数** - - - `setup` ([Request](#Request)) - -- **返回** - - - [Response](#Response) - -### _abstract method_ `get_session(params=None, headers=None, cookies=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#HTTPClientMixin-get-session} - -- **说明:** 获取一个 HTTP 会话 - -- **参数** - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `version` (str | [HTTPVersion](#HTTPVersion)) - - - `timeout` (float | None) - - - `proxy` (str | None) - -- **返回** - - - HTTPClientSession - -## _class_ `HTTPServerSetup()` {#HTTPServerSetup} - -- **说明:** HTTP 服务器路由配置。 - -- **参数** - - auto - -## _abstract class_ `WebSocketClientMixin()` {#WebSocketClientMixin} - -- **说明:** WebSocket 客户端混入基类。 - -- **参数** - - auto - -### _abstract method_ `websocket(setup)` {#WebSocketClientMixin-websocket} - -- **说明:** 发起一个 WebSocket 连接 - -- **参数** - - - `setup` ([Request](#Request)) - -- **返回** - - - AsyncGenerator[[WebSocket](#WebSocket), None] - -## _class_ `WebSocketServerSetup()` {#WebSocketServerSetup} - -- **说明:** WebSocket 服务器路由配置。 - -- **参数** - - auto diff --git a/website/versioned_docs/version-2.3.1/api/drivers/none.md b/website/versioned_docs/version-2.3.1/api/drivers/none.md deleted file mode 100644 index df948f2fc7fb..000000000000 --- a/website/versioned_docs/version-2.3.1/api/drivers/none.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -sidebar_position: 6 -description: nonebot.drivers.none 模块 ---- - -# nonebot.drivers.none - -None 驱动适配 - -:::tip 提示 -本驱动不支持任何服务器或客户端连接 -::: - -## _class_ `Driver(env, config)` {#Driver} - -- **说明:** None 驱动框架 - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` ([Config](../config.md#Config)) - -### _property_ `type` {#Driver-type} - -- **类型:** str - -- **说明:** 驱动名称: `none` - -### _property_ `logger` {#Driver-logger} - -- **类型:** untyped - -- **说明:** none driver 使用的 logger - -### _method_ `run(*args, **kwargs)` {#Driver-run} - -- **说明:** 启动 none driver - -- **参数** - - - `*args` - - - `**kwargs` - -- **返回** - - - untyped - -### _method_ `exit(force=False)` {#Driver-exit} - -- **说明:** 退出 none driver - -- **参数** - - - `force` (bool): 强制退出 - -- **返回** - - - untyped diff --git a/website/versioned_docs/version-2.3.1/api/drivers/quart.md b/website/versioned_docs/version-2.3.1/api/drivers/quart.md deleted file mode 100644 index 65a09b647384..000000000000 --- a/website/versioned_docs/version-2.3.1/api/drivers/quart.md +++ /dev/null @@ -1,218 +0,0 @@ ---- -sidebar_position: 5 -description: nonebot.drivers.quart 模块 ---- - -# nonebot.drivers.quart - -[Quart](https://pgjones.gitlab.io/quart/index.html) 驱动适配 - -```bash -nb driver install quart -# 或者 -pip install nonebot2[quart] -``` - -:::tip 提示 -本驱动仅支持服务端连接 -::: - -## _class_ `Config()` {#Config} - -- **说明:** Quart 驱动框架设置 - -- **参数** - - auto - -### _class-var_ `quart_reload` {#Config-quart-reload} - -- **类型:** bool - -- **说明:** 开启/关闭冷重载 - -### _class-var_ `quart_reload_dirs` {#Config-quart-reload-dirs} - -- **类型:** list[str] | None - -- **说明:** 重载监控文件夹列表,默认为 uvicorn 默认值 - -### _class-var_ `quart_reload_delay` {#Config-quart-reload-delay} - -- **类型:** float - -- **说明:** 重载延迟,默认为 uvicorn 默认值 - -### _class-var_ `quart_reload_includes` {#Config-quart-reload-includes} - -- **类型:** list[str] | None - -- **说明:** 要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -### _class-var_ `quart_reload_excludes` {#Config-quart-reload-excludes} - -- **类型:** list[str] | None - -- **说明:** 不要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -### _class-var_ `quart_extra` {#Config-quart-extra} - -- **类型:** dict[str, Any] - -- **说明:** 传递给 `Quart` 的其他参数。 - -## _class_ `Driver(env, config)` {#Driver} - -- **说明:** Quart 驱动框架 - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` (NoneBotConfig) - -### _property_ `type` {#Driver-type} - -- **类型:** str - -- **说明:** 驱动名称: `quart` - -### _property_ `server_app` {#Driver-server-app} - -- **类型:** Quart - -- **说明:** `Quart` 对象 - -### _property_ `asgi` {#Driver-asgi} - -- **类型:** untyped - -- **说明:** `Quart` 对象 - -### _property_ `logger` {#Driver-logger} - -- **类型:** untyped - -- **说明:** Quart 使用的 logger - -### _method_ `setup_http_server(setup)` {#Driver-setup-http-server} - -- **参数** - - - `setup` ([HTTPServerSetup](index.md#HTTPServerSetup)) - -- **返回** - - - untyped - -### _method_ `setup_websocket_server(setup)` {#Driver-setup-websocket-server} - -- **参数** - - - `setup` ([WebSocketServerSetup](index.md#WebSocketServerSetup)) - -- **返回** - - - None - -### _method_ `run(host=None, port=None, *args, app=None, **kwargs)` {#Driver-run} - -- **说明:** 使用 `uvicorn` 启动 Quart - -- **参数** - - - `host` (str | None) - - - `port` (int | None) - - - `*args` - - - `app` (str | None) - - - `**kwargs` - -- **返回** - - - untyped - -## _class_ `WebSocket(*, request, websocket_ctx)` {#WebSocket} - -- **说明:** Quart WebSocket Wrapper - -- **参数** - - - `request` (BaseRequest) - - - `websocket_ctx` (WebsocketContext) - -### _async method_ `accept()` {#WebSocket-accept} - -- **参数** - - empty - -- **返回** - - - untyped - -### _async method_ `close(code=1000, reason="")` {#WebSocket-close} - -- **参数** - - - `code` (int) - - - `reason` (str) - -- **返回** - - - untyped - -### _async method_ `receive()` {#WebSocket-receive} - -- **参数** - - empty - -- **返回** - - - str | bytes - -### _async method_ `receive_text()` {#WebSocket-receive-text} - -- **参数** - - empty - -- **返回** - - - str - -### _async method_ `receive_bytes()` {#WebSocket-receive-bytes} - -- **参数** - - empty - -- **返回** - - - bytes - -### _async method_ `send_text(data)` {#WebSocket-send-text} - -- **参数** - - - `data` (str) - -- **返回** - - - untyped - -### _async method_ `send_bytes(data)` {#WebSocket-send-bytes} - -- **参数** - - - `data` (bytes) - -- **返回** - - - untyped diff --git a/website/versioned_docs/version-2.3.1/api/drivers/websockets.md b/website/versioned_docs/version-2.3.1/api/drivers/websockets.md deleted file mode 100644 index ac8ad6f963f9..000000000000 --- a/website/versioned_docs/version-2.3.1/api/drivers/websockets.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -sidebar_position: 4 -description: nonebot.drivers.websockets 模块 ---- - -# nonebot.drivers.websockets - -[websockets](https://websockets.readthedocs.io/) 驱动适配 - -```bash -nb driver install websockets -# 或者 -pip install nonebot2[websockets] -``` - -:::tip 提示 -本驱动仅支持客户端 WebSocket 连接 -::: - -## _def_ `catch_closed(func)` {#catch-closed} - -- **参数** - - - `func` ((P) -> Coroutine[Any, Any, T]) - -- **返回** - - - (P) -> Coroutine[Any, Any, T] - -## _class_ `Mixin()` {#Mixin} - -- **说明:** Websockets Mixin - -- **参数** - - auto - -### _method_ `websocket(setup)` {#Mixin-websocket} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - AsyncGenerator[[WebSocket](index.md#WebSocket), None] - -## _class_ `WebSocket(*, request, websocket)` {#WebSocket} - -- **说明:** Websockets WebSocket Wrapper - -- **参数** - - - `request` ([Request](index.md#Request)) - - - `websocket` (WebSocketClientProtocol) - -### _async method_ `accept()` {#WebSocket-accept} - -- **参数** - - empty - -- **返回** - - - untyped - -### _async method_ `close(code=1000, reason="")` {#WebSocket-close} - -- **参数** - - - `code` (int) - - - `reason` (str) - -- **返回** - - - untyped - -### _async method_ `receive()` {#WebSocket-receive} - -- **参数** - - empty - -- **返回** - - - str | bytes - -### _async method_ `receive_text()` {#WebSocket-receive-text} - -- **参数** - - empty - -- **返回** - - - str - -### _async method_ `receive_bytes()` {#WebSocket-receive-bytes} - -- **参数** - - empty - -- **返回** - - - bytes - -### _async method_ `send_text(data)` {#WebSocket-send-text} - -- **参数** - - - `data` (str) - -- **返回** - - - None - -### _async method_ `send_bytes(data)` {#WebSocket-send-bytes} - -- **参数** - - - `data` (bytes) - -- **返回** - - - None - -## _class_ `Driver(env, config)` {#Driver} - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` ([Config](../config.md#Config)) diff --git a/website/versioned_docs/version-2.3.1/api/exception.md b/website/versioned_docs/version-2.3.1/api/exception.md deleted file mode 100644 index 44882749ec7d..000000000000 --- a/website/versioned_docs/version-2.3.1/api/exception.md +++ /dev/null @@ -1,254 +0,0 @@ ---- -sidebar_position: 10 -description: nonebot.exception 模块 ---- - -# nonebot.exception - -本模块包含了所有 NoneBot 运行时可能会抛出的异常。 - -这些异常并非所有需要用户处理,在 NoneBot 内部运行时被捕获,并进行对应操作。 - -```bash -NoneBotException -├── ParserExit -├── ProcessException -| ├── IgnoredException -| ├── SkippedException -| | └── TypeMisMatch -| ├── MockApiException -| └── StopPropagation -├── MatcherException -| ├── PausedException -| ├── RejectedException -| └── FinishedException -├── AdapterException -| ├── NoLogException -| ├── ApiNotAvailable -| ├── NetworkError -| └── ActionFailed -└── DriverException - └── WebSocketClosed -``` - -## _class_ `NoneBotException()` {#NoneBotException} - -- **说明:** 所有 NoneBot 发生的异常基类。 - -- **参数** - - auto - -## _class_ `ParserExit()` {#ParserExit} - -- **说明:** 处理消息失败时返回的异常。 - -- **参数** - - auto - -## _class_ `ProcessException()` {#ProcessException} - -- **说明:** 事件处理过程中发生的异常基类。 - -- **参数** - - auto - -## _class_ `IgnoredException()` {#IgnoredException} - -- **说明:** 指示 NoneBot 应该忽略该事件。可由 PreProcessor 抛出。 - -- **参数** - - - `reason`: 忽略事件的原因 - -## _class_ `SkippedException()` {#SkippedException} - -- **说明** - - 指示 NoneBot 立即结束当前 `Dependent` 的运行。 - - 例如,可以在 `Handler` 中通过 [Matcher.skip](matcher.md#Matcher-skip) 抛出。 - -- **参数** - - auto - -- **用法** - - ```python - def always_skip(): - Matcher.skip() - - @matcher.handle() - async def handler(dependency = Depends(always_skip)): - # never run - ``` - -## _class_ `TypeMisMatch()` {#TypeMisMatch} - -- **说明:** 当前 `Handler` 的参数类型不匹配。 - -- **参数** - - auto - -## _class_ `MockApiException()` {#MockApiException} - -- **说明:** 指示 NoneBot 阻止本次 API 调用或修改本次调用返回值,并返回自定义内容。 可由 api hook 抛出。 - -- **参数** - - - `result`: 返回的内容 - -## _class_ `StopPropagation()` {#StopPropagation} - -- **说明** - - 指示 NoneBot 终止事件向下层传播。 - - 在 [Matcher.block](matcher.md#Matcher-block) 为 `True` - 或使用 [Matcher.stop_propagation](matcher.md#Matcher-stop-propagation) 方法时抛出。 - -- **参数** - - auto - -- **用法** - - ```python - matcher = on_notice(block=True) - # 或者 - @matcher.handle() - async def handler(matcher: Matcher): - matcher.stop_propagation() - ``` - -## _class_ `MatcherException()` {#MatcherException} - -- **说明:** 所有 Matcher 发生的异常基类。 - -- **参数** - - auto - -## _class_ `PausedException()` {#PausedException} - -- **说明** - - 指示 NoneBot 结束当前 `Handler` 并等待下一条消息后继续下一个 `Handler`。 可用于用户输入新信息。 - - 可以在 `Handler` 中通过 [Matcher.pause](matcher.md#Matcher-pause) 抛出。 - -- **参数** - - auto - -- **用法** - - ```python - @matcher.handle() - async def handler(): - await matcher.pause("some message") - ``` - -## _class_ `RejectedException()` {#RejectedException} - -- **说明** - - 指示 NoneBot 结束当前 `Handler` 并等待下一条消息后重新运行当前 `Handler`。 可用于用户重新输入。 - - 可以在 `Handler` 中通过 [Matcher.reject](matcher.md#Matcher-reject) 抛出。 - -- **参数** - - auto - -- **用法** - - ```python - @matcher.handle() - async def handler(): - await matcher.reject("some message") - ``` - -## _class_ `FinishedException()` {#FinishedException} - -- **说明** - - 指示 NoneBot 结束当前 `Handler` 且后续 `Handler` 不再被运行。可用于结束用户会话。 - - 可以在 `Handler` 中通过 [Matcher.finish](matcher.md#Matcher-finish) 抛出。 - -- **参数** - - auto - -- **用法** - - ```python - @matcher.handle() - async def handler(): - await matcher.finish("some message") - ``` - -## _class_ `AdapterException()` {#AdapterException} - -- **说明:** 代表 `Adapter` 抛出的异常,所有的 `Adapter` 都要在内部继承自这个 `Exception`。 - -- **参数** - - - `adapter_name`: 标识 adapter - -## _class_ `NoLogException()` {#NoLogException} - -- **说明** - - 指示 NoneBot 对当前 `Event` 进行处理但不显示 Log 信息。 - - 可在 [Event.get_log_string](adapters/index.md#Event-get-log-string) 时抛出 - -- **参数** - - auto - -## _class_ `ApiNotAvailable()` {#ApiNotAvailable} - -- **说明:** 在 API 连接不可用时抛出。 - -- **参数** - - auto - -## _class_ `NetworkError()` {#NetworkError} - -- **说明:** 在网络出现问题时抛出, 如: API 请求地址不正确, API 请求无返回或返回状态非正常等。 - -- **参数** - - auto - -## _class_ `ActionFailed()` {#ActionFailed} - -- **说明:** API 请求成功返回数据,但 API 操作失败。 - -- **参数** - - auto - -## _class_ `DriverException()` {#DriverException} - -- **说明:** `Driver` 抛出的异常基类。 - -- **参数** - - auto - -## _class_ `WebSocketClosed()` {#WebSocketClosed} - -- **说明:** WebSocket 连接已关闭。 - -- **参数** - - auto diff --git a/website/versioned_docs/version-2.3.1/api/index.md b/website/versioned_docs/version-2.3.1/api/index.md deleted file mode 100644 index 577535d2f6f7..000000000000 --- a/website/versioned_docs/version-2.3.1/api/index.md +++ /dev/null @@ -1,284 +0,0 @@ ---- -sidebar_position: 0 -description: nonebot 模块 ---- - -# nonebot - -本模块主要定义了 NoneBot 启动所需函数,供 bot 入口文件调用。 - -## 快捷导入 - -为方便使用,本模块从子模块导入了部分内容,以下内容可以直接通过本模块导入: - -- `on` => [`on`](plugin/on.md#on) -- `on_metaevent` => [`on_metaevent`](plugin/on.md#on-metaevent) -- `on_message` => [`on_message`](plugin/on.md#on-message) -- `on_notice` => [`on_notice`](plugin/on.md#on-notice) -- `on_request` => [`on_request`](plugin/on.md#on-request) -- `on_startswith` => [`on_startswith`](plugin/on.md#on-startswith) -- `on_endswith` => [`on_endswith`](plugin/on.md#on-endswith) -- `on_fullmatch` => [`on_fullmatch`](plugin/on.md#on-fullmatch) -- `on_keyword` => [`on_keyword`](plugin/on.md#on-keyword) -- `on_command` => [`on_command`](plugin/on.md#on-command) -- `on_shell_command` => [`on_shell_command`](plugin/on.md#on-shell-command) -- `on_regex` => [`on_regex`](plugin/on.md#on-regex) -- `on_type` => [`on_type`](plugin/on.md#on-type) -- `CommandGroup` => [`CommandGroup`](plugin/on.md#CommandGroup) -- `Matchergroup` => [`MatcherGroup`](plugin/on.md#MatcherGroup) -- `load_plugin` => [`load_plugin`](plugin/load.md#load-plugin) -- `load_plugins` => [`load_plugins`](plugin/load.md#load-plugins) -- `load_all_plugins` => [`load_all_plugins`](plugin/load.md#load-all-plugins) -- `load_from_json` => [`load_from_json`](plugin/load.md#load-from-json) -- `load_from_toml` => [`load_from_toml`](plugin/load.md#load-from-toml) -- `load_builtin_plugin` => - [`load_builtin_plugin`](plugin/load.md#load-builtin-plugin) -- `load_builtin_plugins` => - [`load_builtin_plugins`](plugin/load.md#load-builtin-plugins) -- `get_plugin` => [`get_plugin`](plugin/index.md#get-plugin) -- `get_plugin_by_module_name` => - [`get_plugin_by_module_name`](plugin/index.md#get-plugin-by-module-name) -- `get_loaded_plugins` => - [`get_loaded_plugins`](plugin/index.md#get-loaded-plugins) -- `get_available_plugin_names` => - [`get_available_plugin_names`](plugin/index.md#get-available-plugin-names) -- `get_plugin_config` => [`get_plugin_config`](plugin/index.md#get-plugin-config) -- `require` => [`require`](plugin/load.md#require) - -## _def_ `get_driver()` {#get-driver} - -- **说明** - - 获取全局 [Driver](drivers/index.md#Driver) 实例。 - - 可用于在计划任务的回调等情形中获取当前 [Driver](drivers/index.md#Driver) 实例。 - -- **参数** - - empty - -- **返回** - - - [Driver](drivers/index.md#Driver): 全局 [Driver](drivers/index.md#Driver) 对象 - -- **异常** - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - driver = nonebot.get_driver() - ``` - -## _def_ `get_adapter(name)` {#get-adapter} - -- **说明:** 获取已注册的 [Adapter](adapters/index.md#Adapter) 实例。 - -- **重载** - - **1.** `(name) -> Adapter` - - - **参数** - - - `name` (str): 适配器名称 - - - **返回** - - - [Adapter](adapters/index.md#Adapter): 指定名称的 [Adapter](adapters/index.md#Adapter) 对象 - - **2.** `(name) -> A` - - - **参数** - - - `name` (type[A]): 适配器类型 - - - **返回** - - - A: 指定类型的 [Adapter](adapters/index.md#Adapter) 对象 - -- **异常** - - - ValueError: 指定的 [Adapter](adapters/index.md#Adapter) 未注册 - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - from nonebot.adapters.console import Adapter - adapter = nonebot.get_adapter(Adapter) - ``` - -## _def_ `get_adapters()` {#get-adapters} - -- **说明:** 获取所有已注册的 [Adapter](adapters/index.md#Adapter) 实例。 - -- **参数** - - empty - -- **返回** - - - dict[str, [Adapter](adapters/index.md#Adapter)]: 所有 [Adapter](adapters/index.md#Adapter) 实例字典 - -- **异常** - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - adapters = nonebot.get_adapters() - ``` - -## _def_ `get_app()` {#get-app} - -- **说明:** 获取全局 [ASGIMixin](drivers/index.md#ASGIMixin) 对应的 Server App 对象。 - -- **参数** - - empty - -- **返回** - - - Any: Server App 对象 - -- **异常** - - - AssertionError: 全局 Driver 对象不是 [ASGIMixin](drivers/index.md#ASGIMixin) 类型 - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - app = nonebot.get_app() - ``` - -## _def_ `get_asgi()` {#get-asgi} - -- **说明:** 获取全局 [ASGIMixin](drivers/index.md#ASGIMixin) 对应的 [ASGI](https://asgi.readthedocs.io/) 对象。 - -- **参数** - - empty - -- **返回** - - - Any: ASGI 对象 - -- **异常** - - - AssertionError: 全局 Driver 对象不是 [ASGIMixin](drivers/index.md#ASGIMixin) 类型 - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - asgi = nonebot.get_asgi() - ``` - -## _def_ `get_bot(self_id=None)` {#get-bot} - -- **说明** - - 获取一个连接到 NoneBot 的 [Bot](adapters/index.md#Bot) 对象。 - - 当提供 `self_id` 时,此函数是 `get_bots()[self_id]` 的简写; - 当不提供时,返回一个 [Bot](adapters/index.md#Bot)。 - -- **参数** - - - `self_id` (str | None): 用来识别 [Bot](adapters/index.md#Bot) 的 [Bot.self_id](adapters/index.md#Bot-self-id) 属性 - -- **返回** - - - [Bot](adapters/index.md#Bot): [Bot](adapters/index.md#Bot) 对象 - -- **异常** - - - KeyError: 对应 self_id 的 Bot 不存在 - - - ValueError: 没有传入 self_id 且没有 Bot 可用 - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - assert nonebot.get_bot("12345") == nonebot.get_bots()["12345"] - - another_unspecified_bot = nonebot.get_bot() - ``` - -## _def_ `get_bots()` {#get-bots} - -- **说明:** 获取所有连接到 NoneBot 的 [Bot](adapters/index.md#Bot) 对象。 - -- **参数** - - empty - -- **返回** - - - dict[str, [Bot](adapters/index.md#Bot)]: 一个以 [Bot.self_id](adapters/index.md#Bot-self-id) 为键 - - [Bot](adapters/index.md#Bot) 对象为值的字典 - -- **异常** - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - bots = nonebot.get_bots() - ``` - -## _def_ `init(*, _env_file=None, **kwargs)` {#init} - -- **说明** - - 初始化 NoneBot 以及 全局 [Driver](drivers/index.md#Driver) 对象。 - - NoneBot 将会从 .env 文件中读取环境信息,并使用相应的 env 文件配置。 - - 也可以传入自定义的 `_env_file` 来指定 NoneBot 从该文件读取配置。 - -- **参数** - - - `_env_file` (DOTENV_TYPE | None): 配置文件名,默认从 `.env.{env_name}` 中读取配置 - - - `**kwargs` (Any): 任意变量,将会存储到 [Driver.config](drivers/index.md#Driver-config) 对象里 - -- **返回** - - - None - -- **用法** - - ```python - nonebot.init(database=Database(...)) - ``` - -## _def_ `run(*args, **kwargs)` {#run} - -- **说明:** 启动 NoneBot,即运行全局 [Driver](drivers/index.md#Driver) 对象。 - -- **参数** - - - `*args` (Any): 传入 [Driver.run](drivers/index.md#Driver-run) 的位置参数 - - - `**kwargs` (Any): 传入 [Driver.run](drivers/index.md#Driver-run) 的命名参数 - -- **返回** - - - None - -- **用法** - - ```python - nonebot.run(host="127.0.0.1", port=8080) - ``` diff --git a/website/versioned_docs/version-2.3.1/api/log.md b/website/versioned_docs/version-2.3.1/api/log.md deleted file mode 100644 index b4238ba995e8..000000000000 --- a/website/versioned_docs/version-2.3.1/api/log.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -sidebar_position: 7 -description: nonebot.log 模块 ---- - -# nonebot.log - -本模块定义了 NoneBot 的日志记录 Logger。 - -NoneBot 使用 [`loguru`][loguru] 来记录日志信息。 - -自定义 logger 请参考 [自定义日志](https://nonebot.dev/docs/appendices/log) -以及 [`loguru`][loguru] 文档。 - -[loguru]: https://github.com/Delgan/loguru - -## _var_ `logger` {#logger} - -- **类型:** Logger - -- **说明** - - NoneBot 日志记录器对象。 - - 默认信息: - - - 格式: `[%(asctime)s %(name)s] %(levelname)s: %(message)s` - - 等级: `INFO` ,根据 `config.log_level` 配置改变 - - 输出: 输出至 stdout - -- **用法** - - ```python - from nonebot.log import logger - ``` - -## _class_ `LoguruHandler()` {#LoguruHandler} - -- **说明:** logging 与 loguru 之间的桥梁,将 logging 的日志转发到 loguru。 - -- **参数** - - auto - -### _method_ `emit(record)` {#LoguruHandler-emit} - -- **参数** - - - `record` (logging.LogRecord) - -- **返回** - - - untyped - -## _def_ `default_filter(record)` {#default-filter} - -- **说明:** 默认的日志过滤器,根据 `config.log_level` 配置改变日志等级。 - -- **参数** - - - `record` (Record) - -- **返回** - - - untyped - -## _var_ `default_format` {#default-format} - -- **类型:** str - -- **说明:** 默认日志格式 diff --git a/website/versioned_docs/version-2.3.1/api/matcher.md b/website/versioned_docs/version-2.3.1/api/matcher.md deleted file mode 100644 index b529af158172..000000000000 --- a/website/versioned_docs/version-2.3.1/api/matcher.md +++ /dev/null @@ -1,749 +0,0 @@ ---- -sidebar_position: 3 -description: nonebot.matcher 模块 ---- - -# nonebot.matcher - -本模块实现事件响应器的创建与运行,并提供一些快捷方法来帮助用户更好的与机器人进行对话。 - -## _class_ `Matcher()` {#Matcher} - -- **说明:** 事件响应器类 - -- **参数** - - empty - -### _class-var_ `type` {#Matcher-type} - -- **类型:** ClassVar[str] - -- **说明:** 事件响应器类型 - -### _class-var_ `rule` {#Matcher-rule} - -- **类型:** ClassVar[[Rule](rule.md#Rule)] - -- **说明:** 事件响应器匹配规则 - -### _class-var_ `permission` {#Matcher-permission} - -- **类型:** ClassVar[[Permission](permission.md#Permission)] - -- **说明:** 事件响应器触发权限 - -### _class-var_ `handlers` {#Matcher-handlers} - -- **类型:** ClassVar[list[[Dependent](dependencies/index.md#Dependent)[Any]]] - -- **说明:** 事件响应器拥有的事件处理函数列表 - -### _class-var_ `priority` {#Matcher-priority} - -- **类型:** ClassVar[int] - -- **说明:** 事件响应器优先级 - -### _class-var_ `block` {#Matcher-block} - -- **类型:** bool - -- **说明:** 事件响应器是否阻止事件传播 - -### _class-var_ `temp` {#Matcher-temp} - -- **类型:** ClassVar[bool] - -- **说明:** 事件响应器是否为临时 - -### _class-var_ `expire_time` {#Matcher-expire-time} - -- **类型:** ClassVar[datetime | None] - -- **说明:** 事件响应器过期时间点 - -### _classmethod_ `new(type_="", rule=None, permission=None, handlers=None, temp=False, priority=1, block=False, *, plugin=None, module=None, source=None, expire_time=None, default_state=None, default_type_updater=None, default_permission_updater=None)` {#Matcher-new} - -- **说明:** 创建一个新的事件响应器,并存储至 `matchers <#matchers>`\_ - -- **参数** - - - `type_` (str): 事件响应器类型,与 `event.get_type()` 一致时触发,空字符串表示任意 - - - `rule` ([Rule](rule.md#Rule) | None): 匹配规则 - - - `permission` ([Permission](permission.md#Permission) | None): 权限 - - - `handlers` (list[[T\_Handler](typing.md#T-Handler) | [Dependent](dependencies/index.md#Dependent)[Any]] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器,即触发一次后删除 - - - `priority` (int): 响应优先级 - - - `block` (bool): 是否阻止事件向更低优先级的响应器传播 - - - `plugin` ([Plugin](plugin/model.md#Plugin) | None): **Deprecated.** 事件响应器所在插件 - - - `module` (ModuleType | None): **Deprecated.** 事件响应器所在模块 - - - `source` (MatcherSource | None): 事件响应器源代码上下文信息 - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `default_state` ([T_State](typing.md#T-State) | None): 默认状态 `state` - - - `default_type_updater` ([T_TypeUpdater](typing.md#T-TypeUpdater) | [Dependent](dependencies/index.md#Dependent)[str] | None): 默认事件类型更新函数 - - - `default_permission_updater` ([T_PermissionUpdater](typing.md#T-PermissionUpdater) | [Dependent](dependencies/index.md#Dependent)[[Permission](permission.md#Permission)] | None): 默认会话权限更新函数 - -- **返回** - - - type[Matcher]: 新的事件响应器类 - -### _classmethod_ `destroy()` {#Matcher-destroy} - -- **说明:** 销毁当前的事件响应器 - -- **参数** - - empty - -- **返回** - - - None - -### _classmethod_ `check_perm(bot, event, stack=None, dependency_cache=None)` {#Matcher-check-perm} - -- **说明:** 检查是否满足触发权限 - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): 上报事件 - - - `stack` (AsyncExitStack | None): 异步上下文栈 - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None): 依赖缓存 - -- **返回** - - - bool: 是否满足权限 - -### _classmethod_ `check_rule(bot, event, state, stack=None, dependency_cache=None)` {#Matcher-check-rule} - -- **说明:** 检查是否满足匹配规则 - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): 上报事件 - - - `state` ([T_State](typing.md#T-State)): 当前状态 - - - `stack` (AsyncExitStack | None): 异步上下文栈 - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None): 依赖缓存 - -- **返回** - - - bool: 是否满足匹配规则 - -### _classmethod_ `type_updater(func)` {#Matcher-type-updater} - -- **说明:** 装饰一个函数来更改当前事件响应器的默认响应事件类型更新函数 - -- **参数** - - - `func` ([T_TypeUpdater](typing.md#T-TypeUpdater)): 响应事件类型更新函数 - -- **返回** - - - [T_TypeUpdater](typing.md#T-TypeUpdater) - -### _classmethod_ `permission_updater(func)` {#Matcher-permission-updater} - -- **说明:** 装饰一个函数来更改当前事件响应器的默认会话权限更新函数 - -- **参数** - - - `func` ([T_PermissionUpdater](typing.md#T-PermissionUpdater)): 会话权限更新函数 - -- **返回** - - - [T_PermissionUpdater](typing.md#T-PermissionUpdater) - -### _classmethod_ `append_handler(handler, parameterless=None)` {#Matcher-append-handler} - -- **参数** - - - `handler` ([T_Handler](typing.md#T-Handler)) - - - `parameterless` (Iterable[Any] | None) - -- **返回** - - - [Dependent](dependencies/index.md#Dependent)[Any] - -### _classmethod_ `handle(parameterless=None)` {#Matcher-handle} - -- **说明:** 装饰一个函数来向事件响应器直接添加一个处理函数 - -- **参数** - - - `parameterless` (Iterable[Any] | None): 非参数类型依赖列表 - -- **返回** - - - ([T_Handler](typing.md#T-Handler)) -> [T_Handler](typing.md#T-Handler) - -### _classmethod_ `receive(id="", parameterless=None)` {#Matcher-receive} - -- **说明:** 装饰一个函数来指示 NoneBot 在接收用户新的一条消息后继续运行该函数 - -- **参数** - - - `id` (str): 消息 ID - - - `parameterless` (Iterable[Any] | None): 非参数类型依赖列表 - -- **返回** - - - ([T_Handler](typing.md#T-Handler)) -> [T_Handler](typing.md#T-Handler) - -### _classmethod_ `got(key, prompt=None, parameterless=None)` {#Matcher-got} - -- **说明** - - 装饰一个函数来指示 NoneBot 获取一个参数 `key` - - 当要获取的 `key` 不存在时接收用户新的一条消息再运行该函数, - 如果 `key` 已存在则直接继续运行 - -- **参数** - - - `key` (str): 参数名 - - - `prompt` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 在参数不存在时向用户发送的消息 - - - `parameterless` (Iterable[Any] | None): 非参数类型依赖列表 - -- **返回** - - - ([T_Handler](typing.md#T-Handler)) -> [T_Handler](typing.md#T-Handler) - -### _classmethod_ `send(message, **kwargs)` {#Matcher-send} - -- **说明:** 发送一条消息给当前交互用户 - -- **参数** - - - `message` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate)): 消息内容 - - - `**kwargs` (Any): [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - Any - -### _classmethod_ `finish(message=None, **kwargs)` {#Matcher-finish} - -- **说明:** 发送一条消息给当前交互用户并结束当前事件响应器 - -- **参数** - - - `message` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 消息内容 - - - `**kwargs`: [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - NoReturn - -### _classmethod_ `pause(prompt=None, **kwargs)` {#Matcher-pause} - -- **说明:** 发送一条消息给当前交互用户并暂停事件响应器,在接收用户新的一条消息后继续下一个处理函数 - -- **参数** - - - `prompt` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 消息内容 - - - `**kwargs`: [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - NoReturn - -### _classmethod_ `reject(prompt=None, **kwargs)` {#Matcher-reject} - -- **说明:** 最近使用 `got` / `receive` 接收的消息不符合预期, 发送一条消息给当前交互用户并将当前事件处理流程中断在当前位置,在接收用户新的一个事件后从头开始执行当前处理函数 - -- **参数** - - - `prompt` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 消息内容 - - - `**kwargs`: [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - NoReturn - -### _classmethod_ `reject_arg(key, prompt=None, **kwargs)` {#Matcher-reject-arg} - -- **说明:** 最近使用 `got` 接收的消息不符合预期, 发送一条消息给当前交互用户并将当前事件处理流程中断在当前位置,在接收用户新的一条消息后从头开始执行当前处理函数 - -- **参数** - - - `key` (str): 参数名 - - - `prompt` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 消息内容 - - - `**kwargs`: [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - NoReturn - -### _classmethod_ `reject_receive(id="", prompt=None, **kwargs)` {#Matcher-reject-receive} - -- **说明:** 最近使用 `receive` 接收的消息不符合预期, 发送一条消息给当前交互用户并将当前事件处理流程中断在当前位置,在接收用户新的一个事件后从头开始执行当前处理函数 - -- **参数** - - - `id` (str): 消息 id - - - `prompt` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 消息内容 - - - `**kwargs`: [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - NoReturn - -### _classmethod_ `skip()` {#Matcher-skip} - -- **说明** - - 跳过当前事件处理函数,继续下一个处理函数 - - 通常在事件处理函数的依赖中使用。 - -- **参数** - - empty - -- **返回** - - - NoReturn - -### _method_ `get_receive(id, default=None)` {#Matcher-get-receive} - -- **说明** - - 获取一个 `receive` 事件 - - 如果没有找到对应的事件,返回 `default` 值 - -- **重载** - - **1.** `(id) -> Event | None` - - - **参数** - - - `id` (str) - - - **返回** - - - [Event](adapters/index.md#Event) | None - - **2.** `(id, default) -> Event | T` - - - **参数** - - - `id` (str) - - - `default` (T) - - - **返回** - - - [Event](adapters/index.md#Event) | T - -### _method_ `set_receive(id, event)` {#Matcher-set-receive} - -- **说明:** 设置一个 `receive` 事件 - -- **参数** - - - `id` (str) - - - `event` ([Event](adapters/index.md#Event)) - -- **返回** - - - None - -### _method_ `get_last_receive(default=None)` {#Matcher-get-last-receive} - -- **说明** - - 获取最近一次 `receive` 事件 - - 如果没有事件,返回 `default` 值 - -- **重载** - - **1.** `() -> Event | None` - - - **参数** - - empty - - - **返回** - - - [Event](adapters/index.md#Event) | None - - **2.** `(default) -> Event | T` - - - **参数** - - - `default` (T) - - - **返回** - - - [Event](adapters/index.md#Event) | T - -### _method_ `get_arg(key, default=None)` {#Matcher-get-arg} - -- **说明** - - 获取一个 `got` 消息 - - 如果没有找到对应的消息,返回 `default` 值 - -- **重载** - - **1.** `(key) -> Message | None` - - - **参数** - - - `key` (str) - - - **返回** - - - [Message](adapters/index.md#Message) | None - - **2.** `(key, default) -> Message | T` - - - **参数** - - - `key` (str) - - - `default` (T) - - - **返回** - - - [Message](adapters/index.md#Message) | T - -### _method_ `set_arg(key, message)` {#Matcher-set-arg} - -- **说明:** 设置一个 `got` 消息 - -- **参数** - - - `key` (str) - - - `message` ([Message](adapters/index.md#Message)) - -- **返回** - - - None - -### _method_ `set_target(target, cache=True)` {#Matcher-set-target} - -- **参数** - - - `target` (str) - - - `cache` (bool) - -- **返回** - - - None - -### _method_ `get_target(default=None)` {#Matcher-get-target} - -- **重载** - - **1.** `() -> str | None` - - - **参数** - - empty - - - **返回** - - - str | None - - **2.** `(default) -> str | T` - - - **参数** - - - `default` (T) - - - **返回** - - - str | T - -### _method_ `stop_propagation()` {#Matcher-stop-propagation} - -- **说明:** 阻止事件传播 - -- **参数** - - empty - -- **返回** - - - untyped - -### _async method_ `update_type(bot, event, stack=None, dependency_cache=None)` {#Matcher-update-type} - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)) - - - `event` ([Event](adapters/index.md#Event)) - - - `stack` (AsyncExitStack | None) - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None) - -- **返回** - - - str - -### _async method_ `update_permission(bot, event, stack=None, dependency_cache=None)` {#Matcher-update-permission} - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)) - - - `event` ([Event](adapters/index.md#Event)) - - - `stack` (AsyncExitStack | None) - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None) - -- **返回** - - - [Permission](permission.md#Permission) - -### _async method_ `resolve_reject()` {#Matcher-resolve-reject} - -- **参数** - - empty - -- **返回** - - - untyped - -### _method_ `ensure_context(bot, event)` {#Matcher-ensure-context} - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)) - - - `event` ([Event](adapters/index.md#Event)) - -- **返回** - - - untyped - -### _async method_ `simple_run(bot, event, state, stack=None, dependency_cache=None)` {#Matcher-simple-run} - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)) - - - `event` ([Event](adapters/index.md#Event)) - - - `state` ([T_State](typing.md#T-State)) - - - `stack` (AsyncExitStack | None) - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None) - -- **返回** - - - untyped - -### _async method_ `run(bot, event, state, stack=None, dependency_cache=None)` {#Matcher-run} - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)) - - - `event` ([Event](adapters/index.md#Event)) - - - `state` ([T_State](typing.md#T-State)) - - - `stack` (AsyncExitStack | None) - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None) - -- **返回** - - - untyped - -## _var_ `matchers` {#matchers} - -- **类型:** untyped - -## _class_ `MatcherManager()` {#MatcherManager} - -- **说明** - - 事件响应器管理器 - - 实现了常用字典操作,用于管理事件响应器。 - -- **参数** - - empty - -### _method_ `keys()` {#MatcherManager-keys} - -- **参数** - - empty - -- **返回** - - - KeysView[int] - -### _method_ `values()` {#MatcherManager-values} - -- **参数** - - empty - -- **返回** - - - ValuesView[list[type[[Matcher](#Matcher)]]] - -### _method_ `items()` {#MatcherManager-items} - -- **参数** - - empty - -- **返回** - - - ItemsView[int, list[type[[Matcher](#Matcher)]]] - -### _method_ `get(key, default=None)` {#MatcherManager-get} - -- **重载** - - **1.** `(key) -> list[type[Matcher]] | None` - - - **参数** - - - `key` (int) - - - **返回** - - - list[type[[Matcher](#Matcher)]] | None - - **2.** `(key, default) -> list[type[Matcher]] | T` - - - **参数** - - - `key` (int) - - - `default` (T) - - - **返回** - - - list[type[[Matcher](#Matcher)]] | T - -### _method_ `pop(key)` {#MatcherManager-pop} - -- **参数** - - - `key` (int) - -- **返回** - - - list[type[[Matcher](#Matcher)]] - -### _method_ `popitem()` {#MatcherManager-popitem} - -- **参数** - - empty - -- **返回** - - - tuple[int, list[type[[Matcher](#Matcher)]]] - -### _method_ `clear()` {#MatcherManager-clear} - -- **参数** - - empty - -- **返回** - - - None - -### _method_ `update(__m)` {#MatcherManager-update} - -- **参数** - - - `__m` (MutableMapping[int, list[type[[Matcher](#Matcher)]]]) - -- **返回** - - - None - -### _method_ `setdefault(key, default)` {#MatcherManager-setdefault} - -- **参数** - - - `key` (int) - - - `default` (list[type[[Matcher](#Matcher)]]) - -- **返回** - - - list[type[[Matcher](#Matcher)]] - -### _method_ `set_provider(provider_class)` {#MatcherManager-set-provider} - -- **说明:** 设置事件响应器存储器 - -- **参数** - - - `provider_class` (type[[MatcherProvider](#MatcherProvider)]): 事件响应器存储器类 - -- **返回** - - - None - -## _abstract class_ `MatcherProvider(matchers)` {#MatcherProvider} - -- **说明:** 事件响应器存储器基类 - -- **参数** - - - `matchers` (Mapping[int, list[type[[Matcher](#Matcher)]]]): 当前存储器中已有的事件响应器 - -## _var_ `DEFAULT_PROVIDER_CLASS` {#DEFAULT-PROVIDER-CLASS} - -- **类型:** untyped - -- **说明:** 默认存储器类型 diff --git a/website/versioned_docs/version-2.3.1/api/message.md b/website/versioned_docs/version-2.3.1/api/message.md deleted file mode 100644 index 905b2de36d3b..000000000000 --- a/website/versioned_docs/version-2.3.1/api/message.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -sidebar_position: 2 -description: nonebot.message 模块 ---- - -# nonebot.message - -本模块定义了事件处理主要流程。 - -NoneBot 内部处理并按优先级分发事件给所有事件响应器,提供了多个插槽以进行事件的预处理等。 - -## _def_ `event_preprocessor(func)` {#event-preprocessor} - -- **说明** - - 事件预处理。 - - 装饰一个函数,使它在每次接收到事件并分发给各响应器之前执行。 - -- **参数** - - - `func` ([T_EventPreProcessor](typing.md#T-EventPreProcessor)) - -- **返回** - - - [T_EventPreProcessor](typing.md#T-EventPreProcessor) - -## _def_ `event_postprocessor(func)` {#event-postprocessor} - -- **说明** - - 事件后处理。 - - 装饰一个函数,使它在每次接收到事件并分发给各响应器之后执行。 - -- **参数** - - - `func` ([T_EventPostProcessor](typing.md#T-EventPostProcessor)) - -- **返回** - - - [T_EventPostProcessor](typing.md#T-EventPostProcessor) - -## _def_ `run_preprocessor(func)` {#run-preprocessor} - -- **说明** - - 运行预处理。 - - 装饰一个函数,使它在每次事件响应器运行前执行。 - -- **参数** - - - `func` ([T_RunPreProcessor](typing.md#T-RunPreProcessor)) - -- **返回** - - - [T_RunPreProcessor](typing.md#T-RunPreProcessor) - -## _def_ `run_postprocessor(func)` {#run-postprocessor} - -- **说明** - - 运行后处理。 - - 装饰一个函数,使它在每次事件响应器运行后执行。 - -- **参数** - - - `func` ([T_RunPostProcessor](typing.md#T-RunPostProcessor)) - -- **返回** - - - [T_RunPostProcessor](typing.md#T-RunPostProcessor) - -## _async def_ `check_and_run_matcher(Matcher, bot, event, state, stack=None, dependency_cache=None)` {#check-and-run-matcher} - -- **说明:** 检查并运行事件响应器。 - -- **参数** - - - `Matcher` (type[[Matcher](matcher.md#Matcher)]): 事件响应器 - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): Event 对象 - - - `state` ([T_State](typing.md#T-State)): 会话状态 - - - `stack` (AsyncExitStack | None): 异步上下文栈 - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None): 依赖缓存 - -- **返回** - - - None - -## _async def_ `handle_event(bot, event)` {#handle-event} - -- **说明:** 处理一个事件。调用该函数以实现分发事件。 - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): Event 对象 - -- **返回** - - - None - -- **用法** - - ```python - import asyncio - asyncio.create_task(handle_event(bot, event)) - ``` diff --git a/website/versioned_docs/version-2.3.1/api/params.md b/website/versioned_docs/version-2.3.1/api/params.md deleted file mode 100644 index 47a5d3fa6e4d..000000000000 --- a/website/versioned_docs/version-2.3.1/api/params.md +++ /dev/null @@ -1,510 +0,0 @@ ---- -sidebar_position: 4 -description: nonebot.params 模块 ---- - -# nonebot.params - -本模块定义了依赖注入的各类参数。 - -## _def_ `Arg(key=None)` {#Arg} - -- **说明:** Arg 参数消息 - -- **参数** - - - `key` (str | None) - -- **返回** - - - Any - -## _def_ `ArgStr(key=None)` {#ArgStr} - -- **说明:** Arg 参数消息文本 - -- **参数** - - - `key` (str | None) - -- **返回** - - - str - -## _def_ `Depends(dependency=None, *, use_cache=True, validate=False)` {#Depends} - -- **说明:** 子依赖装饰器 - -- **参数** - - - `dependency` ([T_Handler](typing.md#T-Handler) | None): 依赖函数。默认为参数的类型注释。 - - - `use_cache` (bool): 是否使用缓存。默认为 `True`。 - - - `validate` (bool | PydanticFieldInfo): 是否使用 Pydantic 类型校验。默认为 `False`。 - -- **返回** - - - Any - -- **用法** - - ```python - def depend_func() -> Any: - return ... - - def depend_gen_func(): - try: - yield ... - finally: - ... - - async def handler( - param_name: Any = Depends(depend_func), - gen: Any = Depends(depend_gen_func), - ): - ... - ``` - -## _class_ `ArgParam(*args, key, type, **kwargs)` {#ArgParam} - -- **说明** - - Arg 注入参数 - - 本注入解析事件响应器操作 `got` 所获取的参数。 - - 可以通过 `Arg`、`ArgStr`、`ArgPlainText` 等函数参数 `key` 指定获取的参数, - 留空则会根据参数名称获取。 - -- **参数** - - - `*args` - - - `key` (str) - - - `type` (Literal['message', 'str', 'plaintext']) - - - `**kwargs` (Any) - -## _class_ `BotParam(*args, checker=None, **kwargs)` {#BotParam} - -- **说明** - - 注入参数。 - - 本注入解析所有类型为且仅为 [Bot](adapters/index.md#Bot) 及其子类或 `None` 的参数。 - - 为保证兼容性,本注入还会解析名为 `bot` 且没有类型注解的参数。 - -- **参数** - - - `*args` - - - `checker` ([ModelField](compat.md#ModelField) | None) - - - `**kwargs` (Any) - -## _class_ `EventParam(*args, checker=None, **kwargs)` {#EventParam} - -- **说明** - - 注入参数 - - 本注入解析所有类型为且仅为 [Event](adapters/index.md#Event) 及其子类或 `None` 的参数。 - - 为保证兼容性,本注入还会解析名为 `event` 且没有类型注解的参数。 - -- **参数** - - - `*args` - - - `checker` ([ModelField](compat.md#ModelField) | None) - - - `**kwargs` (Any) - -## _class_ `StateParam(*args, validate=False, **kwargs)` {#StateParam} - -- **说明** - - 事件处理状态注入参数 - - 本注入解析所有类型为 `T_State` 的参数。 - - 为保证兼容性,本注入还会解析名为 `state` 且没有类型注解的参数。 - -- **参数** - - - `*args` - - - `validate` (bool) - - - `**kwargs` (Any) - -## _class_ `DependParam(*args, dependent, use_cache, **kwargs)` {#DependParam} - -- **说明** - - 子依赖注入参数。 - - 本注入解析所有子依赖注入,然后将它们的返回值作为参数值传递给父依赖。 - - 本注入应该具有最高优先级,因此应该在其他参数之前检查。 - -- **参数** - - - `*args` - - - `dependent` ([Dependent](dependencies/index.md#Dependent)) - - - `use_cache` (bool) - - - `**kwargs` (Any) - -## _def_ `ArgPlainText(key=None)` {#ArgPlainText} - -- **说明:** Arg 参数消息纯文本 - -- **参数** - - - `key` (str | None) - -- **返回** - - - str - -## _class_ `DefaultParam(*args, validate=False, **kwargs)` {#DefaultParam} - -- **说明** - - 默认值注入参数 - - 本注入解析所有剩余未能解析且具有默认值的参数。 - - 本注入参数应该具有最低优先级,因此应该在所有其他注入参数之后使用。 - -- **参数** - - - `*args` - - - `validate` (bool) - - - `**kwargs` (Any) - -## _class_ `MatcherParam(*args, checker=None, **kwargs)` {#MatcherParam} - -- **说明** - - 事件响应器实例注入参数 - - 本注入解析所有类型为且仅为 [Matcher](matcher.md#Matcher) 及其子类或 `None` 的参数。 - - 为保证兼容性,本注入还会解析名为 `matcher` 且没有类型注解的参数。 - -- **参数** - - - `*args` - - - `checker` ([ModelField](compat.md#ModelField) | None) - - - `**kwargs` (Any) - -## _class_ `ExceptionParam(*args, validate=False, **kwargs)` {#ExceptionParam} - -- **说明** - - 的异常注入参数 - - 本注入解析所有类型为 `Exception` 或 `None` 的参数。 - - 为保证兼容性,本注入还会解析名为 `exception` 且没有类型注解的参数。 - -- **参数** - - - `*args` - - - `validate` (bool) - - - `**kwargs` (Any) - -## _def_ `EventType()` {#EventType} - -- **说明:** 类型参数 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `EventMessage()` {#EventMessage} - -- **说明:** 消息参数 - -- **参数** - - empty - -- **返回** - - - Any - -## _def_ `EventPlainText()` {#EventPlainText} - -- **说明:** 纯文本消息参数 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `EventToMe()` {#EventToMe} - -- **说明:** `to_me` 参数 - -- **参数** - - empty - -- **返回** - - - bool - -## _def_ `Command()` {#Command} - -- **说明:** 消息命令元组 - -- **参数** - - empty - -- **返回** - - - tuple[str, ...] - -## _def_ `RawCommand()` {#RawCommand} - -- **说明:** 消息命令文本 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `CommandArg()` {#CommandArg} - -- **说明:** 消息命令参数 - -- **参数** - - empty - -- **返回** - - - Any - -## _def_ `CommandStart()` {#CommandStart} - -- **说明:** 消息命令开头 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `CommandWhitespace()` {#CommandWhitespace} - -- **说明:** 消息命令与参数之间的空白 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `ShellCommandArgs()` {#ShellCommandArgs} - -- **说明:** shell 命令解析后的参数字典 - -- **参数** - - empty - -- **返回** - - - Any - -## _def_ `ShellCommandArgv()` {#ShellCommandArgv} - -- **说明:** shell 命令原始参数列表 - -- **参数** - - empty - -- **返回** - - - Any - -## _def_ `RegexMatched()` {#RegexMatched} - -- **说明:** 正则匹配结果 - -- **参数** - - empty - -- **返回** - - - Match[str] - -## _def_ `RegexStr(*groups)` {#RegexStr} - -- **说明:** 正则匹配结果文本 - -- **重载** - - **1.** `(__group=0) -> str` - - - **参数** - - - `__group` (Literal[0]) - - - **返回** - - - str - - **2.** `(__group) -> str | Any` - - - **参数** - - - `__group` (str | int) - - - **返回** - - - str | Any - - **3.** `(__group1, __group2, *groups) -> tuple[str | Any, ...]` - - - **参数** - - - `__group1` (str | int) - - - `__group2` (str | int) - - - `*groups` (str | int) - - - **返回** - - - tuple[str | Any, ...] - -## _def_ `RegexGroup()` {#RegexGroup} - -- **说明:** 正则匹配结果 group 元组 - -- **参数** - - empty - -- **返回** - - - tuple[Any, ...] - -## _def_ `RegexDict()` {#RegexDict} - -- **说明:** 正则匹配结果 group 字典 - -- **参数** - - empty - -- **返回** - - - dict[str, Any] - -## _def_ `Startswith()` {#Startswith} - -- **说明:** 响应触发前缀 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `Endswith()` {#Endswith} - -- **说明:** 响应触发后缀 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `Fullmatch()` {#Fullmatch} - -- **说明:** 响应触发完整消息 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `Keyword()` {#Keyword} - -- **说明:** 响应触发关键字 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `Received(id=None, default=None)` {#Received} - -- **说明:** `receive` 事件参数 - -- **参数** - - - `id` (str | None) - - - `default` (Any) - -- **返回** - - - Any - -## _def_ `LastReceived(default=None)` {#LastReceived} - -- **说明:** `last_receive` 事件参数 - -- **参数** - - - `default` (Any) - -- **返回** - - - Any diff --git a/website/versioned_docs/version-2.3.1/api/permission.md b/website/versioned_docs/version-2.3.1/api/permission.md deleted file mode 100644 index acb6b643275e..000000000000 --- a/website/versioned_docs/version-2.3.1/api/permission.md +++ /dev/null @@ -1,208 +0,0 @@ ---- -sidebar_position: 6 -description: nonebot.permission 模块 ---- - -# nonebot.permission - -本模块是 [Matcher.permission](matcher.md#Matcher-permission) 的类型定义。 - -每个[事件响应器](matcher.md#Matcher) -拥有一个 [Permission](#Permission),其中是 `PermissionChecker` 的集合。 -只要有一个 `PermissionChecker` 检查结果为 `True` 时就会继续运行。 - -## _def_ `USER(*users, perm=None)` {#USER} - -- **说明** - - 匹配当前事件属于指定会话。 - - 如果 `perm` 中仅有 `User` 类型的权限检查函数,则会去除原有检查函数的会话 ID 限制。 - -- **参数** - - - `*users` (str) - - - `perm` (Permission | None): 需要同时满足的权限 - - - `user`: 会话白名单 - -- **返回** - - - untyped - -## _class_ `User(users, perm=None)` {#User} - -- **说明:** 检查当前事件是否属于指定会话。 - -- **参数** - - - `users` (tuple[str, ...]): 会话 ID 元组 - - - `perm` (Permission | None): 需同时满足的权限 - -### _classmethod_ `from_event(event, perm=None)` {#User-from-event} - -- **说明** - - 从事件中获取会话 ID。 - - 如果 `perm` 中仅有 `User` 类型的权限检查函数,则会去除原有的会话 ID 限制。 - -- **参数** - - - `event` ([Event](adapters/index.md#Event)): Event 对象 - - - `perm` (Permission | None): 需同时满足的权限 - -- **返回** - - - Self - -### _classmethod_ `from_permission(*users, perm=None)` {#User-from-permission} - -- **说明** - - 指定会话与权限。 - - 如果 `perm` 中仅有 `User` 类型的权限检查函数,则会去除原有的会话 ID 限制。 - -- **参数** - - - `*users` (str): 会话白名单 - - - `perm` (Permission | None): 需同时满足的权限 - -- **返回** - - - Self - -## _class_ `Permission(*checkers)` {#Permission} - -- **说明** - - 权限类。 - - 当事件传递时,在 [Matcher](matcher.md#Matcher) 运行前进行检查。 - -- **参数** - - - `*checkers` ([T_PermissionChecker](typing.md#T-PermissionChecker) | [Dependent](dependencies/index.md#Dependent)[bool]): PermissionChecker - -- **用法** - - ```python - Permission(async_function) | sync_function - # 等价于 - Permission(async_function, sync_function) - ``` - -### _instance-var_ `checkers` {#Permission-checkers} - -- **类型:** set[[Dependent](dependencies/index.md#Dependent)[bool]] - -- **说明:** 存储 `PermissionChecker` - -### _async method_ `__call__(bot, event, stack=None, dependency_cache=None)` {#Permission---call--} - -- **说明:** 检查是否满足某个权限。 - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): Event 对象 - - - `stack` (AsyncExitStack | None): 异步上下文栈 - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None): 依赖缓存 - -- **返回** - - - bool - -## _class_ `Message()` {#Message} - -- **说明:** 检查是否为消息事件 - -- **参数** - - auto - -## _class_ `Notice()` {#Notice} - -- **说明:** 检查是否为通知事件 - -- **参数** - - auto - -## _class_ `Request()` {#Request} - -- **说明:** 检查是否为请求事件 - -- **参数** - - auto - -## _class_ `MetaEvent()` {#MetaEvent} - -- **说明:** 检查是否为元事件 - -- **参数** - - auto - -## _var_ `MESSAGE` {#MESSAGE} - -- **类型:** [Permission](#Permission) - -- **说明** - - 匹配任意 `message` 类型事件 - - 仅在需要同时捕获不同类型事件时使用,优先使用 message type 的 Matcher。 - -## _var_ `NOTICE` {#NOTICE} - -- **类型:** [Permission](#Permission) - -- **说明** - - 匹配任意 `notice` 类型事件 - - 仅在需要同时捕获不同类型事件时使用,优先使用 notice type 的 Matcher。 - -## _var_ `REQUEST` {#REQUEST} - -- **类型:** [Permission](#Permission) - -- **说明** - - 匹配任意 `request` 类型事件 - - 仅在需要同时捕获不同类型事件时使用,优先使用 request type 的 Matcher。 - -## _var_ `METAEVENT` {#METAEVENT} - -- **类型:** [Permission](#Permission) - -- **说明** - - 匹配任意 `meta_event` 类型事件 - - 仅在需要同时捕获不同类型事件时使用,优先使用 meta_event type 的 Matcher。 - -## _class_ `SuperUser()` {#SuperUser} - -- **说明:** 检查当前事件是否是消息事件且属于超级管理员 - -- **参数** - - auto - -## _var_ `SUPERUSER` {#SUPERUSER} - -- **类型:** [Permission](#Permission) - -- **说明:** 匹配任意超级用户事件 diff --git a/website/versioned_docs/version-2.3.1/api/plugin/_category_.json b/website/versioned_docs/version-2.3.1/api/plugin/_category_.json deleted file mode 100644 index 14e3de02a88f..000000000000 --- a/website/versioned_docs/version-2.3.1/api/plugin/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "position": 12 -} diff --git a/website/versioned_docs/version-2.3.1/api/plugin/index.md b/website/versioned_docs/version-2.3.1/api/plugin/index.md deleted file mode 100644 index bc6644e04cc7..000000000000 --- a/website/versioned_docs/version-2.3.1/api/plugin/index.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -sidebar_position: 0 -description: nonebot.plugin 模块 ---- - -# nonebot.plugin - -本模块为 NoneBot 插件开发提供便携的定义函数。 - -## 快捷导入 - -为方便使用,本模块从子模块导入了部分内容,以下内容可以直接通过本模块导入: - -- `on` => [`on`](on.md#on) -- `on_metaevent` => [`on_metaevent`](on.md#on-metaevent) -- `on_message` => [`on_message`](on.md#on-message) -- `on_notice` => [`on_notice`](on.md#on-notice) -- `on_request` => [`on_request`](on.md#on-request) -- `on_startswith` => [`on_startswith`](on.md#on-startswith) -- `on_endswith` => [`on_endswith`](on.md#on-endswith) -- `on_fullmatch` => [`on_fullmatch`](on.md#on-fullmatch) -- `on_keyword` => [`on_keyword`](on.md#on-keyword) -- `on_command` => [`on_command`](on.md#on-command) -- `on_shell_command` => [`on_shell_command`](on.md#on-shell-command) -- `on_regex` => [`on_regex`](on.md#on-regex) -- `on_type` => [`on_type`](on.md#on-type) -- `CommandGroup` => [`CommandGroup`](on.md#CommandGroup) -- `Matchergroup` => [`MatcherGroup`](on.md#MatcherGroup) -- `load_plugin` => [`load_plugin`](load.md#load-plugin) -- `load_plugins` => [`load_plugins`](load.md#load-plugins) -- `load_all_plugins` => [`load_all_plugins`](load.md#load-all-plugins) -- `load_from_json` => [`load_from_json`](load.md#load-from-json) -- `load_from_toml` => [`load_from_toml`](load.md#load-from-toml) -- `load_builtin_plugin` => - [`load_builtin_plugin`](load.md#load-builtin-plugin) -- `load_builtin_plugins` => - [`load_builtin_plugins`](load.md#load-builtin-plugins) -- `require` => [`require`](load.md#require) -- `PluginMetadata` => [`PluginMetadata`](model.md#PluginMetadata) - -## _def_ `get_plugin(plugin_id)` {#get-plugin} - -- **说明** - - 获取已经导入的某个插件。 - - 如果为 `load_plugins` 文件夹导入的插件,则为文件(夹)名。 - - 如果为嵌套的子插件,标识符为 `父插件标识符:子插件文件(夹)名`。 - -- **参数** - - - `plugin_id` (str): 插件标识符,即 [Plugin.id\_](model.md#Plugin-id-)。 - -- **返回** - - - [Plugin](model.md#Plugin) | None - -## _def_ `get_plugin_by_module_name(module_name)` {#get-plugin-by-module-name} - -- **说明** - - 通过模块名获取已经导入的某个插件。 - - 如果提供的模块名为某个插件的子模块,同样会返回该插件。 - -- **参数** - - - `module_name` (str): 模块名,即 [Plugin.module_name](model.md#Plugin-module-name)。 - -- **返回** - - - [Plugin](model.md#Plugin) | None - -## _def_ `get_loaded_plugins()` {#get-loaded-plugins} - -- **说明:** 获取当前已导入的所有插件。 - -- **参数** - - empty - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -## _def_ `get_available_plugin_names()` {#get-available-plugin-names} - -- **说明:** 获取当前所有可用的插件标识符(包含尚未加载的插件)。 - -- **参数** - - empty - -- **返回** - - - set[str] - -## _def_ `get_plugin_config(config)` {#get-plugin-config} - -- **说明:** 从全局配置获取当前插件需要的配置项。 - -- **参数** - - - `config` (type[C]) - -- **返回** - - - C diff --git a/website/versioned_docs/version-2.3.1/api/plugin/load.md b/website/versioned_docs/version-2.3.1/api/plugin/load.md deleted file mode 100644 index e526e712cd08..000000000000 --- a/website/versioned_docs/version-2.3.1/api/plugin/load.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -sidebar_position: 1 -description: nonebot.plugin.load 模块 ---- - -# nonebot.plugin.load - -本模块定义插件加载接口。 - -## _def_ `load_plugin(module_path)` {#load-plugin} - -- **说明:** 加载单个插件,可以是本地插件或是通过 `pip` 安装的插件。 - -- **参数** - - - `module_path` (str | Path): 插件名称 `path.to.your.plugin` 或插件路径 `pathlib.Path(path/to/your/plugin)` - -- **返回** - - - [Plugin](model.md#Plugin) | None - -## _def_ `load_plugins(*plugin_dir)` {#load-plugins} - -- **说明:** 导入文件夹下多个插件,以 `_` 开头的插件不会被导入! - -- **参数** - - - `*plugin_dir` (str): 文件夹路径 - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -## _def_ `load_all_plugins(module_path, plugin_dir)` {#load-all-plugins} - -- **说明:** 导入指定列表中的插件以及指定目录下多个插件,以 `_` 开头的插件不会被导入! - -- **参数** - - - `module_path` (Iterable[str]): 指定插件集合 - - - `plugin_dir` (Iterable[str]): 指定文件夹路径集合 - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -## _def_ `load_from_json(file_path, encoding="utf-8")` {#load-from-json} - -- **说明:** 导入指定 json 文件中的 `plugins` 以及 `plugin_dirs` 下多个插件。 以 `_` 开头的插件不会被导入! - -- **参数** - - - `file_path` (str): 指定 json 文件路径 - - - `encoding` (str): 指定 json 文件编码 - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -- **用法** - - ```json title=plugins.json - { - "plugins": ["some_plugin"], - "plugin_dirs": ["some_dir"] - } - ``` - - ```python - nonebot.load_from_json("plugins.json") - ``` - -## _def_ `load_from_toml(file_path, encoding="utf-8")` {#load-from-toml} - -- **说明:** 导入指定 toml 文件 `[tool.nonebot]` 中的 `plugins` 以及 `plugin_dirs` 下多个插件。 以 `_` 开头的插件不会被导入! - -- **参数** - - - `file_path` (str): 指定 toml 文件路径 - - - `encoding` (str): 指定 toml 文件编码 - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -- **用法** - - ```toml title=pyproject.toml - [tool.nonebot] - plugins = ["some_plugin"] - plugin_dirs = ["some_dir"] - ``` - - ```python - nonebot.load_from_toml("pyproject.toml") - ``` - -## _def_ `load_builtin_plugin(name)` {#load-builtin-plugin} - -- **说明:** 导入 NoneBot 内置插件。 - -- **参数** - - - `name` (str): 插件名称 - -- **返回** - - - [Plugin](model.md#Plugin) | None - -## _def_ `load_builtin_plugins(*plugins)` {#load-builtin-plugins} - -- **说明:** 导入多个 NoneBot 内置插件。 - -- **参数** - - - `*plugins` (str): 插件名称列表 - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -## _def_ `require(name)` {#require} - -- **说明:** 声明依赖插件。 - -- **参数** - - - `name` (str): 插件模块名或插件标识符,仅在已声明插件的情况下可使用标识符。 - -- **返回** - - - ModuleType - -- **异常** - - - RuntimeError: 插件无法加载 - -## _def_ `inherit_supported_adapters(*names)` {#inherit-supported-adapters} - -- **说明** - - 获取已加载插件的适配器支持状态集合。 - - 如果传入了多个插件名称,返回值会自动取交集。 - -- **参数** - - - `*names` (str): 插件名称列表。 - -- **返回** - - - set[str] | None - -- **异常** - - - RuntimeError: 插件未加载 - - - ValueError: 插件缺少元数据 diff --git a/website/versioned_docs/version-2.3.1/api/plugin/manager.md b/website/versioned_docs/version-2.3.1/api/plugin/manager.md deleted file mode 100644 index 51a7c10e4f33..000000000000 --- a/website/versioned_docs/version-2.3.1/api/plugin/manager.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -sidebar_position: 5 -description: nonebot.plugin.manager 模块 ---- - -# nonebot.plugin.manager - -本模块实现插件加载流程。 - -参考: [import hooks](https://docs.python.org/3/reference/import.html#import-hooks), [PEP302](https://www.python.org/dev/peps/pep-0302/) - -## _class_ `PluginManager(plugins=None, search_path=None)` {#PluginManager} - -- **说明:** 插件管理器。 - -- **参数** - - - `plugins` (Iterable[str] | None): 独立插件模块名集合。 - - - `search_path` (Iterable[str] | None): 插件搜索路径(文件夹),相对于当前工作目录。 - -### _property_ `third_party_plugins` {#PluginManager-third-party-plugins} - -- **类型:** set[str] - -- **说明:** 返回所有独立插件标识符。 - -### _property_ `searched_plugins` {#PluginManager-searched-plugins} - -- **类型:** set[str] - -- **说明:** 返回已搜索到的插件标识符。 - -### _property_ `available_plugins` {#PluginManager-available-plugins} - -- **类型:** set[str] - -- **说明:** 返回当前插件管理器中可用的插件标识符。 - -### _property_ `controlled_modules` {#PluginManager-controlled-modules} - -- **类型:** dict[str, str] - -- **说明:** 返回当前插件管理器中控制的插件标识符与模块路径映射字典。 - -### _method_ `load_plugin(name)` {#PluginManager-load-plugin} - -- **说明** - - 加载指定插件。 - - 可以使用完整插件模块名或者插件标识符加载。 - -- **参数** - - - `name` (str): 插件名称或插件标识符。 - -- **返回** - - - [Plugin](model.md#Plugin) | None - -### _method_ `load_all_plugins()` {#PluginManager-load-all-plugins} - -- **说明:** 加载所有可用插件。 - -- **参数** - - empty - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -## _class_ `PluginFinder()` {#PluginFinder} - -- **参数** - - auto - -### _method_ `find_spec(fullname, path, target=None)` {#PluginFinder-find-spec} - -- **参数** - - - `fullname` (str) - - - `path` (Sequence[str] | None) - - - `target` (ModuleType | None) - -- **返回** - - - untyped - -## _class_ `PluginLoader(manager, fullname, path)` {#PluginLoader} - -- **参数** - - - `manager` (PluginManager) - - - `fullname` (str) - - - `path` (str) - -### _method_ `create_module(spec)` {#PluginLoader-create-module} - -- **参数** - - - `spec` - -- **返回** - - - ModuleType | None - -### _method_ `exec_module(module)` {#PluginLoader-exec-module} - -- **参数** - - - `module` (ModuleType) - -- **返回** - - - None diff --git a/website/versioned_docs/version-2.3.1/api/plugin/model.md b/website/versioned_docs/version-2.3.1/api/plugin/model.md deleted file mode 100644 index e43f84cd9b79..000000000000 --- a/website/versioned_docs/version-2.3.1/api/plugin/model.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -sidebar_position: 3 -description: nonebot.plugin.model 模块 ---- - -# nonebot.plugin.model - -本模块定义插件相关信息。 - -## _class_ `PluginMetadata()` {#PluginMetadata} - -- **说明:** 插件元信息,由插件编写者提供 - -- **参数** - - auto - -### _instance-var_ `name` {#PluginMetadata-name} - -- **类型:** str - -- **说明:** 插件名称 - -### _instance-var_ `description` {#PluginMetadata-description} - -- **类型:** str - -- **说明:** 插件功能介绍 - -### _instance-var_ `usage` {#PluginMetadata-usage} - -- **类型:** str - -- **说明:** 插件使用方法 - -### _class-var_ `type` {#PluginMetadata-type} - -- **类型:** str | None - -- **说明:** 插件类型,用于商店分类 - -### _class-var_ `homepage` {#PluginMetadata-homepage} - -- **类型:** str | None - -- **说明:** 插件主页 - -### _class-var_ `config` {#PluginMetadata-config} - -- **类型:** type[BaseModel] | None - -- **说明:** 插件配置项 - -### _class-var_ `supported_adapters` {#PluginMetadata-supported-adapters} - -- **类型:** set[str] | None - -- **说明** - - 插件支持的适配器模块路径 - - 格式为 `[:]`,`~` 为 `nonebot.adapters.` 的缩写。 - - `None` 表示支持**所有适配器**。 - -### _class-var_ `extra` {#PluginMetadata-extra} - -- **类型:** dict[Any, Any] - -- **说明:** 插件额外信息,可由插件编写者自由扩展定义 - -### _method_ `get_supported_adapters()` {#PluginMetadata-get-supported-adapters} - -- **说明:** 获取当前已安装的插件支持适配器类列表 - -- **参数** - - empty - -- **返回** - - - set[type[[Adapter](../adapters/index.md#Adapter)]] | None - -## _class_ `Plugin()` {#Plugin} - -- **说明:** 存储插件信息 - -- **参数** - - auto - -### _instance-var_ `name` {#Plugin-name} - -- **类型:** str - -- **说明:** 插件名称,NoneBot 使用 文件/文件夹 名称作为插件名称 - -### _instance-var_ `module` {#Plugin-module} - -- **类型:** ModuleType - -- **说明:** 插件模块对象 - -### _instance-var_ `module_name` {#Plugin-module-name} - -- **类型:** str - -- **说明:** 点分割模块路径 - -### _instance-var_ `manager` {#Plugin-manager} - -- **类型:** [PluginManager](manager.md#PluginManager) - -- **说明:** 导入该插件的插件管理器 - -### _class-var_ `matcher` {#Plugin-matcher} - -- **类型:** set[type[[Matcher](../matcher.md#Matcher)]] - -- **说明:** 插件加载时定义的 `Matcher` - -### _class-var_ `parent_plugin` {#Plugin-parent-plugin} - -- **类型:** Plugin | None - -- **说明:** 父插件 - -### _class-var_ `sub_plugins` {#Plugin-sub-plugins} - -- **类型:** set[Plugin] - -- **说明:** 子插件集合 - -### _property_ `id_` {#Plugin-id-} - -- **类型:** str - -- **说明:** 插件索引标识 diff --git a/website/versioned_docs/version-2.3.1/api/plugin/on.md b/website/versioned_docs/version-2.3.1/api/plugin/on.md deleted file mode 100644 index 68df8478c3d6..000000000000 --- a/website/versioned_docs/version-2.3.1/api/plugin/on.md +++ /dev/null @@ -1,948 +0,0 @@ ---- -sidebar_position: 2 -description: nonebot.plugin.on 模块 ---- - -# nonebot.plugin.on - -本模块定义事件响应器便携定义函数。 - -## _def_ `store_matcher(matcher)` {#store-matcher} - -- **说明:** 存储一个事件响应器到插件。 - -- **参数** - - - `matcher` (type[[Matcher](../matcher.md#Matcher)]): 事件响应器 - -- **返回** - - - None - -## _def_ `get_matcher_plugin(depth=...)` {#get-matcher-plugin} - -- **说明** - - 获取事件响应器定义所在插件。 - - **Deprecated**, 请使用 [get_matcher_source](#get-matcher-source) 获取信息。 - -- **参数** - - - `depth` (int): 调用栈深度 - -- **返回** - - - [Plugin](model.md#Plugin) | None - -## _def_ `get_matcher_module(depth=...)` {#get-matcher-module} - -- **说明** - - 获取事件响应器定义所在模块。 - - **Deprecated**, 请使用 [get_matcher_source](#get-matcher-source) 获取信息。 - -- **参数** - - - `depth` (int): 调用栈深度 - -- **返回** - - - ModuleType | None - -## _def_ `get_matcher_source(depth=...)` {#get-matcher-source} - -- **说明:** 获取事件响应器定义所在源码信息。 - -- **参数** - - - `depth` (int): 调用栈深度 - -- **返回** - - - MatcherSource | None - -## _def_ `on(type="", rule=..., permission=..., *, handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on} - -- **说明:** 注册一个基础事件响应器,可自定义类型。 - -- **参数** - - - `type` (str): 事件响应器类型 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_metaevent(rule=..., permission=..., *, handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-metaevent} - -- **说明:** 注册一个元事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_message(rule=..., permission=..., *, handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-message} - -- **说明:** 注册一个消息事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_notice(rule=..., permission=..., *, handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-notice} - -- **说明:** 注册一个通知事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_request(rule=..., permission=..., *, handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-request} - -- **说明:** 注册一个请求事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_startswith(msg, rule=..., ignorecase=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-startswith} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**以指定内容开头时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息开头内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `ignorecase` (bool): 是否忽略大小写 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_endswith(msg, rule=..., ignorecase=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-endswith} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**以指定内容结尾时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息结尾内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `ignorecase` (bool): 是否忽略大小写 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_fullmatch(msg, rule=..., ignorecase=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-fullmatch} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**与指定内容完全一致时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息全匹配内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `ignorecase` (bool): 是否忽略大小写 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_keyword(keywords, rule=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-keyword} - -- **说明:** 注册一个消息事件响应器,并且当消息纯文本部分包含关键词时响应。 - -- **参数** - - - `keywords` (set[str]): 关键词列表 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_command(cmd, rule=..., aliases=..., force_whitespace=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-command} - -- **说明** - - 注册一个消息事件响应器,并且当消息以指定命令开头时响应。 - - 命令匹配规则参考: `命令形式匹配 `\_ - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `force_whitespace` (str | bool | None): 是否强制命令后必须有指定空白符 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_shell_command(cmd, rule=..., aliases=..., parser=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-shell-command} - -- **说明** - - 注册一个支持 `shell_like` 解析参数的命令消息事件响应器。 - - 与普通的 `on_command` 不同的是,在添加 `parser` 参数时, 响应器会自动处理消息。 - - 可以通过 [ShellCommandArgv](../params.md#ShellCommandArgv) 获取原始参数列表, - 通过 [ShellCommandArgs](../params.md#ShellCommandArgs) 获取解析后的参数字典。 - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `parser` ([ArgumentParser](../rule.md#ArgumentParser) | None): `nonebot.rule.ArgumentParser` 对象 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_regex(pattern, flags=..., rule=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-regex} - -- **说明** - - 注册一个消息事件响应器,并且当消息匹配正则表达式时响应。 - - 命令匹配规则参考: `正则匹配 `\_ - -- **参数** - - - `pattern` (str): 正则表达式 - - - `flags` (int | re.RegexFlag): 正则匹配标志 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_type(types, rule=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-type} - -- **说明:** 注册一个事件响应器,并且当事件为指定类型时响应。 - -- **参数** - - - `types` (type[[Event](../adapters/index.md#Event)] | tuple[type[[Event](../adapters/index.md#Event)], ...]): 事件类型 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _class_ `CommandGroup(cmd, prefix_aliases=..., *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#CommandGroup} - -- **参数** - - - `cmd` (str | tuple[str, ...]) - - - `prefix_aliases` (bool) - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None) - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None) - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None) - - - `temp` (bool) - - - `expire_time` (datetime | timedelta | None) - - - `priority` (int) - - - `block` (bool) - - - `state` ([T_State](../typing.md#T-State) | None) - -### _method_ `command(cmd, *, rule=..., aliases=..., force_whitespace=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#CommandGroup-command} - -- **说明:** 注册一个新的命令。新参数将会覆盖命令组默认值 - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `force_whitespace` (str | bool | None): 是否强制命令后必须有指定空白符 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `shell_command(cmd, *, rule=..., aliases=..., parser=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#CommandGroup-shell-command} - -- **说明:** 注册一个新的 `shell_like` 命令。新参数将会覆盖命令组默认值 - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `parser` ([ArgumentParser](../rule.md#ArgumentParser) | None): `nonebot.rule.ArgumentParser` 对象 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _class_ `MatcherGroup(*, type=..., rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup} - -- **参数** - - - `type` (str) - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None) - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None) - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None) - - - `temp` (bool) - - - `expire_time` (datetime | timedelta | None) - - - `priority` (int) - - - `block` (bool) - - - `state` ([T_State](../typing.md#T-State) | None) - -### _method_ `on(*, type=..., rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on} - -- **说明:** 注册一个基础事件响应器,可自定义类型。 - -- **参数** - - - `type` (str): 事件响应器类型 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_metaevent(*, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-metaevent} - -- **说明:** 注册一个元事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_message(*, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-message} - -- **说明:** 注册一个消息事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_notice(*, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-notice} - -- **说明:** 注册一个通知事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_request(*, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-request} - -- **说明:** 注册一个请求事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_startswith(msg, *, ignorecase=..., rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-startswith} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**以指定内容开头时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息开头内容 - - - `ignorecase` (bool): 是否忽略大小写 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_endswith(msg, *, ignorecase=..., rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-endswith} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**以指定内容结尾时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息结尾内容 - - - `ignorecase` (bool): 是否忽略大小写 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_fullmatch(msg, *, ignorecase=..., rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-fullmatch} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**与指定内容完全一致时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息全匹配内容 - - - `ignorecase` (bool): 是否忽略大小写 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_keyword(keywords, *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-keyword} - -- **说明:** 注册一个消息事件响应器,并且当消息纯文本部分包含关键词时响应。 - -- **参数** - - - `keywords` (set[str]): 关键词列表 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_command(cmd, aliases=..., force_whitespace=..., *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-command} - -- **说明** - - 注册一个消息事件响应器,并且当消息以指定命令开头时响应。 - - 命令匹配规则参考: `命令形式匹配 `\_ - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `force_whitespace` (str | bool | None): 是否强制命令后必须有指定空白符 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_shell_command(cmd, aliases=..., parser=..., *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-shell-command} - -- **说明** - - 注册一个支持 `shell_like` 解析参数的命令消息事件响应器。 - - 与普通的 `on_command` 不同的是,在添加 `parser` 参数时, 响应器会自动处理消息。 - - 可以通过 [ShellCommandArgv](../params.md#ShellCommandArgv) 获取原始参数列表, - 通过 [ShellCommandArgs](../params.md#ShellCommandArgs) 获取解析后的参数字典。 - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `parser` ([ArgumentParser](../rule.md#ArgumentParser) | None): `nonebot.rule.ArgumentParser` 对象 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_regex(pattern, flags=..., *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-regex} - -- **说明** - - 注册一个消息事件响应器,并且当消息匹配正则表达式时响应。 - - 命令匹配规则参考: `正则匹配 `\_ - -- **参数** - - - `pattern` (str): 正则表达式 - - - `flags` (int | re.RegexFlag): 正则匹配标志 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_type(types, *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-type} - -- **说明:** 注册一个事件响应器,并且当事件为指定类型时响应。 - -- **参数** - - - `types` (type[[Event](../adapters/index.md#Event)] | tuple[type[[Event](../adapters/index.md#Event)]]): 事件类型 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] diff --git a/website/versioned_docs/version-2.3.1/api/rule.md b/website/versioned_docs/version-2.3.1/api/rule.md deleted file mode 100644 index a0f2c044f582..000000000000 --- a/website/versioned_docs/version-2.3.1/api/rule.md +++ /dev/null @@ -1,402 +0,0 @@ ---- -sidebar_position: 5 -description: nonebot.rule 模块 ---- - -# nonebot.rule - -本模块是 [Matcher.rule](matcher.md#Matcher-rule) 的类型定义。 - -每个[事件响应器](matcher.md#Matcher)拥有一个 -[Rule](#Rule),其中是 `RuleChecker` 的集合。 -只有当所有 `RuleChecker` 检查结果为 `True` 时继续运行。 - -## _class_ `Rule(*checkers)` {#Rule} - -- **说明** - - 规则类。 - - 当事件传递时,在 [Matcher](matcher.md#Matcher) 运行前进行检查。 - -- **参数** - - - `*checkers` ([T_RuleChecker](typing.md#T-RuleChecker) | [Dependent](dependencies/index.md#Dependent)[bool]): RuleChecker - -- **用法** - - ```python - Rule(async_function) & sync_function - # 等价于 - Rule(async_function, sync_function) - ``` - -### _instance-var_ `checkers` {#Rule-checkers} - -- **类型:** set[[Dependent](dependencies/index.md#Dependent)[bool]] - -- **说明:** 存储 `RuleChecker` - -### _async method_ `__call__(bot, event, state, stack=None, dependency_cache=None)` {#Rule---call--} - -- **说明:** 检查是否符合所有规则 - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): Event 对象 - - - `state` ([T_State](typing.md#T-State)): 当前 State - - - `stack` (AsyncExitStack | None): 异步上下文栈 - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None): 依赖缓存 - -- **返回** - - - bool - -## _class_ `CMD_RESULT()` {#CMD-RESULT} - -- **参数** - - auto - -## _class_ `TRIE_VALUE()` {#TRIE-VALUE} - -- **说明:** TRIE_VALUE(command_start, command) - -- **参数** - - auto - -## _class_ `StartswithRule(msg, ignorecase=False)` {#StartswithRule} - -- **说明:** 检查消息纯文本是否以指定字符串开头。 - -- **参数** - - - `msg` (tuple[str, ...]): 指定消息开头字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -## _def_ `startswith(msg, ignorecase=False)` {#startswith} - -- **说明:** 匹配消息纯文本开头。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息开头字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -- **返回** - - - [Rule](#Rule) - -## _class_ `EndswithRule(msg, ignorecase=False)` {#EndswithRule} - -- **说明:** 检查消息纯文本是否以指定字符串结尾。 - -- **参数** - - - `msg` (tuple[str, ...]): 指定消息结尾字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -## _def_ `endswith(msg, ignorecase=False)` {#endswith} - -- **说明:** 匹配消息纯文本结尾。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息开头字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -- **返回** - - - [Rule](#Rule) - -## _class_ `FullmatchRule(msg, ignorecase=False)` {#FullmatchRule} - -- **说明:** 检查消息纯文本是否与指定字符串全匹配。 - -- **参数** - - - `msg` (tuple[str, ...]): 指定消息全匹配字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -## _def_ `fullmatch(msg, ignorecase=False)` {#fullmatch} - -- **说明:** 完全匹配消息。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息全匹配字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -- **返回** - - - [Rule](#Rule) - -## _class_ `KeywordsRule(*keywords)` {#KeywordsRule} - -- **说明:** 检查消息纯文本是否包含指定关键字。 - -- **参数** - - - `*keywords` (str): 指定关键字元组 - -## _def_ `keyword(*keywords)` {#keyword} - -- **说明:** 匹配消息纯文本关键词。 - -- **参数** - - - `*keywords` (str): 指定关键字元组 - -- **返回** - - - [Rule](#Rule) - -## _class_ `CommandRule(cmds, force_whitespace=None)` {#CommandRule} - -- **说明:** 检查消息是否为指定命令。 - -- **参数** - - - `cmds` (list[tuple[str, ...]]): 指定命令元组列表 - - - `force_whitespace` (str | bool | None): 是否强制命令后必须有指定空白符 - -## _def_ `command(*cmds, force_whitespace=None)` {#command} - -- **说明** - - 匹配消息命令。 - - 根据配置里提供的 [`command_start`](config.md#Config-command-start), - [`command_sep`](config.md#Config-command-sep) 判断消息是否为命令。 - - 可以通过 [Command](params.md#Command) 获取匹配成功的命令(例: `("test",)`), - 通过 [RawCommand](params.md#RawCommand) 获取匹配成功的原始命令文本(例: `"/test"`), - 通过 [CommandArg](params.md#CommandArg) 获取匹配成功的命令参数。 - -- **参数** - - - `*cmds` (str | tuple[str, ...]): 命令文本或命令元组 - - - `force_whitespace` (str | bool | None): 是否强制命令后必须有指定空白符 - -- **返回** - - - [Rule](#Rule) - -- **用法** - - 使用默认 `command_start`, `command_sep` 配置情况下: - - 命令 `("test",)` 可以匹配: `/test` 开头的消息 - 命令 `("test", "sub")` 可以匹配: `/test.sub` 开头的消息 - -:::tip 提示 -命令内容与后续消息间无需空格! -::: - -## _class_ `ArgumentParser()` {#ArgumentParser} - -- **说明** - - `shell_like` 命令参数解析器,解析出错时不会退出程序。 - - 支持 [Message](adapters/index.md#Message) 富文本解析。 - -- **参数** - - auto - -- **用法** - - 用法与 `argparse.ArgumentParser` 相同, - 参考文档: [argparse](https://docs.python.org/3/library/argparse.html) - -### _method_ `parse_known_args(args=None, namespace=None)` {#ArgumentParser-parse-known-args} - -- **重载** - - **1.** `(args=None, namespace=None) -> tuple[Namespace, list[str | MessageSegment]]` - - - **参数** - - - `args` (Sequence[str | [MessageSegment](adapters/index.md#MessageSegment)] | None) - - - `namespace` (None) - - - **返回** - - - tuple[Namespace, list[str | [MessageSegment](adapters/index.md#MessageSegment)]] - - **2.** `(args, namespace) -> tuple[T, list[str | MessageSegment]]` - - - **参数** - - - `args` (Sequence[str | [MessageSegment](adapters/index.md#MessageSegment)] | None) - - - `namespace` (T) - - - **返回** - - - tuple[T, list[str | [MessageSegment](adapters/index.md#MessageSegment)]] - - **3.** `(*, namespace) -> tuple[T, list[str | MessageSegment]]` - - - **参数** - - - `namespace` (T) - - - **返回** - - - tuple[T, list[str | [MessageSegment](adapters/index.md#MessageSegment)]] - -## _class_ `ShellCommandRule(cmds, parser)` {#ShellCommandRule} - -- **说明:** 检查消息是否为指定 shell 命令。 - -- **参数** - - - `cmds` (list[tuple[str, ...]]): 指定命令元组列表 - - - `parser` (ArgumentParser | None): 可选参数解析器 - -## _def_ `shell_command(*cmds, parser=None)` {#shell-command} - -- **说明** - - 匹配 `shell_like` 形式的消息命令。 - - 根据配置里提供的 [`command_start`](config.md#Config-command-start), - [`command_sep`](config.md#Config-command-sep) 判断消息是否为命令。 - - 可以通过 [Command](params.md#Command) 获取匹配成功的命令 - (例: `("test",)`), - 通过 [RawCommand](params.md#RawCommand) 获取匹配成功的原始命令文本 - (例: `"/test"`), - 通过 [ShellCommandArgv](params.md#ShellCommandArgv) 获取解析前的参数列表 - (例: `["arg", "-h"]`), - 通过 [ShellCommandArgs](params.md#ShellCommandArgs) 获取解析后的参数字典 - (例: `{"arg": "arg", "h": True}`)。 - - :::caution 警告 - 如果参数解析失败,则通过 [ShellCommandArgs](params.md#ShellCommandArgs) - 获取的将是 [ParserExit](exception.md#ParserExit) 异常。 - ::: - -- **参数** - - - `*cmds` (str | tuple[str, ...]): 命令文本或命令元组 - - - `parser` (ArgumentParser | None): [ArgumentParser](#ArgumentParser) 对象 - -- **返回** - - - [Rule](#Rule) - -- **用法** - - 使用默认 `command_start`, `command_sep` 配置,更多示例参考 - [argparse](https://docs.python.org/3/library/argparse.html) 标准库文档。 - - ```python - from nonebot.rule import ArgumentParser - - parser = ArgumentParser() - parser.add_argument("-a", action="store_true") - - rule = shell_command("ls", parser=parser) - ``` - -:::tip 提示 -命令内容与后续消息间无需空格! -::: - -## _class_ `RegexRule(regex, flags=0)` {#RegexRule} - -- **说明:** 检查消息字符串是否符合指定正则表达式。 - -- **参数** - - - `regex` (str): 正则表达式 - - - `flags` (int): 正则表达式标记 - -## _def_ `regex(regex, flags=0)` {#regex} - -- **说明** - - 匹配符合正则表达式的消息字符串。 - - 可以通过 [RegexStr](params.md#RegexStr) 获取匹配成功的字符串, - 通过 [RegexGroup](params.md#RegexGroup) 获取匹配成功的 group 元组, - 通过 [RegexDict](params.md#RegexDict) 获取匹配成功的 group 字典。 - -- **参数** - - - `regex` (str): 正则表达式 - - - `flags` (int | re.RegexFlag): 正则表达式标记 - -- **返回** - - - [Rule](#Rule) - -:::tip 提示 -正则表达式匹配使用 search 而非 match,如需从头匹配请使用 `r"^xxx"` 来确保匹配开头 -::: -:::tip 提示 -正则表达式匹配使用 `EventMessage` 的 `str` 字符串, -而非 `EventMessage` 的 `PlainText` 纯文本字符串 -::: - -## _class_ `ToMeRule()` {#ToMeRule} - -- **说明:** 检查事件是否与机器人有关。 - -- **参数** - - auto - -## _def_ `to_me()` {#to-me} - -- **说明:** 匹配与机器人有关的事件。 - -- **参数** - - empty - -- **返回** - - - [Rule](#Rule) - -## _class_ `IsTypeRule(*types)` {#IsTypeRule} - -- **说明:** 检查事件类型是否为指定类型。 - -- **参数** - - - `*types` (type[[Event](adapters/index.md#Event)]) - -## _def_ `is_type(*types)` {#is-type} - -- **说明:** 匹配事件类型。 - -- **参数** - - - `*types` (type[[Event](adapters/index.md#Event)]): 事件类型 - -- **返回** - - - [Rule](#Rule) diff --git a/website/versioned_docs/version-2.3.1/api/typing.md b/website/versioned_docs/version-2.3.1/api/typing.md deleted file mode 100644 index 986eb3005f91..000000000000 --- a/website/versioned_docs/version-2.3.1/api/typing.md +++ /dev/null @@ -1,303 +0,0 @@ ---- -sidebar_position: 11 -description: nonebot.typing 模块 ---- - -# nonebot.typing - -本模块定义了 NoneBot 模块中共享的一些类型。 - -使用 Python 的 Type Hint 语法, -参考 [`PEP 484`](https://www.python.org/dev/peps/pep-0484/), -[`PEP 526`](https://www.python.org/dev/peps/pep-0526/) 和 -[`typing`](https://docs.python.org/3/library/typing.html)。 - -## _def_ `overrides(InterfaceClass)` {#overrides} - -- **说明:** 标记一个方法为父类 interface 的 implement - -- **参数** - - - `InterfaceClass` (object) - -- **返回** - - - untyped - -## _def_ `type_has_args(type_)` {#type-has-args} - -- **参数** - - - `type_` (type[Any]) - -- **返回** - - - bool - -## _def_ `origin_is_union(origin)` {#origin-is-union} - -- **参数** - - - `origin` (type[Any] | None) - -- **返回** - - - bool - -## _def_ `origin_is_literal(origin)` {#origin-is-literal} - -- **说明:** 判断是否是 Literal 类型 - -- **参数** - - - `origin` (type[Any] | None) - -- **返回** - - - bool - -## _def_ `all_literal_values(type_)` {#all-literal-values} - -- **说明:** 获取 Literal 类型包含的所有值 - -- **参数** - - - `type_` (type[Any]) - -- **返回** - - - list[Any] - -## _def_ `origin_is_annotated(origin)` {#origin-is-annotated} - -- **说明:** 判断是否是 Annotated 类型 - -- **参数** - - - `origin` (type[Any] | None) - -- **返回** - - - bool - -## _def_ `is_none_type(type_)` {#is-none-type} - -- **说明:** 判断是否是 None 类型 - -- **参数** - - - `type_` (type[Any]) - -- **返回** - - - bool - -## _def_ `evaluate_forwardref(ref, globalns, localns)` {#evaluate-forwardref} - -- **参数** - - - `ref` (ForwardRef) - - - `globalns` (dict[str, Any]) - - - `localns` (dict[str, Any]) - -- **返回** - - - Any - -## _class_ `StateFlag()` {#StateFlag} - -- **参数** - - auto - -## _var_ `T_State` {#T-State} - -- **类型:** dict[Any, Any] - -- **说明:** 事件处理状态 State 类型 - -## _var_ `T_BotConnectionHook` {#T-BotConnectionHook} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - Bot 连接建立时钩子函数 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_BotDisconnectionHook` {#T-BotDisconnectionHook} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - Bot 连接断开时钩子函数 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_CallingAPIHook` {#T-CallingAPIHook} - -- **类型:** ([Bot](adapters/index.md#Bot), str, dict[str, Any]) -> Awaitable[Any] - -- **说明:** `bot.call_api` 钩子函数 - -## _var_ `T_CalledAPIHook` {#T-CalledAPIHook} - -- **类型:** ([Bot](adapters/index.md#Bot), Exception | None, str, dict[str, Any], Any) -> Awaitable[Any] - -- **说明:** `bot.call_api` 后执行的函数,参数分别为 bot, exception, api, data, result - -## _var_ `T_EventPreProcessor` {#T-EventPreProcessor} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - 事件预处理函数 EventPreProcessor 类型 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_EventPostProcessor` {#T-EventPostProcessor} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - 事件后处理函数 EventPostProcessor 类型 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_RunPreProcessor` {#T-RunPreProcessor} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - 事件响应器运行前预处理函数 RunPreProcessor 类型 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - MatcherParam: Matcher 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_RunPostProcessor` {#T-RunPostProcessor} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - 事件响应器运行后后处理函数 RunPostProcessor 类型 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - MatcherParam: Matcher 对象 - - ExceptionParam: 异常对象(可能为 None) - - DefaultParam: 带有默认值的参数 - -## _var_ `T_RuleChecker` {#T-RuleChecker} - -- **类型:** \_DependentCallable[bool] - -- **说明** - - RuleChecker 即判断是否响应事件的处理函数。 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_PermissionChecker` {#T-PermissionChecker} - -- **类型:** \_DependentCallable[bool] - -- **说明** - - PermissionChecker 即判断事件是否满足权限的处理函数。 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_Handler` {#T-Handler} - -- **类型:** \_DependentCallable[Any] - -- **说明:** Handler 处理函数。 - -## _var_ `T_TypeUpdater` {#T-TypeUpdater} - -- **类型:** \_DependentCallable[str] - -- **说明** - - TypeUpdater 在 Matcher.pause, Matcher.reject 时被运行,用于更新响应的事件类型。 默认会更新为 `message`。 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - MatcherParam: Matcher 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_PermissionUpdater` {#T-PermissionUpdater} - -- **类型:** \_DependentCallable[[Permission](permission.md#Permission)] - -- **说明** - - PermissionUpdater 在 Matcher.pause, Matcher.reject 时被运行,用于更新会话对象权限。 默认会更新为当前事件的触发对象。 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - MatcherParam: Matcher 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_DependencyCache` {#T-DependencyCache} - -- **类型:** dict[\_DependentCallable[Any], Task[Any]] - -- **说明:** 依赖缓存, 用于存储依赖函数的返回值 diff --git a/website/versioned_docs/version-2.3.1/api/utils.md b/website/versioned_docs/version-2.3.1/api/utils.md deleted file mode 100644 index 976bb1a2a0f0..000000000000 --- a/website/versioned_docs/version-2.3.1/api/utils.md +++ /dev/null @@ -1,280 +0,0 @@ ---- -sidebar_position: 8 -description: nonebot.utils 模块 ---- - -# nonebot.utils - -本模块包含了 NoneBot 的一些工具函数 - -## _def_ `escape_tag(s)` {#escape-tag} - -- **说明** - - 用于记录带颜色日志时转义 `` 类型特殊标签 - - 参考: [loguru color 标签](https://loguru.readthedocs.io/en/stable/api/logger.html#color) - -- **参数** - - - `s` (str): 需要转义的字符串 - -- **返回** - - - str - -## _def_ `deep_update(mapping, *updating_mappings)` {#deep-update} - -- **说明:** 深度更新合并字典 - -- **参数** - - - `mapping` (dict[K, Any]) - - - `*updating_mappings` (dict[K, Any]) - -- **返回** - - - dict[K, Any] - -## _def_ `lenient_issubclass(cls, class_or_tuple)` {#lenient-issubclass} - -- **说明:** 检查 cls 是否是 class_or_tuple 中的一个类型子类并忽略类型错误。 - -- **参数** - - - `cls` (Any) - - - `class_or_tuple` (type[Any] | tuple[type[Any], ...]) - -- **返回** - - - bool - -## _def_ `generic_check_issubclass(cls, class_or_tuple)` {#generic-check-issubclass} - -- **说明** - - 检查 cls 是否是 class_or_tuple 中的一个类型子类。 - - 特别的: - - - 如果 cls 是 `typing.Union` 或 `types.UnionType` 类型, - 则会检查其中的所有类型是否是 class_or_tuple 中一个类型的子类或 None。 - - 如果 cls 是 `typing.Literal` 类型, - 则会检查其中的所有值是否是 class_or_tuple 中一个类型的实例。 - - 如果 cls 是 `typing.TypeVar` 类型, - 则会检查其 `__bound__` 或 `__constraints__` - 是否是 class_or_tuple 中一个类型的子类或 None。 - -- **参数** - - - `cls` (Any) - - - `class_or_tuple` (type[Any] | tuple[type[Any], ...]) - -- **返回** - - - bool - -## _def_ `type_is_complex(type_)` {#type-is-complex} - -- **说明:** 检查 type\_ 是否是复杂类型 - -- **参数** - - - `type_` (type[Any]) - -- **返回** - - - bool - -## _def_ `is_coroutine_callable(call)` {#is-coroutine-callable} - -- **说明:** 检查 call 是否是一个 callable 协程函数 - -- **参数** - - - `call` ((...) -> Any) - -- **返回** - - - bool - -## _def_ `is_gen_callable(call)` {#is-gen-callable} - -- **说明:** 检查 call 是否是一个生成器函数 - -- **参数** - - - `call` ((...) -> Any) - -- **返回** - - - bool - -## _def_ `is_async_gen_callable(call)` {#is-async-gen-callable} - -- **说明:** 检查 call 是否是一个异步生成器函数 - -- **参数** - - - `call` ((...) -> Any) - -- **返回** - - - bool - -## _def_ `run_sync(call)` {#run-sync} - -- **说明:** 一个用于包装 sync function 为 async function 的装饰器 - -- **参数** - - - `call` ((P) -> R): 被装饰的同步函数 - -- **返回** - - - (P) -> Coroutine[None, None, R] - -## _def_ `run_sync_ctx_manager(cm)` {#run-sync-ctx-manager} - -- **说明:** 一个用于包装 sync context manager 为 async context manager 的执行函数 - -- **参数** - - - `cm` (AbstractContextManager[T]) - -- **返回** - - - AsyncGenerator[T, None] - -## _async def_ `run_coro_with_catch(coro, exc, return_on_err=None)` {#run-coro-with-catch} - -- **说明:** 运行协程并当遇到指定异常时返回指定值。 - -- **重载** - - **1.** `(coro, exc, return_on_err=None) -> T | None` - - - **参数** - - - `coro` (Coroutine[Any, Any, T]) - - - `exc` (tuple[type[Exception], ...]) - - - `return_on_err` (None) - - - **返回** - - - T | None - - **2.** `(coro, exc, return_on_err) -> T | R` - - - **参数** - - - `coro` (Coroutine[Any, Any, T]) - - - `exc` (tuple[type[Exception], ...]) - - - `return_on_err` (R) - - - **返回** - - - T | R - -- **参数** - - - `coro`: 要运行的协程 - - - `exc`: 要捕获的异常 - - - `return_on_err`: 当发生异常时返回的值 - -- **返回** - - 协程的返回值或发生异常时的指定值 - -## _def_ `get_name(obj)` {#get-name} - -- **说明:** 获取对象的名称 - -- **参数** - - - `obj` (Any) - -- **返回** - - - str - -## _def_ `path_to_module_name(path)` {#path-to-module-name} - -- **说明:** 转换路径为模块名 - -- **参数** - - - `path` (Path) - -- **返回** - - - str - -## _def_ `resolve_dot_notation(obj_str, default_attr, default_prefix=None)` {#resolve-dot-notation} - -- **说明:** 解析并导入点分表示法的对象 - -- **参数** - - - `obj_str` (str) - - - `default_attr` (str) - - - `default_prefix` (str | None) - -- **返回** - - - Any - -## _class_ `classproperty(func)` {#classproperty} - -- **说明:** 类属性装饰器 - -- **参数** - - - `func` ((Any) -> T) - -## _class_ `DataclassEncoder()` {#DataclassEncoder} - -- **说明:** 可以序列化 [Message](adapters/index.md#Message)(List[Dataclass]) 的 `JSONEncoder` - -- **参数** - - auto - -### _method_ `default(o)` {#DataclassEncoder-default} - -- **参数** - - - `o` - -- **返回** - - - untyped - -## _def_ `logger_wrapper(logger_name)` {#logger-wrapper} - -- **说明:** 用于打印 adapter 的日志。 - -- **参数** - - - `logger_name` (str): adapter 的名称 - -- **返回** - - - untyped: 日志记录函数 - - 日志记录函数的参数: - - - level: 日志等级 - - message: 日志信息 - - exception: 异常信息 diff --git a/website/versioned_docs/version-2.3.1/appendices/api-calling.mdx b/website/versioned_docs/version-2.3.1/appendices/api-calling.mdx deleted file mode 100644 index ab6ce23d9ec1..000000000000 --- a/website/versioned_docs/version-2.3.1/appendices/api-calling.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -sidebar_position: 4 -description: 使用平台接口,完成更多功能 - -options: - menu: - - category: appendices - weight: 50 ---- - -# 使用平台接口 - -import Messenger from "@/components/Messenger"; - -在 NoneBot 中,除了使用事件响应器操作发送文本消息外,我们还可以直接通过使用协议适配器提供的方法来使用平台特定的接口,完成发送特殊消息、获取信息等其他平台提供的功能。同时,在部分无法使用事件响应器的情况中,例如[定时任务](../best-practice/scheduler.md),我们也可以使用平台接口来完成需要的功能。 - -## 发送平台特殊消息 - -在之前的章节中,我们介绍了如何向用户发送文本消息以及[如何处理平台消息](../tutorial/message.md),现在我们来向用户发送平台特殊消息。 - -:::caution 注意 -在以下的示例中,我们将使用 `Console` 协议适配器来演示如何发送平台消息。在实际使用中,你需要确保你使用的**消息序列类型**与你所要发送的**平台类型**一致。 -::: - -```python {4,7-17} title=weather/__init__.py -import inspect -from nonebot.adapters.console import MessageSegment - -@weather.got("location", prompt=MessageSegment.emoji("question") + "请输入地名") -async def got_location(location: str = ArgPlainText()): - result = await weather.send( - MessageSegment.markdown( - inspect.cleandoc( - f""" - # {location} - - - 今天 - - ⛅ 多云 20℃~24℃ - """ - ) - ) - ) -``` - - - -在上面的示例中,我们使用了 `Console` 协议适配器提供的 `MessageSegment` 类来发送平台特定的消息 `emoji` 和 `markdown`。这两种消息可以显示在终端中,但是无法在其他平台上使用。在事件响应器操作中,我们可以使用 `str`、消息序列、消息段、消息模板四种类型来发送消息,但其中只有 `str` 和[纯文本形式的消息模板类型](../tutorial/message.md#使用消息模板)消息可以在所有平台上使用。 - -`send` 事件响应器操作实际上是由协议适配器通过调用平台 API 来实现的,通常会将 API 调用的结果作为返回值返回。 - -## 调用平台 API - -在 NoneBot 中,我们可以通过 `Bot` 对象来调用协议适配器支持的平台 API,来完成更多的功能。 - -### 获取 Bot - -在调用平台 API 之前,我们首先要获得 Bot 对象。有两种方式可以获得 Bot 对象。 - -在事件处理流程的上下文中,我们可以直接使用依赖注入 Bot 来获取: - -```python {1,4} title=weather/__init__.py -from nonebot.adapters import Bot - -@weather.got("location", prompt="请输入地名") -async def got_location(bot: Bot, location: str = ArgPlainText()): - ... -``` - -依赖注入会确保你获得的 Bot 对象与类型注解的 Bot 类型一致。也就是说,如果你使用的是 Bot 基类,将会允许任何平台的 Bot 对象;如果你使用的是平台特定的 Bot 类型,将会只允许该平台的 Bot 对象,其他类型的 Bot 将会跳过这个事件处理函数。更多详情请参考[事件处理重载](./overload.md)。 - -在其他情况下,我们可以通过 NoneBot 提供的方法来获取 Bot 对象,这些方法将会在[使用适配器](../advanced/adapter.md#获取-bot-对象)中详细介绍: - -```python {4,6} -from nonebot import get_bot - -# 获取当前所有 Bot 中的第一个 -bot = get_bot() -# 获取指定 ID 的 Bot -bot = get_bot("bot_id") -``` - -### 调用 API - -在获得 Bot 对象后,我们可以通过 Bot 的实例方法来调用平台 API: - -```python {2,5} -# 通过 bot.api_name(**kwargs) 的方法调用 API -result = await bot.get_user_info(user_id=12345678) - -# 通过 bot.call_api(api_name, **kwargs) 的方法调用 API -result = await bot.call_api("get_user_info", user_id=12345678) -``` - -:::caution 注意 -实际可以使用的 API 以及参数取决于平台提供的接口以及协议适配器的实现,请参考协议适配器以及平台文档。 -::: - -在了解了如何调用 API 后,我们可以来改进 `weather` 插件,使得消息发送后,调用 `Console` 接口响铃提醒机器人用户: - -```python {4,18} title=weather/__init__.py -from nonebot.adapters.console import Bot, MessageSegment - -@weather.got("location", prompt=MessageSegment.emoji("question") + "请输入地名") -async def got_location(bot: Bot, location: str = ArgPlainText()): - await weather.send( - MessageSegment.markdown( - inspect.cleandoc( - f""" - # {location} - - - 今天 - - ⛅ 多云 20℃~24℃ - """ - ) - ) - ) - await bot.bell() -``` diff --git a/website/versioned_docs/version-2.3.1/appendices/config.mdx b/website/versioned_docs/version-2.3.1/appendices/config.mdx deleted file mode 100644 index 72a2fa79463e..000000000000 --- a/website/versioned_docs/version-2.3.1/appendices/config.mdx +++ /dev/null @@ -1,632 +0,0 @@ ---- -sidebar_position: 0 -description: 读取用户配置来控制插件行为 - -options: - menu: - - category: appendices - weight: 10 ---- - -# 配置 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -配置是项目中非常重要的一部分,为了方便我们控制机器人的行为,NoneBot 提供了一套配置系统。下面我们将会补充[指南](../quick-start.mdx)中的天气插件,使其能够读取用户配置。在这之前,我们需要先了解一下配置系统,如果你已经了解了 NoneBot 中的配置方法,可以跳转到[编写插件配置](#插件配置)。 - -NoneBot 使用 [`pydantic`](https://docs.pydantic.dev/) 以及 [`python-dotenv`](https://saurabh-kumar.com/python-dotenv/) 来读取 dotenv 配置文件以及环境变量,从而控制机器人行为。配置文件需要符合 dotenv 格式,复杂数据类型需使用 JSON 格式或 [pydantic 支持格式](https://docs.pydantic.dev/usage/types/)填写。 - -NoneBot 内置的配置项列表及含义可以在[内置配置项](#内置配置项)中查看。 - -:::caution 注意 - -NoneBot 自 2.2.0 起兼容了 Pydantic v1 与 v2 版本,以下文档中 Pydantic 相关示例均采用 v2 版本用法。 - -如果在使用商店或其他第三方插件的过程中遇到 Pydantic 相关警告或报错,例如: - -```python -pydantic_core._pydantic_core.ValidationError: 1 validation error for Config - Input should be a valid dictionary or instance of Config [type=model_type, input_value=Config(...), input_type=Config] -``` - -请考虑降级 Pydantic 至 v1 版本: - -```bash -pip install --force-reinstall 'pydantic~=1.10' -``` - -::: - -## 配置项的加载 - -在 NoneBot 中,我们可以把配置途径分为 **直接传入**、**系统环境变量**、**dotenv 配置文件** 三种,其加载优先级依次由高到低。 - -### 直接传入 - -在 NoneBot 初始化的过程中,可以通过 `nonebot.init()` 传入任意合法的 Python 变量,也可以在初始化完成后直接赋值。 - -通常,在初始化前的传参会在机器人的入口文件(如 `bot.py`)中进行,而初始化后的赋值可以在任何地方进行。 - -```python {4,8,9} title=bot.py -import nonebot - -# 初始化时 -nonebot.init(custom_config1="config on init") - -# 初始化后 -config = nonebot.get_driver().config -config.custom_config1 = "changed after init" -config.custom_config2 = "new config after init" -``` - -### 系统环境变量 - -在 dotenv 配置文件中定义的配置项,也会在环境变量中进行寻找。如果在环境变量中发现同名配置项(大小写不敏感),将会覆盖 dotenv 中所填值。 - -例如,在 dotenv 配置文件中存在配置项 `custom_config`: - -```dotenv -CUSTOM_CONFIG=config in dotenv -``` - -同时,设置环境变量: - -```bash -# windows cmd -set CUSTOM_CONFIG 'config in environment variables' -# windows powershell -$Env:CUSTOM_CONFIG='config in environment variables' -# linux/macOS -export CUSTOM_CONFIG='config in environment variables' -``` - -那最终 NoneBot 所读取的内容为环境变量中的内容,即 `config in environment variables`。 - -:::caution 注意 -NoneBot 不会自发读取未被定义的配置项的环境变量,如果需要读取某一环境变量需要在 dotenv 配置文件中进行声明。 -::: - -### dotenv 配置文件 - -dotenv 是一种便捷的跨平台配置通用模式,也是我们推荐的配置方式。 - -NoneBot 在启动时将会从系统环境变量或者 `.env` 文件中寻找配置项 `ENVIRONMENT` (大小写不敏感),默认值为 `prod`。这将决定 NoneBot 后续进一步加载环境配置的文件路径 `.env.{ENVIRONMENT}`。 - -#### 配置项解析 - -dotenv 文件中的配置值使用 JSON 进行解析。如果配置项值无法被解析,将作为**字符串**处理。例如: - -```dotenv -STRING_CONFIG=some string -LIST_CONFIG=[1, 2, 3] -DICT_CONFIG={"key": "value"} -MULTILINE_CONFIG=' -[ - { - "item_key": "item_value" - } -] -' -EMPTY_CONFIG= -NULL_CONFIG -``` - -将被解析为: - -```python -dotenv_config = { - "string_config": "some string", - "list_config": [1, 2, 3], - "dict_config": {"key": "value"}, - "multiline_config": [{"item_key": "item_value"}], - "empty_config": "", - "null_config": None -} -``` - -特别的,NoneBot 支持使用 `env_nested_delimiter` 配置嵌套字典,在层与层之间使用 `__` 分隔即可: - -```dotenv -DICT={"k1": "v1", "k2": null} -DICT__K2=v2 -DICT__K3=v3 -DICT__INNER__K4=v4 -``` - -将被解析为: - -```python -dotenv_config = { - "dict": { - "k1": "v1", - "k2": "v2", - "k3": "v3", - "inner": { - "k4": "v4" - } - } -} -``` - -#### .env 文件 - -`.env` 文件是基础配置文件,该文件中的配置项在不同环境下都会被加载,但会被 `.env.{ENVIRONMENT}` 文件中的配置所**覆盖**。 - -我们可以在 `.env` 文件中写入当前的环境信息: - -```dotenv -ENVIRONMENT=dev -COMMON_CONFIG=common config # 这个配置项在任何环境中都会被加载 -``` - -这样,我们在启动 NoneBot 时就会从 `.env.dev` 文件中加载剩余配置项。 - -:::tip 提示 -在生产环境中,可以通过设置环境变量 `ENVIRONMENT=prod` 来确保 NoneBot 读取正确的环境配置。 -::: - -#### .env.\{ENVIRONMENT\} 文件 - -`.env.{ENVIRONMENT}` 文件类似于预设,可以让我们在多套不同的配置方案中灵活切换,默认 NoneBot 会读取 `.env.prod` 配置。如果你使用了 `nb-cli` 创建 `simple` 项目,那么将含有两套预设配置:`.env.dev` 和 `.env.prod`。 - -在 NoneBot 初始化时,可以指定加载某个环境配置文件: - -```python -nonebot.init(_env_file=".env.dev") -``` - -这将忽略在 `.env` 文件或环境变量中指定的 `ENVIRONMENT` 配置项。 - -## 读取配置项 - -NoneBot 的全局配置对象可以通过 `driver` 获取,如: - -```python -import nonebot - -config = nonebot.get_driver().config -``` - -如果我们需要获取某个配置项,可以直接通过 `config` 对象的属性访问: - -```python -superusers = config.superusers -``` - -如果配置项不存在,将会抛出异常。 - -## 插件配置 - -在一个涉及大量配置项的项目中,通过直接读取配置项的方式显然并不高效。同时,由于额外的全局配置项没有预先定义,开发时编辑器将无法提示字段与类型,并且运行时没有对配置项直接进行合法性检查。那么就需要一种方式来规范定义插件配置项。 - -在 NoneBot 中,我们使用强大高效的 `pydantic` 来定义配置模型,这个模型可以被用于配置的读取和类型检查等。例如在 `weather` 插件目录中新建 `config.py` 来定义一个模型: - -```python title=weather/config.py -from pydantic import BaseModel, field_validator - -class Config(BaseModel): - weather_api_key: str - weather_command_priority: int = 10 - weather_plugin_enabled: bool = True - - @field_validator("weather_command_priority") - @classmethod - def check_priority(cls, v: int) -> int: - if v >= 1: - return v - raise ValueError("weather command priority must greater than 1") -``` - -在 `config.py` 中,我们定义了一个 `Config` 类,它继承自 `pydantic.BaseModel`,并定义了一些配置项。在 `Config` 类中,我们还定义了一个 `check_priority` 方法,它用于检查 `weather_command_priority` 配置项的合法性。更多关于 `pydantic` 的编写方式,可以参考 [pydantic 官方文档](https://docs.pydantic.dev/)。 - -在定义好配置模型后,我们可以在插件加载时获取全局配置,导入插件自身的配置模型并使用: - -```python {5,11} title=weather/__init__.py -from nonebot import get_plugin_config - -from .config import Config - -plugin_config = get_plugin_config(Config) - -weather = on_command( - "天气", - rule=to_me(), - aliases={"weather", "查天气"}, - priority=plugin_config.weather_command_priority, - block=True, -) -``` - -然后,我们便可以从 `plugin_config` 中读取配置了,例如 `plugin_config.weather_api_key`。 - -这种方式可以简洁、高效地读取配置项,同时也可以设置默认值或者在运行时对配置项进行合法性检查,防止由于配置项导致的插件出错等情况出现。 - -:::tip 提示 -发布插件应该为自身的事件响应器提供可配置的优先级,以便插件使用者可以自定义多个插件间的响应顺序。 -::: - -由于插件配置项是从全局配置中读取的,通常我们需要在配置项名称前面添加前缀名,以防止配置项冲突。例如在上方的示例中,我们就添加了配置项前缀 `weather_`。但是这样会导致在使用配置项时过长的变量名,因此我们可以使用 `pydantic` 的 `alias` 或者通过配置 scope 来简化配置项名称。这里我们以 scope 配置为例: - -```python title=weather/config.py -from pydantic import BaseModel - -class ScopedConfig(BaseModel): - api_key: str - command_priority: int = 10 - plugin_enabled: bool = True - -class Config(BaseModel): - weather: ScopedConfig -``` - -```python title=weather/__init__.py -from nonebot import get_plugin_config - -from .config import Config - -plugin_config = get_plugin_config(Config).weather -``` - -这样我们就可以省略插件配置项名称中的前缀 `weather_` 了。但需要注意的是,如果我们使用了 scope 配置,那么在配置文件中也需要使用 [`env_nested_delimiter` 格式](#配置项解析),例如: - -```dotenv -WEATHER__API_KEY=123456 -WEATHER__COMMAND_PRIORITY=10 -``` - -## 内置配置项 - -配置项 API 文档可以前往 [Config 类](../api/config.md#Config)查看。 - -### Driver - -- **类型**: `str` -- **默认值**: `"~fastapi"` - -NoneBot 运行所使用的驱动器。具体配置方法可以参考[安装驱动器](../tutorial/store.mdx#安装驱动器)和[选择驱动器](../advanced/driver.md)。 - - - - -```dotenv -DRIVER=~fastapi+~httpx+~websockets -``` - - - - -```bash -# windows cmd -set DRIVER '~fastapi+~httpx+~websockets' -# windows powershell -$Env:DRIVER='~fastapi+~httpx+~websockets' -# linux/macOS -export DRIVER='~fastapi+~httpx+~websockets' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(driver="~fastapi+~httpx+~websockets") -``` - - - - -### Host - -- **类型**: `IPvAnyAddress` -- **默认值**: `127.0.0.1` - -当 NoneBot 作为服务端时,监听的 IP / 主机名。 - - - - -```dotenv -HOST=127.0.0.1 -``` - - - - -```bash -# windows cmd -set HOST '127.0.0.1' -# windows powershell -$Env:HOST='127.0.0.1' -# linux/macOS -export HOST='127.0.0.1' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(host="127.0.0.1") -``` - - - - -### Port - -- **类型**: `int` (1 ~ 65535) -- **默认值**: `8080` - -当 NoneBot 作为服务端时,监听的端口。 - - - - -```dotenv -PORT=8080 -``` - - - - -```bash -# windows cmd -set PORT '8080' -# windows powershell -$Env:PORT='8080' -# linux/macOS -export PORT='8080' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(port=8080) -``` - - - - -### Log Level - -- **类型**: `int | str` -- **默认值**: `INFO` - -NoneBot 日志输出等级,可以为 `int` 类型等级或等级名称。具体等级对照表参考 [loguru 日志等级](https://loguru.readthedocs.io/en/stable/api/logger.html#levels)。 - -:::tip 提示 -日志等级名称应为大写,如 `INFO`。 -::: - - - - -```dotenv -LOG_LEVEL=DEBUG -``` - - - - -```bash -# windows cmd -set LOG_LEVEL 'DEBUG' -# windows powershell -$Env:LOG_LEVEL='DEBUG' -# linux/macOS -export LOG_LEVEL='DEBUG' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(log_level="DEBUG") -``` - - - - -### API Timeout - -- **类型**: `float | None` -- **默认值**: `30.0` - -调用平台接口的超时时间,单位为秒。`None` 表示不设置超时时间。 - - - - -```dotenv -API_TIMEOUT=10.0 -``` - - - - -```bash -# windows cmd -set API_TIMEOUT '10.0' -# windows powershell -$Env:API_TIMEOUT='10.0' -# linux/macOS -export API_TIMEOUT='10.0' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(api_timeout=10.0) -``` - - - - -### SuperUsers - -- **类型**: `set[str]` -- **默认值**: `set()` - -机器人超级用户,可以使用权限 [`SUPERUSER`](../api/permission.md#SUPERUSER)。 - - - - -```dotenv -SUPERUSERS=["123123123"] -``` - - - - -```bash -# windows cmd -set SUPERUSERS '["123123123"]' -# windows powershell -$Env:SUPERUSERS='["123123123"]' -# linux/macOS -export SUPERUSERS='["123123123"]' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(superusers={"123123123"}) -``` - - - - -### Nickname - -- **类型**: `set[str]` -- **默认值**: `set()` - -机器人昵称,通常协议适配器会根据用户是否 @bot 或者是否以机器人昵称开头来判断是否是向机器人发送的消息。 - - - - -```dotenv -NICKNAME=["bot"] -``` - - - - -```bash -# windows cmd -set NICKNAME '["bot"]' -# windows powershell -$Env:NICKNAME='["bot"]' -# linux/macOS -export NICKNAME='["bot"]' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(nickname={"bot"}) -``` - - - - -### Command Start 和 Command Separator - -- **类型**: `set[str]` -- **默认值**: - - Command Start: `{"/"}` - - Command Separator: `{"."}` - -命令消息的起始符和分隔符。用于 [`command`](../advanced/matcher.md#command) 规则。 - - - - -```dotenv -COMMAND_START=["/", ""] -COMMAND_SEP=[".", " "] -``` - - - - -```bash -# windows cmd -set COMMAND_START '["/", ""]' -set COMMAND_SEP '[".", " "]' -# windows powershell -$Env:COMMAND_START='["/", ""]' -$Env:COMMAND_SEP='[".", " "]' -# linux/macOS -export COMMAND_START='["/", ""]' -export COMMAND_SEP='[".", " "]' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(command_start={"/", ""}, command_sep={".", " "}) -``` - - - - -### Session Expire Timeout - -- **类型**: `timedelta` -- **默认值**: `timedelta(minutes=2)` - -用户会话超时时间,配置格式参考 [Datetime Types](https://docs.pydantic.dev/latest/api/standard_library_types/#datetimetimedelta)。 - - - - -```dotenv -SESSION_EXPIRE_TIMEOUT=00:02:00 -``` - - - - -```bash -# windows cmd -set SESSION_EXPIRE_TIMEOUT '00:02:00' -# windows powershell -$Env:SESSION_EXPIRE_TIMEOUT='00:02:00' -# linux/macOS -export SESSION_EXPIRE_TIMEOUT='00:02:00' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(session_expire_timeout=120) -``` - - - diff --git a/website/versioned_docs/version-2.3.1/appendices/log.md b/website/versioned_docs/version-2.3.1/appendices/log.md deleted file mode 100644 index 7fb68686f172..000000000000 --- a/website/versioned_docs/version-2.3.1/appendices/log.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -sidebar_position: 6 -description: 记录与控制日志 - -options: - menu: - - category: appendices - weight: 70 ---- - -# 日志 - -无论是在开发还是在生产环境中,日志都是一个重要的功能,可以帮助我们了解运行状况、排查问题等。虽然我们可以使用 `print` 来将需要的信息输出到控制台,但是这种方式难以控制,而且不利于日志的归档、分析等。NoneBot 使用优秀的 [Loguru](https://loguru.readthedocs.io/) 库来进行日志记录。 - -## 记录日志 - -我们可以从 NoneBot 中导入 `logger` 对象,然后使用 `logger` 对象的方法来记录日志。 - -```python -from nonebot import logger - -logger.trace("This is a trace message") -logger.debug("This is a debug message") -logger.info("This is an info message") -logger.success("This is a success message") -logger.warning("This is a warning message") -logger.error("This is an error message") -logger.critical("This is a critical message") -``` - -我们仅需一行代码即可记录对应级别的日志。日志可以通过配置 [`LOG_LEVEL` 配置项](./config.mdx#log-level)来过滤输出等级,控制台中仅会输出大于等于 `LOG_LEVEL` 的日志。默认的 `LOG_LEVEL` 为 `INFO`,即只会输出 `INFO`、`SUCCESS`、`WARNING`、`ERROR`、`CRITICAL` 级别的日志。 - -如果需要记录 `Exception traceback` 日志,可以向 `logger` 添加 `exception` 选项: - -```python {4} -try: - 1 / 0 -except ZeroDivisionError: - logger.opt(exception=True).error("ZeroDivisionError") -``` - -如果需要输出彩色日志,可以向 `logger` 添加 `colors` 选项: - -```python -logger.opt(colors=True).warning("We got a BIG problem") -``` - -更多日志记录方法请参考 [Loguru 文档](https://loguru.readthedocs.io/)。 - -## 自定义日志输出 - -NoneBot 在启动时会添加一个默认的日志处理器,该处理器会将日志输出到**stdout**,并且根据 `LOG_LEVEL` 配置项过滤日志等级。 - -默认的日志格式为: - -```text -{time:MM-DD HH:mm:ss} [{level}] {name} | {message} -``` - -我们可以从 `nonebot.log` 模块导入以使用 NoneBot 的默认格式和过滤器: - -```python -from nonebot.log import default_format, default_filter -``` - -如果需要自定义日志格式,我们需要移除 NoneBot 默认的日志处理器并添加新的日志处理器。例如,在机器人入口文件中 `nonebot.init` 之前添加以下内容: - -```python title=bot.py -from nonebot.log import logger_id - -# 移除 NoneBot 默认的日志处理器 -logger.remove(logger_id) -# 添加新的日志处理器 -logger.add( - sys.stdout, - level=0, - diagnose=True, - format="{time:MM-DD HH:mm:ss} [{level}] {name} | {message}", - filter=default_filter -) -``` - -如果想要输出日志到文件,我们可以使用 `logger.add` 方法添加文件处理器: - -```python title=bot.py -logger.add("error.log", level="ERROR", format=default_format, rotation="1 week") -``` - -更多日志处理器的使用方法请参考 [Loguru 文档](https://loguru.readthedocs.io/)。 - -## 重定向 logging 日志 - -`logging` 是 Python 标准库中的日志模块,NoneBot 提供了一个 logging handler 用于将 `logging` 日志重定向到 `loguru` 处理。 - -```python -from nonebot.log import LoguruHandler - -# root logger 添加 LoguruHandler -logging.basicConfig(handlers=[LoguruHandler()]) -# 或者为其他 logging.Logger 添加 LoguruHandler -logger.addHandler(LoguruHandler()) -``` diff --git a/website/versioned_docs/version-2.3.1/appendices/overload.md b/website/versioned_docs/version-2.3.1/appendices/overload.md deleted file mode 100644 index 2ade4b5b5825..000000000000 --- a/website/versioned_docs/version-2.3.1/appendices/overload.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -sidebar_position: 7 -description: 根据事件类型进行不同的处理 - -options: - menu: - - category: appendices - weight: 80 ---- - -# 事件类型与重载 - -在之前的示例中,我们已经了解了如何[获取事件信息](../tutorial/event-data.mdx)以及[使用平台接口](./api-calling.mdx)。但是,事件信息通常不仅仅包含消息这一个内容,还有其他平台提供的信息,例如消息发送时间、消息发送者等等。同时,在使用平台接口时,我们需要确保使用的**平台接口**与所要发送的**平台类型**一致,对不同类型的事件需要做出不同的处理。在本章节中,我们将介绍如何获取事件更多的信息以及根据事件类型进行不同的处理。 - -## 事件类型 - -在 NoneBot 中,事件均是 `nonebot.adapters.Event` 基类的子类型,基类对一些必要的属性进行了抽象,子类型则根据不同的平台进行了实现。在[自定义权限](./permission.mdx#自定义权限)一节中,我们就使用了 `Event` 的抽象方法 `get_user_id` 来获取事件发送者 ID,这个方法由协议适配器进行了实现,返回机器人用户对应的平台 ID。更多的基类抽象方法可以在[使用适配器](../advanced/adapter.md#获取事件通用信息)中查看。 - -既然事件是基类的子类型,我们实际可以获得的信息通常多于基类抽象方法所提供的。如果我们不满足于基类能获得的信息,我们可以小小的修改一下事件处理函数的事件参数类型注解,使其变为子类型,这样我们就可以通过协议适配器定义的子类型来获取更多的信息。我们以 `Console` 协议适配器为例: - -```python {4} title=weather/__init__.py -from nonebot.adapters.console import MessageEvent - -@weather.got("location", prompt="请输入地名") -async def got_location(event: MessageEvent, location: str = ArgPlainText()): - await weather.finish(f"{event.time.strftime('%Y-%m-%d')} {location} 的天气是...") -``` - -在上面的代码中,我们获取了 `Console` 协议适配器的消息事件提供的发送时间 `time` 属性。 - -:::caution 注意 -如果**基类**就能满足你的需求,那么就**不要修改**事件参数类型注解,这样可以使你的代码更加**通用**,可以在更多平台上运行。如何根据不同平台事件类型进行不同的处理,我们将在[重载](#重载)一节中介绍。 -::: - -## 重载 - -我们在编写机器人时,常常会遇到这样一个问题:如何对私聊和群聊消息进行不同的处理?如何对不同平台的事件进行不同的处理?针对这些问题,NoneBot 提供了一个便捷而高效的解决方案 ── 重载。简单来说,依赖函数会根据其参数的类型注解来决定是否执行,忽略不符合其参数类型注解的情况。这样,我们就可以通过修改事件参数类型注解来实现对不同事件的处理,或者修改 `Bot` 参数类型注解来实现使用不同平台的接口。我们以 `OneBot` 协议适配器为例: - -```python {4,8} -from nonebot.adapters.onebot.v11 import PrivateMessageEvent, GroupMessageEvent - -@matcher.handle() -async def handle_private(event: PrivateMessageEvent): - await matcher.finish("私聊消息") - -@matcher.handle() -async def handle_group(event: GroupMessageEvent): - await matcher.finish("群聊消息") -``` - -这样,机器人用户就会在私聊和群聊中分别收到不同的回复。同样的,我们也可以通过修改 `Bot` 参数类型注解来实现使用不同平台的接口: - -```python -from nonebot.adapters.console import Bot as ConsoleBot -from nonebot.adapters.onebot.v11 import Bot as OneBot - -@matcher.handle() -async def handle_console(bot: ConsoleBot): - await bot.bell() - -@matcher.handle() -async def handle_onebot(bot: OneBot): - await bot.send_group_message(group_id=123123, message="OneBot") -``` - -:::caution 注意 -重载机制对所有的参数类型注解都有效,因此,依赖注入也可以使用这个特性来对不同的返回值进行处理。 - -但 Bot、Event 和 Matcher 三者的参数类型注解具有最高检查优先级,如果三者任一类型注解不匹配,那么其他依赖注入将不会执行(如:`Depends`)。 -::: - -:::tip 提示 -如何更好地编写一个跨平台的插件,我们将在[最佳实践](../best-practice/multi-adapter.mdx)中介绍。 -::: diff --git a/website/versioned_docs/version-2.3.1/appendices/permission.mdx b/website/versioned_docs/version-2.3.1/appendices/permission.mdx deleted file mode 100644 index eac451839753..000000000000 --- a/website/versioned_docs/version-2.3.1/appendices/permission.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -sidebar_position: 5 -description: 控制事件响应器的权限 - -options: - menu: - - category: appendices - weight: 60 ---- - -# 权限控制 - -import Messenger from "@site/src/components/Messenger"; - -**权限控制**是机器人在实际应用中需要解决的重点问题之一,NoneBot 提供了灵活的权限控制机制 —— `Permission`。 - -类似于响应规则 `Rule`,`Permission` 是由非负整数个 `PermissionChecker` 所共同组成的**用于筛选事件**的对象。但需要特别说明的是,权限和响应规则有如下区别: - -1. 权限检查**先于**响应规则检查 -2. `Permission` 只需**其中一个** `PermissionChecker` 返回 `True` 时就会检查通过 -3. 权限检查进行时,上下文中并不存在会话状态 `state` -4. `Rule` 仅在**初次触发**事件响应器时进行检查,在余下的会话中并不会限制事件;而 `Permission` 会**持续生效**,在连续对话中一直对事件主体加以限制。 - -## 基础使用 - -通常情况下,`Permission` 更侧重于对于**触发事件的机器人用户**的筛选,例如由 NoneBot 自身提供的 `SUPERUSER` 权限,便是筛选出会话发起者是否为超级用户。它可以对输入的用户进行鉴别,如果符合要求则会被认为通过并返回 `True`,反之则返回 `False`。 - -简单来说,`Permission` 是一个用于筛选出符合要求的用户的机制,可以通过 `Permission` 精确的控制响应对象的覆盖范围,从而拒绝掉我们所不希望的事件。 - -例如,我们可以在 `weather` 插件中添加一个超级用户可用的指令: - -```python {2,8} title=weather/__init__.py -from typing import Tuple -from nonebot.permission import SUPERUSER - -manage = on_command( - ("天气", "启用"), - rule=to_me(), - aliases={("天气", "禁用")}, - permission=SUPERUSER, -) - -@manage.handle() -async def control(cmd: Tuple[str, str] = Command()): - _, action = cmd - if action == "启用": - plugin_config.weather_plugin_enabled = True - elif action == "禁用": - plugin_config.weather_plugin_enabled = False - await manage.finish(f"天气插件已{action}") -``` - -如上方示例所示,在注册事件响应器时,我们设置了 `permission` 参数,那么这个事件处理器在触发事件前的检查阶段会对用户身份进行验证,如果不符合我们设置的条件(此处即为**超级用户**)则不会响应。此时,我们向机器人发送 `/天气.禁用` 指令,机器人不会有任何响应,因为我们还不是机器人的超级管理员。我们在 dotenv 文件中设置了 `SUPERUSERS` 配置项之后,机器人就会响应我们的指令了。 - -```dotenv title=.env -SUPERUSERS=["console_user"] -``` - - - -## 自定义权限 - -与事件响应规则类似,`PermissionChecker` 也是一个返回值为 `bool` 类型的依赖函数,即 `PermissionChecker` 支持依赖注入。例如,我们可以限制用户的指令调用次数: - -```python title=weather/__init__.py -from nonebot.adapters import Event - -fake_db: Dict[str, int] = {} - -async def limit_permission(event: Event): - count = fake_db.setdefault(event.get_user_id(), 100) - if count > 0: - fake_db[event.get_user_id()] -= 1 - return True - return False - -weather = on_command("天气", permission=limit_permission) -``` - -## 权限组合 - -权限之间可以通过 `|` 运算符进行组合,使得任意一个权限检查返回 `True` 时通过。例如: - -```python {4-6} -perm1 = Permission(foo_checker) -perm2 = Permission(bar_checker) - -perm = perm1 | perm2 -perm = perm1 | bar_checker -perm = foo_checker | perm2 -``` - -同样的,我们也无需担心组合了一个 `None` 值,`Permission` 会自动忽略 `None` 值。 - -```python -assert (perm | None) is perm -``` - -## 主动使用权限 - -除了在事件响应器中使用权限外,我们也可以主动使用权限来判断事件是否符合条件。例如: - -```python {3} -perm = Permission(some_checker) - -result: bool = await perm(bot, event) -``` - -我们只需要传入 `Bot` 实例、事件,`Permission` 会并发调用所有 `PermissionChecker` 进行检查,并返回结果。 diff --git a/website/versioned_docs/version-2.3.1/appendices/rule.md b/website/versioned_docs/version-2.3.1/appendices/rule.md deleted file mode 100644 index a4e55a87dfdf..000000000000 --- a/website/versioned_docs/version-2.3.1/appendices/rule.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -sidebar_position: 1 -description: 自定义响应规则 - -options: - menu: - - category: appendices - weight: 20 ---- - -# 响应规则 - -机器人在实际应用中,往往会接收到多种多样的事件类型,NoneBot 通过响应规则来控制事件的处理。 - -在[指南](../tutorial/matcher.md#为事件响应器添加参数)中,我们为 `weather` 命令添加了一个 `rule=to_me()` 参数,这个参数就是一个响应规则,确保只有在私聊或者 `@bot` 时才会响应。 - -响应规则是一个 `Rule` 对象,它由一系列的 `RuleChecker` 函数组成,每个 `RuleChecker` 函数都会检查事件是否符合条件,如果所有的检查都通过,则事件会被处理。 - -## RuleChecker - -`RuleChecker` 是一个返回值为 `bool` 类型的依赖函数,即 `RuleChecker` 支持依赖注入。我们可以根据上一节中添加的[配置项](./config.mdx#插件配置),在 `weather` 插件目录中编写一个响应规则: - -```python {3,4} title=weather/__init__.py -plugin_config = get_plugin_config(Config) - -async def is_enable() -> bool: - return plugin_config.weather_plugin_enabled - -weather = on_command("天气", rule=is_enable) -``` - -在上面的代码中,我们定义了一个函数 `is_enable`,它会检查配置项 `weather_plugin_enabled` 是否为 `True`。这个函数 `is_enable` 即为一个 `RuleChecker`。 - -## Rule - -`Rule` 是若干个 `RuleChecker` 的集合,它会并发调用每个 `RuleChecker`,只有当所有 `RuleChecker` 检查通过时匹配成功。例如:我们可以组合两个 `RuleChecker`,一个用于检查插件是否启用,一个用于检查用户是否在黑名单中: - -```python {10} -from nonebot.rule import Rule -from nonebot.adapters import Event - -async def is_enable() -> bool: - return plugin_config.weather_plugin_enabled - -async def is_blacklisted(event: Event) -> bool: - return event.get_user_id() not in BLACKLIST - -rule = Rule(is_enable, is_blacklisted) - -weather = on_command("天气", rule=rule) -``` - -## 合并响应规则 - -在定义响应规则时,我们可以将规则进行细分,来更好地复用规则。而在使用时,我们需要合并多个规则。除了使用 `Rule` 对象来组合多个 `RuleChecker` 外,我们还可以对 `Rule` 对象进行合并。在原 `weather` 插件中,我们可以将 `rule=to_me()` 与 `rule=is_enable` 使用 `&` 运算符合并: - -```python {10} title=weather/__init__.py -from nonebot.rule import to_me - -plugin_config = get_plugin_config(Config) - -async def is_enable() -> bool: - return plugin_config.weather_plugin_enabled - -weather = on_command( - "天气", - rule=to_me() & is_enable, - aliases={"weather", "查天气"}, - priority=plugin_config.weather_command_priority - block=True, -) -``` - -这样,`weather` 命令就只会在插件启用且在私聊或者 `@bot` 时才会响应。 - -合并响应规则可以有多种形式,例如: - -```python {4-6} -rule1 = Rule(foo_checker) -rule2 = Rule(bar_checker) - -rule = rule1 & rule2 -rule = rule1 & bar_checker -rule = foo_checker & rule2 -``` - -同时,我们也无需担心合并了一个 `None` 值,`Rule` 会忽略 `None` 值。 - -```python -assert (rule & None) is rule -``` - -## 主动使用响应规则 - -除了在事件响应器中使用响应规则外,我们也可以主动使用响应规则来判断事件是否符合条件。例如: - -```python {3} -rule = Rule(some_checker) - -result: bool = await rule(bot, event, state) -``` - -我们只需要传入 `Bot` 对象、事件和会话状态,`Rule` 会并发调用所有 `RuleChecker` 进行检查,并返回结果。 - -## 内置响应规则 - -NoneBot 内置了一些常用的响应规则,可以直接通过事件响应器辅助函数或者自行合并其他规则使用。内置响应规则列表可以参考[事件响应器进阶](../advanced/matcher.md) diff --git a/website/versioned_docs/version-2.3.1/appendices/session-control.mdx b/website/versioned_docs/version-2.3.1/appendices/session-control.mdx deleted file mode 100644 index c98bf2bf2b0f..000000000000 --- a/website/versioned_docs/version-2.3.1/appendices/session-control.mdx +++ /dev/null @@ -1,397 +0,0 @@ ---- -sidebar_position: 2 -description: 更灵活的会话控制 - -options: - menu: - - category: appendices - weight: 30 ---- - -# 会话控制 - -import Messenger from "@site/src/components/Messenger"; - -在[指南](../tutorial/event-data.mdx#使用依赖注入)的 `weather` 插件中,我们使用依赖注入获取了机器人用户发送的地名参数,并根据地名参数进行相应的回复。但是,一问一答的对话模式仅仅适用于简单的对话场景,如果我们想要实现更复杂的对话模式,就需要使用会话控制。 - -## 询问并获取用户输入 - -在 `weather` 插件中,我们对于用户未输入地名参数的情况直接回复了 `请输入地名` 并结束了事件流程。但是,这样用户体验并不好,需要重新输入指令和地名参数才能获取天气回复。我们现在来实现询问并获取用户地名参数的功能。 - -### 询问用户 - -我们可以使用事件响应器操作中的 `got` 装饰器来表示当前事件处理流程需要询问并获取用户输入的消息: - -```python {6} title=weather/__init__.py -@weather.handle() -async def handle_function(args: Message = CommandArg()): - if location := args.extract_plain_text(): - await weather.finish(f"今天{location}的天气是...") - -@weather.got("location", prompt="请输入地名") -async def got_location(): - ... -``` - -在上面的代码中,我们使用 `got` 事件响应器操作来向用户发送 `prompt` 消息,并等待用户的回复。用户的回复消息将会被作为 `location` 参数存储于事件响应器状态中。 - -:::tip 提示 -事件处理函数根据定义的顺序依次执行。 -::: - -### 获取用户输入 - -在询问以及用户回复之后,我们就可以获取到我们需要的 `location` 参数了。我们使用 `ArgPlainText` 依赖注入来获取参数纯文本信息: - -```python {9} title=weather/__init__.py -from nonebot.params import ArgPlainText - -@weather.handle() -async def handle_function(args: Message = CommandArg()): - if location := args.extract_plain_text(): - await weather.finish(f"今天{location}的天气是...") - -@weather.got("location", prompt="请输入地名") -async def got_location(location: str = ArgPlainText()): - await weather.finish(f"今天{location}的天气是...") -``` - - - -在上面的代码中,我们在 `got_location` 函数中定义了一个依赖注入参数 `location`,他的值将会是用户回复的消息纯文本信息。获取到用户输入的地名参数后,我们就可以进行天气查询并回复了。 - -:::tip 提示 -如果想要获取用户回复的消息对象 `Message` ,可以使用 `Arg` 依赖注入。 -::: - -### 跳过询问 - -在上面的代码中,如果用户在输入天气指令时,同时提供了地名参数,我们直接回复了天气信息,这部分的逻辑是和询问用户地名参数之后的逻辑一致的。如果在复杂的业务场景下,我们希望这部分代码应该复用以减少代码冗余。我们可以使用事件响应器操作中的 `set_arg` 来主动设置一个参数: - -```python {4,6} title=weather/__init__.py -from nonebot.matcher import Matcher - -@weather.handle() -async def handle_function(matcher: Matcher, args: Message = CommandArg()): - if args.extract_plain_text(): - matcher.set_arg("location", args) - -@weather.got("location", prompt="请输入地名") -async def got_location(location: str = ArgPlainText()): - await weather.finish(f"今天{location}的天气是...") -``` - -请注意,设置参数需要使用依赖注入来获取 `Matcher` 实例以确保上下文正确,且参数值应为 `Message` 对象。 - -在 `location` 参数被设置之后,`got` 事件响应器操作将不再会询问并等待用户的回复,而是直接进入 `got_location` 函数。 - -## 请求重新输入 - -在实际的业务场景中,用户的输入很有可能并非是我们所期望的,而结束事件处理流程让用户重新发送指令也不是一个好的体验。这时我们可以使用 `reject` 事件响应器操作来请求用户重新输入: - -```python {8,9} title=weather/__init__.py -@weather.handle() -async def handle_function(matcher: Matcher, args: Message = CommandArg()): - if args.extract_plain_text(): - matcher.set_arg("location", args) - -@weather.got("location", prompt="请输入地名") -async def got_location(location: str = ArgPlainText()): - if location not in ["北京", "上海", "广州", "深圳"]: - await weather.reject(f"你想查询的城市 {location} 暂不支持,请重新输入!") - await weather.finish(f"今天{location}的天气是...") -``` - - - -在上面的代码中,我们在 `got_location` 函数中判断用户输入的地名是否在支持的城市列表中,如果不在,则使用 `reject` 事件响应器操作。操作将会向用户发送 `reject` 参数中的消息,并等待用户回复后,重新执行 `got_location` 函数。通过 `got` 和 `reject` 事件响应器操作,我们实现了类似于**循环**的执行方式。 - -`reject` 事件响应器操作与 `finish` 类似,NoneBot 会在向机器人用户发送消息内容后抛出 `RejectedException` 异常来暂停事件响应流程以等待用户输入。也就是说,在 `reject` 被执行后,后续的程序同样是不会被执行的。 - -## 更多事件响应器操作 - -在之前的章节中,我们已经大致了解了五个事件响应器操作:`handle`、`got`、`finish`、`send` 和 `reject`。现在我们来完整地介绍一下这些操作。 - -事件响应器操作可以分为两大类:**交互操作**和**流程控制操作**。我们可以通过交互操作来与用户进行交互,而流程控制操作则可以用来控制事件处理流程的执行。 - -:::tip 提示 -事件处理流程按照事件处理函数添加顺序执行,已经结束的事件处理函数不可能被恢复执行。 -::: - -### handle - -`handle` 事件响应器操作是一个装饰器,用于向事件处理流程添加一个事件处理函数。 - -```python -@matcher.handle() -async def handle_func(): - ... -``` - -`handle` 装饰器支持嵌套操作,即一个事件处理函数可以被添加多次: - -```python -@matcher.handle() -@matcher.handle() -async def handle_func(): - # 这个函数会被执行两次 - ... -``` - -### got - -`got` 事件响应器操作也是一个装饰器,它会在当前装饰的事件处理函数运行之前,中断当前事件处理流程,等待接收一个新的事件。它可以通过 `prompt` 参数来向用户发送询问消息,然后等待用户的回复消息,贴近对话形式会话。 - -`got` 装饰器接受一个参数 `key` 和一个可选参数 `prompt`。当会话状态中不存在 `key` 对应的消息时,会向用户发送 `prompt` 参数的消息,并等待用户回复。`prompt` 参数的类型和 [`send`](#send) 事件响应器操作的参数类型一致。 - -在事件处理函数中,可以通过依赖注入的方式来获取接收到的消息,参考:[`Arg`](../advanced/dependency.mdx#arg)、[`ArgStr`](../advanced/dependency.mdx#argstr)、[`ArgPlainText`](../advanced/dependency.mdx#argplaintext)。 - -```python -@matcher.got("key", prompt="请输入...") -async def got_func(key: Message = Arg()): - ... -``` - -`got` 装饰器支持与 `got` 和 `receive` 装饰器嵌套操作,即一个事件处理函数可以在接收多个事件或消息后执行: - -```python -@matcher.got("key1", prompt="请输入key1...") -@matcher.got("key2", prompt="请输入key2...") -@matcher.receive("key3") -async def got_func(key1: Message = Arg(), key2: Message = Arg(), key3: Event = Received("key3")): - ... -``` - -### receive - -`receive` 事件响应器操作也是一个装饰器,它会在当前装饰的事件处理函数运行之前,中断当前事件处理流程,等待接收一个新的事件。与 `got` 不同的是,`receive` 不会向用户发送询问消息,并且等待一个用户事件。可以接收的事件类型取决于[会话更新](../advanced/session-updating.md)。 - -`receive` 装饰器接受一个可选参数 id,用于标识当前需要接收的事件,如果不指定,则默认为空 `""`。 - -在事件处理函数中,可以通过依赖注入的方式来获取接收到的事件,参考:[`Received`](../advanced/dependency.mdx#received)、[`LastReceived`](../advanced/dependency.mdx#lastreceived)。 - -```python -@matcher.receive("id") -async def receive_func(event: Event = Received("id")): - ... -``` - -`receive` 装饰器支持与 `got` 和 `receive` 装饰器嵌套操作,即一个事件处理函数可以在接收多个事件或消息后执行: - -```python -@matcher.receive("key1") -@matcher.got("key2", prompt="请输入key2...") -@matcher.got("key3", prompt="请输入key3...") -async def receive_func(key1: Event = Received("key1"), key2: Message = Arg(), key3: Message = Arg()): - ... -``` - -### send - -`send` 事件响应器操作用于向用户回复一条消息。协议适配器会根据当前 event 选择回复的途径。 - -`send` 操作接受一个参数 message 和其他任何协议适配器接受的参数。message 参数类型可以是字符串、消息序列、消息段或者消息模板。消息模板将会使用会话状态字典进行渲染后发送。 - -这个操作等同于使用 `bot.send(event, message, **kwargs)`,但不需要自行传入 `event`。 - -```python -@matcher.handle() -async def _(): - await matcher.send("Hello world!") -``` - -### finish - -向用户回复一条消息(可选),并立即结束**整个处理流程**。 - -参数与 [`send`](#send) 相同。 - -```python -@matcher.handle() -async def _(): - await matcher.finish("Hello world!") - # 下面的代码不会被执行 -``` - -### pause - -向用户回复一条消息(可选),立即结束**当前**事件处理函数,等待接收一个新的事件后进入**下一个**事件处理函数。 - -参数与 [`send`](#send) 相同。 - -```python -@matcher.handle() -async def _(): - if need_confirm: - await matcher.pause("请在两分钟内确认执行") - -@matcher.handle() -async def _(): - ... -``` - -### reject - -向用户回复一条消息(可选),立即结束**当前**事件处理函数,等待接收一个新的事件后再次执行**当前**事件处理函数。 - -`reject` 可以用于拒绝当前 `receive` 接收的事件或 `got` 接收的参数。通常在用户回复不符合格式或标准需要重新输入,或者用于循环进行用户交互。 - -参数与 [`send`](#send) 相同。 - -```python -@matcher.got("arg") -async def _(arg: str = ArgPlainText()): - if not is_valid(arg): - await matcher.reject("Invalid arg!") -``` - -### reject_arg - -向用户回复一条消息(可选),立即结束**当前**事件处理函数,等待接收一个新的消息后再次执行**当前**事件处理函数。 - -`reject_arg` 用于拒绝指定 `got` 接收的参数,通常在嵌套装饰器时使用。 - -`reject_arg` 操作接受一个 key 参数以及可选的 prompt 参数。prompt 参数与 [`send`](#send) 相同。 - -```python -@matcher.got("a") -@matcher.got("b") -async def _(a: str = ArgPlainText(), b: str = ArgPlainText()): - if a not in b: - await matcher.reject_arg("a", "Invalid a!") -``` - -### reject_receive - -向用户回复一条消息(可选),立即结束**当前**事件处理函数,等待接收一个新的事件后再次执行**当前**事件处理函数。 - -`reject_receive` 用于拒绝指定 `receive` 接收的事件,通常在嵌套装饰器时使用。 - -`reject_receive` 操作接受一个可选的 id 参数以及可选的 prompt 参数。id 参数默认为空 `""`,prompt 参数与 [`send`](#send) 相同。 - -```python -@matcher.receive("a") -@matcher.receive("b") -async def _(a: Event = Received("a"), b: Event = Received("b")): - if a.get_user_id() != b.get_user_id(): - await matcher.reject_receive("a") -``` - -### skip - -立即结束当前事件处理函数,进入下一个事件处理函数。 - -通常在依赖注入中使用,用于跳过当前事件处理函数的执行。 - -```python -from nonebot.params import Depends - -async def dependency(): - matcher.skip() - -@matcher.handle() -async def _(check=Depends(dependency)): - # 这个函数不会被执行 -``` - -### stop_propagation - -阻止事件向更低优先级的事件响应器传播。 - -```python -from nonebot.matcher import Matcher - -@foo.handle() -async def _(matcher: Matcher): - matcher.stop_propagation() -``` - -:::caution 注意 -`stop_propagation` 操作是实例方法,需要先通过依赖注入获取事件响应器实例再进行调用。 -::: - -### get_arg - -获取一个 `got` 接收的参数。 - -`get_arg` 操作接受一个 key 参数和一个可选的 default 参数。当参数不存在时,将返回 default 或 `None`。 - -```python -from nonebot.matcher import Matcher - -@matcher.handle() -async def _(matcher: Matcher): - key = matcher.get_arg("key", default=None) -``` - -### set_arg - -设置 / 覆盖一个 `got` 接收的参数。 - -`set_arg` 操作接受一个 key 参数和一个 value 参数。请注意,value 参数必须是消息序列对象,如需存储其他数据请使用[会话状态](./session-state.md)。 - -```python -from nonebot.matcher import Matcher - -@matcher.handle() -async def _(matcher: Matcher): - matcher.set_arg("key", Message("value")) -``` - -### get_receive - -获取一个 `receive` 接收的事件。 - -`get_receive` 操作接受一个 id 参数和一个可选的 default 参数。当事件不存在时,将返回 default 或 `None`。 - -```python -from nonebot.matcher import Matcher - -@matcher.handle() -async def _(matcher: Matcher): - event = matcher.get_receive("id", default=None) -``` - -### get_last_receive - -获取最近的一个 `receive` 接收的事件。 - -`get_last_receive` 操作接受一个可选的 default 参数。当事件不存在时,将返回 default 或 `None`。 - -```python -from nonebot.matcher import Matcher - -@matcher.handle() -async def _(matcher: Matcher): - event = matcher.get_last_receive(default=None) -``` - -### set_receive - -设置 / 覆盖一个 `receive` 接收的事件。 - -`set_receive` 操作接受一个 id 参数和一个 event 参数。请注意,event 参数必须是事件对象,如需存储其他数据请使用[会话状态](./session-state.md)。 - -```python -from nonebot.matcher import Matcher - -@matcher.handle() -async def _(matcher: Matcher): - matcher.set_receive("key", Event()) -``` diff --git a/website/versioned_docs/version-2.3.1/appendices/session-state.md b/website/versioned_docs/version-2.3.1/appendices/session-state.md deleted file mode 100644 index d6780fc9921e..000000000000 --- a/website/versioned_docs/version-2.3.1/appendices/session-state.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -sidebar_position: 3 -description: 会话状态信息 - -options: - menu: - - category: appendices - weight: 40 ---- - -# 会话状态 - -在事件处理流程中,和用户交互的过程即是会话。在会话中,我们可能需要记录一些信息,例如用户的重试次数等等,以便在会话中的不同阶段进行判断和处理。这些信息都可以存储于会话状态中。 - -NoneBot 中的会话状态是一个字典,可以通过类型 `T_State` 来获取。字典内可以存储任意类型的数据,但是要注意的是,NoneBot 本身会在会话状态中存储一些信息,因此不要使用 [NoneBot 使用的键名](../api/consts.md)。 - -```python -from nonebot.typing import T_State - -@matcher.got("key", prompt="请输入密码") -async def _(state: T_State, key: str = ArgPlainText()): - if key != "some password": - try_count = state.get("try_count", 1) - if try_count >= 3: - await matcher.finish("密码错误次数过多") - else: - state["try_count"] = try_count + 1 - await matcher.reject("密码错误,请重新输入") - await matcher.finish("密码正确") -``` - -会话状态的生命周期与事件处理流程相同,在期间的任何一个事件处理函数都可以进行读写。 - -```python -from nonebot.typing import T_State - -@matcher.handle() -async def _(state: T_State): - state["key"] = "value" - -@matcher.handle() -async def _(state: T_State): - await matcher.finish(state["key"]) -``` - -会话状态还可以用于发送动态消息,消息模板在发送时会使用会话状态字典进行渲染。消息模板的使用方法已经在[消息处理](../tutorial/message.md#使用消息模板)中介绍过,这里不再赘述。 - -```python -from nonebot.typing import T_State -from nonebot.adapters import MessageTemplate - -@matcher.handle() -async def _(state: T_State): - state["username"] = "user" - -@matcher.got("password", prompt=MessageTemplate("请输入 {username} 的密码")) -async def _(): - await matcher.finish(MessageTemplate("密码为 {password}")) -``` diff --git a/website/versioned_docs/version-2.3.1/appendices/whats-next.md b/website/versioned_docs/version-2.3.1/appendices/whats-next.md deleted file mode 100644 index 4b1a3f3fc56f..000000000000 --- a/website/versioned_docs/version-2.3.1/appendices/whats-next.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -sidebar_position: 99 -description: 下一步──进阶! ---- - -# 下一步 - -至此,我们已经了解了 NoneBot 的大多数功能用法,相信你已经可以独自写出一个插件了。现在你可以选择: - -- 即刻开始插件编写! -- 更深入地了解 NoneBot 的[更多功能和原理](../advanced/plugin-info.md)! diff --git a/website/versioned_docs/version-2.3.1/best-practice/alconna/README.mdx b/website/versioned_docs/version-2.3.1/best-practice/alconna/README.mdx deleted file mode 100644 index b6f79eacecc8..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/alconna/README.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -sidebar_position: 1 -description: Alconna 命令解析拓展 - -slug: /best-practice/alconna/ ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# Alconna 插件 - -[`nonebot-plugin-alconna`](https://github.com/nonebot/plugin-alconna) 是一类提供了拓展响应规则的插件。 -该插件使用 [Alconna](https://github.com/ArcletProject/Alconna) 作为命令解析器, -是一个简单、灵活、高效的命令参数解析器,并且不局限于解析命令式字符串。 - -该插件提供了一类新的事件响应器辅助函数 `on_alconna`,以及 `AlconnaResult` 等依赖注入函数。 - -该插件声明了一个 `Matcher` 的子类 `AlconnaMatcher`,并在 `AlconnaMatcher` 中添加了一些新的方法,例如: - -- `assign`:基于 `Alconna` 解析结果,执行满足目标路径的处理函数 -- `dispatch`:类似 `CommandGroup`,对目标路径创建一个新的 `AlconnaMatcher`,并将解析结果分配给该 `AlconnaMatcher` -- `got_path`:类似 `got`,但是可以指定目标路径,并且能够验证解析结果是否可用 -- ... - -基于 `Alconna` 的特性,该插件同时提供了一系列便捷的消息段标注。 -标注可用于在 `Alconna` 中匹配消息中除 text 外的其他消息段,也可用于快速创建各适配器下的消息段。所有标注位于 `nonebot_plugin_alconna.adapters` 中。 - -该插件同时通过提供 `UniMessage` (通用消息模型) 实现了**跨平台接收和发送消息**的功能。 - -## 安装插件 - -在使用前请先安装 `nonebot-plugin-alconna` 插件至项目环境中,可参考[获取商店插件](../../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如: - -在**项目目录**下执行以下命令: - - - - -```shell -nb plugin install nonebot-plugin-alconna -``` - - - - -```shell -pip install nonebot-plugin-alconna -``` - - - - - -```shell -pdm add nonebot-plugin-alconna -``` - - - - -## 导入插件 - -由于 `nonebot-plugin-alconna` 作为插件,因此需要在使用前对其进行**加载**并**导入**其中的 `on_alconna` 来使用命令拓展。使用 `require` 方法可轻松完成这一过程,可参考 [跨插件访问](../../advanced/requiring.md) 一节进行了解。 - -```python -from nonebot import require - -require("nonebot_plugin_alconna") - -from nonebot_plugin_alconna import on_alconna -``` - -## 使用插件 - -在前面的[深入指南](../../appendices/session-control.mdx)中,我们已经得到了一个天气插件。 -现在我们将使用 `Alconna` 来改写这个插件。 - -
- 插件示例 - -```python title=weather/__init__.py -from nonebot import on_command -from nonebot.rule import to_me -from nonebot.matcher import Matcher -from nonebot.adapters import Message -from nonebot.params import CommandArg, ArgPlainText - -weather = on_command("天气", rule=to_me(), aliases={"weather", "天气预报"}) - -@weather.handle() -async def handle_function(matcher: Matcher, args: Message = CommandArg()): - if args.extract_plain_text(): - matcher.set_arg("location", args) - -@weather.got("location", prompt="请输入地名") -async def got_location(location: str = ArgPlainText()): - if location not in ["北京", "上海", "广州", "深圳"]: - await weather.reject(f"你想查询的城市 {location} 暂不支持,请重新输入!") - await weather.finish(f"今天{location}的天气是...") -``` - -
- -```python {5-9,13-15,17-18} -from nonebot.rule import to_me -from arclet.alconna import Alconna, Args -from nonebot_plugin_alconna import Match, on_alconna - -weather = on_alconna( - Alconna("天气", Args["location?", str]), - aliases={"weather", "天气预报"}, - rule=to_me(), -) - - -@weather.handle() -async def handle_function(location: Match[str]): - if location.available: - weather.set_path_arg("location", location.result) - -@weather.got_path("location", prompt="请输入地名") -async def got_location(location: str): - if location not in ["北京", "上海", "广州", "深圳"]: - await weather.reject(f"你想查询的城市 {location} 暂不支持,请重新输入!") - await weather.finish(f"今天{location}的天气是...") -``` - -在上面的代码中,我们使用 `Alconna` 来解析命令,`on_alconna` 用来创建响应器,使用 `Match` 来获取解析结果。 - -关于更多 `Alconna` 的使用方法,可参考 [Alconna 文档](https://arclet.top/docs/tutorial/alconna), -或阅读 [Alconna 基本介绍](./command.md) 一节。 - -关于更多 `on_alconna` 的使用方法,可参考 [插件文档](https://github.com/nonebot/plugin-alconna/blob/master/docs.md), -或阅读 [响应规则的使用](./matcher.mdx) 一节。 - -## 交流与反馈 - -QQ 交流群: [🔗 链接](https://jq.qq.com/?_wv=1027&k=PUPOnCSH) - -友链: [📚 文档](https://graiax.cn/guide/message_parser/alconna.html) diff --git a/website/versioned_docs/version-2.3.1/best-practice/alconna/_category_.json b/website/versioned_docs/version-2.3.1/best-practice/alconna/_category_.json deleted file mode 100644 index d8e7367fe9d1..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/alconna/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Alconna 命令解析拓展", - "position": 6 -} diff --git a/website/versioned_docs/version-2.3.1/best-practice/alconna/command.md b/website/versioned_docs/version-2.3.1/best-practice/alconna/command.md deleted file mode 100644 index e5df7cbdd761..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/alconna/command.md +++ /dev/null @@ -1,640 +0,0 @@ ---- -sidebar_position: 2 -description: Alconna 基本介绍 ---- - -# Alconna 本体 - -[`Alconna`](https://github.com/ArcletProject/Alconna) 隶属于 `ArcletProject`,是一个简单、灵活、高效的命令参数解析器, 并且不局限于解析命令式字符串。 - -我们通过一个例子来讲解 **Alconna** 的核心 —— `Args`, `Subcommand`, `Option`: - -```python -from arclet.alconna import Alconna, Args, Subcommand, Option - - -alc = Alconna( - "pip", - Subcommand( - "install", - Args["package", str], - Option("-r|--requirement", Args["file", str]), - Option("-i|--index-url", Args["url", str]), - ) -) - -res = alc.parse("pip install nonebot2 -i URL") - -print(res) -# matched=True, header_match=(origin='pip' result='pip' matched=True groups={}), subcommands={'install': (value=Ellipsis args={'package': 'nonebot2'} options={'index-url': (value=None args={'url': 'URL'})} subcommands={})}, other_args={'package': 'nonebot2', 'url': 'URL'} - -print(res.all_matched_args) -# {'package': 'nonebot2', 'url': 'URL'} -``` - -这段代码通过`Alconna`创捷了一个接受主命令名为`pip`, 子命令为`install`且子命令接受一个 **Args** 参数`package`和二个 **Option** 参数`-r`和`-i`的命令参数解析器, 通过`parse`方法返回解析结果 **Arparma** 的实例。 - -## 命令头 - -命令头是指命令的前缀 (Prefix) 与命令名 (Command) 的组合,例如 !help 中的 ! 与 help。 - -| 前缀 | 命令名 | 匹配内容 | 说明 | -| :--------------------------: | :--------: | :---------------------------------------------------------: | :--------------: | -| - | "foo" | `"foo"` | 无前缀的纯文字头 | -| - | 123 | `123` | 无前缀的元素头 | -| - | "re:\d{2}" | `"32"` | 无前缀的正则头 | -| - | int | `123` 或 `"456"` | 无前缀的类型头 | -| [int, bool] | - | `True` 或 `123` | 无名的元素类头 | -| ["foo", "bar"] | - | `"foo"` 或 `"bar"` | 无名的纯文字头 | -| ["foo", "bar"] | "baz" | `"foobaz"` 或 `"barbaz"` | 纯文字头 | -| [int, bool] | "foo" | `[123, "foo"]` 或 `[False, "foo"]` | 类型头 | -| [123, 4567] | "foo" | `[123, "foo"]` 或 `[4567, "foo"]` | 元素头 | -| [nepattern.NUMBER] | "bar" | `[123, "bar"]` 或 `[123.456, "bar"]` | 表达式头 | -| [123, "foo"] | "bar" | `[123, "bar"]` 或 `"foobar"` 或 `["foo", "bar"]` | 混合头 | -| [(int, "foo"), (456, "bar")] | "baz" | `[123, "foobaz"]` 或 `[456, "foobaz"]` 或 `[456, "barbaz"]` | 对头 | - -对于无前缀的类型头,此时会将传入的值尝试转为 BasePattern,例如 `int` 会转为 `nepattern.INTEGER`。如此该命令头会匹配对应的类型, 例如 `int` 会匹配 `123` 或 `"456"`,但不会匹配 `"foo"`。解析后,Alconna 会将命令头匹配到的值转为对应的类型,例如 `int` 会将 `"123"` 转为 `123`。 - -:::tip - -**正则内容只在命令名上生效,前缀中的正则会被转义** - -::: - -除了通过传入 `re:xxx` 来使用正则表达式外,Alconna 还提供了一种更加简洁的方式来使用正则表达式,称为 Bracket Header: - -```python -from alconna import Alconna - - -alc = Alconna(".rd{roll:int}") -assert alc.parse(".rd123").header["roll"] == 123 -``` - -Bracket Header 类似 python 里的 f-string 写法,通过 `"{}"` 声明匹配类型 - -`"{}"` 中的内容为 "name:type or pat": - -- `"{}"`, `"{:}"` ⇔ `"(.+)"`, 占位符 -- `"{foo}"` ⇔ `"(?P<foo>.+)"` -- `"{:\d+}"` ⇔ `"(\d+)"` -- `"{foo:int}"` ⇔ `"(?P<foo>\d+)"`,其中 `"int"` 部分若能转为 `BasePattern` 则读取里面的表达式 - -## 参数声明(Args) - -`Args` 是用于声明命令参数的组件, 可以通过以下几种方式构造 **Args** : - -- `Args[key, var, default][key1, var1, default1][...]` -- `Args[(key, var, default)]` -- `Args.key[var, default]` - -其中,key **一定**是字符串,而 var 一般为参数的类型,default 为具体的值或者 **arclet.alconna.args.Field** - -其与函数签名类似,但是允许含有默认值的参数在前;同时支持 keyword-only 参数不依照构造顺序传入 (但是仍需要在非 keyword-only 参数之后)。 - -### key - -`key` 的作用是用以标记解析出来的参数并存放于 **Arparma** 中,以方便用户调用。 - -其有三种为 Args 注解的标识符: `?`、`/`、 `!`, 标识符与 key 之间建议以 `;` 分隔: - -- `!` 标识符表示该处传入的参数应**不是**规定的类型,或**不在**指定的值中。 -- `?` 标识符表示该参数为**可选**参数,会在无参数匹配时跳过。 -- `/` 标识符表示该参数的类型注解需要隐藏。 - -另外,对于参数的注释也可以标记在 `key` 中,其与 key 或者标识符 以 `#` 分割: -`foo#这是注释;?` 或 `foo?#这是注释` - -:::tip - -`Args` 中的 `key` 在实际命令中并不需要传入(keyword 参数除外): - -```python -from arclet.alconna import Alconna, Args - - -alc = Alconna("test", Args["foo", str]) -alc.parse("test --foo abc") # 错误 -alc.parse("test abc") # 正确 -``` - -若需要 `test --foo abc`,你应该使用 `Option`: - -```python -from arclet.alconna import Alconna, Args, Option - - -alc = Alconna("test", Option("--foo", Args["foo", str])) -``` - -::: - -### var - -var 负责命令参数的**类型检查**与**类型转化** - -`Args` 的`var`表面上看需要传入一个 `type`,但实际上它需要的是一个 `nepattern.BasePattern` 的实例: - -```python -from arclet.alconna import Args -from nepattern import BasePattern - - -# 表示 foo 参数需要匹配一个 @number 样式的字符串 -args = Args["foo", BasePattern("@\d+")] -``` - -`pip` 示例中可以传入 `str` 是因为 `str` 已经注册在了 `nepattern.global_patterns` 中,因此会替换为 `nepattern.global_patterns[str]` - -`nepattern.global_patterns`默认支持的类型有: - -- `str`: 匹配任意字符串 -- `int`: 匹配整数 -- `float`: 匹配浮点数 -- `bool`: 匹配 `True` 与 `False` 以及他们小写形式 -- `hex`: 匹配 `0x` 开头的十六进制字符串 -- `url`: 匹配网址 -- `email`: 匹配 `xxxx@xxx` 的字符串 -- `ipv4`: 匹配 `xxx.xxx.xxx.xxx` 的字符串 -- `list`: 匹配类似 `["foo","bar","baz"]` 的字符串 -- `dict`: 匹配类似 `{"foo":"bar","baz":"qux"}` 的字符串 -- `datetime`: 传入一个 `datetime` 支持的格式字符串,或时间戳 -- `Any`: 匹配任意类型 -- `AnyString`: 匹配任意类型,转为 `str` -- `Number`: 匹配 `int` 与 `float`,转为 `int` - -同时可以使用 typing 中的类型: - -- `Literal[X]`: 匹配其中的任意一个值 -- `Union[X, Y]`: 匹配其中的任意一个类型 -- `Optional[xxx]`: 会自动将默认值设为 `None`,并在解析失败时使用默认值 -- `List[X]`: 匹配一个列表,其中的元素为 `X` 类型 -- `Dict[X, Y]`: 匹配一个字典,其中的 key 为 `X` 类型,value 为 `Y` 类型 -- ... - -:::tip - -几类特殊的传入标记: - -- `"foo"`: 匹配字符串 "foo" (若没有某个 `BasePattern` 与之关联) -- `RawStr("foo")`: 匹配字符串 "foo" (即使有 `BasePattern` 与之关联也不会被替换) -- `"foo|bar|baz"`: 匹配 "foo" 或 "bar" 或 "baz" -- `[foo, bar, Baz, ...]`: 匹配其中的任意一个值或类型 -- `Callable[[X], Y]`: 匹配一个参数为 `X` 类型的值,并返回通过该函数调用得到的 `Y` 类型的值 -- `"re:xxx"`: 匹配一个正则表达式 `xxx`,会返回 Match[0] -- `"rep:xxx"`: 匹配一个正则表达式 `xxx`,会返回 `re.Match` 对象 -- `{foo: bar, baz: qux}`: 匹配字典中的任意一个键, 并返回对应的值 (特殊的键 ... 会匹配任意的值) -- ... - -**特别的**,你可以不传入 `var`,此时会使用 `key` 作为 `var`, 匹配 `key` 字符串。 - -::: - -#### MultiVar 与 KeyWordVar - -`MultiVar` 是一个特殊的标注,用于告知解析器该参数可以接受多个值,类似于函数中的 `*args`,其构造方法形如 `MultiVar(str)`。 - -同样的还有 `KeyWordVar`,类似于函数中的 `*, name: type`,其构造方法形如 `KeyWordVar(str)`,用于告知解析器该参数为一个 keyword-only 参数。 - -:::tip - -`MultiVar` 与 `KeyWordVar` 组合时,代表该参数为一个可接受多个 key-value 的参数,类似于函数中的 `**kwargs`,其构造方法形如 `MultiVar(KeyWordVar(str))` - -`MultiVar` 与 `KeyWordVar` 也可以传入 `default` 参数,用于指定默认值 - -`MultiVar` 不能在 `KeyWordVar` 之后传入 - -::: - -### default - -`default` 传入的是该参数的默认值或者 `Field`,以携带对于该参数的更多信息。 - -默认情况下 (即不声明) `default` 的值为特殊值 `Empty`。这也意味着你可以将默认值设置为 `None` 表示默认值为空值。 - -`Field` 构造需要的参数说明如下: - -- default: 参数单元的默认值 -- alias: 参数单元默认值的别名 -- completion: 参数单元的补全说明生成函数 -- unmatch_tips: 参数单元的错误提示生成函数,其接收一个表示匹配失败的元素的参数 -- missing_tips: 参数单元的缺失提示生成函数 - -## 选项与子命令(Option & Subcommand) - -`Option` 和 `Subcommand` 可以传入一组 `alias`,如 `Option("--foo|-F|--FOO|-f")`,`Subcommand("foo", alias=["F"])` - -传入别名后,选项与子命令会选择其中长度最长的作为其名称。若传入为 "--foo|-f",则命令名称为 "--foo" - -:::tip 特别提醒!!! - -Option 的名字或别名**没有要求**必须在前面写上 `-` - -Option 与 Subcommand 的唯一区别在于 Subcommand 可以传入自己的 **Option** 与 **Subcommand** - -::: - -他们拥有如下共同参数: - -- `help_text`: 传入该组件的帮助信息 -- `dest`: 被指定为解析完成时标注匹配结果的标识符,不传入时默认为选项或子命令的名称 (name) -- `requires`: 一段指定顺序的字符串列表,作为唯一的前置序列与命令嵌套替换 - 对于命令 `test foo bar baz qux ` 来讲,因为`foo bar baz` 仅需要判断是否相等, 所以可以这么编写: - -```python -Alconna("test", Option("qux", Args.a[int], requires=["foo", "bar", "baz"])) -``` - -- `default`: 默认值,在该组件未被解析时使用使用该值替换。 - 特别的,使用 `OptionResult` 或 `SubcomanndResult` 可以设置包括参数字典在内的默认值: - -```python -from arclet.alconna import Option, OptionResult - -opt1 = Option("--foo", default=False) -opt2 = Option("--foo", default=OptionResult(value=False, args={"bar": 1})) -``` - -### Action - -`Option` 可以特别设置传入一类 `Action`,作为解析操作 - -`Action` 分为三类: - -- `store`: 无 Args 时, 仅存储一个值, 默认为 Ellipsis; 有 Args 时, 后续的解析结果会覆盖之前的值 -- `append`: 无 Args 时, 将多个值存为列表, 默认为 Ellipsis; 有 Args 时, 每个解析结果会追加到列表中, 当存在默认值并且不为列表时, 会自动将默认值变成列表, 以保证追加的正确性 -- `count`: 无 Args 时, 计数器加一; 有 Args 时, 表现与 STORE 相同, 当存在默认值并且不为数字时, 会自动将默认值变成 1, 以保证计数器的正确性。 - -`Alconna` 提供了预制的几类 `Action`: - -- `store`(默认),`store_value`,`store_true`,`store_false` -- `append`,`append_value` -- `count` - -## 解析结果(Arparma) - -`Alconna.parse` 会返回由 **Arparma** 承载的解析结果 - -`Arparma` 有如下属性: - -- 调试类 - - - matched: 是否匹配成功 - - error_data: 解析失败时剩余的数据 - - error_info: 解析失败时的异常内容 - - origin: 原始命令,可以类型标注 - -- 分析类 - - header_match: 命令头部的解析结果,包括原始头部、解析后头部、解析结果与可能的正则匹配组 - - main_args: 命令的主参数的解析结果 - - options: 命令所有选项的解析结果 - - subcommands: 命令所有子命令的解析结果 - - other_args: 除主参数外的其他解析结果 - - all_matched_args: 所有 Args 的解析结果 - -`Arparma` 同时提供了便捷的查询方法 `query[type]()`,会根据传入的 `path` 查找参数并返回 - -`path` 支持如下: - -- `main_args`, `options`, ...: 返回对应的属性 -- `args`: 返回 all_matched_args -- `main_args.xxx`, `options.xxx`, ...: 返回字典中 `xxx`键对应的值 -- `args.xxx`: 返回 all_matched_args 中 `xxx`键对应的值 -- `options.foo`, `foo`: 返回选项 `foo` 的解析结果 (OptionResult) -- `options.foo.value`, `foo.value`: 返回选项 `foo` 的解析值 -- `options.foo.args`, `foo.args`: 返回选项 `foo` 的解析参数字典 -- `options.foo.args.bar`, `foo.bar`: 返回选项 `foo` 的参数字典中 `bar` 键对应的值 ... - -## 元数据(CommandMeta) - -`Alconna` 的元数据相当于其配置,拥有以下条目: - -- `description`: 命令的描述 -- `usage`: 命令的用法 -- `example`: 命令的使用样例 -- `author`: 命令的作者 -- `fuzzy_match`: 命令是否开启模糊匹配 -- `fuzzy_threshold`: 模糊匹配阈值 -- `raise_exception`: 命令是否抛出异常 -- `hide`: 命令是否对 manager 隐藏 -- `hide_shortcut`: 命令的快捷指令是否在 help 信息中隐藏 -- `keep_crlf`: 命令解析时是否保留换行字符 -- `compact`: 命令是否允许第一个参数紧随头部 -- `strict`: 命令是否严格匹配,若为 False 则未知参数将作为名为 $extra 的参数 -- `context_style`: 命令上下文插值的风格,None 为关闭,bracket 为 `{...}`,parentheses 为 `$(...)` -- `extra`: 命令的自定义额外信息 - -元数据一定使用 `meta=...` 形式传入: - -```python -from arclet.alconna import Alconna, CommandMeta - -alc = Alconna(..., meta=CommandMeta("foo", example="bar")) -``` - -## 命名空间配置 - -命名空间配置 (以下简称命名空间) 相当于 `Alconna` 的默认配置,其优先度低于 `CommandMeta`。 - -`Alconna` 默认使用 "Alconna" 命名空间。 - -命名空间有以下几个属性: - -- name: 命名空间名称 -- prefixes: 默认前缀配置 -- separators: 默认分隔符配置 -- formatter_type: 默认格式化器类型 -- fuzzy_match: 默认是否开启模糊匹配 -- raise_exception: 默认是否抛出异常 -- builtin_option_name: 默认的内置选项名称(--help, --shortcut, --comp) -- disable_builtin_options: 默认禁用的内置选项(--help, --shortcut, --comp) -- enable_message_cache: 默认是否启用消息缓存 -- compact: 默认是否开启紧凑模式 -- strict: 命令是否严格匹配 -- context_style: 命令上下文插值的风格 -- ... - -### 新建命名空间并替换 - -```python -from arclet.alconna import Alconna, namespace, Namespace, Subcommand, Args, config - - -ns = Namespace("foo", prefixes=["/"]) # 创建 "foo"命名空间配置, 它要求创建的Alconna的主命令前缀必须是/ - -alc = Alconna("pip", Subcommand("install", Args["package", str]), namespace=ns) # 在创建Alconna时候传入命名空间以替换默认命名空间 - -# 可以通过with方式创建命名空间 -with namespace("bar") as np1: - np1.prefixes = ["!"] # 以上下文管理器方式配置命名空间,此时配置会自动注入上下文内创建的命令 - np1.formatter_type = ShellTextFormatter # 设置此命名空间下的命令的 formatter 默认为 ShellTextFormatter - np1.builtin_option_name["help"] = {"帮助", "-h"} # 设置此命名空间下的命令的帮助选项名称 - -# 你还可以使用config来管理所有命名空间并切换至任意命名空间 -config.namespaces["foo"] = ns # 将命名空间挂载到 config 上 - -alc = Alconna("pip", Subcommand("install", Args["package", str]), namespace=config.namespaces["foo"]) # 也是同样可以切换到"foo"命名空间 -``` - -### 修改默认的命名空间 - -```python -from arclet.alconna import config, namespace, Namespace - - -config.default_namespace.prefixes = [...] # 直接修改默认配置 - -np = Namespace("xxx", prefixes=[...]) -config.default_namespace = np # 更换默认的命名空间 - -with namespace(config.default_namespace.name) as np: - np.prefixes = [...] -``` - -## 快捷指令 - -快捷命令可以做到标识一段命令, 并且传递参数给原命令 - -一般情况下你可以通过 `Alconna.shortcut` 进行快捷指令操作 (创建,删除) - -`shortcut` 的第一个参数为快捷指令名称,第二个参数为 `ShortcutArgs`,作为快捷指令的配置: - -```python -class ShortcutArgs(TypedDict): - """快捷指令参数""" - - command: NotRequired[str] - """快捷指令的命令""" - args: NotRequired[list[Any]] - """快捷指令的附带参数""" - fuzzy: NotRequired[bool] - """是否允许命令后随参数""" - prefix: NotRequired[bool] - """是否调用时保留指令前缀""" - wrapper: NotRequired[ShortcutRegWrapper] - """快捷指令的正则匹配结果的额外处理函数""" - humanized: NotRequired[str] - """快捷指令的人类可读描述""" -``` - -### args的使用 - -```python -from arclet.alconna import Alconna, Args - - -alc = Alconna("setu", Args["count", int]) - -alc.shortcut("涩图(\d+)张", {"args": ["{0}"]}) -# 'Alconna::setu 的快捷指令: "涩图(\\d+)张" 添加成功' - -alc.parse("涩图3张").query("count") -# 3 -``` - -### command的使用 - -```python -from arclet.alconna import Alconna, Args - - -alc = Alconna("eval", Args["content", str]) - -alc.shortcut("echo", {"command": "eval print(\\'{*}\\')"}) -# 'Alconna::eval 的快捷指令: "echo" 添加成功' - -alc.shortcut("echo", delete=True) # 删除快捷指令 -# 'Alconna::eval 的快捷指令: "echo" 删除成功' - -@alc.bind() # 绑定一个命令执行器, 若匹配成功则会传入参数, 自动执行命令执行器 -def cb(content: str): - eval(content, {}, {}) - -alc.parse('eval print(\\"hello world\\")') -# hello world - -alc.parse("echo hello world!") -# hello world! -``` - -当 `fuzzy` 为 False 时,第一个例子中传入 `"涩图1张 abc"` 之类的快捷指令将视为解析失败 - -快捷指令允许三类特殊的 placeholder: - -- `{%X}`: 如 `setu {%0}`,表示此处填入快捷指令后随的第 X 个参数。 - -例如,若快捷指令为 `涩图`, 配置为 `{"command": "setu {%0}"}`, 则指令 `涩图 1` 相当于 `setu 1` - -- `{*}`: 表示此处填入所有后随参数,并且可以通过 `{*X}` 的方式指定组合参数之间的分隔符。 - -- `{X}`: 表示此处填入可能的正则匹配的组: - -- 若 `command` 中存在匹配组 `(xxx)`,则 `{X}` 表示第 X 个匹配组的内容 -- 若 `command` 中存储匹配组 `(?P...)`, 则 `{X}` 表示 **名字** 为 X 的匹配结果 - -除此之外, 通过 **Alconna** 内置选项 `--shortcut` 可以动态操作快捷指令 - -例如: - -- `cmd --shortcut ` 来增加一个快捷指令 -- `cmd --shortcut list` 来列出当前指令的所有快捷指令 -- `cmd --shortcut delete key` 来删除一个快捷指令 - -```python -from arclet.alconna import Alconna, Args - - -alc = Alconna("eval", Args["content", str]) - -alc.shortcut("echo", {"command": "eval print(\\'{*}\\')"}) - -alc.parse("eval --shortcut list") -# 'echo' -``` - -## 紧凑命令 - -`Alconna`, `Option` 与 `Subcommand` 可以设置 `compact=True` 使得解析命令时允许名称与后随参数之间没有分隔: - -```python -from arclet.alconna import Alconna, Option, CommandMeta, Args - - -alc = Alconna("test", Args["foo", int], Option("BAR", Args["baz", str], compact=True), meta=CommandMeta(compact=True)) - -assert alc.parse("test123 BARabc").matched -``` - -这使得我们可以实现如下命令: - -```python -from arclet.alconna import Alconna, Option, Args, append - - -alc = Alconna("gcc", Option("--flag|-F", Args["content", str], action=append, compact=True)) -print(alc.parse("gcc -Fabc -Fdef -Fxyz").query[list]("flag.content")) -# ['abc', 'def', 'xyz'] -``` - -当 `Option` 的 `action` 为 `count` 时,其自动支持 `compact` 特性: - -```python -from arclet.alconna import Alconna, Option, count - - -alc = Alconna("pp", Option("--verbose|-v", action=count, default=0)) -print(alc.parse("pp -vvv").query[int]("verbose.value")) -# 3 -``` - -## 模糊匹配 - -模糊匹配会应用在任意需要进行名称判断的地方,如 **命令名称**,**选项名称** 和 **参数名称** (如指定需要传入参数名称)。 - -```python -from arclet.alconna import Alconna, CommandMeta - - -alc = Alconna("test_fuzzy", meta=CommandMeta(fuzzy_match=True)) - -alc.parse("test_fuzy") -# test_fuzy is not matched. Do you mean "test_fuzzy"? -``` - -## 半自动补全 - -半自动补全为用户提供了推荐后续输入的功能 - -补全默认通过 `--comp` 或 `-cp` 或 `?` 触发:(命名空间配置可修改名称) - -```python -from arclet.alconna import Alconna, Args, Option - - -alc = Alconna("test", Args["abc", int]) + Option("foo") + Option("bar") -alc.parse("test --comp") - -''' -output - -以下是建议的输入: -* -* --help -* -h -* -sct -* --shortcut -* foo -* bar -''' -``` - -## Duplication - -**Duplication** 用来提供更好的自动补全,类似于 **ArgParse** 的 **Namespace** - -普通情况下使用,需要利用到 **ArgsStub**、**OptionStub** 和 **SubcommandStub** 三个部分 - -以pip为例,其对应的 Duplication 应如下构造: - -```python -from arclet.alconna import Alconna, Args, Option, OptionResult, Duplication, SubcommandStub, Subcommand, count - - -class MyDup(Duplication): - verbose: OptionResult - install: SubcommandStub - - -alc = Alconna( - "pip", - Subcommand( - "install", - Args["package", str], - Option("-r|--requirement", Args["file", str]), - Option("-i|--index-url", Args["url", str]), - ), - Option("-v|--version"), - Option("-v|--verbose", action=count), -) - -res = alc.parse("pip -v install ...") # 不使用duplication获得的提示较少 -print(res.query("install")) -# (value=Ellipsis args={'package': '...'} options={} subcommands={}) - -result = alc.parse("pip -v install ...", duplication=MyDup) -print(result.install) -# SubcommandStub(_origin=Subcommand('install', args=Args('package': str)), _value=Ellipsis, available=True, args=ArgsStub(_origin=Args('package': str), _value={'package': '...'}, available=True), dest='install', options=[OptionStub(_origin=Option('requirement', args=Args('file': str)), _value=None, available=False, args=ArgsStub(_origin=Args('file': str), _value={}, available=False), dest='requirement', aliases=['r', 'requirement'], name='requirement'), OptionStub(_origin=Option('index-url', args=Args('url': str)), _value=None, available=False, args=ArgsStub(_origin=Args('url': str), _value={}, available=False), dest='index-url', aliases=['index-url', 'i'], name='index-url')], subcommands=[], name='install') -``` - -**Duplication** 也可以如 **Namespace** 一样直接标明参数名称和类型: - -```python -from typing import Optional -from arclet.alconna import Duplication - - -class MyDup(Duplication): - package: str - file: Optional[str] = None - url: Optional[str] = None -``` - -## 上下文插值 - -当 `context_style` 条目被设置后,传入的命令中符合上下文插值的字段会被自动替换成当前上下文中的信息。 - -上下文可以在 `parse` 中传入: - -```python -from arclet.alconna import Alconna, Args, CommandMeta - -alc = Alconna("test", Args["foo", int], meta=CommandMeta(context_style="parentheses")) - -alc.parse("test $(bar)", {"bar": 123}) -# {"foo": 123} -``` - -context_style 的值分两种: - -- `"bracket"`: 插值格式为 `{...}`,例如 `{foo}` -- `"parentheses"`: 插值格式为 `$(...)`,例如 `$(bar)` diff --git a/website/versioned_docs/version-2.3.1/best-practice/alconna/config.md b/website/versioned_docs/version-2.3.1/best-practice/alconna/config.md deleted file mode 100644 index ebce8d57a86a..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/alconna/config.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -sidebar_position: 4 -description: 配置项 ---- - -# 配置项 - -## alconna_auto_send_output - -- **类型**: `bool` -- **默认值**: `False` - -是否全局启用输出信息自动发送,不启用则会在触发特殊内置选项后仍然将解析结果传递至响应器。 - -## alconna_use_command_start - -- **类型**: `bool` -- **默认值**: `False` - -是否读取 Nonebot 的配置项 `COMMAND_START` 来作为全局的 Alconna 命令前缀 - -## alconna_auto_completion - -- **类型**: `bool` -- **默认值**: `False` - -是否全局启用命令自动补全,启用后会在参数缺失或触发 `--comp` 选项时自自动启用交互式补全。 - -## alconna_use_origin - -- **类型**: `bool` -- **默认值**: `False` - -是否全局使用原始消息 (即未经过 to_me 等处理的),该选项会影响到 Alconna 的匹配行为。 - -## alconna_use_command_sep - -- **类型**: `bool` -- **默认值**: `False` - -是否读取 Nonebot 的配置项 `COMMAND_SEP` 来作为全局的 Alconna 命令分隔符。 - -## alconna_global_extensions - -- **类型**: `List[str]` -- **默认值**: `[]` - -全局加载的扩展,路径以 . 分隔,如 `foo.bar.baz:DemoExtension`。 - -## alconna_context_style - -- **类型**: `Optional[Literal["bracket", "parentheses"]]` -- **默认值**: `None` - -全局命令上下文插值的风格,None 为关闭,bracket 为 `{...}`,parentheses 为 `$(...)`。 - -## alconna_enable_saa_patch - -- **类型**: `bool` -- **默认值**: `False` - -是否启用 SAA 补丁。 - -## alconna_apply_filehost - -- **类型**: `bool` -- **默认值**: `False` - -是否启用文件托管。 - -## alconna_apply_fetch_targets - -- **类型**: `bool` -- **默认值**: `False` - -是否启动时拉取一次发送对象列表。 diff --git a/website/versioned_docs/version-2.3.1/best-practice/alconna/matcher.mdx b/website/versioned_docs/version-2.3.1/best-practice/alconna/matcher.mdx deleted file mode 100644 index be9a670f7b3d..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/alconna/matcher.mdx +++ /dev/null @@ -1,607 +0,0 @@ ---- -sidebar_position: 3 -description: 响应规则的使用 ---- - -import Messenger from "@site/src/components/Messenger"; - -# Alconna 插件 - -展示: - -```python -from nonebot_plugin_alconna import At, Image, on_alconna -from arclet.alconna import Args, Option, Alconna, Arparma, MultiVar, Subcommand - - -alc = Alconna( - ["/", "!"], - "role-group", - Subcommand( - "add", - Args["name", str], - Option("member", Args["target", MultiVar(At)]), - ), - Option("list"), - Option("icon", Args["icon", Image]) -) -rg = on_alconna(alc, auto_send_output=True) - - -@rg.handle() -async def _(result: Arparma): - if result.find("list"): - img: bytes = await gen_role_group_list_image() - await rg.finish(Image(raw=img)) - if result.find("add"): - group = await create_role_group(result.query[str]("add.name")) - if result.find("add.member"): - ats = result.query[tuple[At, ...]]("add.member.target") - group.extend(member.target for member in ats) - await rg.finish("添加成功") -``` - -## 响应器使用 - -本插件基于 **Alconna**,为 **Nonebot** 提供了一类新的事件响应器辅助函数 `on_alconna`: - -```python -def on_alconna( - command: Alconna | str, - skip_for_unmatch: bool = True, - auto_send_output: bool = False, - aliases: set[str | tuple[str, ...]] | None = None, - comp_config: CompConfig | None = None, - extensions: list[type[Extension] | Extension] | None = None, - exclude_ext: list[type[Extension] | str] | None = None, - use_origin: bool = False, - use_cmd_start: bool = False, - use_cmd_sep: bool = False, - **kwargs, - ..., -): -``` - -- `command`: Alconna 命令或字符串,字符串将通过 `AlconnaFormat` 转换为 Alconna 命令 -- `skip_for_unmatch`: 是否在命令不匹配时跳过该响应 -- `auto_send_output`: 是否自动发送输出信息并跳过响应 -- `aliases`: 命令别名, 作用类似于 `on_command` 中的 aliases -- `comp_config`: 补全会话配置, 不传入则不启用补全会话 -- `extensions`: 需要加载的匹配扩展, 可以是扩展类或扩展实例 -- `exclude_ext`: 需要排除的匹配扩展, 可以是扩展类或扩展的id -- `use_origin`: 是否使用未经 to_me 等处理过的消息 -- `use_cmd_start`: 是否使用 COMMAND_START 作为命令前缀 -- `use_cmd_sep`: 是否使用 COMMAND_SEP 作为命令分隔符 - -`on_alconna` 返回的是 `Matcher` 的子类 `AlconnaMatcher` ,其拓展了如下方法: - -- `.assign(path, value, or_not)`: 用于对包含多个选项/子命令的命令的分派处理(具体请看[条件控制](./matcher.mdx#条件控制)) -- `.got_path(path, prompt, middleware)`: 在 `got` 方法的基础上,会以 path 对应的参数为准,读取传入 message 的最后一个消息段并验证转换 -- `.set_path_arg(key, value)`, `.get_path_arg(key)`: 类似 `set_arg` 和 `got_arg`,为 `got_path` 的特化版本 -- `.reject_path(path[, prompt, fallback])`: 类似于 `reject_arg`,对应 `got_path` -- `.dispatch`: 同样的分派处理,但是是类似 `CommandGroup` 一样返回新的 `AlconnaMatcher` -- `.got`, `send`, `reject`, ... : 拓展了 prompt 类型,即支持使用 `UniMessage` 作为 prompt - -实例: - -```python -from nonebot import require -require("nonebot_plugin_alconna") - -from arclet.alconna import Alconna, Option, Args -from nonebot_plugin_alconna import on_alconna, Match, UniMessage - - -login = on_alconna(Alconna(["/"], "login", Args["password?", str], Option("-r|--recall"))) # 这里["/"]指命令前缀必须是/ - -# /login -r 触发 -@login.assign("recall") -async def login_exit(): - await login.finish("已退出") - -# /login xxx 触发 -@login.assign("password") -async def login_handle(pw: Match[str]): - if pw.available: - login.set_path_arg("password", pw.result) - -# /login 触发 -@login.got_path("password", prompt=UniMessage.template("{:At(user, $event.get_user_id())} 请输入密码")) -async def login_got(password: str): - assert password - await login.send("登录成功") -``` - -## 依赖注入 - -本插件提供了一系列依赖注入函数,便于在响应函数中获取解析结果: - -- `AlconnaResult`: `CommandResult` 类型的依赖注入函数 -- `AlconnaMatches`: `Arparma` 类型的依赖注入函数 -- `AlconnaDuplication`: `Duplication` 类型的依赖注入函数 -- `AlconnaMatch`: `Match` 类型的依赖注入函数 -- `AlconnaQuery`: `Query` 类型的依赖注入函数 - -同时,基于 [`Annotated` 支持](https://github.com/nonebot/nonebot2/pull/1832),添加了两类注解: - -- `AlcMatches`:同 `AlconnaMatches` -- `AlcResult`:同 `AlconnaResult` - -可以看到,本插件提供了几类额外的模型: - -- `CommandResult`: 解析结果,包括了源命令 `source: Alconna` ,解析结果 `result: Arparma`,以及可能的输出信息 `output: str | None` 字段 -- `Match`: 匹配项,表示参数是否存在于 `all_matched_args` 内,可用 `Match.available` 判断是否匹配,`Match.result` 获取匹配的值 -- `Query`: 查询项,表示参数是否可由 `Arparma.query` 查询并获得结果,可用 `Query.available` 判断是否查询成功,`Query.result` 获取查询结果 - -**Alconna** 默认依赖注入的目标参数皆不需要使用依赖注入函数, 该效果对于 `AlconnaMatcher.got_path` 下的 Arg 同样有效: - -```python -async def handle( - result: CommandResult, - arp: Arparma, - dup: Duplication, - source: Alconna, - abc: str, # 类似 Match, 但是若匹配结果不存在对应字段则跳过该 handler - foo: Match[str], - bar: Query[int] = Query("ttt.bar", 0) # Query 仍然需要一个默认值来传递 path 参数 -): - ... -``` - -:::note - -如果你更喜欢 Depends 式的依赖注入,`nonebot_plugin_alconna` 同时提供了一系列的依赖注入函数,他们包括: - -- `AlconnaResult`: `CommandResult` 类型的依赖注入函数 -- `AlconnaMatches`: `Arparma` 类型的依赖注入函数 -- `AlconnaDuplication`: `Duplication` 类型的依赖注入函数 -- `AlconnaMatch`: `Match` 类型的依赖注入函数,其能够额外传入一个 middleware 函数来处理得到的参数 -- `AlconnaQuery`: `Query` 类型的依赖注入函数,其能够额外传入一个 middleware 函数来处理得到的参数 -- `AlconnaExecResult`: 提供挂载在命令上的 callback 的返回结果 (`Dict[str, Any]`) 的依赖注入函数 -- `AlconnaExtension`: 提供指定类型的 `Extension` 的依赖注入函数 - -::: - -实例: - -```python -from nonebot import require -require("nonebot_plugin_alconna") - -from nonebot_plugin_alconna import ( - on_alconna, - Match, - Query, - AlconnaMatch, - AlcResult -) -from arclet.alconna import Alconna, Args, Option, Arparma - - -test = on_alconna( - Alconna( - "test", - Option("foo", Args["bar", int]), - Option("baz", Args["qux", bool, False]) - ), - auto_send_output=True -) - -@test.handle() -async def handle_test1(result: AlcResult): - await test.send(f"matched: {result.matched}") - await test.send(f"maybe output: {result.output}") - -@test.handle() -async def handle_test2(result: Arparma): - await test.send(f"head result: {result.header_result}") - await test.send(f"args: {result.all_matched_args}") - -@test.handle() -async def handle_test3(bar: Match[int] = AlconnaMatch("bar")): - if bar.available: - await test.send(f"foo={bar.result}") - -@test.handle() -async def handle_test4(qux: Query[bool] = Query("baz.qux", False)): - if qux.available: - await test.send(f"baz.qux={qux.result}") -``` - -## 多平台适配 - -本插件提供了通用消息段标注, 通用消息段序列, 使插件使用者可以忽略平台之间字段的差异 - -响应器使用示例中使用了消息段标注,其中 `At` 属于通用标注,而 `Image` 属于 `onebot12` 适配器下的标注。 - -具体介绍和使用请查看 [通用信息组件](./uniseg.mdx#通用消息段) - -本插件为以下适配器提供了专门的适配器标注: - -| 协议名称 | 路径 | -| ------------------------------------------------------------------- | ------------------------------------ | -| [OneBot 协议](https://github.com/nonebot/adapter-onebot) | adapters.onebot11, adapters.onebot12 | -| [Telegram](https://github.com/nonebot/adapter-telegram) | adapters.telegram | -| [飞书](https://github.com/nonebot/adapter-feishu) | adapters.feishu | -| [GitHub](https://github.com/nonebot/adapter-github) | adapters.github | -| [QQ bot](https://github.com/nonebot/adapter-qq) | adapters.qq | -| [钉钉](https://github.com/nonebot/adapter-ding) | adapters.ding | -| [Dodo](https://github.com/nonebot/adapter-dodo) | adapters.dodo | -| [Console](https://github.com/nonebot/adapter-console) | adapters.console | -| [开黑啦](https://github.com/Tian-que/nonebot-adapter-kaiheila) | adapters.kook | -| [Mirai](https://github.com/ieew/nonebot_adapter_mirai2) | adapters.mirai | -| [Ntchat](https://github.com/JustUndertaker/adapter-ntchat) | adapters.ntchat | -| [MineCraft](https://github.com/17TheWord/nonebot-adapter-minecraft) | adapters.minecraft | -| [BiliBili Live](https://github.com/wwweww/adapter-bilibili) | adapters.bilibili | -| [Walle-Q](https://github.com/onebot-walle/nonebot_adapter_walleq) | adapters.onebot12 | -| [Discord](https://github.com/nonebot/adapter-discord) | adapters.discord | -| [Red 协议](https://github.com/nonebot/adapter-red) | adapters.red | -| [Satori 协议](https://github.com/nonebot/adapter-satori) | adapters.satori | - -## 条件控制 - -本插件可以通过 `assign` 来控制一个具体的响应函数是否在不满足条件时跳过响应。 - -```python -... -from nonebot import require -require("nonebot_plugin_alconna") -... - -from arclet.alconna import Alconna, Subcommand, Option, Args -from nonebot_plugin_alconna import on_alconna, CommandResult - - -pip = Alconna( - "pip", - Subcommand( - "install", Args["pak", str], - Option("--upgrade"), - Option("--force-reinstall") - ), - Subcommand("list", Option("--out-dated")) -) - -pip_cmd = on_alconna(pip) - -# 仅在命令为 `pip install pip` 时响应 -@pip_cmd.assign("install.pak", "pip") -async def update(res: CommandResult): - ... - -# 仅在命令为 `pip list` 时响应 -@pip_cmd.assign("list") -async def list_(res: CommandResult): - ... - -# 在命令为 `pip install xxx` 时响应 -@pip_cmd.assign("install") -async def install(res: CommandResult): - ... -``` - -此外,使用 `AlconnaMatcher.dispatch` 还能像 `CommandGroup` 一样为每个分发设置独立的 matcher: - -```python -update_cmd = pip_cmd.dispatch("install.pak", "pip") - -@update_cmd.handle() -async def update(arp: CommandResult): - ... -``` - -另外,`AlconnaMatcher` 有类似于 `got` 的 `got_path`: - -```python -from nonebot_plugin_alconna import At, Match, UniMessage, on_alconna - - -test_cmd = on_alconna(Alconna("test", Args["target?", Union[str, At]])) - -@test_cmd.handle() -async def tt_h(target: Match[Union[str, At]]): - if target.available: - test_cmd.set_path_arg("target", target.result) - -@test_cmd.got_path("target", prompt="请输入目标") -async def tt(target: Union[str, At]): - await test_cmd.send(UniMessage(["ok\n", target])) -``` - -`got_path` 与 `assign`,`Match`,`Query` 等地方一样,都需要指明 `path` 参数 (即对应 Arg 验证的路径) - -`got_path` 会获取消息的最后一个消息段并转为 path 对应的类型,例如示例中 `target` 对应的 Arg 里要求 str 或 At,则 got 后用户输入的消息只有为 text 或 at 才能进入处理函数。 - -:::tip - -`path` 支持 ~XXX 语法,其会把 ~ 替换为可能的父级路径: - -```python - pip = Alconna( - "pip", - Subcommand( - "install", - Args["pak", str], - Option("--upgrade|-U"), - Option("--force-reinstall"), - ), - Subcommand("list", Option("--out-dated")), - ) - - pipcmd = on_alconna(pip) - pip_install_cmd = pipcmd.dispatch("install") - - - @pip_install_cmd.assign("~upgrade") - async def pip1_u(pak: Query[str] = Query("~pak")): - await pip_install_cmd.finish(f"pip upgrading {pak.result}...") -``` - -::: - -## 响应器创建装饰 - -本插件提供了一个 `funcommand` 装饰器, 其用于将一个接受任意参数, 返回 `str` 或 `Message` 或 `MessageSegment` 的函数转换为命令响应器: - -```python -from nonebot_plugin_alconna import funcommand - - -@funcommand() -async def echo(msg: str): - return msg -``` - -其等同于: - -```python -from arclet.alconna import Alconna, Args -from nonebot_plugin_alconna import on_alconna, AlconnaMatch, Match - - -echo = on_alconna(Alconna("echo", Args["msg", str])) - -@echo.handle() -async def echo_exit(msg: Match[str] = AlconnaMatch("msg")): - await echo.finish(msg.result) - -``` - -## 类Koishi构造器 - -本插件提供了一个 `Command` 构造器,其基于 `arclet.alconna.tools` 中的 `AlconnaString`, 以类似 `Koishi` 中注册命令的方式来构建一个 **AlconnaMatcher** : - -```python -from nonebot_plugin_alconna import Command, Arparma - - -book = ( - Command("book", "测试") - .option("writer", "-w ") - .option("writer", "--anonymous", {"id": 0}) - .usage("book [-w | --anonymous]") - .shortcut("测试", {"args": ["--anonymous"]}) - .build() -) - -@book.handle() -async def _(arp: Arparma): - await book.send(str(arp.options)) -``` - -甚至,你可以设置 `action` 来设定响应行为: - -```python -book = ( - Command("book", "测试") - .option("writer", "-w ") - .option("writer", "--anonymous", {"id": 0}) - .usage("book [-w | --anonymous]") - .shortcut("测试", {"args": ["--anonymous"]}) - .action(lambda options: str(options)) # 会自动通过 bot.send 发送 - .build() -) -``` - -## 返回值中间件 - -在 `AlconnaMatch`,`AlconnaQuery` 或 `got_path` 中,你可以使用 `middleware` 参数来传入一个对返回值进行处理的函数: - -```python -from nonebot_plugin_alconna import image_fetch - - -mask_cmd = on_alconna( - Alconna("search", Args["img?", Image]), -) - - -@mask_cmd.handle() -async def mask_h(matcher: AlconnaMatcher, img: Match[bytes] = AlconnaMatch("img", image_fetch)): - result = await search_img(img.result) - await matcher.send(result.content) -``` - -其中,`image_fetch` 是一个中间件,其接受一个 `Image` 对象,并提取图片的二进制数据返回。 - -## 匹配拓展 - -本插件提供了一个 `Extension` 类,其用于自定义 AlconnaMatcher 的部分行为 - -例如一个 `LLMExtension` 可以如下实现 (仅举例): - -```python -from nonebot_plugin_alconna import Extension, Alconna, on_alconna, Interface - - -class LLMExtension(Extension): - @property - def priority(self) -> int: - return 10 - - @property - def id(self) -> str: - return "LLMExtension" - - def __init__(self, llm): - self.llm = llm - - def post_init(self, alc: Alconna) -> None: - self.llm.add_context(alc.command, alc.meta.description) - - async def receive_wrapper(self, bot, event, receive): - resp = await self.llm.input(str(receive)) - return receive.__class__(resp.content) - - def before_catch(self, name, annotation, default): - return name == "llm" - - def catch(self, interface: Interface): - if interface.name == "llm": - return self.llm - -matcher = on_alconna( - Alconna(...), - extensions=[LLMExtension(LLM)] -) -... -``` - -那么添加了 `LLMExtension` 的响应器便能接受任何能通过 llm 翻译为具体命令的自然语言消息,同时可以在响应器中为所有 `llm` 参数注入模型变量。 - -目前 `Extension` 的功能有: - -- `validate`: 对于事件的来源适配器或 bot 选择是否接受响应 -- `output_converter`: 输出信息的自定义转换方法 -- `message_provider`: 从传入事件中自定义提取消息的方法 -- `receive_provider`: 对传入的消息 (Message 或 UniMessage) 的额外处理 -- `context_provider`: 对命令上下文的额外处理 -- `permission_check`: 命令对消息解析并确认头部匹配(即确认选择响应)时对发送者的权限判断 -- `parse_wrapper`: 对命令解析结果的额外处理 -- `send_wrapper`: 对发送的消息 (Message 或 UniMessage) 的额外处理 -- `before_catch`: 自定义依赖注入的绑定确认函数 -- `catch`: 自定义依赖注入处理函数 -- `post_init`: 响应器创建后对命令对象的额外处理 - -例如内置的 `DiscordSlashExtension`,其可自动将 Alconna 对象翻译成 slash 指令并注册,且将收到的指令交互事件转为指令供命令解析: - -```python -from nonebot_plugin_alconna import Match, on_alconna -from nonebot_plugin_alconna.builtins.extensions.discord import DiscordSlashExtension - - -alc = Alconna( - ["/"], - "permission", - Subcommand("add", Args["plugin", str]["priority?", int]), - Option("remove", Args["plugin", str]["time?", int]), - meta=CommandMeta(description="权限管理"), -) - -matcher = on_alconna(alc, extensions=[DiscordSlashExtension()]) - -@matcher.assign("add") -async def add(plugin: Match[str], priority: Match[int]): - await matcher.finish(f"added {plugin.result} with {priority.result if priority.available else 0}") - -@matcher.assign("remove") -async def remove(plugin: Match[str], time: Match[int]): - await matcher.finish(f"removed {plugin.result} with {time.result if time.available else -1}") -``` - -目前插件提供了 4 个内置的 `Extension`,它们在 `nonebot_plugin_alconna.builtins.extensions` 下: - -- `ReplyRecordExtension`: 将消息事件中的回复暂存在 extension 中,使得解析用的消息不带回复信息,同时可以在后续的处理中获取回复信息。 -- `DiscordSlashExtension`: 将 Alconna 的命令自动转换为 Discord 的 Slash Command,并将 Slash Command 的交互事件转换为消息交给 Alconna 处理。 -- `MarkdownOutputExtension`: 将 Alconna 的自动输出转换为 Markdown 格式 -- `TelegramSlashExtension`: 将 Alconna 的命令注册在 Telegram 上以获得提示。 - -:::tip - -全局的 Extension 可延迟加载 (即若有全局拓展加载于部分 AlconnaMatcher 之后,这部分响应器会被追加拓展) - -::: - -## 补全会话 - -补全会话基于 [`半自动补全`](./command.md#半自动补全),用于指令参数缺失或参数错误时给予交互式提示,类似于 `got-reject`: - -```python -from nonebot_plugin_alconna import Alconna, Args, Field, At, on_alconna - -alc = Alconna( - "添加教师", - Args["name", str, Field(completion=lambda: "请输入姓名")], - Args["phone", int, Field(completion=lambda: "请输入手机号")], - Args["at", [str, At], Field(completion=lambda: "请输入教师号")], -) - -cmd = on_alconna(alc, comp_config={"lite": True}, skip_for_unmatch=False) - -@cmd.handle() -async def handle(result: Arparma): - cmd.finish("添加成功") -``` - -此时,当用户输入 `添加教师` 时,会自动提示用户输入姓名,手机号和教师号,用户输入后会自动进入下一个提示: - - - -补全会话配置如下: - -```python -class CompConfig(TypedDict): - tab: NotRequired[str] - """用于切换提示的指令的名称""" - enter: NotRequired[str] - """用于输入提示的指令的名称""" - exit: NotRequired[str] - """用于退出会话的指令的名称""" - timeout: NotRequired[int] - """超时时间""" - hide_tabs: NotRequired[bool] - """是否隐藏所有提示""" - hides: NotRequired[Set[Literal["tab", "enter", "exit"]]] - """隐藏的指令""" - disables: NotRequired[Set[Literal["tab", "enter", "exit"]]] - """禁用的指令""" - lite: NotRequired[bool] - """是否使用简洁版本的补全会话(相当于同时配置 disables、hides、hide_tabs)""" -``` - -## 内置插件 - -类似于 Nonebot 本身提供的内置插件,`nonebot_plugin_alconna` 提供了两个内置插件:`echo` 和 `help`。 - -你可以用本插件的 `load_builtin_plugin(s)` 来加载它们: - -```python -from nonebot_plugin_alconna import load_builtin_plugins - -load_builtin_plugins("echo", "help") -``` - -其中 `help` 仅能列出所有 Alconna 指令。 - - diff --git a/website/versioned_docs/version-2.3.1/best-practice/alconna/uniseg.mdx b/website/versioned_docs/version-2.3.1/best-practice/alconna/uniseg.mdx deleted file mode 100644 index 8b7d5b6e588a..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/alconna/uniseg.mdx +++ /dev/null @@ -1,590 +0,0 @@ ---- -sidebar_position: 5 -description: 通用消息组件 ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# 通用消息组件 - -`uniseg` 模块属于 `nonebot-plugin-alconna` 的子插件,其提供了一套通用的消息组件,用于在 `nonebot-plugin-alconna` 下构建通用消息。 - -## 通用消息段 - -适配器下的消息段标注会匹配适配器特定的 `MessageSegment`, 而通用消息段与适配器消息段的区别在于: -通用消息段会匹配多个适配器中相似类型的消息段,并返回 `uniseg` 模块中定义的 [`Segment` 模型](https://nonebot.dev/docs/next/best-practice/alconna/utils#%E9%80%9A%E7%94%A8%E6%B6%88%E6%81%AF%E6%AE%B5), 以达到**跨平台接收消息**的作用。 - -`nonebot-plugin-alconna.uniseg` 提供了类似 `MessageSegment` 的通用消息段,并可在 `Alconna` 下直接标注使用: - -```python -class Segment: - """基类标注""" - children: List["Segment"] - -class Text(Segment): - """Text对象, 表示一类文本元素""" - text: str - styles: Dict[Tuple[int, int], List[str]] - -class At(Segment): - """At对象, 表示一类提醒某用户的元素""" - flag: Literal["user", "role", "channel"] - target: str - display: Optional[str] - -class AtAll(Segment): - """AtAll对象, 表示一类提醒所有人的元素""" - here: bool - -class Emoji(Segment): - """Emoji对象, 表示一类表情元素""" - id: str - name: Optional[str] - -class Media(Segment): - url: Optional[str] - id: Optional[str] - path: Optional[Union[str, Path]] - raw: Optional[Union[bytes, BytesIO]] - mimetype: Optional[str] - name: str - - to_url: ClassVar[Optional[MediaToUrl]] - -class Image(Media): - """Image对象, 表示一类图片元素""" - -class Audio(Media): - """Audio对象, 表示一类音频元素""" - duration: Optional[int] - -class Voice(Media): - """Voice对象, 表示一类语音元素""" - duration: Optional[int] - -class Video(Media): - """Video对象, 表示一类视频元素""" - -class File(Segment): - """File对象, 表示一类文件元素""" - id: str - name: Optional[str] - -class Reply(Segment): - """Reply对象,表示一类回复消息""" - id: str - """此处不一定是消息ID,可能是其他ID,如消息序号等""" - msg: Optional[Union[Message, str]] - origin: Optional[Any] - -class Reference(Segment): - """Reference对象,表示一类引用消息。转发消息 (Forward) 也属于此类""" - id: Optional[str] - """此处不一定是消息ID,可能是其他ID,如消息序号等""" - children: List[Union[RefNode, CustomNode]] - -class Hyper(Segment): - """Hyper对象,表示一类超级消息。如卡片消息、ark消息、小程序等""" - format: Literal["xml", "json"] - raw: Optional[str] - content: Optional[Union[dict, list]] - -class Other(Segment): - """其他 Segment""" - origin: MessageSegment - -``` - -:::tip - -或许你注意到了 `Segment` 上有一个 `children` 属性。 - -这是因为在 [`Satori`](https://satori.js.org/zh-CN/) 协议的规定下,一类元素可以用其子元素来代表一类兼容性消息 -(例如,qq 的商场表情在某些平台上可以用图片代替)。 - -为此,本插件提供了两种方式来表达 "获取子元素" 的方法: - -```python -from nonebot_plugin_alconna.builtins.uniseg.chronocat import MarketFace -from nonebot_plugin_alconna import Args, Image, Alconna, select, select_first - -# 表示这个指令需要的图片要么直接是 Image 要么是在 MarketFace 元素内的 Image -alc1 = Alconna("make_meme", Args["img", [Image, Image.from_(MarketFace)]]) - -# 表示这个指令需要的图片会在目标元素下进行搜索,将所有符合 Image 的元素选出来并将第一个作为结果 -alc2 = Alconna("make_meme", Args["img", select(Image, index=0)]) # 也可以使用 select_first(Image) -``` - -::: - -## 通用消息序列 - -`nonebot-plugin-alconna.uniseg` 同时提供了一个类似于 `Message` 的 `UniMessage` 类型,其元素为经过通用标注转换后的通用消息段。 - -你可以用如下方式获取 `UniMessage`: - - - - -通过提供的 `UniversalMessage` 或 `UniMsg` 依赖注入器来获取 `UniMessage`。 - -```python -from nonebot_plugin_alconna.uniseg import UniMsg, At, Reply - - -matcher = on_xxx(...) - -@matcher.handle() -async def _(msg: UniMsg): - reply = msg[Reply, 0] - print(reply.origin) - if msg.has(At): - ats = msg.get(At) - print(ats) - ... -``` - - - - -注意,`generate` 方法在响应器以外的地方如果不传入 `event` 与 `bot` 则无法处理 reply。 - -```python -from nonebot import Message, EventMessage -from nonebot_plugin_alconna.uniseg import UniMessage - - -matcher = on_xxx(...) - -@matcher.handle() -async def _(message: Message = EventMessage()): - msg = await UniMessage.generate(message=message) - msg1 = UniMessage.generate_without_reply(message=message) -``` - - - - -不仅如此,你还可以通过 `UniMessage` 的 `export` 与 `send` 方法来**跨平台发送消息**。 - -`UniMessage.export` 会通过传入的 `bot: Bot` 参数,或上下文中的 `Bot` 对象读取适配器信息,并使用对应的生成方法把通用消息转为适配器对应的消息序列: - -```python -from nonebot import Bot, on_command -from nonebot_plugin_alconna.uniseg import Image, UniMessage - - -test = on_command("test") - -@test.handle() -async def handle_test(): - await test.send(await UniMessage(Image(path="path/to/img")).export()) -``` - -除此之外 `UniMessage.send` 方法基于 `UniMessage.export` 并调用各适配器下的发送消息方法,返回一个 `Receipt` 对象,用于修改/撤回消息: - -```python -from nonebot import Bot, on_command -from nonebot_plugin_alconna.uniseg import UniMessage - - -test = on_command("test") - -@test.handle() -async def handle(): - receipt = await UniMessage.text("hello!").send(at_sender=True, reply_to=True) - await receipt.recall(delay=1) -``` - -而在 `AlconnaMatcher` 下,`got`, `send`, `reject` 等可以发送消息的方法皆支持使用 `UniMessage`,不需要手动调用 export 方法: - -```python -from arclet.alconna import Alconna, Args -from nonebot_plugin_alconna import Match, AlconnaMatcher, on_alconna -from nonebot_plugin_alconna.uniseg import At, UniMessage - - -test_cmd = on_alconna(Alconna("test", Args["target?", At])) - -@test_cmd.handle() -async def tt_h(matcher: AlconnaMatcher, target: Match[At]): - if target.available: - matcher.set_path_arg("target", target.result) - -@test_cmd.got_path("target", prompt="请输入目标") -async def tt(target: At): - await test_cmd.send(UniMessage([target, "\ndone."])) -``` - -:::caution - -在响应器以外的地方,除非启用了 `alconna_apply_fetch_targets` 配置项,否则 `bot` 参数必须手动传入。 - -::: - -### 构造 - -如同 `Message`, `UniMessage` 可以传入单个字符串/消息段,或可迭代的字符串/消息段: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, At - - -msg = UniMessage("Hello") -msg1 = UniMessage(At("user", "124")) -msg2 = UniMessage(["Hello", At("user", "124")]) -``` - -`UniMessage` 上同时存在便捷方法,令其可以链式地添加消息段: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, At, Image - - -msg = UniMessage.text("Hello").at("124").image(path="/path/to/img") -assert msg == UniMessage( - ["Hello", At("user", "124"), Image(path="/path/to/img")] -) -``` - -### 拼接消息 - -`str`、`UniMessage`、`Segment` 对象之间可以直接相加,相加均会返回一个新的 `UniMessage` 对象: - -```python -# 消息序列与消息段相加 -UniMessage("text") + Text("text") -# 消息序列与字符串相加 -UniMessage([Text("text")]) + "text" -# 消息序列与消息序列相加 -UniMessage("text") + UniMessage([Text("text")]) -# 字符串与消息序列相加 -"text" + UniMessage([Text("text")]) -# 消息段与消息段相加 -Text("text") + Text("text") -# 消息段与字符串相加 -Text("text") + "text" -# 消息段与消息序列相加 -Text("text") + UniMessage([Text("text")]) -# 字符串与消息段相加 -"text" + Text("text") -``` - -如果需要在当前消息序列后直接拼接新的消息段,可以使用 `Message.append`、`Message.extend` 方法,或者使用自加: - -```python -msg = UniMessage([Text("text")]) -# 自加 -msg += "text" -msg += Text("text") -msg += UniMessage([Text("text")]) -# 附加 -msg.append(Text("text")) -# 扩展 -msg.extend([Text("text")]) -``` - -### 使用消息模板 - -`UniMessage.template` 同样类似于 `Message.template`,可以用于格式化消息,大体用法参考 [消息模板](../../tutorial/message#使用消息模板)。 - -这里额外说明 `UniMessage.template` 的拓展控制符 - -相比 `Message`,UniMessage 对于 `{:XXX}` 做了另一类拓展。其能够识别例如 At(xxx, yyy) 或 Emoji(aaa, bbb)的字符串并执行 - -以 At(...) 为例: - -```python title=使用通用消息段的拓展控制符 ->>> from nonebot_plugin_alconna.uniseg import UniMessage ->>> UniMessage.template("{:At(user, target)}").format(target="123") -UniMessage(At("user", "123")) ->>> UniMessage.template("{:At(type=user, target=id)}").format(id="123") -UniMessage(At("user", "123")) ->>> UniMessage.template("{:At(type=user, target=123)}").format() -UniMessage(At("user", "123")) -``` - -而在 `AlconnaMatcher` 中,`{:XXX}` 更进一步地提供了获取 `event` 和 `bot` 中的属性的功能: - -```python title=在AlconnaMatcher中使用通用消息段的拓展控制符 -from arclet.alconna import Alconna, Args -from nonebot_plugin_alconna import At, Match, UniMessage, AlconnaMatcher, on_alconna - - -test_cmd = on_alconna(Alconna("test", Args["target?", At])) - -@test_cmd.handle() -async def tt_h(matcher: AlconnaMatcher, target: Match[At]): - if target.available: - matcher.set_path_arg("target", target.result) - -@test_cmd.got_path( - "target", - prompt=UniMessage.template("{:At(user, $event.get_user_id())} 请确认目标") -) -async def tt(): - await test_cmd.send( - UniMessage.template("{:At(user, $event.get_user_id())} 已确认目标为 {target}") - ) -``` - -另外也有 `$message_id` 与 `$target` 两个特殊值。 - -### 检查消息段 - -我们可以通过 `in` 运算符或消息序列的 `has` 方法来: - -```python -# 是否存在消息段 -At("user", "1234") in message -# 是否存在指定类型的消息段 -At in message -``` - -我们还可以使用 `only` 方法来检查消息中是否仅包含指定的消息段: - -```python -# 是否都为 "test" -message.only("test") -# 是否仅包含指定类型的消息段 -message.only(Text) -``` - -### 获取消息纯文本 - -类似于 `Message.extract_plain_text()`,用于获取通用消息的纯文本: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, At - - -# 提取消息纯文本字符串 -assert UniMessage( - [At("user", "1234"), "text"] -).extract_plain_text() == "text" -``` - -### 遍历 - -通用消息序列继承自 `List[Segment]` ,因此可以使用 `for` 循环遍历消息段: - -```python -for segment in message: # type: Segment - ... -``` - -### 过滤、索引与切片 - -消息序列对列表的索引与切片进行了增强,在原有列表 `int` 索引与 `slice` 切片的基础上,支持 `type` 过滤索引与切片: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, At, Text, Reply - - -message = UniMessage( - [ - Reply(...), - "text1", - At("user", "1234"), - "text2" - ] -) -# 索引 -message[0] == Reply(...) -# 切片 -message[0:2] == UniMessage([Reply(...), Text("text1")]) -# 类型过滤 -message[At] == Message([At("user", "1234")]) -# 类型索引 -message[At, 0] == At("user", "1234") -# 类型切片 -message[Text, 0:2] == UniMessage([Text("text1"), Text("text2")]) -``` - -我们也可以通过消息序列的 `include`、`exclude` 方法进行类型过滤: - -```python -message.include(Text, At) -message.exclude(Reply) -``` - -同样的,消息序列对列表的 `index`、`count` 方法也进行了增强,可以用于索引指定类型的消息段: - -```python -# 指定类型首个消息段索引 -message.index(Text) == 1 -# 指定类型消息段数量 -message.count(Text) == 2 -``` - -此外,消息序列添加了一个 `get` 方法,可以用于获取指定类型指定个数的消息段: - -```python -# 获取指定类型指定个数的消息段 -message.get(Text, 1) == UniMessage([Text("test1")]) -``` - -## 消息发送 - -前面提到,通用消息可用 `UniMessage.send` 发送自身: - -```python -async def send( - self, - target: Union[Event, Target, None] = None, - bot: Optional[Bot] = None, - fallback: bool = True, - at_sender: Union[str, bool] = False, - reply_to: Union[str, bool] = False, -) -> Receipt: -``` - -实际上,`UniMessage` 同时提供了获取消息事件 id 与消息发送对象的方法: - - - - -通过提供的 `MessageTarget`, `MessageId` 或 `MsgTarget`, `MsgId` 依赖注入器来获取消息事件 id 与消息发送对象。 - -```python -from nonebot_plugin_alconna.uniseg import MessageId, MsgTarget - - -matcher = on_xxx(...) - -@matcher.handle() -asycn def _(target: MsgTarget, msg_id: MessageId): - ... -``` - - - - -```python -from nonebot import Event, Bot -from nonebot_plugin_alconna.uniseg import UniMessage, Target - - -matcher = on_xxx(...) - -@matcher.handle() -asycn def _(bot: Bot, event: Event): - target: Target = UniMessage.get_target(event, bot) - msg_id: str = UniMessage.get_message_id(event, bot) - -``` - - - - -`send`, `get_target`, `get_message_id` 中与 `event`, `bot` 相关的参数都会尝试从上下文中获取对象。 - -### 消息发送对象 - -消息发送对象是用来描述响应消息时的发送对象或者主动发送消息时的目标对象的对象,它包含了以下属性: - -```python -class Target: - id: str - """目标id;若为群聊则为group_id或者channel_id,若为私聊则为user_id""" - parent_id: str - """父级id;若为频道则为guild_id,其他情况下可能为空字符串(例如 Feishu 下可作为部门 id)""" - channel: bool - """是否为频道,仅当目标平台符合频道概念时""" - private: bool - """是否为私聊""" - source: str - """可能的事件id""" - self_id: Union[str, None] - """机器人id,若为 None 则 Bot 对象会随机选择""" - selector: Union[Callable[[Bot], Awaitable[bool]], None] - """选择器,用于在多个 Bot 对象中选择特定 Bot""" - extra: Dict[str, Any] - """额外信息,用于适配器扩展""" -``` - -其构造时需要如下参数: - -- `id` 为目标id;若为群聊则为 group_id 或者 channel_id,若为私聊则为user_id -- `parent_id` 为父级id;若为频道则为 guild_id,其他情况下可能为空字符串(例如 Feishu 下可作为部门 id) -- `channel` 为是否为频道,仅当目标平台符合频道概念时 -- `private` 为是否为私聊 -- `source` 为可能的事件id -- `self_id` 为机器人id,若为 None 则 Bot 对象会随机选择 -- `selector` 为选择器,用于在多个 Bot 对象中选择特定 Bot -- `scope` 为适配器范围,用于传入内置的特定选择器 -- `adapter` 为适配器名称,若为 None 则需要明确指定 Bot 对象 -- `platform` 为平台名称,仅当目标适配器存在多个平台时使用 -- `extra` 为额外信息,用于适配器扩展 - -通过 `Target` 对象,我们可以在 `UniMessage.send` 中指定发送对象: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, MsgTarget, Target, SupportScope - - -matcher = on_xxx(...) - -@matcher.handle() -async def _(target: MsgTarget): - await UniMessage("Hello!").send(target=target) - target1 = Target("xxxx", scope=SupportScope.qq_client) - await UniMessage("Hello!").send(target=target1) -``` - -### 主动发送消息 - -`UniMessage.send` 也可以用于主动发送消息: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, Target, SupportScope -from nonebot import get_driver - - -driver = get_driver() - -@driver.on_startup -async def on_startup(): - target = Target("xxxx", scope=SupportScope.qq_client) - await UniMessage("Hello!").send(target=target) -``` - -## 自定义消息段 - -`uniseg` 提供了部分方法来允许用户自定义 Segment 的序列化和反序列化: - -```python -from dataclasses import dataclass - -from nonebot.adapters import Bot -from nonebot.adapters import MessageSegment as BaseMessageSegment -from nonebot.adapters.satori import Custom, Message, MessageSegment - -from nonebot_plugin_alconna.uniseg.builder import MessageBuilder -from nonebot_plugin_alconna.uniseg.exporter import MessageExporter -from nonebot_plugin_alconna.uniseg import Segment, custom_handler, custom_register - - -@dataclass -class MarketFace(Segment): - tabId: str - faceId: str - key: str - - -@custom_register(MarketFace, "chronocat:marketface") -def mfbuild(builder: MessageBuilder, seg: BaseMessageSegment): - if not isinstance(seg, Custom): - raise ValueError("MarketFace can only be built from Satori Message") - return MarketFace(**seg.data)(*builder.generate(seg.children)) - - -@custom_handler(MarketFace) -async def mfexport(exporter: MessageExporter, seg: MarketFace, bot: Bot, fallback: bool): - if exporter.get_message_type() is Message: - return MessageSegment("chronocat:marketface", seg.data)(await exporter.export(seg.children, bot, fallback)) - -``` - -具体而言,你可以使用 `custom_register` 来增加一个从 MessageSegment 到 Segment 的处理方法;使用 `custom_handler` 来增加一个从 Segment 到 MessageSegment 的处理方法。 diff --git a/website/versioned_docs/version-2.3.1/best-practice/data-storing.md b/website/versioned_docs/version-2.3.1/best-practice/data-storing.md deleted file mode 100644 index ffa4f61a71a4..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/data-storing.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -sidebar_position: 1 -description: 存储数据文件到本地 ---- - -# 数据存储 - -在使用插件的过程中,难免会需要存储一些持久化数据,例如用户的个人信息、群组的信息等。除了使用数据库等第三方存储之外,还可以使用本地文件来自行管理数据。NoneBot 提供了 `nonebot-plugin-localstore` 插件,可用于获取正确的数据存储路径并写入数据。 - -## 安装插件 - -在使用前请先安装 `nonebot-plugin-localstore` 插件至项目环境中,可参考[获取商店插件](../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如: - -在**项目目录**下执行以下命令: - -```bash -nb plugin install nonebot-plugin-localstore -``` - -## 使用插件 - -`nonebot-plugin-localstore` 插件兼容 Windows、Linux 和 macOS 等操作系统,使用时无需关心操作系统的差异。同时插件提供 `nb-cli` 脚本,可以使用 `nb localstore` 命令来检查数据存储路径。 - -在使用本插件前同样需要使用 `require` 方法进行**加载**并**导入**需要使用的方法,可参考 [跨插件访问](../advanced/requiring.md) 一节进行了解,如: - -```python -from nonebot import require - -require("nonebot_plugin_localstore") - -import nonebot_plugin_localstore as store - -# 获取插件缓存目录 -cache_dir = store.get_cache_dir("plugin_name") -# 获取插件缓存文件 -cache_file = store.get_cache_file("plugin_name", "file_name") -# 获取插件数据目录 -data_dir = store.get_data_dir("plugin_name") -# 获取插件数据文件 -data_file = store.get_data_file("plugin_name", "file_name") -# 获取插件配置目录 -config_dir = store.get_config_dir("plugin_name") -# 获取插件配置文件 -config_file = store.get_config_file("plugin_name", "file_name") -``` - -:::danger 警告 -在 Windows 和 macOS 系统下,插件的数据目录和配置目录是同一个目录,因此在使用时需要注意避免文件名冲突。 -::: - -插件提供的方法均返回一个 `pathlib.Path` 路径,可以参考 [pathlib 文档](https://docs.python.org/zh-cn/3/library/pathlib.html)来了解如何使用。常用的方法有: - -```python -from pathlib import Path - -data_file = store.get_data_file("plugin_name", "file_name") -# 写入文件内容 -data_file.write_text("Hello World!") -# 读取文件内容 -data = data_file.read_text() -``` - -:::note 提示 - -对于嵌套插件,子插件的存储目录将位于父插件存储目录下。 - -::: - -## 配置项 - -### localstore_cache_dir - -自定义缓存目录 - -默认值: - -- macOS: `~/Library/Caches/` -- Unix: `~/.cache/` (XDG default) -- Windows: `C:\Users\\AppData\Local\\Cache` - -```dotenv -LOCALSTORE_CACHE_DIR=/tmp/cache -``` - -### localstore_data_dir - -自定义数据目录 - -默认值: - -- macOS: `~/Library/Application Support/` -- Unix: `~/.local/share/` or in $XDG_DATA_HOME, if defined -- Win XP (not roaming): `C:\Documents and Settings\\Application Data\` -- Win 7 (not roaming): `C:\Users\\AppData\Local\` - -```dotenv -LOCALSTORE_DATA_DIR=/tmp/data -``` - -### localstore_config_dir - -自定义配置目录 - -默认值: - -- macOS: same as user_data_dir -- Unix: `~/.config/` -- Win XP (roaming): `C:\Documents and Settings\\Local Settings\Application Data\` -- Win 7 (roaming): `C:\Users\\AppData\Roaming\` - -```dotenv -LOCALSTORE_CONFIG_DIR=/tmp/config -``` - -### localstore_plugin_cache_dir - -自定义插件缓存目录 - -默认值:`{}` - -```dotenv -LOCALSTORE_PLUGIN_CACHE_DIR=' -{ - "plugin_id": "/tmp/plugin_cache" -} -' -``` - -### localstore_plugin_data_dir - -自定义插件数据目录 - -默认值:`{}` - -```dotenv -LOCALSTORE_PLUGIN_DATA_DIR=' -{ - "plugin_id": "/tmp/plugin_data" -} -' -``` - -### localstore_plugin_config_dir - -自定义插件配置目录 - -默认值:`{}` - -```dotenv -LOCALSTORE_PLUGIN_CONFIG_DIR=' -{ - "plugin_id": "/tmp/plugin_config" -} -' -``` diff --git a/website/versioned_docs/version-2.3.1/best-practice/database/README.mdx b/website/versioned_docs/version-2.3.1/best-practice/database/README.mdx deleted file mode 100644 index 0f8a157234ce..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/database/README.mdx +++ /dev/null @@ -1,145 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# 数据库 - -[`nonebot-plugin-orm`](https://github.com/nonebot/plugin-orm) 是 NoneBot 的数据库支持插件。 -本插件基于 [SQLAlchemy](https://www.sqlalchemy.org/) 和 [Alembic](https://alembic.sqlalchemy.org/),提供了许多与 NoneBot 紧密集成的功能: - -- 多 Engine / Connection 支持 -- Session 管理 -- 关系模型管理、依赖注入支持 -- 数据库迁移 - -## 安装 - - - - -```shell -nb plugin install nonebot-plugin-orm -``` - - - - -```shell -pip install nonebot-plugin-orm -``` - - - - - -```shell -pdm add nonebot-plugin-orm -``` - - - - -## 数据库驱动和后端 - -本插件只提供了 ORM 功能,没有数据库后端,也没有直接连接数据库后端的能力。 -所以你需要另行安装数据库驱动和数据库后端,并且配置数据库连接信息。 - -### SQLite - -[SQLite](https://www.sqlite.org/) 是一个轻量级的嵌入式数据库,它的数据以单文件的形式存储在本地,不需要单独的数据库后端。 -SQLite 非常适合用于开发环境和小型应用,但是不适合用于大型应用的生产环境。 - -虽然不需要另行安装数据库后端,但你仍然需要安装数据库驱动: - - - - -```shell -pip install "nonebot-plugin-orm[sqlite]" -``` - - - - - -```shell -pdm add "nonebot-plugin-orm[sqlite]" -``` - - - - -默认情况下,数据库文件为 `/nonebot-plugin-orm/db.sqlite3`(数据目录由 [nonebot-plugin-localstore](../data-storing) 提供)。 -或者,你可以通过配置 `SQLALCHEMY_DATABASE_URL` 来指定数据库文件路径: - -```shell -SQLALCHEMY_DATABASE_URL=sqlite+aiosqlite:///file_path -``` - -### PostgreSQL - -[PostgreSQL](https://www.postgresql.org/) 是世界上最先进的开源关系数据库之一,对各种高级且广泛应用的功能有最好的支持,是中小型应用的首选数据库。 - - - - -```shell -pip install nonebot-plugin-orm[postgresql] -``` - - - - - -```shell -pdm add nonebot-plugin-orm[postgresql] -``` - - - - -```shell -SQLALCHEMY_DATABASE_URL=postgresql+psycopg://user:password@host:port/dbname[?key=value&key=value...] -``` - -### MySQL / MariaDB - -[MySQL](https://www.mysql.com/) 和 [MariaDB](https://mariadb.com/) 是经典的开源关系数据库,适合用于中小型应用。 - - - - -```shell -pip install nonebot-plugin-orm[mysql] -``` - - - - - -```shell -pdm add nonebot-plugin-orm[mysql] -``` - - - - -```shell -SQLALCHEMY_DATABASE_URL=mysql+aiomysql://user:password@host:port/dbname[?key=value&key=value...] -``` - -## 使用 - -本插件提供了数据库迁移功能(此功能依赖于 [nb-cli 脚手架](../../quick-start#安装脚手架))。 -在安装了新的插件或机器人之后,你需要执行一次数据库迁移操作,将数据库同步至与机器人一致的状态: - -```shell -nb orm upgrade -``` - -运行完毕后,可以检查一下: - -```shell -nb orm check -``` - -如果输出是 `没有检测到新的升级操作`,那么恭喜你,数据库已经迁移完成了,你可以启动机器人了。 diff --git a/website/versioned_docs/version-2.3.1/best-practice/database/_category_.json b/website/versioned_docs/version-2.3.1/best-practice/database/_category_.json deleted file mode 100644 index 4c6eeb3a4d30..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/database/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "数据库", - "position": 7 -} diff --git a/website/versioned_docs/version-2.3.1/best-practice/database/developer/README.md b/website/versioned_docs/version-2.3.1/best-practice/database/developer/README.md deleted file mode 100644 index 8b6bf65866e3..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/database/developer/README.md +++ /dev/null @@ -1,378 +0,0 @@ -# 开发者指南 - -开发者指南内容较多,故分为了一个示例以及数个专题。 -阅读(并且最好跟随实践)示例后,你将会对使用 `nonebot-plugin-orm` 开发插件有一个基本的认识。 -如果想要更深入地学习关于 [SQLAlchemy](https://www.sqlalchemy.org/) 和 [Alembic](https://alembic.sqlalchemy.org/) 的知识,或者在使用过程中遇到了问题,可以查阅专题以及其官方文档。 - -## 示例 - -### 模型定义 - -首先,我们需要设计存储的数据的结构。 -例如天气插件,需要存储**什么地方 (`location`)** 的**天气是什么 (`weather`)**。 -其中,一个地方只会有一种天气,而不同地方可能有相同的天气。 -所以,我们可以设计出如下的模型: - -```python title=weather/__init__.py showLineNumbers -from nonebot_plugin_orm import Model -from sqlalchemy.orm import Mapped, mapped_column - - -class Weather(Model): - location: Mapped[str] = mapped_column(primary_key=True) - weather: Mapped[str] -``` - -其中,`primary_key=True` 意味着此列 (`location`) 是主键,即内容是唯一的且非空的。 -每一个模型必须有至少一个主键。 - -我们可以用以下代码检查模型生成的数据库模式是否正确: - -```python -from sqlalchemy.schema import CreateTable - -print(CreateTable(Weather.__table__)) -``` - -```sql -CREATE TABLE weather_weather ( - location VARCHAR NOT NULL, - weather VARCHAR NOT NULL, - CONSTRAINT pk_weather_weather PRIMARY KEY (location) -) -``` - -可以注意到表名是 `weather_weather` 而不是 `Weather` 或者 `weather`。 -这是因为 `nonebot-plugin-orm` 会自动为模型生成一个表名,规则是:`<插件模块名>_<类名小写>`。 - -你也可以通过指定 `__tablename__` 属性来自定义表名: - -```python {2} -class Weather(Model): - __tablename__ = "weather" - ... -``` - -```sql {1} -CREATE TABLE weather ( - ... -) -``` - -但是,并不推荐你这么做,因为这可能会导致不同插件间的表名重复,引发冲突。 -特别是当你会发布插件时,你并不知道其他插件会不会使用相同的表名。 - -### 首次迁移 - -我们成功定义了模型,现在启动机器人试试吧: - -```shell -$ nb run -01-02 15:04:05 [SUCCESS] nonebot | NoneBot is initializing... -01-02 15:04:05 [ERROR] nonebot_plugin_orm | 启动检查失败 -01-02 15:04:05 [ERROR] nonebot | Application startup failed. Exiting. -Traceback (most recent call last): - ... -click.exceptions.UsageError: 检测到新的升级操作: -[('add_table', - Table('weather', MetaData(), Column('location', String(), table=, primary_key=True, nullable=False), Column('weather', String(), table=, nullable=False), schema=None))] -``` - -咦,发生了什么? -`nonebot-plugin-orm` 试图阻止我们启动机器人。 -原来是我们定义了模型,但是数据库中并没有对应的表,这会导致插件不能正常运行。 -所以,我们需要迁移数据库。 - -首先,我们需要创建一个迁移脚本: - -```shell -nb orm revision -m "first revision" --branch-label weather -``` - -其中,`-m` 参数是迁移脚本的描述,`--branch-label` 参数是迁移脚本的分支,一般为插件模块名。 -执行命令过后,出现了一个 `weather/migrations` 目录,其中有一个 `xxxxxxxxxxxx_first_revision.py` 文件: - -```shell {4,5} -weather -├── __init__.py -├── config.py -└── migrations - └── xxxxxxxxxxxx_first_revision.py -``` - -这就是我们创建的迁移脚本,它记录了数据库模式的变化。 -我们可以查看一下它的内容: - -```python title=weather/migrations/xxxxxxxxxxxx_first_revision.py {25-33,39-41} showLineNumbers -"""first revision - -迁移 ID: xxxxxxxxxxxx -父迁移: -创建时间: 2006-01-02 15:04:05.999999 - -""" - -from __future__ import annotations - -from collections.abc import Sequence - -import sqlalchemy as sa -from alembic import op - -revision: str = "xxxxxxxxxxxx" -down_revision: str | Sequence[str] | None = None -branch_labels: str | Sequence[str] | None = ("weather",) -depends_on: str | Sequence[str] | None = None - - -def upgrade(name: str = "") -> None: - if name: - return - # ### commands auto generated by Alembic - please adjust! ### - op.create_table( - "weather_weather", - sa.Column("location", sa.String(), nullable=False), - sa.Column("weather", sa.String(), nullable=False), - sa.PrimaryKeyConstraint("location", name=op.f("pk_weather_weather")), - info={"bind_key": "weather"}, - ) - # ### end Alembic commands ### - - -def downgrade(name: str = "") -> None: - if name: - return - # ### commands auto generated by Alembic - please adjust! ### - op.drop_table("weather_weather") - # ### end Alembic commands ### -``` - -可以注意到脚本的主体部分(其余是模版代码,请勿修改)是: - -```python -# ### commands auto generated by Alembic - please adjust! ### -op.create_table( # CREATE TABLE - "weather_weather", # weather_weather - sa.Column("location", sa.String(), nullable=False), # location VARCHAR NOT NULL, - sa.Column("weather", sa.String(), nullable=False), # weather VARCHAR NOT NULL, - sa.PrimaryKeyConstraint("location", name=op.f("pk_weather_weather")), # CONSTRAINT pk_weather_weather PRIMARY KEY (location) - info={"bind_key": "weather"}, -) -# ### end Alembic commands ### -``` - -```python -# ### commands auto generated by Alembic - please adjust! ### -op.drop_table("weather_weather") # DROP TABLE weather_weather; -# ### end Alembic commands ### -``` - -虽然我们不是很懂这些代码的意思,但是可以注意到它们几乎与 SQL 语句 (DDL) 一一对应。 -显然,它们是用来创建和删除表的。 - -我们还可以注意到,`upgrade()` 和 `downgrade()` 函数中的代码是**互逆**的。 -也就是说,执行一次 `upgrade()` 函数,再执行一次 `downgrade()` 函数后,数据库的模式就会回到原来的状态。 - -这就是迁移脚本的作用:记录数据库模式的变化,以便我们在不同的环境中(例如开发环境和生产环境)**可复现地**、**可逆地**同步数据库模式,正如 git 对我们的代码做的事情那样。 - -对了,不要忘记还有一段注释:`commands auto generated by Alembic - please adjust!`。 -它在提醒我们,这些代码是由 Alembic 自动生成的,我们应该检查它们,并且根据需要进行调整。 - -:::caution 注意 -迁移脚本冗长且繁琐,我们一般不会手写它们,而是由 Alembic 自动生成。 -一般情况下,Alembic 足够智能,可以正确地生成迁移脚本。 -但是,在复杂或有歧义的情况下,我们可能需要手动调整迁移脚本。 -所以,**永远要检查迁移脚本,并且在开发环境中测试!** - -**迁移脚本中任何一处错误都足以使数据付之东流!** -::: - -确定迁移脚本正确后,我们就可以执行迁移脚本,将数据库模式同步到数据库中: - -```shell -nb orm upgrade -``` - -现在,我们可以正常启动机器人了。 - -开发过程中,我们可能会频繁地修改模型,这意味着我们需要频繁地创建并执行迁移脚本,非常繁琐。 -实际上,此时我们不在乎数据安全,只需要数据库模式与模型定义一致即可。 -所以,我们可以关闭 `nonebot-plugin-orm` 的启动检查: - -```shell title=.env.dev -ALEMBIC_STARTUP_CHECK=false -``` - -现在,每次启动机器人时,数据库模式会自动与模型定义同步,无需手动迁移。 - -### 会话管理 - -我们已经成功定义了模型,并且迁移了数据库,现在可以开始使用数据库了……吗? -并不能,因为模型只是数据结构的定义,并不能通过它操作数据(如果你曾经使用过 [Tortoise ORM](https://tortoise.github.io/),可能会知道 `await Weather.get(location="上海")` 这样的面向对象编程。 -但是 SQLAlchemy 不同,选择了命令式编程)。 -我们需要使用**会话**操作数据: - -```python title=weather/__init__.py {10,13} showLineNumbers -from nonebot import on_command -from nonebot.adapters import Message -from nonebot.params import CommandArg -from nonebot_plugin_orm import async_scoped_session - -weather = on_command("天气") - - -@weather.handle() -async def _(session: async_scoped_session, args: Message = CommandArg()): - location = args.extract_plain_text() - - if wea := await session.get(Weather, location): - await weather.finish(f"今天{location}的天气是{wea.weather}") - - await weather.finish(f"未查询到{location}的天气") -``` - -我们通过 `session: async_scoped_session` 依赖注入获得了一个会话,然后使用 `await session.get(Weather, location)` 查询数据库。 -`async_scoped_session` 是一个有作用域限制的会话,作用域为当前事件、当前事件响应器。 -会话产生的模型实例(例如此处的 `wea := await session.get(Weather, location)`)作用域与会话相同。 - -:::caution 注意 -此处提到的“会话”指的是 ORM 会话,而非 [NoneBot 会话](../../../appendices/session-control),两者的生命周期也是不同的(NoneBot 会话的生命周期中可能包含多个事件,不同的事件也会有不同的事件响应器)。 -具体而言,就是不要将 ORM 会话和模型实例存储在 NoneBot 会话状态中: - -```python {12} -from nonebot.params import ArgPlainText -from nonebot.typing import T_State - - -@weather.got("location", prompt="请输入地名") -async def _(state: T_State, session: async_scoped_session, location: str = ArgPlainText()): - wea = await session.get(Weather, location) - - if not wea: - await weather.finish(f"未查询到{location}的天气") - - state["weather"] = wea # 不要这么做,除非你知道自己在做什么 -``` - -当然非要这么做也不是不可以: - -```python {6} -@weather.handle() -async def _(state: T_State, session: async_scoped_session): - # 通过 await session.merge(state["weather"]) 获得了此 ORM 会话中的相应模型实例, - # 而非直接使用会话状态中的模型实例, - # 因为先前的 ORM 会话已经关闭了。 - wea = await session.merge(state["weather"]) - await weather.finish(f"今天{state['location']}的天气是{wea.weather}") -``` - -::: - -当有数据更改时,我们需要提交事务,也要注意会话作用域问题: - -```python title=weather/__init__.py {12,20} showLineNumbers -from nonebot.params import Depends - - -async def get_weather( - session: async_scoped_session, args: Message = CommandArg() -) -> Weather: - location = args.extract_plain_text() - - if not (wea := await session.get(Weather, location)): - wea = Weather(location=location, weather="未知") - session.add(wea) - # await session.commit() # 不应该在其他地方提交事务 - - return wea - - -@weather.handle() -async def _(session: async_scoped_session, wea: Weather = Depends(get_weather)): - await weather.send(f"今天的天气是{wea.weather}") - await session.commit() # 而应该在事件响应器结束前提交事务 -``` - -当然我们也可以获得一个新的会话,不过此时就要手动管理会话了: - -```python title=weather/__init__.py {5-6} showLineNumbers -from nonebot_plugin_orm import get_session - - -async def get_weather(location: str) -> str: - session = get_session() - async with session.begin(): - wea = await session.get(Weather, location) - - if not wea: - wea = Weather(location=location, weather="未知") - session.add(wea) - - return wea.weather - - -@weather.handle() -async def _(args: Message = CommandArg()): - wea = await get_weather(args.extract_plain_text()) - await weather.send(f"今天的天气是{wea}") -``` - -### 依赖注入 - -在上面的示例中,我们都是通过会话获得数据的。 -不过,我们也可以通过依赖注入获得数据: - -```python title=weather/__init__.py {12-14} showLineNumbers -from sqlalchemy import select -from nonebot.params import Depends -from nonebot_plugin_orm import SQLDepends - - -def extract_arg_plain_text(args: Message = CommandArg()) -> str: - return args.extract_plain_text() - - -@weather.handle() -async def _( - wea: Weather = SQLDepends( - select(Weather).where(Weather.location == Depends(extract_arg_plain_text)) - ), -): - await weather.send(f"今天的天气是{wea.weather}") -``` - -其中,`SQLDepends` 是一个特殊的依赖注入,它会根据类型标注和 SQL 语句提供数据,SQL 语句中也可以有子依赖。 - -不同的类型标注也会获得不同形式的数据: - -```python title=weather/__init__.py {5} showLineNumbers -from collections.abc import Sequence - -@weather.handle() -async def _( - weas: Sequence[Weather] = SQLDepends( - select(Weather).where(Weather.weather == Depends(extract_arg_plain_text)) - ), -): - await weather.send(f"今天的天气是{weas[0].weather}的城市有{','.join(wea.location for wea in weas)}") -``` - -支持的类型标注请参见 [依赖注入](dependency)。 - -我们也可以像 [类作为依赖](../../../advanced/dependency#类作为依赖) 那样,在类属性中声明子依赖: - -```python title=weather/__init__.py {5-6,10} showLineNumbers -from collections.abc import Sequence - -class Weather(Model): - location: Mapped[str] = mapped_column(primary_key=True) - weather: Mapped[str] = Depends(extract_arg_plain_text) - # weather: Annotated[Mapped[str], Depends(extract_arg_plain_text)] # Annotated 支持 - - -@weather.handle() -async def _(weas: Sequence[Weather]): - await weather.send( - f"今天的天气是{weas[0].weather}的城市有{','.join(wea.location for wea in weas)}" - ) -``` diff --git a/website/versioned_docs/version-2.3.1/best-practice/database/developer/_category_.json b/website/versioned_docs/version-2.3.1/best-practice/database/developer/_category_.json deleted file mode 100644 index 999af8e69b92..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/database/developer/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "开发者指南", - "position": 3 -} diff --git a/website/versioned_docs/version-2.3.1/best-practice/database/developer/dependency.md b/website/versioned_docs/version-2.3.1/best-practice/database/developer/dependency.md deleted file mode 100644 index 6496d6a106d5..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/database/developer/dependency.md +++ /dev/null @@ -1,240 +0,0 @@ ---- -sidebar_position: 3 -description: 依赖注入 ---- - -# 依赖注入 - -`nonebot-plugin-orm` 提供了强大且灵活的依赖注入,可以方便地帮助你获取数据库会话和查询数据。 - -## 数据库会话 - -### AsyncSession - -新数据库会话,常用于有独立的数据库操作逻辑的插件。 - -```python {13,26} -from nonebot import on_message -from nonebot.params import Depends -from nonebot_plugin_orm import AsyncSession, Model, async_scoped_session -from sqlalchemy.orm import Mapped, mapped_column - -message = on_message() - - -class Message(Model): - id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True) - - -async def get_message(session: AsyncSession) -> Message: - # 等价于 session = get_session() - async with session: - msg = Message() - - session.add(msg) - await session.commit() - await session.refresh(msg) - - return msg - - -@message.handle() -async def _(session: async_scoped_session, msg: Message = Depends(get_message)): - await session.rollback() # 无法回退 get_message() 中的更改 - await message.send(str(msg.id)) # msg 被存储,msg.id 递增 -``` - -### async_scoped_session - -数据库作用域会话,常用于事件响应器和有与响应逻辑相关的数据库操作逻辑的插件。 - -```python {13,26} -from nonebot import on_message -from nonebot.params import Depends -from nonebot_plugin_orm import Model, async_scoped_session -from sqlalchemy.orm import Mapped, mapped_column - -message = on_message() - - -class Message(Model): - id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True) - - -async def get_message(session: async_scoped_session) -> Message: - # 等价于 session = get_scoped_session() - msg = Message() - - session.add(msg) - await session.flush() - await session.refresh(msg) - - return msg - - -@message.handle() -async def _(session: async_scoped_session, msg: Message = Depends(get_message)): - await session.rollback() # 可以回退 get_message() 中的更改 - await message.send(str(msg.id)) # msg 没有被存储,msg.id 不变 -``` - -## 查询数据 - -### Model - -支持类作为依赖。 - -```python -from typing import Annotated - -from nonebot.params import Depends -from nonebot_plugin_orm import Model -from sqlalchemy.orm import Mapped, mapped_column - - -def get_id() -> int: ... - - -class Message(Model): - id: Annotated[Mapped[int], Depends(get_id)] = mapped_column( - primary_key=True, autoincrement=True - ) - - -async def _(msg: Message): - # 等价于 msg = ( - # await (await session.stream(select(Message).where(Message.id == get_id()))) - # .scalars() - # .one_or_none() - # ) - ... -``` - -### SQLDepends - -参数为一个 SQL 语句,决定依赖注入的内容,SQL 语句中可以使用子依赖。 - -```python {11-13} -from nonebot.params import Depends -from nonebot_plugin_orm import Model, SQLDepends -from sqlalchemy import select - - -def get_id() -> int: ... - - -async def _( - model: Model = SQLDepends(select(Model).where(Model.id == Depends(get_id))), -): ... -``` - -参数可以是任意 SQL 语句,但不建议使用 `select` 以外的语句,因为语句可能没有返回值(`returning` 除外),而且代码不清晰。 - -### 类型标注 - -类型标注决定依赖注入的数据结构,主要影响以下几个层面: - -- 迭代器(`session.execute()`)或异步迭代器(`session.stream()`) -- 标量(`session.execute().scalars()`)或元组(`session.execute()`) -- 一个(`session.execute().one_or_none()`,注意 `None` 时可能触发 [重载](../../../appendices/overload#重载))或全部(`session.execute()` / `session.execute().all()`) -- 连续(`session().execute()`)或分块(`session.execute().partitions()`) - -具体如下(可以使用父类型作为类型标注): - -- ```python - async def _(rows_partitions: AsyncIterator[Sequence[Tuple[Model, ...]]]): - # 等价于 rows_partitions = await (await session.stream(sql).partitions()) - - async for partition in rows_partitions: - for row in partition: - print(row[0], row[1], ...) - ``` - -- ```python - async def _(model_partitions: AsyncIterator[Sequence[Model]]): - # 等价于 model_partitions = await (await session.stream(sql).scalars().partitions()) - - async for partition in model_partitions: - for model in partition: - print(model) - ``` - -- ```python - async def _(row_partitions: Iterator[Sequence[Tuple[Model, ...]]]): - # 等价于 row_partitions = await session.execute(sql).partitions() - - for partition in rows_partitions: - for row in partition: - print(row[0], row[1], ...) - ``` - -- ```python - async def _(model_partitions: Iterator[Sequence[Model]]): - # 等价于 model_partitions = await (await session.execute(sql).scalars().partitions()) - - for partition in model_partitions: - for model in partition: - print(model) - ``` - -- ```python - async def _(rows: sa_async.AsyncResult[Tuple[Model, ...]]): - # 等价于 rows = await session.stream(sql) - - async for row in rows: - print(row[0], row[1], ...) - ``` - -- ```python - async def _(models: sa_async.AsyncScalarResult[Model]): - # 等价于 models = await session.stream(sql).scalars() - - async for model in models: - print(model) - ``` - -- ```python - async def _(rows: sa.Result[Tuple[Model, ...]]): - # 等价于 rows = await session.execute(sql) - - for row in rows: - print(row[0], row[1], ...) - ``` - -- ```python - async def _(models: sa.ScalarResult[Model]): - # 等价于 models = await session.execute(sql).scalars() - - for model in models: - print(model) - ``` - -- ```python - async def _(rows: Sequence[Tuple[Model, ...]]): - # 等价于 rows = await (await session.stream(sql).all()) - - for row in rows: - print(row[0], row[1], ...) - ``` - -- ```python - async def _(models: Sequence[Model]): - # 等价于 models = await (await session.stream(sql).scalars().all()) - - for model in models: - print(model) - ``` - -- ```python - async def _(row: Tuple[Model, ...]): - # 等价于 row = await (await session.stream(sql).one_or_none()) - - print(row[0], row[1], ...) - ``` - -- ```python - async def _(model: Model): - # 等价于 model = await (await session.stream(sql).scalars().one_or_none()) - - print(model) - ``` diff --git a/website/versioned_docs/version-2.3.1/best-practice/database/developer/test.md b/website/versioned_docs/version-2.3.1/best-practice/database/developer/test.md deleted file mode 100644 index 654ee7234aea..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/database/developer/test.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -sidebar_position: 2 -description: 测试 ---- - -# 测试 - -百思不如一试,测试是发现问题的最佳方式。 - -不同的用户会有不同的配置,为了提高项目的兼容性,我们需要在不同数据库后端上测试。 -手动进行大量的、重复的测试不可靠,也不现实,因此我们推荐使用 [GitHub Actions](https://github.com/features/actions) 进行自动化测试: - -```yaml title=.github/workflows/test.yml {12-42,52-53} showLineNumbers -name: Test - -on: - push: - branches: - - main - -jobs: - test: - runs-on: ubuntu-latest - - strategy: - matrix: - db: - - sqlite+aiosqlite:///db.sqlite3 - - postgresql+psycopg://postgres:postgres@localhost:5432/postgres - - mysql+aiomysql://mysql:mysql@localhost:3306/mymysql - - fail-fast: false - - env: - SQLALCHEMY_DATABASE_URL: ${{ matrix.db }} - - services: - postgresql: - image: ${{ startsWith(matrix.db, 'postgresql') && 'postgres' || '' }} - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - ports: - - 5432:5432 - - mysql: - image: ${{ startsWith(matrix.db, 'mysql') && 'mysql' || '' }} - env: - MYSQL_ROOT_PASSWORD: mysql - MYSQL_USER: mysql - MYSQL_PASSWORD: mysql - MYSQL_DATABASE: mymysql - ports: - - 3306:3306 - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Run migrations - run: pipx run nb-cli orm upgrade - - - name: Run tests - run: pytest -``` - -如果项目还需要考虑跨平台和跨 Python 版本兼容,测试矩阵中还需要增加这两个维度。 -但是,我们没必要在所有平台和 Python 版本上运行所有数据库的测试,因为很显然,PostgreSQL 和 MySQL 这类独立的数据库后端不会受平台和 Python 影响,而且 Github Actions 的非 Linux 平台不支持运行独立服务: - -| | Python 3.9 | Python 3.10 | Python 3.11 | Python 3.12 | -| ----------- | ---------- | ----------- | ----------- | --------------------------- | -| **Linux** | SQLite | SQLite | SQLite | SQLite / PostgreSQL / MySQL | -| **Windows** | SQLite | SQLite | SQLite | SQLite | -| **macOS** | SQLite | SQLite | SQLite | SQLite | - -```yaml title=.github/workflows/test.yml {12-24} showLineNumbers -name: Test - -on: - push: - branches: - - main - -jobs: - test: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.9", "3.10", "3.11", "3.12"] - db: ["sqlite+aiosqlite:///db.sqlite3"] - - include: - - os: ubuntu-latest - python-version: "3.12" - db: postgresql+psycopg://postgres:postgres@localhost:5432/postgres - - os: ubuntu-latest - python-version: "3.12" - db: mysql+aiomysql://mysql:mysql@localhost:3306/mymysql - - fail-fast: false - - env: - SQLALCHEMY_DATABASE_URL: ${{ matrix.db }} - - services: - postgresql: - image: ${{ startsWith(matrix.db, 'postgresql') && 'postgres' || '' }} - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - ports: - - 5432:5432 - - mysql: - image: ${{ startsWith(matrix.db, 'mysql') && 'mysql' || '' }} - env: - MYSQL_ROOT_PASSWORD: mysql - MYSQL_USER: mysql - MYSQL_PASSWORD: mysql - MYSQL_DATABASE: mymysql - ports: - - 3306:3306 - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Run migrations - run: pipx run nb-cli orm upgrade - - - name: Run tests - run: pytest -``` diff --git a/website/versioned_docs/version-2.3.1/best-practice/database/user.md b/website/versioned_docs/version-2.3.1/best-practice/database/user.md deleted file mode 100644 index 9bfc0ada6674..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/database/user.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -sidebar_position: 2 -description: 用户指南 ---- - -# 用户指南 - -`nonebot-plugin-orm` 功能强大且复杂,使用上有一定难度。 -不过,对于用户而言,只需要掌握部分功能即可。 - -:::caution 注意 -请注意区分插件的项目名(如:`nonebot-plugin-wordcloud`)和模块名(如:`nonebot_plugin_wordcloud`)。`nonebot-plugin-orm` 中统一使用插件模块名。参见 [插件命名规范](../../developer/plugin-publishing#插件命名规范)。 -::: - -## 示例 - -### 创建新机器人 - -我们想要创建一个机器人,并安装 `nonebot-plugin-wordcloud` 插件,只需要执行以下命令: - -```shell -nb init # 初始化项目文件夹 - -pip install nonebot-plugin-orm[sqlite] # 安装 nonebot-plugin-orm,并附带 SQLite 支持 - -nb plugin install nonebot-plugin-wordcloud # 安装插件 - -# nb orm heads # 查看有什么插件使用到了数据库(可选) - -nb orm upgrade # 升级数据库 - -# nb orm check # 检查一下数据库模式是否与模型定义一致(可选) - -nb run # 启动机器人 -``` - -### 卸载插件 - -我们已经安装了 `nonebot-plugin-wordcloud` 插件,但是现在想要卸载它,并且**删除它的数据**,只需要执行以下命令: - -```shell -nb plugin uninstall nonebot-plugin-wordcloud # 卸载插件 - -# nb orm heads # 查看有什么插件使用到了数据库。(可选) - -nb orm downgrade nonebot_plugin_wordcloud@base # 降级数据库,删除数据 - -# nb orm check # 检查一下数据库模式是否与模型定义一致(可选) -``` - -## CLI - -接下来,让我们了解下示例中出现的 CLI 命令的含义: - -### heads - -显示所有的分支头。一般一个分支对应一个插件。 - -```shell -nb orm heads -``` - -输出格式为 `<迁移 ID> (<插件模块名>) (<头部类型>)`: - -``` -46327b837dd8 (nonebot_plugin_chatrecorder) (head) -9492159f98f7 (nonebot_plugin_user) (head) -71a72119935f (nonebot_plugin_session_orm) (effective head) -ade8cdca5470 (nonebot_plugin_wordcloud) (head) -``` - -### upgrade - -升级数据库。每次安装新的插件或更新插件版本后,都需要执行此命令。 - -```shell -nb orm upgrade <插件模块名>@<迁移 ID> -``` - -其中,`<插件模块名>@<迁移 ID>` 是可选参数。如果不指定,则会将所有分支升级到最新版本,这也是最常见的用法: - -```shell -nb orm upgrade -``` - -### downgrade - -降级数据库。当需要回滚插件版本或删除插件时,可以执行此命令。 - -```shell -nb orm downgrade <插件模块名>@<迁移 ID> -``` - -其中,`<迁移 ID>` 也可以是 `base`,即回滚到初始状态。常用于卸载插件后删除其数据: - -```shell -nb orm downgrade <插件模块名>@base -``` - -### check - -检查数据库模式是否与模型定义一致。机器人启动前会自动运行此命令(`ALEMBIC_STARTUP_CHECK=true` 时),并在检查失败时阻止启动。 - -```shell -nb orm check -``` - -## 配置 - -### sqlalchemy_database_url - -默认数据库连接 URL。参见 [数据库驱动和后端](.#数据库驱动和后端) 和 [引擎配置 — SQLAlchemy 2.0 文档](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls)。 - -```shell -SQLALCHEMY_DATABASE_URL=dialect+driver://username:password@host:port/database -``` - -### sqlalchemy_bind - -bind keys(一般为插件模块名)到数据库连接 URL、[`create_async_engine()`](https://docs.sqlalchemy.org/en/20/orm/extensions/asyncio.html#sqlalchemy.ext.asyncio.create_async_engine) 参数字典或 [`AsyncEngine`](https://docs.sqlalchemy.org/en/20/orm/extensions/asyncio.html#sqlalchemy.ext.asyncio.AsyncEngine) 实例的字典。 -例如,我们想要让 `nonebot-plugin-wordcloud` 插件使用一个 SQLite 数据库,并开启 [Echo 选项](https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine.params.echo) 便于 debug,而其他插件使用默认的 PostgreSQL 数据库,可以这样配置: - -```shell -SQLALCHEMY_BINDS='{ - "": "postgresql+psycopg://scott:tiger@localhost/mydatabase", - "nonebot_plugin_wordcloud": { - "url": "sqlite+aiosqlite://", - "echo": true - } -}' -``` - -### sqlalchemy_engine_options - -[`create_async_engine()`](https://docs.sqlalchemy.org/en/20/orm/extensions/asyncio.html#sqlalchemy.ext.asyncio.create_async_engine) 默认参数字典。 - -```shell -SQLALCHEMY_ENGINE_OPTIONS='{ - "pool_size": 5, - "max_overflow": 10, - "pool_timeout": 30, - "pool_recycle": 3600, - "echo": true -}' -``` - -### sqlalchemy_echo - -开启 [Echo 选项](https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine.params.echo) 和 [Echo Pool 选项](https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine.params.echo_pool) 便于 debug。 - -```shell -SQLALCHEMY_ECHO=true -``` - -:::caution 注意 -以上配置之间有覆盖关系,遵循特殊优先于一般的原则,具体为 [`sqlalchemy_database_url`](#sqlalchemy_database_url) > [`sqlalchemy_bind`](#sqlalchemy_bind) > [`sqlalchemy_echo`](#sqlalchemy_echo) > [`sqlalchemy_engine_options`](#sqlalchemy_engine_options)。 -但覆盖顺序并非显而易见,出于清晰考虑,请只配置必要的选项。 -::: diff --git a/website/versioned_docs/version-2.3.1/best-practice/deployment.mdx b/website/versioned_docs/version-2.3.1/best-practice/deployment.mdx deleted file mode 100644 index 8c33520b4f7f..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/deployment.mdx +++ /dev/null @@ -1,299 +0,0 @@ ---- -sidebar_position: 3 -description: 部署你的机器人 ---- - -# 部署 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -在编写完成各类插件后,我们需要长期运行机器人来使得用户能够正常使用。通常,我们会使用云服务器来部署机器人。 - -我们在开发插件时,机器人运行的环境称为开发环境;而在部署后,机器人运行的环境称为生产环境。与开发环境不同的是,在生产环境中,开发者通常不能随意地修改/添加/删除代码,开启或停止服务。 - -## 部署前准备 - -### 项目依赖管理 - -由于部署后的机器人运行在生产环境中,因此,为确保机器人能够正常运行,我们需要保证机器人的运行环境与开发环境一致。我们可以通过以下几种方式来进行依赖管理: - - - - -[Poetry](https://python-poetry.org/) 是一个 Python 项目的依赖管理工具。它可以通过声明项目所依赖的库,为你管理(安装/更新)它们。Poetry 提供了一个 `poetry.lock` 文件,以确保可重复安装,并可以构建用于分发的项目。 - -Poetry 会在安装依赖时自动生成 `poetry.lock` 文件,在**项目目录**下执行以下命令: - -```bash -# 初始化 poetry 配置 -poetry init -# 添加项目依赖,这里以 nonebot2[fastapi] 为例 -poetry add nonebot2[fastapi] -``` - - - - -[PDM](https://pdm.fming.dev/) 是一个现代 Python 项目的依赖管理工具。它采用 [PEP621](https://www.python.org/dev/peps/pep-0621/) 标准,依赖解析快速;同时支持 [PEP582](https://www.python.org/dev/peps/pep-0582/) 和 [virtualenv](https://virtualenv.pypa.io/)。PDM 提供了一个 `pdm.lock` 文件,以确保可重复安装,并可以构建用于分发的项目。 - -PDM 会在安装依赖时自动生成 `pdm.lock` 文件,在**项目目录**下执行以下命令: - -```bash -# 初始化 pdm 配置 -pdm init -# 添加项目依赖,这里以 nonebot2[fastapi] 为例 -pdm add nonebot2[fastapi] -``` - - - - -[pip](https://pip.pypa.io/) 是 Python 包管理工具。他并不是一个依赖管理工具,为了尽可能保证环境的一致性,我们可以使用 `requirements.txt` 文件来声明依赖。 - -```bash -pip freeze > requirements.txt -``` - - - - -### 安装 Docker - -[Docker](https://www.docker.com/) 是一个应用容器引擎,可以让开发者打包应用以及依赖包到一个可移植的镜像中,然后发布到服务器上。 - -我们可以参考 [Docker 官方文档](https://docs.docker.com/get-docker/) 来安装 Docker 。 - -在 Linux 上,我们可以使用以下一键脚本来安装 Docker 以及 Docker Compose Plugin: - -```bash -curl -fsSL https://get.docker.com | sh -s -- --mirror Aliyun -``` - -在 Windows/macOS 上,我们可以使用 [Docker Desktop](https://docs.docker.com/desktop/) 来安装 Docker 以及 Docker Compose Plugin。 - -### 安装脚手架 Docker 插件 - -我们可以使用 [nb-cli-plugin-docker](https://github.com/nonebot/cli-plugin-docker) 来快速部署机器人。 - -插件可以帮助我们生成配置文件并构建 Docker 镜像,以及启动/停止/重启机器人。使用以下命令安装脚手架 Docker 插件: - -```bash -nb self install nb-cli-plugin-docker -``` - -## Docker 部署 - -### 快速部署 - -使用脚手架命令即可一键生成配置并部署: - -```bash -nb docker up -``` - -当看到 `Running` 字样时,说明机器人已经启动成功。我们可以通过以下命令来查看机器人的运行日志: - - - - -```bash -nb docker logs -``` - - - - -```bash -docker compose logs -``` - - - - -如果需要停止机器人,我们可以使用以下命令: - - - - -```bash -nb docker down -``` - - - - -```bash -docker compose down -``` - - - - -### 自定义部署 - -在部分情况下,我们需要事先生成 Docker 配置文件,再到生产环境进行部署;或者自动生成的配置文件并不能满足复杂场景,需要根据实际需求手动修改配置文件。我们可以使用以下命令来生成基础配置文件: - -```bash -nb docker generate -``` - -nb-cli 将会在项目目录下生成 `docker-compose.yml` 和 `Dockerfile` 等配置文件。在 nb-cli 完成配置文件的生成后,我们可以根据部署环境的实际情况使用 nb-cli 或者 Docker Compose 来启动机器人。 - -我们可以参考 [Dockerfile 文件规范](https://docs.docker.com/engine/reference/builder/)和 [Compose 文件规范](https://docs.docker.com/compose/compose-file/)修改这两个文件。 - -修改完成后我们可以直接启动或者手动构建镜像: - - - - -```bash -# 启动机器人 -nb docker up -# 手动构建镜像 -nb docker build -``` - - - - -```bash -# 启动机器人 -docker compose up -d -# 手动构建镜像 -docker compose build -``` - - - - -### 持续集成 - -我们可以使用 GitHub Actions 来实现持续集成(CI),我们只需要在 GitHub 上发布 Release 即可自动构建镜像并推送至镜像仓库。 - -首先,我们需要在 [Docker Hub](https://hub.docker.com/) (或者其他平台,如:[GitHub Packages](https://github.com/features/packages)、[阿里云容器镜像服务](https://www.alibabacloud.com/zh/product/container-registry)等)上创建镜像仓库,用于存放镜像。 - -前往项目仓库的 `Settings` > `Secrets` > `actions` 栏目 `New Repository Secret` 添加构建所需的密钥: - -- `DOCKERHUB_USERNAME`: 你的 Docker Hub 用户名 -- `DOCKERHUB_TOKEN`: 你的 Docker Hub PAT([创建方法](https://docs.docker.com/docker-hub/access-tokens/)) - -将以下文件添加至**项目目录**下的 `.github/workflows/` 目录下,并将文件中高亮行中的仓库名称替换为你的仓库名称: - -```yaml title=.github/workflows/build.yml -name: Docker Hub Release - -on: - push: - tags: - - "v*" - -jobs: - docker: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Setup Docker - uses: docker/setup-buildx-action@v2 - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Generate Tags - uses: docker/metadata-action@v4 - id: metadata - with: - images: | - # highlight-next-line - {organization}/{repository} - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=sha - - - name: Build and Publish - uses: docker/build-push-action@v4 - with: - context: . - push: true - tags: ${{ steps.metadata.outputs.tags }} - labels: ${{ steps.metadata.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max -``` - -### 持续部署 - -在完成发布并构建镜像后,我们可以自动将镜像部署到服务器上。 - -前往项目仓库的 `Settings` > `Secrets` > `actions` 栏目 `New Repository Secret` 添加部署所需的密钥: - -- `DEPLOY_HOST`: 部署服务器的 SSH 地址 -- `DEPLOY_USER`: 部署服务器用户名 -- `DEPLOY_KEY`: 部署服务器私钥([创建方法](https://github.com/appleboy/ssh-action#setting-up-a-ssh-key)) -- `DEPLOY_PATH`: 部署服务器上的项目路径 - -将以下文件添加至**项目目录**下的 `.github/workflows/` 目录下,在构建成功后触发部署: - -```yaml title=.github/workflows/deploy.yml -name: Deploy - -on: - workflow_run: - workflows: - - Docker Hub Release - types: - - completed - -jobs: - deploy: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - name: Start Deployment - uses: bobheadxi/deployments@v1 - id: deployment - with: - step: start - token: ${{ secrets.GITHUB_TOKEN }} - env: bot - - - name: Run Remote SSH Command - uses: appleboy/ssh-action@master - env: - DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }} - with: - host: ${{ secrets.DEPLOY_HOST }} - username: ${{ secrets.DEPLOY_USER }} - key: ${{ secrets.DEPLOY_KEY }} - envs: DEPLOY_PATH - script: | - cd $DEPLOY_PATH - docker compose up -d --pull always - - - name: update deployment status - uses: bobheadxi/deployments@v0.6.2 - if: always() - with: - step: finish - token: ${{ secrets.GITHUB_TOKEN }} - status: ${{ job.status }} - env: ${{ steps.deployment.outputs.env }} - deployment_id: ${{ steps.deployment.outputs.deployment_id }} -``` - -将上一部分的 `docker-compose.yml` 文件以及 `.env.prod` 配置文件添加至 `DEPLOY_PATH` 目录下,并修改 `docker-compose.yml` 文件中的镜像配置,替换为 Docker Hub 的仓库名称: - -```diff -- build: . -+ image: {organization}/{repository}:latest -``` diff --git a/website/versioned_docs/version-2.3.1/best-practice/error-tracking.md b/website/versioned_docs/version-2.3.1/best-practice/error-tracking.md deleted file mode 100644 index a28a22d152a5..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/error-tracking.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -sidebar_position: 2 -description: 使用 sentry 进行错误跟踪 ---- - -# 错误跟踪 - -在应用实际运行过程中,可能会出现各种各样的错误。可能是由于代码逻辑错误,也可能是由于用户输入错误,甚至是由于第三方服务的错误。这些错误都会导致应用的运行出现问题,这时候就需要对错误进行跟踪,以便及时发现问题并进行修复。NoneBot 提供了 `nonebot-plugin-sentry` 插件,支持 [sentry](https://sentry.io/) 平台,可以方便地进行错误跟踪。 - -## 安装插件 - -在使用前请先安装 `nonebot-plugin-sentry` 插件至项目环境中,可参考[获取商店插件](../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如: - -在**项目目录**下执行以下命令: - -```bash -nb plugin install nonebot-plugin-sentry -``` - -## 使用插件 - -在安装完成之后,仅需要对插件进行简单的配置即可使用。 - -### 获取 sentry DSN - -前往 [sentry](https://sentry.io/) 平台,注册并创建一个新的项目,然后在项目设置中找到 `Client Keys (DSN)`,复制其中的 `DSN` 值。 - -### 配置插件 - -:::caution 注意 -错误跟踪通常在生产环境中使用,因此开发环境中 `sentry_dsn` 留空即会停用插件。 -::: - -在项目 dotenv 配置文件中添加以下配置即可使用: - -```dotenv -SENTRY_DSN= -``` - -## 配置项 - -配置项具体含义参考 [Sentry Docs](https://docs.sentry.io/platforms/python/configuration/options/)。 - -- `sentry_dsn: str` -- `sentry_debug: bool = False` -- `sentry_release: str | None = None` -- `sentry_release: str | None = None` -- `sentry_environment: str | None = nonebot env` -- `sentry_server_name: str | None = None` -- `sentry_sample_rate: float = 1.` -- `sentry_max_breadcrumbs: int = 100` -- `sentry_attach_stacktrace: bool = False` -- `sentry_send_default_pii: bool = False` -- `sentry_in_app_include: List[str] = Field(default_factory=list)` -- `sentry_in_app_exclude: List[str] = Field(default_factory=list)` -- `sentry_request_bodies: str = "medium"` -- `sentry_with_locals: bool = True` -- `sentry_ca_certs: str | None = None` -- `sentry_before_send: Callable[[Any, Any], Any | None] | None = None` -- `sentry_before_breadcrumb: Callable[[Any, Any], Any | None] | None = None` -- `sentry_transport: Any | None = None` -- `sentry_http_proxy: str | None = None` -- `sentry_https_proxy: str | None = None` -- `sentry_shutdown_timeout: int = 2` diff --git a/website/versioned_docs/version-2.3.1/best-practice/multi-adapter.mdx b/website/versioned_docs/version-2.3.1/best-practice/multi-adapter.mdx deleted file mode 100644 index 5afb42ad4fa7..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/multi-adapter.mdx +++ /dev/null @@ -1,183 +0,0 @@ ---- -sidebar_position: 4 -description: 插件跨平台支持 ---- - -# 插件跨平台支持 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -由于不同平台的事件与接口之间,存在着极大的差异性,NoneBot 通过[重载](../appendices/overload.md)的方式,使得插件可以在不同平台上正确响应。但为了减少跨平台的兼容性问题,我们应该尽可能的使用基类方法实现原生跨平台,而不是使用特定平台的方法。当基类方法无法满足需求时,我们可以使用依赖注入的方式,将特定平台的事件或机器人注入到事件处理函数中,实现针对特定平台的处理。 - -:::tip 提示 -如果需要在多平台上**使用**跨平台插件,首先应该根据[注册适配器](../advanced/adapter.md#注册适配器)一节,为机器人注册各平台对应的适配器。 -::: - -## 基于基类的跨平台 - -在[事件通用信息](../advanced/adapter.md#获取事件通用信息)中,我们了解了事件基类能够提供的通用信息。同时,[事件响应器操作](../appendices/session-control.mdx#更多事件响应器操作)也为我们提供了基本的用户交互方式。使用这些方法,可以让我们的插件运行在任何平台上。例如,一个简单的命令处理插件: - -```python {5,11} -from nonebot import on_command -from nonebot.adapters import Event - -async def is_blacklisted(event: Event) -> bool: - return event.get_user_id() not in BLACKLIST - -weather = on_command("天气", rule=is_blacklisted, priority=10, block=True) - -@weather.handle() -async def handle_function(): - await weather.finish("今天的天气是...") -``` - -由于此插件仅使用了事件通用信息和事件响应器操作的纯文本交互方式,这些方法不使用特定平台的信息或接口,因此是原生跨平台的,并不需要额外处理。但在一些较为复杂的需求下,例如发送图片消息时,并非所有平台都具有统一的接口,因此基类便无能为力,我们需要引入特定平台的适配器了。 - -## 基于重载的跨平台 - -重载是 NoneBot 跨平台操作的核心,在[事件类型与重载](../appendices/overload.md#重载)一节中,我们初步了解了如何通过类型注解来实现针对不同平台事件的处理方式。在[依赖注入](../advanced/dependency.mdx)一节中,我们又对依赖注入的使用方法进行了详细的介绍。结合这两节内容,我们可以实现更复杂的跨平台操作。 - -### 处理近似事件 - -对于一系列**差异不大**的事件,我们往往具有相同的处理逻辑。这时,我们不希望将相同的逻辑编写两遍,而应该复用代码,以实现在同一个事件处理函数中处理多个近似事件。我们可以使用[事件重载](../advanced/dependency.mdx#Event)的特性来实现这一功能。例如: - - - - -```python -from nonebot import on_command -from nonebot.adapters import Message -from nonebot.params import CommandArg -from nonebot.adapters.onebot.v11 import MessageEvent as OnebotV11MessageEvent -from nonebot.adapters.onebot.v12 import MessageEvent as OnebotV12MessageEvent - -echo = on_command("echo", priority=10, block=True) - -@echo.handle() -async def handle_function(event: OnebotV11MessageEvent | OnebotV12MessageEvent, args: Message = CommandArg()): - await echo.finish(args) -``` - - - - -```python -from typing import Union - -from nonebot import on_command -from nonebot.adapters import Message -from nonebot.params import CommandArg -from nonebot.adapters.onebot.v11 import MessageEvent as OnebotV11MessageEvent -from nonebot.adapters.onebot.v12 import MessageEvent as OnebotV12MessageEvent - -echo = on_command("echo", priority=10, block=True) - -@echo.handle() -async def handle_function(event: Union[OnebotV11MessageEvent, OnebotV12MessageEvent], args: Message = CommandArg()): - await echo.finish(args) -``` - - - - -### 在依赖注入中使用重载 - -NoneBot 依赖注入系统提供了自定义子依赖的方法,子依赖的类型同样会影响到事件处理函数的重载行为。例如: - -```python -from datetime import datetime - -from nonebot import on_command -from nonebot.adapters.console import MessageEvent - -echo = on_command("echo", priority=10, block=True) - -def get_event_time(event: MessageEvent): - return event.time - -# 处理控制台消息事件 -@echo.handle() -async def handle_function(time: datetime = Depends(get_event_time)): - await echo.finish(time.strftime("%Y-%m-%d %H:%M:%S")) -``` - -示例中 ,我们为 `handle_function` 事件处理函数注入了自定义的 `get_event_time` 子依赖,而此子依赖注入参数为 Console 适配器的 `MessageEvent`。因此 `handle_function` 仅会响应 Console 适配器的 `MessageEvent` ,而不能响应其他事件。 - -### 处理多平台事件 - -不同平台的事件之间,往往存在着极大的差异性。为了满足我们插件的跨平台运行,通常我们需要抽离业务逻辑,以保证代码的复用性。一个合理的做法是,在事件响应器的处理流程中,首先先针对不同平台的事件分别进行处理,提取出核心业务逻辑所需要的信息;然后再将这些信息传递给业务逻辑处理函数;最后将业务逻辑的输出以各平台合适的方式返回给用户。也就是说,与平台绑定的处理部分应该与平台无关部分尽量分离。例如: - -```python -import inspect - -from nonebot import on_command -from nonebot.typing import T_State -from nonebot.matcher import Matcher -from nonebot.adapters import Message -from nonebot.params import CommandArg, ArgPlainText -from nonebot.adapters.console import Bot as ConsoleBot -from nonebot.adapters.onebot.v11 import Bot as OnebotBot -from nonebot.adapters.console import MessageSegment as ConsoleMessageSegment - -weather = on_command("天气", priority=10, block=True) - -@weather.handle() -async def handle_function(matcher: Matcher, args: Message = CommandArg()): - if args.extract_plain_text(): - matcher.set_arg("location", args) - - -async def get_weather(state: T_State, location: str = ArgPlainText()): - if location not in ["北京", "上海", "广州", "深圳"]: - await weather.reject(f"你想查询的城市 {location} 暂不支持,请重新输入!") - - state["weather"] = "⛅ 多云 20℃~24℃" - - -# 处理控制台询问 -@weather.got( - "location", - prompt=ConsoleMessageSegment.emoji("question") + "请输入地名", - parameterless=[Depends(get_weather)], -) -async def handle_console(bot: ConsoleBot): - pass - -# 处理 OneBot 询问 -@weather.got( - "location", - prompt="请输入地名", - parameterless=[Depends(get_weather)], -) -async def handle_onebot(bot: OnebotBot): - pass - -# 通过依赖注入或事件处理函数来进行业务逻辑处理 - -# 处理控制台回复 -@weather.handle() -async def handle_console_reply(bot: ConsoleBot, state: T_State, location: str = ArgPlainText()): - await weather.send( - ConsoleMessageSegment.markdown( - inspect.cleandoc( - f""" - # {location} - - - 今天 - - {state['weather']} - """ - ) - ) - ) - -# 处理 OneBot 回复 -@weather.handle() -async def handle_onebot_reply(bot: OnebotBot, state: T_State, location: str = ArgPlainText()): - await weather.send(f"今天{location}的天气是{state['weather']}") -``` - -:::tip 提示 -NoneBot 社区中有一些插件,例如[all4one](https://github.com/nonepkg/nonebot-plugin-all4one)、[send-anything-anywhere](https://github.com/felinae98/nonebot-plugin-send-anything-anywhere),可以帮助你更好地处理跨平台功能,包括事件处理和消息发送等。 -::: diff --git a/website/versioned_docs/version-2.3.1/best-practice/scheduler.md b/website/versioned_docs/version-2.3.1/best-practice/scheduler.md deleted file mode 100644 index 229b27abba19..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/scheduler.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -sidebar_position: 0 -description: 定时执行任务 ---- - -# 定时任务 - -[APScheduler](https://apscheduler.readthedocs.io/en/3.x/) (Advanced Python Scheduler) 是一个 Python 第三方库,其强大的定时任务功能被广泛应用于各个场景。在 NoneBot 中,定时任务作为一个额外功能,依赖于基于 APScheduler 开发的 [`nonebot-plugin-apscheduler`](https://github.com/nonebot/plugin-apscheduler) 插件进行支持。 - -## 安装插件 - -在使用前请先安装 `nonebot-plugin-apscheduler` 插件至项目环境中,可参考[获取商店插件](../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如: - -在**项目目录**下执行以下命令: - -```bash -nb plugin install nonebot-plugin-apscheduler -``` - -## 使用插件 - -`nonebot-plugin-apscheduler` 本质上是对 [APScheduler](https://apscheduler.readthedocs.io/en/3.x/) 进行了封装以适用于 NoneBot 开发,因此其使用方式与 APScheduler 本身并无显著区别。在此我们会简要介绍其调用方法,更多的使用方面的功能请参考[APScheduler 官方文档](https://apscheduler.readthedocs.io/en/3.x/userguide.html)。 - -### 导入调度器 - -由于 `nonebot_plugin_apscheduler` 作为插件,因此需要在使用前对其进行**加载**并**导入**其中的 `scheduler` 调度器来创建定时任务。使用 `require` 方法可轻松完成这一过程,可参考 [跨插件访问](../advanced/requiring.md) 一节进行了解。 - -```python -from nonebot import require - -require("nonebot_plugin_apscheduler") - -from nonebot_plugin_apscheduler import scheduler -``` - -### 添加定时任务 - -在 [APScheduler 官方文档](https://apscheduler.readthedocs.io/en/3.x/userguide.html#adding-jobs) 中提供了以下两种直接添加任务的方式: - -```python -from nonebot import require - -require("nonebot_plugin_apscheduler") - -from nonebot_plugin_apscheduler import scheduler - -# 基于装饰器的方式 -@scheduler.scheduled_job("cron", hour="*/2", id="job_0", args=[1], kwargs={arg2: 2}) -async def run_every_2_hour(arg1: int, arg2: int): - pass - -# 基于 add_job 方法的方式 -def run_every_day(arg1: int, arg2: int): - pass - -scheduler.add_job( - run_every_day, "interval", days=1, id="job_1", args=[1], kwargs={arg2: 2} -) -``` - -:::caution 注意 -由于 APScheduler 的定时任务并不是**由事件响应器所触发的事件**,因此其任务函数无法同[事件处理函数](../tutorial/handler.mdx#事件处理函数)一样通过[依赖注入](../tutorial/event-data.mdx#认识依赖注入)获取上下文信息,也无法通过事件响应器对象的方法进行任何操作,因此我们需要使用[调用平台 API](../appendices/api-calling.mdx#调用平台-api)的方式来获取信息或收发消息。 - -相对于事件处理依赖而言,编写定时任务更像是编写普通的函数,需要我们自行获取信息以及发送信息,请**不要**将事件处理依赖的特殊语法用于定时任务! -::: - -关于 APScheduler 的更多使用方法,可以参考 [APScheduler 官方文档](https://apscheduler.readthedocs.io/en/3.x/index.html) 进行了解。 - -### 配置项 - -#### apscheduler_autostart - -- **类型**: `bool` -- **默认值**: `True` - -是否自动启动 `scheduler` ,若不启动需要自行调用 `scheduler.start()`。 - -#### apscheduler_log_level - -- **类型**: `int` -- **默认值**: `30` - -apscheduler 输出的日志等级 - -- `WARNING` = `30` (默认) -- `INFO` = `20` -- `DEBUG` = `10` (只有在开启 nonebot 的 debug 模式才会显示 debug 日志) - -#### apscheduler_config - -- **类型**: `dict` -- **默认值**: `{ "apscheduler.timezone": "Asia/Shanghai" }` - -`apscheduler` 的相关配置。参考[配置调度器](https://apscheduler.readthedocs.io/en/latest/userguide.html#scheduler-config), [配置参数](https://apscheduler.readthedocs.io/en/latest/modules/schedulers/base.html#apscheduler.schedulers.base.BaseScheduler) - -配置需要包含 `apscheduler.` 作为前缀,例如 `apscheduler.timezone`。 diff --git a/website/versioned_docs/version-2.3.1/best-practice/testing/README.mdx b/website/versioned_docs/version-2.3.1/best-practice/testing/README.mdx deleted file mode 100644 index 12853d960030..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/testing/README.mdx +++ /dev/null @@ -1,240 +0,0 @@ ---- -sidebar_position: 1 -description: 使用 NoneBug 进行单元测试 - -slug: /best-practice/testing/ ---- - -# 配置与测试事件响应器 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -> 在计算机编程中,单元测试(Unit Testing)又称为模块测试,是针对程序模块(软件设计的最小单位)来进行正确性检验的测试工作。 - -为了保证代码的正确运行,我们不仅需要对错误进行跟踪,还需要对代码进行正确性检验,也就是测试。NoneBot 提供了一个测试工具——NoneBug,它是一个 [pytest](https://docs.pytest.org/en/stable/) 插件,可以帮助我们便捷地进行单元测试。 - -:::tip 提示 -建议在阅读本文档前先阅读 [pytest 官方文档](https://docs.pytest.org/en/stable/)来了解 pytest 的相关术语和基本用法。 -::: - -## 安装 NoneBug - -在**项目目录**下激活虚拟环境后运行以下命令安装 NoneBug: - - - - -```bash -poetry add nonebug -G test -``` - - - - -```bash -pdm add nonebug -dG test -``` - - - - -```bash -pip install nonebug -``` - - - - -要运行 NoneBug 测试,还需要额外安装 pytest 异步插件 `pytest-asyncio` 或 `anyio` 以支持异步测试。文档中,我们以 `pytest-asyncio` 为例: - - - - -```bash -poetry add pytest-asyncio -G test -``` - - - - -```bash -pdm add pytest-asyncio -dG test -``` - - - - -```bash -pip install pytest-asyncio -``` - - - - -## 配置测试 - -在开始测试之前,我们需要对测试进行一些配置,以正确启动我们的机器人。 - -首先我们需要配置 pytest-asyncio,在 `pyproject.toml` 的 pytest 配置部分添加: - -```toml -[tool.pytest.ini_options] -asyncio_mode = "auto" -asyncio_default_fixture_loop_scope = "session" -``` - -然后,我们在 `tests` 目录下新建 `conftest.py` 文件,添加以下内容: - -```python title=tests/conftest.py -import pytest -import nonebot -from pytest_asyncio import is_async_test -# 导入适配器 -from nonebot.adapters.console import Adapter as ConsoleAdapter - -def pytest_collection_modifyitems(items: list[pytest.Item]): - pytest_asyncio_tests = (item for item in items if is_async_test(item)) - session_scope_marker = pytest.mark.asyncio(loop_scope="session") - for async_test in pytest_asyncio_tests: - async_test.add_marker(session_scope_marker, append=False) - -@pytest.fixture(scope="session", autouse=True) -async def after_nonebot_init(after_nonebot_init: None): - # 加载适配器 - driver = nonebot.get_driver() - driver.register_adapter(ConsoleAdapter) - - # 加载插件 - nonebot.load_from_toml("pyproject.toml") -``` - -这样,我们就可以在测试中使用机器人的插件了。通常,我们不需要自行初始化 NoneBot,NoneBug 已经为我们运行了 `nonebot.init()`。如果需要自定义 NoneBot 初始化的参数,我们可以在 `conftest.py` 中添加 `pytest_configure` 钩子函数。例如,我们可以修改 NoneBot 配置环境为 `test` 并从环境变量中输入配置: - -```python {4,6,8-10} title=tests/conftest.py -import os - -import pytest -from nonebug import NONEBOT_INIT_KWARGS - -os.environ["ENVIRONMENT"] = "test" - -def pytest_configure(config: pytest.Config): - config.stash[NONEBOT_INIT_KWARGS] = {"secret": os.getenv("INPUT_SECRET")} -``` - -NoneBug 默认也会为我们管理 lifespan 的 startup 与 shutdown。如果不希望 NoneBug 管理 lifespan,你可以在 `pytest_configure` 里添加以下配置: - -```python -import pytest -from nonebug import NONEBOT_START_LIFESPAN - -def pytest_configure(config: pytest.Config): - config.stash[NONEBOT_START_LIFESPAN] = False -``` - -## 编写插件测试 - -在配置完成插件加载后,我们就可以在测试中使用插件了。NoneBug 通过 pytest fixture `app` 提供各种测试方法,我们可以在测试中使用它来测试插件。现在,我们创建一个测试脚本来测试[深入指南](../../appendices/session-control.mdx)中编写的天气插件。首先,我们先要导入我们需要的模块: - -
- 插件示例 - -```python title=weather/__init__.py -from nonebot import on_command -from nonebot.rule import to_me -from nonebot.matcher import Matcher -from nonebot.adapters import Message -from nonebot.params import CommandArg, ArgPlainText - -weather = on_command("天气", rule=to_me(), aliases={"weather", "天气预报"}) - -@weather.handle() -async def handle_function(matcher: Matcher, args: Message = CommandArg()): - if args.extract_plain_text(): - matcher.set_arg("location", args) - -@weather.got("location", prompt="请输入地名") -async def got_location(location: str = ArgPlainText()): - if location not in ["北京", "上海", "广州", "深圳"]: - await weather.reject(f"你想查询的城市 {location} 暂不支持,请重新输入!") - await weather.finish(f"今天{location}的天气是...") -``` - -
- -```python {4,5,9,11-16} title=tests/test_weather.py -from datetime import datetime - -import pytest -from nonebug import App -from nonebot.adapters.console import User, Message, MessageEvent - -@pytest.mark.asyncio -async def test_weather(app: App): - from awesome_bot.plugins.weather import weather - - event = MessageEvent( - time=datetime.now(), - self_id="test", - message=Message("/天气 北京"), - user=User(id="user"), - ) -``` - -在上面的代码中,我们引入了 NoneBug 的测试 `App` 对象,以及必要的适配器消息与事件定义等。在测试函数 `test_weather` 中,我们导入了要进行测试的事件响应器 `weather`。请注意,由于需要等待 NoneBot 初始化并加载插件完毕,插件内容必须在**测试函数内部**进行导入。然后,我们创建了一个 `MessageEvent` 事件对象,它模拟了一个用户发送了 `/天气 北京` 的消息。接下来,我们使用 `app.test_matcher` 方法来测试 `weather` 事件响应器: - -```python {11-15} title=tests/test_weather.py -@pytest.mark.asyncio -async def test_weather(app: App): - from awesome_bot.plugins.weather import weather - - event = MessageEvent( - time=datetime.now(), - self_id="test", - message=Message("/天气 北京"), - user=User(id="user"), - ) - async with app.test_matcher(weather) as ctx: - bot = ctx.create_bot() - ctx.receive_event(bot, event) - ctx.should_call_send(event, "今天北京的天气是...", result=None) - ctx.should_finished(weather) -``` - -这里我们使用 `async with` 语句并通过参数指定要测试的事件响应器 `weather` 来进入测试上下文。在测试上下文中,我们可以使用 `ctx.create_bot` 方法创建一个虚拟的机器人实例,并使用 `ctx.receive_event` 方法来模拟机器人接收到消息事件。然后,我们就可以定义预期行为来测试机器人是否正确运行。在上面的代码中,我们使用 `ctx.should_call_send` 方法来断言机器人应该发送 `今天北京的天气是...` 这条消息,并且将发送函数的调用结果作为第三个参数返回给事件处理函数。如果断言失败,测试将会不通过。我们也可以使用 `ctx.should_finished` 方法来断言机器人应该结束会话。 - -为了测试更复杂的情况,我们可以为添加更多的测试用例。例如,我们可以测试用户输入了一个不支持的地名时机器人的反应: - -```python {17-21,23-26} title=tests/test_weather.py -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_weather(app: App): - from awesome_bot.plugins.weather import weather - - async with app.test_matcher(weather) as ctx: - ... # 省略前面的测试用例 - - async with app.test_matcher(weather) as ctx: - bot = ctx.create_bot() - event = make_event("/天气 南京") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "你想查询的城市 南京 暂不支持,请重新输入!", result=None) - ctx.should_rejected(weather) - - event = make_event("北京") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "今天北京的天气是...", result=None) - ctx.should_finished(weather) -``` - -在上面的代码中,我们使用 `ctx.should_rejected` 来断言机器人应该请求用户重新输入。然后,我们再次使用 `ctx.receive_event` 方法来模拟用户回复了 `北京`,并使用 `ctx.should_finished` 来断言机器人应该结束会话。 - -更多的 NoneBug 用法将在后续章节中介绍。 diff --git a/website/versioned_docs/version-2.3.1/best-practice/testing/_category_.json b/website/versioned_docs/version-2.3.1/best-practice/testing/_category_.json deleted file mode 100644 index d315ef117497..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/testing/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "单元测试", - "position": 5 -} diff --git a/website/versioned_docs/version-2.3.1/best-practice/testing/behavior.mdx b/website/versioned_docs/version-2.3.1/best-practice/testing/behavior.mdx deleted file mode 100644 index f54eeb669efb..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/testing/behavior.mdx +++ /dev/null @@ -1,292 +0,0 @@ ---- -sidebar_position: 2 -description: 测试事件响应、平台接口调用和会话控制 ---- - -# 测试事件响应与会话操作 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -在 NoneBot 接收到事件时,事件响应器根据优先级依次通过权限、响应规则来判断当前事件是否应该触发。事件响应流程中,机器人可能会通过 `send` 发送消息或者调用平台接口来执行预期的操作。因此,我们需要对这两种操作进行单元测试。 - -在上一节中,我们对单个事件响应器进行了简单测试。但是在实际场景中,机器人可能定义了多个事件响应器,由于优先级和响应规则的存在,预期的事件响应器可能并不会被触发。NoneBug 支持同时测试多个事件响应器,以此来测试机器人的整体行为。 - -## 测试事件响应 - -NoneBug 提供了六种定义 `Rule` 和 `Permission` 预期行为的方法: - -- `should_pass_rule` -- `should_not_pass_rule` -- `should_ignore_rule` -- `should_pass_permission` -- `should_not_pass_permission` -- `should_ignore_permission` - -:::tip 提示 -事件响应器类型的检查属于 `Permission` 的一部分,因此可以通过 `should_pass_permission` 和 `should_not_pass_permission` 方法来断言事件响应器类型的检查。 -::: - -下面我们根据插件示例来测试事件响应行为,我们首先定义两个事件响应器作为测试的对象: - -```python title=example.py -from nonebot import on_command - -def never_pass(): - return False - -foo = on_command("foo") -bar = on_command("bar", permission=never_pass) -``` - -在这两个事件响应器中,`foo` 当收到 `/foo` 消息时会执行,而 `bar` 则不会执行。我们使用 NoneBug 来测试它们: - - - - -```python {21,22,28,29} title=tests/test_example.py -from datetime import datetime - -import pytest -from nonebug import App -from nonebot.adapters.console import User, Message, MessageEvent - -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_example(app: App): - from awesome_bot.plugins.example import foo, bar - - async with app.test_matcher(foo) as ctx: - bot = ctx.create_bot() - event = make_event("/foo") - ctx.receive_event(bot, event) - ctx.should_pass_rule() - ctx.should_pass_permission() - - async with app.test_matcher(bar) as ctx: - bot = ctx.create_bot() - event = make_event("/foo") - ctx.receive_event(bot, event) - ctx.should_not_pass_rule() - ctx.should_not_pass_permission() -``` - -在上面的代码中,我们分别对 `foo` 和 `bar` 事件响应器进行响应测试。我们使用 `ctx.should_pass_rule` 和 `ctx.should_pass_permission` 断言 `foo` 事件响应器应该被触发,使用 `ctx.should_not_pass_rule` 和 `ctx.should_not_pass_permission` 断言 `bar` 事件响应器应该被忽略。 - - - - -```python title=tests/test_example.py -from datetime import datetime - -import pytest -from nonebug import App -from nonebot.adapters.console import User, Message, MessageEvent - -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_example(app: App): - from awesome_bot.plugins.example import foo, bar - - async with app.test_matcher() as ctx: - bot = ctx.create_bot() - event = make_event("/foo") - ctx.receive_event(bot, event) - ctx.should_pass_rule(foo) - ctx.should_pass_permission(foo) - ctx.should_not_pass_rule(bar) - ctx.should_not_pass_permission(bar) -``` - -在上面的代码中,我们对 `foo` 和 `bar` 事件响应器一起进行响应测试。我们使用 `ctx.should_pass_rule` 和 `ctx.should_pass_permission` 断言 `foo` 事件响应器应该被触发,使用 `ctx.should_not_pass_rule` 和 `ctx.should_not_pass_permission` 断言 `bar` 事件响应器应该被忽略。通过参数,我们可以指定断言的事件响应器。 - - - - -当然,如果需要忽略某个事件响应器的响应规则和权限检查,强行进入响应流程,我们可以使用 `should_ignore_rule` 和 `should_ignore_permission` 方法: - -```python {21,22} title=tests/test_example.py -from datetime import datetime - -import pytest -from nonebug import App -from nonebot.adapters.console import User, Message, MessageEvent - -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_example(app: App): - from awesome_bot.plugins.example import foo, bar - - async with app.test_matcher(bar) as ctx: - bot = ctx.create_bot() - event = make_event("/foo") - ctx.receive_event(bot, event) - ctx.should_ignore_rule(bar) - ctx.should_ignore_permission(bar) -``` - -在忽略了响应规则和权限检查之后,就会进入 `bar` 事件响应器的响应流程。 - -## 测试平台接口使用 - -上一节的示例插件测试中,我们已经尝试了测试插件对事件的消息回复。通常情况下,事件处理流程中对平台接口的使用会通过事件响应器操作或者调用平台 API 两种途径进行。针对这两种途径,NoneBug 分别提供了 `ctx.should_call_send` 和 `ctx.should_call_api` 方法来测试平台接口的使用情况。 - -1. `should_call_send` - - 定义事件响应器预期发送的消息,即通过[事件响应器操作 send](../../appendices/session-control.mdx#send)进行的操作。`should_call_send` 有四个参数: - - - `event`:回复的目标事件。 - - `message`:预期的消息对象,可以是 `str`、`Message` 或 `MessageSegment`。 - - `result`:send 的返回值,将会返回给插件。 - - `bot`(可选):发送消息的 bot 对象。 - - `**kwargs`:send 方法的额外参数。 - -2. `should_call_api` - 定义事件响应器预期调用的平台 API 接口,即通过[调用平台 API](../../appendices/api-calling.mdx#调用平台-API)进行的操作。`should_call_api` 有四个参数: - - - `api`:API 名称。 - - `data`:预期的请求数据。 - - `result`:call_api 的返回值,将会返回给插件。 - - `adapter`(可选):调用 API 的平台适配器对象。 - - `**kwargs`:call_api 方法的额外参数。 - -下面是一个使用 `should_call_send` 和 `should_call_api` 方法的示例: - -我们先定义一个测试插件,在响应流程中向用户发送一条消息并调用 `Console` 适配器的 `bell` API。 - -```python {8,9} title=example.py -from nonebot import on_command -from nonebot.adapters.console import Bot - -foo = on_command("foo") - -@foo.handle() -async def _(bot: Bot): - await foo.send("message") - await bot.bell() -``` - -然后我们对该插件进行测试: - -```python title=tests/test_example.py -from datetime import datetime - -import pytest -import nonebot -from nonebug import App -from nonebot.adapters.console import Bot, User, Adapter, Message, MessageEvent - -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_example(app: App): - from awesome_bot.plugins.example import foo - - async with app.test_matcher(foo) as ctx: - # highlight-start - adapter = nonebot.get_adapter(Adapter) - bot = ctx.create_bot(base=Bot, adapter=adapter) - # highlight-end - event = make_event("/foo") - ctx.receive_event(bot, event) - # highlight-start - ctx.should_call_send(event, "message", result=None, bot=bot) - ctx.should_call_api("bell", {}, result=None, adapter=adapter) - # highlight-end -``` - -请注意,对于在依赖注入中使用了非基类对象的情况,我们需要在 `create_bot` 方法中指定 `base` 和 `adapter` 参数,确保不会因为重载功能而出现非预期情况。 - -## 测试会话控制 - -在[会话控制](../../appendices/session-control.mdx)一节中,我们介绍了如何使用事件响应器操作来实现对用户的交互式会话。在上一节的示例插件测试中,我们其实已经使用了 `ctx.should_finished` 来断言会话结束。NoneBug 针对各种流程控制操作分别提供了相应的方法来定义预期的会话处理行为。它们分别是: - -- `should_finished`:断言会话结束,对应 `matcher.finish` 操作。 -- `should_rejected`:断言会话等待用户输入并重新执行当前事件处理函数,对应 `matcher.reject` 系列操作。 -- `should_paused`: 断言会话等待用户输入并执行下一个事件处理函数,对应 `matcher.pause` 操作。 - -我们仅需在测试用例中的正确位置调用这些方法,就可以断言会话的预期行为。例如: - -```python title=example.py -from nonebot import on_command -from nonebot.typing import T_State - -foo = on_command("foo") - -@foo.got("key", prompt="请输入密码") -async def _(state: T_State, key: str = ArgPlainText()): - if key != "some password": - try_count = state.get("try_count", 1) - if try_count >= 3: - await foo.finish("密码错误次数过多") - else: - state["try_count"] = try_count + 1 - await foo.reject("密码错误,请重新输入") - await foo.finish("密码正确") -``` - -```python title=tests/test_example.py -from datetime import datetime - -import pytest -from nonebug import App -from nonebot.adapters.console import User, Message, MessageEvent - -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_example(app: App): - from awesome_bot.plugins.example import foo - - async with app.test_matcher(foo) as ctx: - bot = ctx.create_bot() - event = make_event("/foo") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "请输入密码", result=None) - ctx.should_rejected(foo) - event = make_event("wrong password") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "密码错误,请重新输入", result=None) - ctx.should_rejected(foo) - event = make_event("wrong password") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "密码错误,请重新输入", result=None) - ctx.should_rejected(foo) - event = make_event("wrong password") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "密码错误次数过多", result=None) - ctx.should_finished(foo) -``` diff --git a/website/versioned_docs/version-2.3.1/best-practice/testing/mock-network.md b/website/versioned_docs/version-2.3.1/best-practice/testing/mock-network.md deleted file mode 100644 index 8ed56b5c1a8d..000000000000 --- a/website/versioned_docs/version-2.3.1/best-practice/testing/mock-network.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -sidebar_position: 3 -description: 模拟网络通信以进行测试 ---- - -# 模拟网络通信 - -NoneBot 驱动器提供了多种方法来帮助适配器进行网络通信,主要包括客户端和服务端两种类型。模拟网络通信可以帮助我们更加接近实际机器人应用场景,进行更加真实的集成测试。同时,通过这种途径,我们还可以完成对适配器的测试。 - -NoneBot 中的网络通信主要包括以下几种: - -- HTTP 服务端(WebHook) -- WebSocket 服务端 -- HTTP 客户端 -- WebSocket 客户端 - -下面我们将分别介绍如何使用 NoneBug 来模拟这几种通信方式。 - -## 测试 HTTP 服务端 - -当 NoneBot 作为 ASGI 服务端应用时,我们可以定义一系列的路由来处理 HTTP 请求,适配器同样也可以通过定义路由来响应机器人相关的网络通信。下面假设我们使用了一个适配器 `fake` ,它定义了一个路由 `/fake/http` ,用于接收平台 WebHook 并处理。实际应用测试时,应将该路由地址替换为**真实适配器注册的路由地址**。 - -我们首先需要获取测试用模拟客户端: - -```python {5,6} title=tests/test_http_server.py -from nonebug import App - -@pytest.mark.asyncio -async def test_http_server(app: App): - async with app.test_server() as ctx: - client = ctx.get_client() -``` - -默认情况下,`app.test_server()` 会通过 `nonebot.get_asgi` 获取测试对象,我们也可以通过参数指定 ASGI 应用: - -```python -async with app.test_server(asgi=asgi_app) as ctx: - ... -``` - -获取到模拟客户端后,即可像 `requests`、`httpx` 等库类似的方法进行使用: - -```python {3,11-14,16} title=tests/test_http_server.py -import nonebot -from nonebug import App -from nonebot.adapters.fake import Adapter - -@pytest.mark.asyncio -async def test_http_server(app: App): - adapter = nonebot.get_adapter(Adapter) - - async with app.test_server() as ctx: - client = ctx.get_client() - response = await client.post("/fake/http", json={"bot_id": "fake"}) - assert response.status_code == 200 - assert response.json() == {"status": "success"} - assert "fake" in nonebot.get_bots() - - adapter.bot_disconnect(nonebot.get_bot("fake")) -``` - -在上面的测试中,我们向 `/fake/http` 发送了一个模拟 POST 请求,适配器将会对该请求进行处理,我们可以通过检查请求返回是否正确、Bot 对象是否创建等途径来验证机器人是否正确运行。在完成测试后,我们通常需要对 Bot 对象进行清理,以避免对其他测试产生影响。 - -## 测试 WebSocket 服务端 - -当 NoneBot 作为 ASGI 服务端应用时,我们还可以定义一系列的路由来处理 WebSocket 通信。下面假设我们使用了一个适配器 `fake` ,它定义了一个路由 `/fake/ws` ,用于处理平台 WebSocket 连接信息。实际应用测试时,应将该路由地址替换为**真实适配器注册的路由地址**。 - -我们同样需要通过 `app.test_server()` 获取测试用模拟客户端,这里就不再赘述。在获取到模拟客户端后,我们可以通过 `client.websocket_connect` 方法来模拟 WebSocket 连接: - -```python {3,11-15} title=tests/test_ws_server.py -import nonebot -from nonebug import App -from nonebot.adapters.fake import Adapter - -@pytest.mark.asyncio -async def test_ws_server(app: App): - adapter = nonebot.get_adapter(Adapter) - - async with app.test_server() as ctx: - client = ctx.get_client() - async with client.websocket_connect("/fake/ws") as ws: - await ws.send_json({"bot_id": "fake"}) - response = await ws.receive_json() - assert response == {"status": "success"} - assert "fake" in nonebot.get_bots() -``` - -在上面的测试中,我们向 `/fake/ws` 进行了 WebSocket 模拟通信,通过发送消息与机器人进行交互,然后检查机器人发送的信息是否正确。 - -## 测试 HTTP 客户端 - -~~暂不支持~~ - -## 测试 WebSocket 客户端 - -~~暂不支持~~ diff --git a/website/versioned_docs/version-2.3.1/community/contact.md b/website/versioned_docs/version-2.3.1/community/contact.md deleted file mode 100644 index c38fa19a4980..000000000000 --- a/website/versioned_docs/version-2.3.1/community/contact.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -sidebar-position: 0 -description: 遇到问题如何获取帮助 ---- - -# 参与讨论 - -如果在安装或者开发 NoneBot 过程中遇到了任何问题,或者有新奇的点子,欢迎参与我们的社区讨论: - -1. 点击下方链接前往 GitHub,前往 Issues 页面,在 `New Issue` Template 中选择 `Question` - - NoneBot:[![NoneBot project link](https://img.shields.io/github/stars/nonebot/nonebot2?style=social)](https://github.com/nonebot/nonebot2) - -2. 通过 QQ 群(点击下方链接直达) - - [![QQ Chat Group](https://img.shields.io/badge/QQ%E7%BE%A4-768887710-orange?style=social)](https://jq.qq.com/?_wv=1027&k=5OFifDh) - -3. 通过 QQ 频道 - - [![QQ Channel](https://img.shields.io/badge/QQ%E9%A2%91%E9%81%93-NoneBot-orange?style=social)](https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&appChannel=share&inviteCode=7b4a3&appChannel=share&businessType=9&from=246610&biz=ka) - -4. 通过 Discord 服务器(点击下方链接直达) - - [![Discord Server](https://discordapp.com/api/guilds/847819937858584596/widget.png?style=shield)](https://discord.gg/VKtE6Gdc4h) diff --git a/website/versioned_docs/version-2.3.1/community/contributing.md b/website/versioned_docs/version-2.3.1/community/contributing.md deleted file mode 100644 index ff452818a833..000000000000 --- a/website/versioned_docs/version-2.3.1/community/contributing.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar-position: 1 -description: 如何为 NoneBot 贡献代码 ---- - -# 贡献指南 - -## Code of Conduct - -请参阅 [Code of Conduct](https://github.com/nonebot/nonebot2/blob/master/CODE_OF_CONDUCT.md)。 - -## 参与开发 - -请参阅 [Contributing](https://github.com/nonebot/nonebot2/blob/master/CONTRIBUTING.md)。 - -## 鸣谢 - -感谢以下开发者对 NoneBot2 作出的贡献: - - - - diff --git a/website/versioned_docs/version-2.3.1/developer/adapter-writing.md b/website/versioned_docs/version-2.3.1/developer/adapter-writing.md deleted file mode 100644 index 33cd2b7a2d23..000000000000 --- a/website/versioned_docs/version-2.3.1/developer/adapter-writing.md +++ /dev/null @@ -1,608 +0,0 @@ ---- -sidebar_position: 1 -description: 编写适配器对接新的平台 ---- - -# 编写适配器 - -在编写适配器之前,我们需要先了解[适配器的功能与组成](../advanced/adapter#适配器功能与组成),适配器通常由 `Adapter`、`Bot`、`Event` 和 `Message` 四个部分组成,在编写适配器时,我们需要继承 NoneBot 中的基类,并根据实际平台来编写每个部分功能。 - -## 组织结构 - -NoneBot 适配器项目通常以 `nonebot-adapter-{adapter-name}` 作为项目名,并以**命名空间包**的形式编写,即在 `nonebot/adapters/{adapter-name}` 目录中编写实际代码,例如: - -```tree -📦 nonebot-adapter-{adapter-name} -├── 📂 nonebot -│ ├── 📂 adapters -│ │ ├── 📂 {adapter-name} -│ │ │ ├── 📜 __init__.py -│ │ │ ├── 📜 adapter.py -│ │ │ ├── 📜 bot.py -│ │ │ ├── 📜 config.py -│ │ │ ├── 📜 event.py -│ │ │ └── 📜 message.py -├── 📜 pyproject.toml -└── 📜 README.md -``` - -:::tip 提示 - -上述的项目结构仅作推荐,不做强制要求,保证实际可用性即可。 - -::: - -### 使用 NB-CLI 创建项目 - -我们可以使用脚手架快速创建项目: - -```shell -nb adapter create -``` - -按照指引,输入适配器名称以及存储位置,即可创建一个带有基本结构的适配器项目。 - -## 组成部分 - -:::tip 提示 - -本章节的代码中提到的 `Adapter`、`Bot`、`Event` 和 `Message` 等,均为下文中适配器所编写的类,而非 NoneBot 中的基类。 - -::: - -### Log - -适配器在处理时通常需要打印日志,但直接使用 NoneBot 的默认 `logger` 不方便区分适配器输出和其它日志。因此我们可以使用 NoneBot 提供的 `logger_wrapper` 方法,自定义一个 `log` 函数用于快捷打印适配器日志: - -```python {3} title=log.py -from nonebot.utils import logger_wrapper - -log = logger_wrapper("your_adapter_name") -``` - -这个 `log` 函数会在默认 `logger` 中添加适配器名称前缀,它接收三个参数:日志等级、日志内容以及可选的异常,具体用法如下: - -```python -from .log import log - -log("DEBUG", "A DEBUG log.") -log("INFO", "A INFO log.") - -try: - ... -except Exception as e: - log("ERROR", "something error.", e) -``` - -### Config - -通常适配器需要一些配置项,例如平台连接密钥等。适配器的配置方法与[插件配置](../appendices/config#%E6%8F%92%E4%BB%B6%E9%85%8D%E7%BD%AE)类似,例如: - -```python title=config.py -from pydantic import BaseModel - -class Config(BaseModel): - xxx_id: str - xxx_token: str -``` - -配置项的读取将在下方 [Adapter](#adapter) 中介绍。 - -### Adapter - -Adapter 负责转换事件、调用接口,以及正确创建 Bot 对象并注册到 NoneBot 中。在编写平台相关内容之前,我们需要继承基类,并实现适配器的基本信息: - -```python {9,11,14,18} title=adapter.py -from typing import Any -from typing_extensions import override - -from nonebot.drivers import Driver -from nonebot import get_plugin_config -from nonebot.adapters import Adapter as BaseAdapter - -from .config import Config - -class Adapter(BaseAdapter): - @override - def __init__(self, driver: Driver, **kwargs: Any): - super().__init__(driver, **kwargs) - # 读取适配器所需的配置项 - self.adapter_config: Config = get_plugin_config(Config) - - @classmethod - @override - def get_name(cls) -> str: - """适配器名称""" - return "your_adapter_name" -``` - -#### 与平台交互 - -NoneBot 提供了多种 [Driver](../advanced/driver) 来帮助适配器进行网络通信,主要分为客户端和服务端两种类型。我们需要**根据平台文档和特性**选择合适的通信方式,并编写相关方法用于初始化适配器,与平台建立连接和进行交互: - -##### 客户端通信方式 - -```python {12,23,24} title=adapter.py -import asyncio -from typing_extensions import override - -from nonebot import get_plugin_config -from nonebot.exception import WebSocketClosed -from nonebot.drivers import Request, WebSocketClientMixin - -class Adapter(BaseAdapter): - @override - def __init__(self, driver: Driver, **kwargs: Any): - super().__init__(driver, **kwargs) - self.adapter_config: Config = get_plugin_config(Config) - self.task: Optional[asyncio.Task] = None # 存储 ws 任务 - self.setup() - - def setup(self) -> None: - if not isinstance(self.driver, WebSocketClientMixin): - # 判断用户配置的Driver类型是否符合适配器要求,不符合时应抛出异常 - raise RuntimeError( - f"Current driver {self.config.driver} doesn't support websocket client connections!" - f"{self.get_name()} Adapter need a WebSocket Client Driver to work." - ) - # 在 NoneBot 启动和关闭时进行相关操作 - self.driver.on_startup(self.startup) - self.driver.on_shutdown(self.shutdown) - - async def startup(self) -> None: - """定义启动时的操作,例如和平台建立连接""" - self.task = asyncio.create_task(self._forward_ws()) # 建立 ws 连接 - - async def _forward_ws(self): - request = Request( - method="GET", - url="your_platform_websocket_url", - headers={"token": "..."}, # 鉴权请求头 - ) - while True: - try: - async with self.websocket(request) as ws: - try: - # 处理 websocket - ... - except WebSocketClosed as e: - log( - "ERROR", - "WebSocket Closed", - e, - ) - except Exception as e: - log( - "ERROR", - "Error while process data from " - "websocket platform_websocket_url. " - "Trying to reconnect...", - e, - ) - finally: - # 这里要断开 Bot 连接 - except Exception as e: - # 尝试重连 - log( - "ERROR", - "Error while setup websocket to " - "platform_websocket_url. Trying to reconnect...", - e, - ) - await asyncio.sleep(3) # 重连间隔 - - async def shutdown(self) -> None: - """定义关闭时的操作,例如停止任务、断开连接""" - - # 断开 ws 连接 - if self.task is not None and not self.task.done(): - self.task.cancel() -``` - -##### 服务端通信方式 - -```python {30,38} title=adapter.py -from nonebot import get_plugin_config -from nonebot.drivers import ( - Request, - ASGIMixin, - WebSocket, - HTTPServerSetup, - WebSocketServerSetup -) - -class Adapter(BaseAdapter): - @override - def __init__(self, driver: Driver, **kwargs: Any): - super().__init__(driver, **kwargs) - self.adapter_config: Config = get_plugin_config(Config) - self.setup() - - def setup(self) -> None: - if not isinstance(self.driver, ASGIMixin): - raise RuntimeError( - f"Current driver {self.config.driver} doesn't support asgi server!" - f"{self.get_name()} Adapter need a asgi server driver to work." - ) - # 建立服务端路由 - # HTTP Webhook 路由 - http_setup = HTTPServerSetup( - URL("your_webhook_url"), # 路由地址 - "POST", # 接收的方法 - "WEBHOOK name", # 路由名称 - self._handle_http, # 处理函数 - ) - self.setup_http_server(http_setup) - - # 反向 Websocket 路由 - ws_setup = WebSocketServerSetup( - URL("your_websocket_url"), # 路由地址 - "WebSocket name", # 路由名称 - self._handle_ws, # 处理函数 - ) - self.setup_websocket_server(ws_setup) - - - async def _handle_http(self, request: Request) -> Response: - """HTTP 路由处理函数,只有一个类型为 Request 的参数,且返回值类型为 Response""" - ... - return Response( - status_code=200, # 状态码 - headers={"something": "something"}, # 响应头 - content="xxx", # 响应内容 - ) - - async def _handle_ws(self, websocket: WebSocket) -> Any: - """WebSocket 路由处理函数,只有一个类型为 WebSocket 的参数""" - ... -``` - -更多通信交互方式可以参考以下适配器: - -- [OneBot](https://github.com/nonebot/adapter-onebot/blob/master/nonebot/adapters/onebot/v11/adapter.py) - `WebSocket 客户端`、`WebSocket 服务端`、`HTTP WEBHOOK`、`HTTP POST` -- [QQGuild](https://github.com/nonebot/adapter-qqguild/blob/master/nonebot/adapters/qqguild/adapter.py) - `WebSocket 服务端` -- [Telegram](https://github.com/nonebot/adapter-telegram/blob/beta/nonebot/adapters/telegram/adapter.py) - `HTTP WEBHOOK` - -#### 建立 Bot 连接 - -在与平台建立连接后,我们需要将 [Bot](#bot) 实例化,并调用适配器提供的的 `bot_connect` 方法告知 NoneBot 建立了 Bot 连接。在与平台断开连接或出现某些异常进行重连时,我们需要调用 `bot_disconnect` 方法告知 NoneBot 断开了 Bot 连接。 - -```python {7,8,11} title=adapter.py -from .bot import Bot - -class Adapter(BaseAdapter): - - def _handle_connect(self): - bot_id = ... # 通过配置或者平台 API 等方式,获取到 Bot 的 ID - bot = Bot(self, self_id=bot_id) # 实例化 Bot - self.bot_connect(bot) # 建立 Bot 连接 - - def _handle_disconnect(self): - self.bot_disconnect(bot) # 断开 Bot 连接 -``` - -#### 转换 Event 事件 - -在接收到来自平台的事件数据后,我们需要将其转为适配器的 [Event](#event),并调用 Bot 的 `handle_event` 方法来让 Bot 对事件进行处理: - -```python title=adapter.py -import asyncio -from typing import Any, Dict - -from nonebot.compat import type_validate_python - -from .bot import Bot -from .event import Event -from .log import log - -class Adapter(BaseAdapter): - - @classmethod - def payload_to_event(cls, payload: Dict[str, Any]) -> Event: - """根据平台事件的特性,转换平台 payload 为具体 Event - - Event 模型继承自 pydantic.BaseModel,具体请参考 pydantic 文档 - """ - - # 做一层异常处理,以应对平台事件数据的变更 - try: - return type_validate_python(your_event_class, payload) - except Exception as e: - # 无法正常解析为具体 Event 时,给出日志提示 - log( - "WARNING", - f"Parse event error: {str(payload)}", - ) - # 也可以尝试转为基础 Event 进行处理 - return type_validate_python(Event, payload) - - - async def _forward(self, bot: Bot): - - payload: Dict[str, Any] # 接收到的事件数据 - event = self.payload_to_event(payload) - # 让 bot 对事件进行处理 - asyncio.create_task(bot.handle_event(event)) -``` - -#### 调用平台 API - -我们需要实现 `Adapter` 的 `_call_api` 方法,使开发者能够调用平台提供的 API。如果通过 WebSocket 通信可以通过 `send` 方法来发送数据,如果采用 HTTP 请求,则需要通过 NoneBot 提供的 `Request` 对象,调用 `driver` 的 `request` 方法来发送请求。 - -```python {11} title=adapter.py -from typing import Any -from typing_extensions import override - -from nonebot.drivers import Request, WebSocket - -from .bot import Bot - -class Adapter(BaseAdapter): - - @override - async def _call_api(self, bot: Bot, api: str, **data: Any) -> Any: - log("DEBUG", f"Calling API {api}") # 给予日志提示 - platform_data = your_handle_data_method(data) # 自行将数据转为平台所需要的格式 - - # 采用 HTTP 请求的方式,需要构造一个 Request 对象 - request = Request( - method="GET", # 请求方法 - url=api, # 接口地址 - headers=..., # 请求头,通常需要包含鉴权信息 - params=platform_data, # 自行处理数据的传输形式 - # json=platform_data, - # data=platform_data, - ) - # 发送请求,返回结果 - return await self.driver.request(request) - - - # 采用 WebSocket 通信的方式,可以直接调用 send 方法发送数据 - # 通过某种方式获取到 bot 对应的 websocket 对象 - ws: WebSocket = your_get_websocket_method(bot.self_id) - - await ws.send_text(platform_data) # 发送 str 类型的数据 - await ws.send_bytes(platform_data) # 发送 bytes 类型的数据 - await ws.send(platform_data) # 是以上两种方式的合体 - - # 接收并返回结果,同样的,也有 str 和 bytes 的区别 - return await ws.receive_text() - return await ws.receive_bytes() - return await ws.receive() -``` - -`调用平台 API` 实现方式具体可以参考以下适配器: - -Websocket: - -- [OneBot V11](https://github.com/nonebot/adapter-onebot/blob/master/nonebot/adapters/onebot/v11/adapter.py#L127) -- [OneBot V12](https://github.com/nonebot/adapter-onebot/blob/master/nonebot/adapters/onebot/v12/adapter.py#L162) - -HTTP: - -- [QQ 频道](https://github.com/nonebot/adapter-qqguild/blob/master/nonebot/adapters/qqguild/adapter.py#L354) -- [Telegram](https://github.com/nonebot/adapter-telegram/blob/beta/nonebot/adapters/telegram/adapter.py#L145) -- [飞书](https://github.com/nonebot/adapter-feishu/blob/master/nonebot/adapters/feishu/adapter.py#L158) - -### Bot - -Bot 是机器人开发者能够直接获取并使用的核心对象,负责存储平台机器人相关信息,并提供回复事件、调用 API 的上层方法。我们需要继承基类 `Bot`,并实现相关方法: - -```python {20,25,34} title=bot.py -from typing import TYPE_CHECKING, Any, Union -from typing_extensions import override - -from nonebot.message import handle_event -from nonebot.adapters import Bot as BaseBot - -from .event import Event -from .message import Message, MessageSegment - -if TYPE_CHECKING: - from .adapter import Adapter - - -class Bot(BaseBot): - """ - your_adapter_name 协议 Bot 适配。 - """ - - @override - def __init__(self, adapter: Adapter, self_id: str, **kwargs: Any): - super().__init__(adapter, self_id) - self.adapter: Adapter = adapter - # 一些有关 Bot 的信息也可以在此定义和存储 - - async def handle_event(self, event: Event): - # 根据需要,对事件进行某些预处理,例如: - # 检查事件是否和机器人有关操作,去除事件消息首尾的 @bot - # 检查事件是否有回复消息,调用平台 API 获取原始消息的消息内容 - ... - # 调用 handle_event 让 NoneBot 对事件进行处理 - await handle_event(self, event) - - @override - async def send( - self, - event: Event, - message: Union[str, Message, MessageSegment], - **kwargs: Any, - ) -> Any: - # 根据平台实现 Bot 回复事件的方法 - - # 将消息处理为平台所需的格式后,调用发送消息接口进行发送,例如: - data = message_to_platform_data(message) - await self.send_message( - data=data, - ... - ) -``` - -### Event - -Event 是 NoneBot 中的事件主体对象,所有平台消息在进入处理流程前需要转换为 NoneBot 事件。我们需要继承基类 `Event`,并实现相关方法: - -```python {5,8,13,18,23,28,33} title=event.py -from typing_extensions import override - -from nonebot.compat import model_dump -from nonebot.adapters import Event as BaseEvent - -class Event(BaseEvent): - - @override - def get_event_name(self) -> str: - # 返回事件的名称,用于日志打印 - return "event name" - - @override - def get_event_description(self) -> str: - # 返回事件的描述,用于日志打印,请注意转义 loguru tag - return escape_tag(repr(model_dump(self))) - - @override - def get_message(self): - # 获取事件消息的方法,根据事件具体实现,如果事件非消息类型事件,则抛出异常 - raise ValueError("Event has no message!") - - @override - def get_user_id(self) -> str: - # 获取用户 ID 的方法,根据事件具体实现,如果事件没有用户 ID,则抛出异常 - raise ValueError("Event has no context!") - - @override - def get_session_id(self) -> str: - # 获取事件会话 ID 的方法,根据事件具体实现,如果事件没有相关 ID,则抛出异常 - raise ValueError("Event has no context!") - - @override - def is_tome(self) -> bool: - # 判断事件是否和机器人有关 - return False -``` - -然后根据平台消息的类型,编写各种不同的事件,并且注意要根据事件类型实现 `get_type` 方法,具体请参考[事件类型](../advanced/adapter#事件类型)。消息类型事件还应重写 `get_message` 和 `get_user_id` 等方法,例如: - -```python {7,16,20,25,34,42} title=event.py -from .message import Message - -class HeartbeatEvent(Event): - """心跳时间,通常为元事件""" - - @override - def get_type(self) -> str: - return "meta_event" - -class MessageEvent(Event): - """消息事件""" - message_id: str - user_id: str - - @override - def get_type(self) -> str: - return "message" - - @override - def get_message(self) -> Message: - # 返回事件消息对应的 NoneBot Message 对象 - return self.message - - @override - def get_user_id(self) -> str: - return self.user_id - -class JoinRoomEvent(Event): - """加入房间事件,通常为通知事件""" - user_id: str - room_id: str - - @override - def get_type(self) -> str: - return "notice" - -class ApplyAddFriendEvent(Event): - """申请添加好友事件,通常为请求事件""" - user_id: str - - @override - def get_type(self) -> str: - return "request" -``` - -### Message - -Message 负责正确序列化消息,以便机器人插件处理。我们需要继承 `MessageSegment` 和 `Message` 两个类,并实现相关方法: - -```python {9,12,17,22,27,30,36} title=message.py -from typing import Type, Iterable -from typing_extensions import override - -from nonebot.utils import escape_tag - -from nonebot.adapters import Message as BaseMessage -from nonebot.adapters import MessageSegment as BaseMessageSegment - -class MessageSegment(BaseMessageSegment["Message"]): - @classmethod - @override - def get_message_class(cls) -> Type["Message"]: - # 返回适配器的 Message 类型本身 - return Message - - @override - def __str__(self) -> str: - # 返回该消息段的纯文本表现形式,通常在日志中展示 - return "text of MessageSegment" - - @override - def is_text(self) -> bool: - # 判断该消息段是否为纯文本 - return self.type == "text" - - -class Message(BaseMessage[MessageSegment]): - @classmethod - @override - def get_segment_class(cls) -> Type[MessageSegment]: - # 返回适配器的 MessageSegment 类型本身 - return MessageSegment - - @staticmethod - @override - def _construct(msg: str) -> Iterable[MessageSegment]: - # 实现从字符串中构造消息数组,如无字符串嵌入格式可直接返回文本类型 MessageSegment - ... -``` - -然后根据平台具体的消息类型,来实现各种 `MessageSegment` 消息段,具体可以参考以下适配器: - -- [OneBot](https://github.com/nonebot/adapter-onebot/blob/master/nonebot/adapters/onebot/v11/message.py#L77-L261) -- [QQGuild](https://github.com/nonebot/adapter-qqguild/blob/master/nonebot/adapters/qqguild/message.py#L22-L150) -- [Telegram](https://github.com/nonebot/adapter-telegram/blob/beta/nonebot/adapters/telegram/message.py#L43-L250) - -## 适配器测试 - -关于适配器测试相关内容在这里不再展开,开发者可以根据需要进行合适的测试。这里为开发者提供几个常见问题的解决方法: - -1. 在测试中无法导入 editable 模式安装的适配器代码。在 pytest 的 `conftest.py` 内添加如下代码: - - ```python title=tests/conftest.py - from pathlib import Path - import nonebot.adapters - nonebot.adapters.__path__.append( # type: ignore - str((Path(__file__).parent.parent / "nonebot" / "adapters").resolve()) - ) - ``` - -2. 需要计算适配器测试覆盖率,请在 `pyproject.toml` 中添加 pytest 配置: - - ```toml title=pyproject.toml - [tool.pytest.ini_options] - addopts = "--cov nonebot/adapters/{adapter-name} --cov-report term-missing" - ``` - -## 后续工作 - -在完成适配器代码的编写后,如果想要将适配器发布到 NoneBot 商店,我们需要将适配器发布到 PyPI 中,然后前往[商店](/store/adapters)页面,切换到适配器页签,点击**发布适配器**按钮,填写适配器相关信息并提交。 - -另外建议编写适配器文档或者一些插件开发示例,以便其他开发者使用我们的适配器。 diff --git a/website/versioned_docs/version-2.3.1/developer/plugin-publishing.mdx b/website/versioned_docs/version-2.3.1/developer/plugin-publishing.mdx deleted file mode 100644 index d1bf68114cbf..000000000000 --- a/website/versioned_docs/version-2.3.1/developer/plugin-publishing.mdx +++ /dev/null @@ -1,202 +0,0 @@ ---- -sidebar_position: 0 -description: 在商店发布自己的插件 ---- - -# 发布插件 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -NoneBot 为开发者提供了分享插件给大家使用的方式——商店。本章节将会介绍如何将我们写好的插件发布到商店。 - -:::tip 提示 -本章节仅包含插件发布流程指导,插件开发请查阅前述章节。 -::: - -## 准备工作 - -### 插件命名规范 - -NoneBot 插件使用下述命名规范: - -- 对于**项目名**,建议统一以 `nonebot-plugin-` 开头,之后为拟定的插件名字,词间用横杠 `-` 分隔; - - **项目名**用于代码仓库名称、PyPI 包的发布名称等; - - 本文使用 `nonebot-plugin-{your-plugin-name}` 为例。 -- 对于**模块名**,建议与**项目名**一致,但词间用下划线 `_` 分隔,即统一以 `nonebot_plugin_` 开头,之后为拟定的插件名字; - - **模块名**用于程序导入使用,应为插件文件(夹)的名称; - - 本文使用 `nonebot_plugin_{your_plugin_name}` 为例。 - -### 项目结构 - -:::tip 提示 -本段所述的项目结构仅作推荐,不做强制要求,保证实际可用性即可。 -::: - -插件程序本身结构可参考[插件结构](../tutorial/create-plugin.md#插件结构)一节,唯一区别在于,插件包可以直接处于项目顶层。 - -插件项目的一种组织结构如下: - -```tree -📦 nonebot-plugin-{your-plugin-name} -├── 📂 nonebot_plugin_{your_plugin_name} -│ ├── 📜 __init__.py -│ └── 📜 config.py -├── 📜 pyproject.toml -└── 📜 README.md -``` - -#### 第三方项目模板 - -一些社区用户可能会分享自己制作的项目模板方便大家使用,如:[A-kirami/nonebot-plugin-template](https://github.com/A-kirami/nonebot-plugin-template) 等。 - -:::tip 提示 -本文档**不保证**第三方模板的适用性。 - -根据项目模板提供的使用指导补全/修改相应内容后上传到 GitHub 即可。 -::: - -### 插件依赖 - -本段指导填写插件依赖,避免不正确的依赖信息导致插件无法正常工作。 - -依赖填写的基本原则:程序直接导入了什么第三方库,就添加什么第三方包依赖;能用哪些第三方库的特性,就根据使用的特性锁定第三方包版本。 - -:::caution 注意 - -1. 插件需要添加 `nonebot2` 为依赖以避免“幽灵依赖”; -2. 插件需要将使用的适配器加入依赖列表,如:使用 OneBot 适配器的插件应添加 `nonebot-adapter-onebot` 依赖; -3. 由于 `nonebot` 是指 `nonebot1` **而非** `nonebot2`,因此要注意**不要**将 `nonebot` 添加为插件的依赖,以免造成冲突; -4. 尽可能避免使用 `==` 锁定单一版本,增强与其它插件的兼容性。 - -::: - -### 填写插件元数据 - -请注意,插件发布要求**必须**填写元数据才能通过审核。 - -下面是一个示例: - -```python title=nonebot_plugin_{your_plugin_name}/__init__.py -from nonebot.plugin import PluginMetadata - -from .config import Config - -__plugin_meta__ = PluginMetadata( - name="{插件名称}", - description="{插件介绍}", - usage="{插件用法}", - - type="{插件分类}", - # 发布必填,当前有效类型有:`library`(为其他插件编写提供功能),`application`(向机器人用户提供功能)。 - - homepage="{项目主页}", - # 发布必填。 - - config=Config, - # 插件配置项类,如无需配置可不填写。 - - supported_adapters={"~onebot.v11", "~telegram"}, - # 支持的适配器集合,其中 `~` 在此处代表前缀 `nonebot.adapters.`,其余适配器亦按此格式填写。 - # 若插件可以保证兼容所有适配器(即仅使用基本适配器功能)可不填写,否则应该列出插件支持的适配器。 -) -``` - -:::caution 注意 -`__plugin_meta__` 变量**必须**处于插件最外层(如 `__init__.py` 中),否则无法正常识别。 - -一般做法是在 `__init__.py` 中定义 `__plugin_meta__`。 -::: - -:::tip 提示 -带花括号 `{}` 的内容需要自行替换,注意**一定要把原有的花括号去掉**。 -::: - -### 准备项目主页 - -通常可以使用 GitHub 项目页面作为项目主页,在 `README.md` 文件中编写插件介绍等内容。 - -内容大致包括: - -- 插件功能介绍 -- 安装方法(建议至少有 `nb-cli` 方式安装,**不要**使用旧式的 `bot.py` 配置) -- 插件配置项(若无可跳过) -- 插件设置的触发规则(若无可跳过) -- 插件的其它用法(按需编写) - -:::tip 提示 -可以参考[第三方项目模板](#第三方项目模板)。 -::: - -### 发布至 [PyPI](https://pypi.org) - -根据选用的构建系统,在项目的 `pyproject.toml` 中填入必要信息后进行构建与发布。 - -:::tip 提示 -不同构建工具的使用可能存在差别。本文仅以 [`pdm`](https://pdm.fming.dev/latest/), -[`poetry`](https://python-poetry.org/docs/), [`setuptools`](https://setuptools.pypa.io/en/latest/) -构建系统**本地构建与发布**为示例讲解,其余构建/管理工具等和自动化构建的用法请读者自行探索。 -::: - - - - -```bash -poetry publish --build # 构建并发布 - -# 等效于以下两个命令 -poetry build # 只构建 -poetry publish # 只发布先前的构建 -``` - - - - - -```bash -pdm publish # 构建并发布 - -# 等效于以下两个命令 -pdm build # 只构建 -pdm publish --no-build # 只发布先前的构建 -``` - - - - - -```bash -pip install build twine # 安装通用构建与发布工具 - -python -m build --sdist --wheel . # 只构建 -twine upload dist/* # 只发布先前的构建 -``` - - - - -:::tip 提示 -发布前建议自行测试构建包是否可用,避免遗漏代码文件或资源文件等问题。 -::: - -## 商店审核 - -### 提交申请 - -完成在 PyPI 的插件发布流程后,前往[商店](/store/plugins)页面,切换到插件页签,点击 **发布插件** 按钮。 - -在弹出的插件信息提交表单内,填入您所要发布的相应插件信息。请注意,如果插件需要必要配置项才能正常导入,请在“插件配置项”中填写必要的内容(请勿填写密钥等敏感信息)。 - -完成填写后,点击 **发布** 按钮,这将自动跳转 NoneBot 仓库内的“发布插件”页面。确认信息无误后点击页面下方的 `Submit new issue` 按钮进行最终提交即可。 - -### 等待插件审核 - -插件发布 Issue 创建后,将会经过 **NoneFlow Bot** 的自动前置检查,以确保插件信息正确无误、插件能被正确加载。 - -:::tip 提示 -若插件检查未通过或信息有误,**不必**关闭当前 Issue。只需更新插件并上传到 PyPI/修改信息后勾选插件测试勾选框即可重新触发插件检查。 -::: - -之后,NoneBot 的维护者和一些插件开发者会初步检查插件代码,帮助减少该插件的问题。 - -完成这些步骤后,您的插件将会被自动合并到[商店](/store/plugins),而您也将成为 [**NoneBot 贡献者**](https://github.com/nonebot/nonebot2/graphs/contributors)的一员。 diff --git a/website/versioned_docs/version-2.3.1/editor-support.md b/website/versioned_docs/version-2.3.1/editor-support.md deleted file mode 100644 index 0d2f96d680db..000000000000 --- a/website/versioned_docs/version-2.3.1/editor-support.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_position: 2 -description: 配置编辑器以获得最佳体验 ---- - -# 编辑器支持 - -框架基于 [PEP484](https://www.python.org/dev/peps/pep-0484/)、[PEP 561](https://www.python.org/dev/peps/pep-0561/)、[PEP8](https://www.python.org/dev/peps/pep-0008/) 等规范进行开发并且**拥有完整类型注解**。框架使用 Pyright(Pylance)工具进行类型检查,确保代码可以被编辑器正确解析。 - -## 编辑器推荐配置 - -### Visual Studio Code - -在 Visual Studio Code 中,可以使用 Pylance Language Server 并启用 `Type Checking` 配置以达到最佳开发体验。 - -1. 在 VSCode 插件视图搜索并安装 `Python (ms-python.python)` 和 `Pylance (ms-python.vscode-pylance)` 插件。 -2. 修改 VSCode 配置 - 在 VSCode 设置视图搜索配置项 `Python: Language Server` 并将其值设置为 `Pylance`,搜索配置项 `Python > Analysis: Type Checking Mode` 并将其值设置为 `basic`。 - - 或者向项目 `.vscode` 文件夹中配置文件添加以下内容: - - ```json title=settings.json - { - "python.languageServer": "Pylance", - "python.analysis.typeCheckingMode": "basic" - } - ``` - -### 其他 - -欢迎提交 Pull Request 添加其他编辑器配置推荐。点击左下角 `Edit this page` 前往编辑。 diff --git a/website/versioned_docs/version-2.3.1/ospp/2021.md b/website/versioned_docs/version-2.3.1/ospp/2021.md deleted file mode 100644 index 19464a1a5ebd..000000000000 --- a/website/versioned_docs/version-2.3.1/ospp/2021.md +++ /dev/null @@ -1,191 +0,0 @@ ---- -sidebar_position: 0 -description: 开源软件供应链点亮计划 - 暑期 2021 ---- - -# 暑期 2021 - -**开源软件供应链点亮计划 - 暑期 2021** 是**中国科学院软件研究所**与 **openEuler 社区**共同举办的一项面向高校学生的暑期活动,旨在鼓励在校学生积极参与开源软件的开发维护,促进优秀开源软件社区的蓬勃发展。关于具体的活动规划、报名方式,请查看该活动的 [官网](https://summer.iscas.ac.cn/) 和 [帮助文档](https://summer.iscas.ac.cn/help/)。 - -NoneBot 社区有幸作为开源社区参与了本次活动,下面列出了目前我们已经发布的项目,欢迎感兴趣的同学在上面给出的活动官网报名,或通过 [contact@nonebot.dev](mailto:contact@nonebot.dev) 联系我们。 - -## NoneBot v1 - -### 更新 NoneBot v1 文档中的“指南”部分 - -由于 NoneBot v1 和 aiocqhttp 最初基于的 QQ 机器人平台不再提供服务,CQHTTP 接口也转型且改名为 OneBot 标准,目前 NoneBot v1 文档的“指南”部分和 aiocqhttp 文档有部分过时内容需要更新。我们希望将其中与旧的机器人平台相关的内容改为基于 go-cqhttp 或通用的 OneBot 表述,同时对 NoneBot v1 的 awesome-bot 示例做一次全面检查,修改其中可能已经不可用的部分。 - -**难度**:低 - -**导师**:[@cleoold](https://github.com/cleoold) - -**产出要求** - -- 修改“指南”文档和 aiocqhttp 文档中与旧的 QQ 机器人平台相关的部分 -- 检查 awesome-bot 示例是否有已经过时/不可用的地方,并更新/修复 -- 修改“图灵机器人”案例,使用其它 AI 聊天 API 提供商(需先做简单调研) - -**技术要求** - -- 熟悉 Python 编程语言及 asyncio 机制 -- 了解 Git 基本用法 -- 了解聊天机器人基本开发过程 -- 了解 VuePress 更佳 - -### NoneBot v1 API 文档自动生成 - -目前 NoneBot v1 的文档中“API”部分是手动编写的,在更新代码接口的同时需要手动更新文档,可能造成文档与代码不匹配,形成额外的维护成本。我们希望将 API 文档改为直接编写在 Python docstring 中,通过工具自动生成 API 文档。 - -**难度**:中 - -**导师**:[@cleoold](https://github.com/cleoold) - -**产出要求** - -- 调研市面上常见的 Python API 文档生成工具 -- 在代码中补充 API 文档 -- 编写或应用开源工具自动生成 API 文档 -- 配置 GitHub Actions 或其它 CI 自动化构建和部署 API 文档 - -**技术要求** - -- 熟悉 Python 编程语言及 asyncio 和 Type Hints -- 了解 Git 基本用法 -- 了解 Sphinx 等文档生成工具更佳 -- 了解 GitHub Actions 等 CI 工具更佳 - -## NoneBot v2 - -### NoneBot v2 自动化测试框架“NoneBug” - -在聊天机器人的开发过程中,一套自动化的测试机制是非常重要的,特别是对于 NoneBot 2 这类为大型机器人开发而设计的项目来说,需要手动测试每一个边际条件是非常痛苦的。我们希望能够开发一款基于 NoneBot 2 插件机制的自动化测试框架,为 NoneBot 2 用户提供一套易用便捷、高度灵活的自动化测试框架。 - -**难度**:高 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 调研现有的 Python 和其它语言集成测试框架 -- 设计 NoneBug 的用户 API 和实现方式 -- 实现 NoneBug 自动化测试框架 -- 编写详细的使用文档 - -**技术要求** - -- 熟悉 Python 编程语言及 asyncio 和 Type Hints -- 了解 Git 基本用法 -- 了解 NoneBot v2 的基本原理和使用方式 -- 了解主流的 Python 自动化测试框架 - -### NoneBot v2 Telegram 适配器 - -目前 NoneBot v2 已支持 OneBot、Mirai HTTP API、钉钉协议,社区反馈有更多的平台需求,希望能在 NoneBot v2 获得更多的跨平台支持,提高机器人的便携性。同时,我们也希望随着新平台加入,提升现有 NoneBot v2 核心代码的平台通用性。Telegram 是一款较为广泛使用的安全即时聊天软件,同时其官方提供了丰富的聊天机器人 API,因此我们希望为 NoneBot v2 编写一个 Telegram 适配器来支持 Telegram 机器人的开发。 - -**难度**:中 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 调研 Telegram Bot API 以及 WebHook 等官方接口 -- 编写 Telegram 适配器并能够使用 -- 代码遵守项目 Contributing 规范 - -**技术要求** - -- 熟悉 Python 编程语言及 asyncio 和 Type Hints -- 了解 Git 基本用法 -- 了解 Web 开发相关知识 -- 了解 Sphinx 等文档生成工具更佳 - -### NoneBot v2 飞书适配器 - -目前 NoneBot v2 已支持 OneBot、Mirai HTTP API、钉钉协议,社区反馈有更多的平台需求,希望能在 NoneBot v2 获得更多的跨平台支持,提高机器人的便携性。同时,我们也希望随着新平台加入,提升现有 NoneBot v2 核心代码的平台通用性。飞书是目前企业用户广泛使用的即时聊天和协作软件,其官方提供了丰富的聊天机器人 API,因此我们希望为 NoneBot v2 编写一个飞书适配器来支持飞书机器人的开发。 - -**难度**:中 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 调研飞书机器人 API 以及 WebHook 等官方接口 -- 编写飞书适配器并能够使用 -- 代码遵守项目 Contributing 规范 - -**技术要求** - -- 熟悉 Python 编程语言及 asyncio 和 Type Hints -- 了解 Git 基本用法 -- 了解 Web 开发相关知识 -- 了解 Sphinx 等文档生成工具更佳 - -## OneBot - -### 设计 OneBot v12 接口标准 - -目前的 OneBot 标准的 v11 版本仍然与 QQ 平台有较多耦合,我们希望在 v12 去掉与 QQ 耦合的历史包袱,形成一个通用的、可扩展的、易于使用的同时易于实现的聊天机器人接口标准。 - -**难度**:中 - -**导师**:[@richardchien](https://github.com/richardchien) - -**产出要求** - -- 调研各聊天机器人平台的官方/非官方接口特点 -- 通用化 OneBot 核心 API,分离 QQ 特定的 API,去掉无用 API -- 优化现有的通信、消息表示机制 -- 补充 QQ 特定的缺失 API -- 文档需符合风格指南 - -**技术要求** - -- 熟悉至少两个聊天平台的聊天机器人开发 -- 了解 Git 基本用法 -- 了解使用不同语言编写聊天机器人时的常用实践 -- 对文档的优雅性与美观性有追求更佳 - -### 实现 Rust 版 libonebot - -目前最常用的 OneBot 实现包括 go-cqhttp、onebot-kotlin、node-onebot 等,这些实现都各自重复实现了 Web 通信、消息解析、配置读写等功能,当社区中的开发者想针对一个新的聊天平台实现 OneBot 时,他们往往同样需要再次实现类似逻辑。我们希望使用 Rust 编写一个 libonebot 模块,该模块实现所有 OneBot 实现所共享的功能,从而方便其他开发者们使用 Rust 快速编写具体的 OneBot 实现。同时,我们希望借此项目在聊天机器人社区中推广 Rust 编程语言。 - -> 注:这里的逻辑是 libonebot + 针对某聊天平台的对接代码 = 某聊天平台的 OneBot 实现,libonebot 要做的是让 OneBot 实现的开发者只需编写针对特定聊天平台的对接代码,而无需关心 OneBot 标准定义的通信方式、消息格式等。 - -**难度**:高 - -**导师**:[@richardchien](https://github.com/richardchien) - -**产出要求** - -- 实现所有 OneBot 实现所共享的功能,包括 Web 通信、消息解析、配置读写等 -- 充分考虑同时兼容 OneBot v11 和 v12 接口 -- 能够根据用户(OneBot 实现的开发者)所实现的接口自动实现类似 get_available_apis 等接口 -- 编写详细的使用文档 -- 如果可能,与 v12 设计项目联动,实现第一手 v12 支持 - -**技术要求** - -- 熟悉聊天机器人开发 -- 熟悉 Rust Web 开发 - -### 实现自选语言版 libonebot - -目前最常用的 OneBot 实现包括 go-cqhttp、onebot-kotlin、node-onebot 等,这些实现都各自重复实现了 Web 通信、消息解析、配置读写等功能,当社区中的开发者想针对一个新的聊天平台实现 OneBot 时,他们往往同样需要再次实现类似逻辑。我们希望使用 Python、Go、Kotlin、Node、PHP、C#.NET 等主流语言(任选一个)编写 libonebot 模块,该模块实现所有 OneBot 实现所共享的功能,从而方便其他开发者们使用对应语言快速编写具体的 OneBot 实现。 - -> 注:这里的逻辑是 libonebot + 针对某聊天平台的对接代码 = 某聊天平台的 OneBot 实现,libonebot 要做的是让 OneBot 实现的开发者只需编写针对特定聊天平台的对接代码,而无需关心 OneBot 标准定义的通信方式、消息格式等。 - -**难度**:中 - -**导师**:[@richardchien](https://github.com/richardchien) - -**产出要求** - -- 实现所有 OneBot 实现所共享的功能,包括 Web 通信、消息解析、配置读写等 -- 充分考虑同时兼容 OneBot v11 和 v12 接口 -- 编写详细的使用文档 -- 如果可能,实现更多附加特性,如根据用户(OneBot 实现的开发者)所实现的接口自动实现类似 get_available_apis 等接口、实现第一手 v12 支持等 - -**技术要求** - -- 熟悉聊天机器人开发 -- 熟悉所选语言的 Web 开发 diff --git a/website/versioned_docs/version-2.3.1/ospp/2022.md b/website/versioned_docs/version-2.3.1/ospp/2022.md deleted file mode 100644 index e23c274c79b9..000000000000 --- a/website/versioned_docs/version-2.3.1/ospp/2022.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -sidebar_position: 1 -description: 开源之夏 - 暑期 2022 -mdx: - format: md ---- - -# 暑期 2022 - -**开源之夏 - 暑期 2022** 是由**开源软件供应链点亮计划**发起、由**中国科学院软件研究所**与 **openEuler 社区**主办的一项面向高校学生的暑期活动,类似 Google Summer of Code(GSoC),旨在鼓励在校学生积极参与开源软件的开发维护,促进优秀开源软件社区的蓬勃发展。关于具体的活动规划、报名方式,请查看该活动的 [官网](https://summer-ospp.ac.cn/) 和 [帮助文档](https://summer-ospp.ac.cn/help/)。 - -NoneBot 社区有幸作为开源社区 [参与](https://summer-ospp.ac.cn/#/org/orgdetail/e1fb5b8d-125a-4138-b756-25bd32c0a31a/) 了本次活动,下面列出了目前我们已经发布的项目,欢迎感兴趣的同学加入 QQ 群 [737131827](https://jq.qq.com/?_wv=1027&k=PEgyGeEu) 或通过 [contact@nonebot.dev](mailto:contact@nonebot.dev) 联系我们。 - -## NoneBot2 命令行 CLI 交互体验升级 - -NoneBot2 为用户提供了命令行脚手架 ──`nb-cli`,辅助用户更好地上手项目以及进行开发。nb-cli 主要包括:创建项目、运行项目、安装与卸载插件、部署项目等功能。随着 NoneBot2 Beta 版本的发布,脚手架功能存在一定的定位不明确、功能体验不佳。本项目旨在重新设计 nb-cli 功能框架,完善功能,优化用户体验。 - -**难度**:进阶 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 设计 nb-cli 功能框架 - - 明确各功能模块 - - 设计用户交互模式 -- 完成 nb-cli 主要功能代码 - - 项目管理 - - 插件管理 - - 其它 -- 同步更新使用文档 - -**技术要求** - -- 熟悉 Python 命令行交互代码编写 -- 熟悉 NoneBot2 框架功能 -- 熟悉 NoneBot2 项目组织方式 - -**成果仓库** - -- -- - -## NoneBot2 命令行即时交互通信设计与实现 - -NoneBot2 在早期提供了基于网页的 nonebot-plugin-test 插件,无需平台适配接入即可对机器人进行测试,方便了开发者直观的感受机器人文本交互功能。我们希望提供一款基于命令行的适配器/驱动器,用于无平台适配接入、可以运行机器人的场景进行功能体验或测试。 - -**难度**:进阶 - -**导师**:[@mnixry](https://github.com/mnixry) - -**产出要求** - -- 设计命令行与 NoneBot2 通信模式 - - 直接调用/HTTP/WebSocket -- 设计命令行交互界面 -- 实现相应适配器/驱动器 -- 同步更新使用说明文档 - -**技术要求** - -- 熟悉 Python 命令行交互代码编写 -- 熟悉 NoneBot2 框架功能 -- 熟悉 NoneBot2 项目组织方式 - -**成果仓库** - -- - -## NoneBot2 用户上手与深入教程设计 - -NoneBot2 为用户提供了详细的文档介绍,辅助用户更好的上手项目以及进行开发。文档分为基础与进阶两个部分。基础部分帮助新用户快速上手开发,主要包括:安装 NoneBot2、使用脚手架、创建配置项目、使用适配器、加载插件、定义消息事件、处理消息事件、调用平台 API 等。进阶部分向已经熟悉开发流程的用户介绍更多高级技巧,主要包括:NoneBot2 工作原理、定时任务、权限控制、钩子函数、跨插件访问、单元测试、发布插件等。目前文档对于用户而言过于费解,导致用户难以理解 NoneBot2 开发。本项目旨在优化文档内容,使其更加通俗易懂,不让文档成为用户上手的阻碍,同时完善进阶内容,让有更复杂需求的用户,同样能从文档中受益。 - -相关 issue: - -- -- - -**难度**:进阶 - -**导师**:[@SK-415](https://github.com/SK-415) - -**产出要求** - -- 文档通俗易懂 - - 附有适当的图片指引(如 asciinema) -- 内容完整,由浅入深 -- 适当的界面美化,合理分配布局 - -**技术要求** - -- 熟悉文档结构组织与语言表达 -- 熟悉 NoneBot2 框架功能 -- 熟悉 NoneBot2 项目组织方式 - -**成果仓库** - -- diff --git a/website/versioned_docs/version-2.3.1/ospp/2023.md b/website/versioned_docs/version-2.3.1/ospp/2023.md deleted file mode 100644 index 3209537331b8..000000000000 --- a/website/versioned_docs/version-2.3.1/ospp/2023.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -sidebar_position: 2 -description: 开源之夏 - 暑期 2023 -mdx: - format: md ---- - -# 暑期 2023 - -**开源之夏 - 暑期 2023** 是由**开源软件供应链点亮计划**发起、由**中国科学院软件研究所**与 **openEuler 社区**主办的一项面向高校学生的暑期活动,类似 Google Summer of Code(GSoC),旨在鼓励在校学生积极参与开源软件的开发维护,促进优秀开源软件社区的蓬勃发展。关于具体的活动规划、报名方式,请查看该活动的 [官网](https://summer-ospp.ac.cn/) 和 [帮助文档](https://summer-ospp.ac.cn/help/)。 - -NoneBot 社区有幸作为开源社区 [参与](https://summer-ospp.ac.cn/org/orgdetail/e1fb5b8d-125a-4138-b756-25bd32c0a31a?lang=zh) 了本次活动,下面列出了目前我们已经发布的项目,欢迎感兴趣的同学通过 [contact@nonebot.dev](mailto:contact@nonebot.dev) 联系我们。 - -## NoneBot 项目管理图形化面板 - -NoneBot 目前提供了开箱即用的命令行脚手架来帮助初次使用的用户更快的上手编写应用。但是,对于未有一定开发经验的用户,命令行的使用仍具有一定的困难。此外,其他项目如 koishi、vue 等,均可通过图形化界面的形式为用户提供更便捷的项目开发。因此,我们希望借助现有命令行脚手架的可扩展特性,提供一个项目管理面板服务,以网页的形式帮助用户开发 NoneBot 应用。 - -**难度**:进阶 - -**导师**:[@mnixry](https://github.com/mnixry) - -**产出要求** - -- 设计并实现项目管理面板相关功能 - - 创建与管理项目 - - 配置与运行项目 - - NoneBot 插件管理 -- 实现相应 nb-cli 插件提供面板服务 -- 代码符合 NoneBot Contributing 规范 - -**技术要求** - -- 熟悉 nb-cli 相关功能 -- 熟悉 NoneBot 框架功能 -- 熟悉前后端相关实现方式 - -**成果仓库** - -- - -## NoneBot Discord 适配器 - -NoneBot 作为一个跨平台聊天机器人框架,目前已有 OneBot、飞书、Telegram、QQ 频道等诸多平台的适配支持。作为众多用户期待的平台适配之一,我们希望借此机会接入 Discord 聊天机器人。 - -**难度**:进阶 - -**导师**:[@iyume](https://github.com/iyume) - -**产出要求** - -- 调研 Discord Bot 相关功能与接口 -- 设计与编写 NoneBot Discord 适配器 -- 代码符合 NoneBot Contributing 规范 - -**技术要求** - -- 熟悉 NoneBot 框架功能 -- 熟悉 NoneBot 各模块职责与适配器编写 - -**成果仓库** - -- - -## NoneBot 数据库支持插件 - -NoneBot 的插件系统为用户实现应用提供了极高的便捷性,但因此也增加了插件统一管理的难度。目前,我们发现许多用户发布的插件中存在文件存储结构化数据、数据存放散乱等现象,同时插件间也可能产生冲突。因此,我们希望提供一个统一的数据存储与管理方式,便于用户读写应用数据。 - -**难度**:进阶 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 设计并实现 ORM 插件 - - 提供关系模型定义功能 - - 提供模型迁移与管理功能 - - 能较好的支持 Python 类型检查与推导 -- 编写相应的用户使用文档 -- 代码符合 NoneBot Contributing 规范 - -**技术要求** - -- 熟悉 NoneBot 框架功能与插件编写 -- 熟悉 SQLAlchemy 等 ORM 框架 - - 熟悉 SQLAlchemy ORM - - 熟悉 alembic 等迁移工具 -- 熟悉 nb-cli 插件编写 - -**成果仓库** - -- diff --git a/website/versioned_docs/version-2.3.1/ospp/2024.md b/website/versioned_docs/version-2.3.1/ospp/2024.md deleted file mode 100644 index dec90b48a446..000000000000 --- a/website/versioned_docs/version-2.3.1/ospp/2024.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -sidebar_position: 3 -description: 开源之夏 - 暑期 2024 -mdx: - format: md ---- - -# 暑期 2024 - -**开源之夏 - 暑期 2024** 是**中国科学院软件研究所**发起的**开源软件供应链点亮计划**系列暑期活动,旨在鼓励高校学生积极参与开源软件的开发维护,促进优秀开源软件社区的蓬勃发展。活动联合各大开源社区,针对重要开源软件的开发与维护提供项目开发任务,并向全球高校学生开放报名。关于具体的活动规划、报名方式,请查看该活动的 [官网](https://summer-ospp.ac.cn/) 和 [帮助文档](https://summer-ospp.ac.cn/help/)。 - -NoneBot 社区有幸作为开源社区 [参与](https://summer-ospp.ac.cn/org/orgdetail/e1fb5b8d-125a-4138-b756-25bd32c0a31a?lang=zh) 了本次活动,下面列出了目前我们已经发布的项目,欢迎感兴趣的同学通过 [contact@nonebot.dev](mailto:contact@nonebot.dev) 联系我们。 - -## NonePress 官网组件库更新与优化 - -NoneBot 官网目前采用基于 TailwindCSS 自研的 NonePress 组件库及 Docusaurus 框架进行构建。由于相关依赖版本迭代迅速,目前官网组件库已产生了较大的版本落后。本项目希望在跟进框架新版本的基础上,对文档整体视觉体验进行重新设计,提升页面的无障碍访问性,基于 React Hydrate 特性实现完整的静态网站生成(SSG)以提升搜索引擎优化(SEO)水平。在解决以上问题的基础上,可对网页的开发以及生产构建性能做相应的优化提升,例如在生产构建使用自有的 webpack loader、替换现有的热重载逻辑以减少开发环境启动耗时等。 - -**难度**:进阶 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 基于 Docusaurus v3 重构 NonePress 组件库及相关插件 - - 升级相关依赖并重新打造 Docusaurus theme(布局与组件) - - 根据需求实现/修改 Docusaurus 插件使得官网内容构建正常 - - 能够提升页面渲染性能与 MDX 相关能力 -- 升级官网采用新版组件库 - - Algolia 索引与 SEO 正常 - - 桌面端与移动端显示正常 - - 优化官网开发与生产构建体验 -- (可选)优化官网部分页面 - - 优化官网过长的 changelog - - 优化官网插件商店的展示细节 - -**技术要求** - -- 熟练掌握 TS、PostCSS、TSX、MDX等相关技术 -- 掌握 React、Docusaurus、tailwind css 等框架 -- 熟悉静态网站生成 SSG、SEO 优化与 Algolia 索引原理等 - -**成果仓库** - -- - -## NoneFlow 社区自动化工作流管理优化 - -NoneFlow 在 NoneBot 社区中承担着重要的角色,它由 NoneBot 框架基于 GitHub APP 编写而成,能够自动化的完成许多复杂流程的处理,如:用户请求提交插件到商店时进行自动化检测,并在人工审核通过后自动存储至 registry;定时自动更新 registry 内插件信息,跟进插件新版本情况等。但是,在长期的使用中发现了一些问题和不足的地方,例如:项目本身结构复杂耦合,添加新自动化流程与维护现有流程困难;目前采用了 GitHub 用户名作为插件作者名,但已有不少插件作者改名;插件存储至 registry 并定时更新,缺少统计相关信息以帮助商店更好的展示当前插件状态;插件作者想要修改插件信息时无法便捷的找到操作方式等。本项目希望针对以上问题与不足的地方进行修复与优化,提升用户体验。 - -**难度**:进阶 - -**导师**:[@uy/sun](https://github.com/he0119) - -**产出要求** - -- 重构现有工作流处理结构 - - 整合现有 Issue、Pull Request、Git 相关操作 - - 提供用户修改信息的处理方式 - - 正确处理 PR 的 Open、Close、Draft 状态 -- 修复流程中存在的问题 - - 插件作者名正确展示 - - registry 定时更新中需要插件测试环境隔离 -- 在 registry 定时更新的同时提供统计数据 - -**技术要求** - -- 掌握 GitHub APP 开发 - - 熟悉 GitHub REST API、GraphQL 等 - - 熟悉 GitHub APP 权限限制 -- 熟悉 NoneBot 框架与 Python 相关技术 -- 熟悉 Git、GitHub Action、GitHub 工作流 - -**成果仓库** - -- - -## NoneBlockly 低代码框架开发 - -经过深入分析社区反馈,我们发现部分新手因不熟悉编程概念或框架本身而遇到问题。为了解决初学者在使用面向开发者的聊天机器人框架 NoneBot 时遇到的挑战,我们计划引入 Blockly 提供低代码编程支持。通过减少常见的编码错误和降低入门门槛,使框架对初学者更加友好,从而提升用户体验并有助于 NoneBot 生态的成长。本项目将基于 Blockly 实现 NoneBot 插件的低代码编写,使得用户能够快速搭建聊天机器人。 - -**难度**:进阶 - -**导师**:[@mnixry](https://github.com/mnixry) - -**产出要求** - -- 实现 NoneBlockly 低代码开发框架 - - 能够基于 Alconna 编写跨平台插件 - - 确保插件对 Python 和 NoneBot 版本的兼容性 - - 支持对多种类型 NoneBot 事件的响应 - - 支持对 NoneBot 消息对象的便捷操作 - - 集成 localstore 文件存储、apscheduler 定时任务、网络请求等常用功能 -- 对接 NB-CLI 脚手架,通过脚手架扩展使用低代码框架 - -**技术要求** - -- 掌握 Python 与 NoneBot 框架的使用 - - 熟悉 NoneBot 插件的开发,包括事件响应与消息处理等 - - 熟悉 NoneBot 生态组件(Alconna、localstore、apscheduler等)的使用 - - 了解 NB-CLI 脚手架的扩展开发 -- 熟悉 Blockly 低代码框架的使用和开发 - -**成果仓库** - -- diff --git a/website/versioned_docs/version-2.3.1/quick-start.mdx b/website/versioned_docs/version-2.3.1/quick-start.mdx deleted file mode 100644 index 95dfcfebe8c3..000000000000 --- a/website/versioned_docs/version-2.3.1/quick-start.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -sidebar_position: 1 -description: 尝试使用 NoneBot - -options: - menu: - - category: tutorial - weight: 10 ---- - -import Asciinema from "@site/src/components/Asciinema"; -import Messenger from "@site/src/components/Messenger"; - -# 快速上手 - -:::caution 前提条件 - -- 请确保你的 Python 版本 >= 3.9 -- **我们强烈建议使用虚拟环境进行开发**,如果没有使用虚拟环境,请确保已经卸载可能存在的 NoneBot v1!!! - ```bash - pip uninstall nonebot - ``` - -::: - -在本章节中,我们将介绍如何使用脚手架来创建一个 NoneBot 简易项目。项目将基于 nb-cli 脚手架运行,并允许我们从商店安装插件。 - - - -## 安装脚手架 - -确保你已经安装了 Python 3.9 及以上版本,然后在命令行中执行以下命令: - -1. 安装 [pipx](https://pypa.github.io/pipx/) - - ```bash - python -m pip install --user pipx - python -m pipx ensurepath - ``` - - 如果在此步骤的输出中出现了“open a new terminal”或者“re-login”字样,那么请关闭当前终端并重新打开一个新的终端。 - -2. 安装脚手架 - - ```bash - pipx install nb-cli - ``` - -安装完成后,你可以在命令行使用 `nb` 命令来使用脚手架。如果出现无法找到命令的情况(例如出现“Command not found”字样),请参考 [pipx 文档](https://pypa.github.io/pipx/) 检查你的环境变量。 - -## 创建项目 - -使用脚手架来创建一个项目: - -```bash -nb create -``` - -这一指令将会执行创建项目的流程,你将会看到一些询问: - -1. 项目模板 - - ```bash - [?] 选择一个要使用的模板: bootstrap (初学者或用户) - ``` - - 这里我们选择 `bootstrap` 模板,它是一个简单的项目模板,能够安装商店插件。如果你需要**自行编写插件**,这里请选择 `simple` 模板。 - -2. 项目名称 - - ```bash - [?] 项目名称: awesome-bot - ``` - - 这里我们以 `awesome-bot` 为例,作为项目名称。你可以根据自己的需要来命名。 - -3. 其他选项 - 请注意,多选项使用**空格**选中或取消,**回车**确认。 - - ```bash - [?] 要使用哪些驱动器? FastAPI (FastAPI 驱动器) - [?] 要使用哪些适配器? Console (基于终端的交互式适配器) - [?] 立即安装依赖? (Y/n) Yes - [?] 创建虚拟环境? (Y/n) Yes - ``` - - 这里我们选择了创建虚拟环境,nb-cli 在之后的操作中将会自动使用这个虚拟环境。如果你不需要自动创建虚拟环境或者已经创建了其他虚拟环境,nb-cli 将会安装依赖至当前激活的 Python 虚拟环境。 - -4. 选择内置插件 - - ```bash - [?] 要使用哪些内置插件? echo - ``` - - 这里我们选择 `echo` 插件作为示例。这是一个简单的复读回显插件,可以用于测试你的机器人是否正常运行。 - -## 运行项目 - -在项目创建完成后,你可以在**项目目录**中使用以下命令来运行项目: - -```bash -nb run -``` - -你现在应该已经运行起来了你的第一个 NoneBot 项目了!请注意,生成的项目中使用了 `FastAPI` 驱动器和 `Console` 适配器,你之后可以自行修改配置或安装其他适配器。 - -## 尝试使用 - -在项目运行起来后,`Console` 适配器会在你的终端启动交互模式,你可以直接在输入框中输入 `/echo hello world` 来测试你的机器人是否正常运行。 - - diff --git a/website/versioned_docs/version-2.3.1/tutorial/application.md b/website/versioned_docs/version-2.3.1/tutorial/application.md deleted file mode 100644 index 2faa8b1a356c..000000000000 --- a/website/versioned_docs/version-2.3.1/tutorial/application.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -sidebar_position: 0 -description: 创建一个 NoneBot 项目 - -options: - menu: - - category: tutorial - weight: 20 ---- - -# 手动创建项目 - -在[快速上手](../quick-start.mdx)中,我们已经介绍了如何安装和使用 `nb-cli` 创建一个项目。在本章节中,我们将简要介绍如何在不使用 `nb-cli` 的方式创建一个机器人项目的**最小实例**并启动。如果你想要了解 NoneBot 的启动流程,也可以阅读本章节。 - -:::caution 警告 -我们十分不推荐直接创建机器人项目,请优先考虑使用 nb-cli 进行项目创建。 -::: - -一个机器人项目的**最小实例**中**至少**需要包含以下内容: - -- 入口文件:初始化并运行机器人的 Python 文件 -- 配置文件:存储机器人启动所需的配置 -- 插件:为机器人提供具体的功能 - -下面我们创建一个项目文件夹,来存放项目所需文件,以下步骤均在该文件夹中进行。 - -## 安装依赖 - -在创建项目前,我们首先需要将项目所需依赖安装至环境中。 - -1. (可选)创建虚拟环境,以 venv 为例 - - ```bash - python -m venv .venv --prompt nonebot2 - # windows - .venv\Scripts\activate - # linux/macOS - source .venv/bin/activate - ``` - -2. 安装 nonebot2 以及驱动器 - - ```bash - pip install 'nonebot2[fastapi]' - ``` - - 驱动器包名可以在 [驱动器商店](/store/drivers) 中找到。 - -3. 安装适配器 - - ```bash - pip install nonebot-adapter-console - ``` - - 适配器包名可以在 [适配器商店](/store/adapters) 中找到。 - -## 创建配置文件 - -配置文件用于存放 NoneBot 运行所需要的配置项,使用 [`pydantic`](https://docs.pydantic.dev/) 以及 [`python-dotenv`](https://saurabh-kumar.com/python-dotenv/) 来读取配置。配置项需符合 dotenv 格式,复杂类型数据需使用 JSON 格式填写。具体可选配置方式以及配置项详情参考[配置](../appendices/config.mdx)。 - -在**项目文件夹**中创建一个 `.env` 文本文件,并写入以下内容: - -```bash title=.env -HOST=0.0.0.0 # 配置 NoneBot 监听的 IP / 主机名 -PORT=8080 # 配置 NoneBot 监听的端口 -COMMAND_START=["/"] # 配置命令起始字符 -COMMAND_SEP=["."] # 配置命令分割字符 -``` - -## 创建入口文件 - -入口文件( Entrypoint )顾名思义,是用来初始化并运行机器人的 Python 文件。入口文件需要完成框架的初始化、注册适配器、加载插件等工作。 - -:::tip 提示 -如果你使用 `nb-cli` 创建项目,入口文件不会被创建,该文件功能会被 `nb run` 命令代替。 -::: - -在**项目文件夹**中创建一个 `bot.py` 文件,并写入以下内容: - -```python title=bot.py -import nonebot -from nonebot.adapters.console import Adapter as ConsoleAdapter # 避免重复命名 - -# 初始化 NoneBot -nonebot.init() - -# 注册适配器 -driver = nonebot.get_driver() -driver.register_adapter(ConsoleAdapter) - -# 在这里加载插件 -nonebot.load_builtin_plugins("echo") # 内置插件 -# nonebot.load_plugin("thirdparty_plugin") # 第三方插件 -# nonebot.load_plugins("awesome_bot/plugins") # 本地插件 - -if __name__ == "__main__": - nonebot.run() -``` - -我们暂时不需要了解其中内容的含义,这些将会在稍后的章节中逐一介绍。在创建完成以上文件并确认已安装所需适配器和插件后,即可运行机器人。 - -## 运行机器人 - -在**项目文件夹**中,使用配置好环境的 Python 解释器运行入口文件(如果使用虚拟环境,请先激活虚拟环境): - -```bash -python bot.py -``` - -如果你后续使用了 `nb-cli` ,你仍可以使用 `nb run` 命令来运行机器人,`nb-cli` 会自动检测入口文件 `bot.py` 是否存在并运行。 diff --git a/website/versioned_docs/version-2.3.1/tutorial/create-plugin.md b/website/versioned_docs/version-2.3.1/tutorial/create-plugin.md deleted file mode 100644 index 9ce4ed4dd797..000000000000 --- a/website/versioned_docs/version-2.3.1/tutorial/create-plugin.md +++ /dev/null @@ -1,226 +0,0 @@ ---- -sidebar_position: 3 -description: 创建并加载自定义插件 - -options: - menu: - - category: tutorial - weight: 50 ---- - -# 插件编写准备 - -在正式编写插件之前,我们需要先了解一下插件的概念。 - -## 插件结构 - -在 NoneBot 中,插件即是 Python 的一个[模块(module)](https://docs.python.org/zh-cn/3/glossary.html#term-module)。NoneBot 会在导入时对这些模块做一些特殊的处理使得他们成为一个插件。插件间应尽量减少耦合,可以进行有限制的相互调用,NoneBot 能够正确解析插件间的依赖关系。 - -### 单文件插件 - -一个普通的 `.py` 文件即可以作为一个插件,例如创建一个 `foo.py` 文件: - -```tree title=Project -📂 plugins -└── 📜 foo.py -``` - -这个时候模块 `foo` 已经可以被称为一个插件了,尽管它还什么都没做。 - -### 包插件 - -一个包含 `__init__.py` 的文件夹即是一个常规 Python [包 `package`](https://docs.python.org/zh-cn/3/glossary.html#term-regular-package),例如创建一个 `foo` 文件夹: - -```tree title=Project -📂 plugins -└── 📂 foo - └── 📜 __init__.py -``` - -这个时候包 `foo` 同样是一个合法的插件,插件内容可以在 `__init__.py` 文件中编写。 - -## 创建插件 - -:::caution 注意 -如果在之前的[快速上手](../quick-start.mdx)章节中已经使用 `bootstrap` 模板创建了项目,那么你需要做出如下修改: - -1. 在项目目录中创建一个两层文件夹 `awesome_bot/plugins` - - ```tree title=Project - 📦 awesome-bot - ├── 📂 awesome_bot - │ └── 📂 plugins - ├── 📜 pyproject.toml - └── 📜 README.md - ``` - -2. 修改 `pyproject.toml` 文件中的 `nonebot` 配置项,在 `plugin_dirs` 中添加 `awesome_bot/plugins` - - ```toml title=pyproject.toml - [tool.nonebot] - plugin_dirs = ["awesome_bot/plugins"] - ``` - -::: - -:::caution 注意 -如果在之前的[创建项目](./application.md)章节中手动创建了相关文件,那么你需要做出如下修改: - -1. 在项目目录中创建一个两层文件夹 `awesome_bot/plugins` - - ```tree title=Project - 📦 awesome-bot - ├── 📂 awesome_bot - │ └── 📂 plugins - └── 📜 bot.py - ``` - -2. 修改 `bot.py` 文件中的加载插件部分,取消注释或者添加如下代码 - - ```python title=bot.py - # 在这里加载插件 - nonebot.load_builtin_plugins("echo") # 内置插件 - nonebot.load_plugins("awesome_bot/plugins") # 本地插件 - ``` - -::: - -创建插件可以通过 `nb-cli` 命令从完整模板创建,也可以手动新建空白文件。通过以下命令创建一个名为 `weather` 的插件: - -```bash -$ nb plugin create -[?] 插件名称: weather -[?] 使用嵌套插件? (y/N) N -[?] 输出目录: awesome_bot/plugins -``` - -`nb-cli` 会在 `awesome_bot/plugins` 目录下创建一个名为 `weather` 的文件夹,其中包含的文件将在稍后章节中用到。 - -```tree title=Project -📦 awesome-bot -├── 📂 awesome_bot -│ └── 📂 plugins -| └── 📂 foo -| ├── 📜 __init__.py -| └── 📜 config.py -├── 📜 pyproject.toml -└── 📜 README.md -``` - -## 加载插件 - -:::danger 警告 -请勿在插件被加载前 `import` 插件模块,这会导致 NoneBot 无法将其转换为插件而出现意料之外的情况。 -::: - -加载插件是在机器人入口文件中完成的,需要在框架初始化之后,运行之前进行。 - -请注意,加载的插件模块名称(插件文件名或文件夹名)**不能相同**,且每一个插件**只能被加载一次**,重复加载将会导致异常。 - -如果你使用 `nb-cli` 管理插件,那么你可以跳过这一节,`nb-cli` 将会自动处理加载。 - -如果你**使用自定义的入口文件** `bot.py`,那么你需要在 `bot.py` 中加载插件。 - -```python {5} title=bot.py -import nonebot - -nonebot.init() - -# 加载插件 - -nonebot.run() -``` - -加载插件的方式有多种,但在底层的加载逻辑是一致的。以下是为加载插件提供的几种方式: - -### `load_plugin` - -通过点分割模块名称或使用 [`pathlib`](https://docs.python.org/zh-cn/3/library/pathlib.html) 的 `Path` 对象来加载插件。通常用于加载第三方插件或者项目插件。例如: - -```python -from pathlib import Path - -nonebot.load_plugin("path.to.your.plugin") # 加载第三方插件 -nonebot.load_plugin(Path("./path/to/your/plugin.py")) # 加载项目插件 -``` - -:::caution 注意 -请注意,本地插件的路径应该为相对机器人 **入口文件(通常为 bot.py)** 可导入的,例如在项目 `plugins` 目录下。 -::: - -### `load_plugins` - -加载传入插件目录中的所有插件,通常用于加载一系列本地编写的项目插件。例如: - -```python -nonebot.load_plugins("src/plugins", "path/to/your/plugins") -``` - -:::caution 注意 -请注意,插件目录应该为相对机器人 **入口文件(通常为 bot.py)** 可导入的,例如在项目 `plugins` 目录下。 -::: - -### `load_all_plugins` - -这种加载方式是以上两种方式的混合,加载所有传入的插件模块名称,以及所有给定目录下的插件。例如: - -```python -nonebot.load_all_plugins(["path.to.your.plugin"], ["path/to/your/plugins"]) -``` - -### `load_from_json` - -通过 JSON 文件加载插件,是 [`load_all_plugins`](#load_all_plugins) 的 JSON 变种。通过读取 JSON 文件中的 `plugins` 字段和 `plugin_dirs` 字段进行加载。例如: - -```json title=plugin_config.json -{ - "plugins": ["path.to.your.plugin"], - "plugin_dirs": ["path/to/your/plugins"] -} -``` - -```python -nonebot.load_from_json("plugin_config.json", encoding="utf-8") -``` - -:::tip 提示 -如果 JSON 配置文件中的字段无法满足你的需求,可以使用 [`load_all_plugins`](#load_all_plugins) 方法自行读取配置来加载插件。 -::: - -### `load_from_toml` - -通过 TOML 文件加载插件,是 [`load_all_plugins`](#load_all_plugins) 的 TOML 变种。通过读取 TOML 文件中的 `[tool.nonebot]` Table 中的 `plugins` 和 `plugin_dirs` Array 进行加载。例如: - -```toml title=plugin_config.toml -[tool.nonebot] -plugins = ["path.to.your.plugin"] -plugin_dirs = ["path/to/your/plugins"] -``` - -```python -nonebot.load_from_toml("plugin_config.toml", encoding="utf-8") -``` - -:::tip 提示 -如果 TOML 配置文件中的字段无法满足你的需求,可以使用 [`load_all_plugins`](#load_all_plugins) 方法自行读取配置来加载插件。 -::: - -### `load_builtin_plugin` - -加载一个内置插件,传入的插件名必须为 NoneBot 内置插件。该方法是 [`load_plugin`](#load_plugin) 的封装。例如: - -```python -nonebot.load_builtin_plugin("echo") -``` - -### `load_builtin_plugins` - -加载传入插件列表中的所有内置插件。例如: - -```python -nonebot.load_builtin_plugins("echo", "single_session") -``` - -### 其他加载方式 - -有关其他插件加载的方式,可参考[跨插件访问](../advanced/requiring.md)和[嵌套插件](../advanced/plugin-nesting.md)。 diff --git a/website/versioned_docs/version-2.3.1/tutorial/event-data.mdx b/website/versioned_docs/version-2.3.1/tutorial/event-data.mdx deleted file mode 100644 index 5f8ccb543bdc..000000000000 --- a/website/versioned_docs/version-2.3.1/tutorial/event-data.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -sidebar_position: 6 -description: 通过依赖注入获取所需事件信息 - -options: - menu: - - category: tutorial - weight: 80 ---- - -# 获取事件信息 - -import Messenger from "@site/src/components/Messenger"; - -在 NoneBot 事件处理流程中,获取事件信息并做出对应的操作是非常常见的场景。本章节中我们将介绍如何通过**依赖注入**获取事件信息。 - -## 认识依赖注入 - -在事件处理流程中,事件响应器具有自己独立的上下文,例如:当前响应的事件、收到事件的机器人或者其他处理流程中新增的信息等。这些数据可以根据我们的需求,通过依赖注入的方式,在执行事件处理流程中注入到事件处理函数中。 - -相对于传统的信息获取方法,通过依赖注入获取信息的最大特色在于**按需获取**。如果该事件处理函数不需要任何额外信息即可运行,那么可以不进行依赖注入。如果事件处理函数需要额外的数据,可以通过依赖注入的方式灵活的标注出需要的依赖,在函数运行时便会被按需注入。 - -## 使用依赖注入 - -使用依赖注入获取上下文信息的方法十分简单,我们仅需要在函数的参数中声明所需的依赖,并正确的将函数添加为事件处理依赖即可。在 NoneBot 中,我们可以直接使用 `nonebot.params` 模块中定义的参数类型来声明依赖。 - -例如,我们可以继续改进上一章节中的 `weather` 插件,使其可以获取到 `天气` 命令的地名参数,并根据地名返回天气信息。 - -```python {9,11} title=weather/__init__.py -from nonebot import on_command -from nonebot.rule import to_me -from nonebot.adapters import Message -from nonebot.params import CommandArg - -weather = on_command("天气", rule=to_me(), aliases={"weather", "查天气"}, priority=10, block=True) - -@weather.handle() -async def handle_function(args: Message = CommandArg()): - # 提取参数纯文本作为地名,并判断是否有效 - if location := args.extract_plain_text(): - await weather.finish(f"今天{location}的天气是...") - else: - await weather.finish("请输入地名") -``` - -如上方示例所示,我们使用了 `args` 作为注入参数名,注入的内容为 `CommandArg()`,也就是**消息命令后跟随的内容**。在这个示例中,我们获得的参数会被检查是否有效,对无效参数则会结束事件。 - -:::tip 提示 -命令与参数之间可以不需要空格,`CommandArg()` 获取的信息为命令后跟随的内容并去除了头部空白符。例如:`/天气 上海` 消息的参数为 `上海`。 -::: - -:::tip 提示 -`:=` 是 Python 3.8 引入的新语法 [Assignment Expressions](https://docs.python.org/zh-cn/3/reference/expressions.html#assignment-expressions),也称为海象表达式,可以在表达式中直接赋值。 -::: - - - -NoneBot 提供了多种依赖注入类型,可以获取不同的信息,具体内容可参考[依赖注入](../advanced/dependency.mdx)。 diff --git a/website/versioned_docs/version-2.3.1/tutorial/fundamentals.md b/website/versioned_docs/version-2.3.1/tutorial/fundamentals.md deleted file mode 100644 index bb5eea0b656e..000000000000 --- a/website/versioned_docs/version-2.3.1/tutorial/fundamentals.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -sidebar_position: 1 -description: NoneBot 机器人构成及基本使用 - -options: - menu: - - category: tutorial - weight: 30 ---- - -# 机器人的构成 - -了解机器人的基本构成有助于你更好地使用 NoneBot,本章节将介绍 NoneBot 中的基本组成部分,稍后的文档中将会使用到这些概念。 - -使用 NoneBot 框架搭建的机器人具有以下几个基本组成部分: - -1. NoneBot 机器人框架主体:负责连接各个组成部分,提供基本的机器人功能 -2. 驱动器 `Driver`:客户端/服务端的功能实现,负责接收和发送消息(通常为 HTTP 通信) -3. 适配器 `Adapter`:驱动器的上层,负责将**平台消息**与 NoneBot 事件/操作系统的消息格式相互转换 -4. 插件 `Plugin`:机器人的功能实现,通常为负责处理事件并进行一系列的操作 - -除 NoneBot 机器人框架主体外,其他部分均可按需选择、互相搭配,但由于平台的兼容性问题,部分插件可能仅在某些特定平台上可用(这由插件编写者决定)。 - -在接下来的章节中,我们将重点介绍机器人功能实现,即插件 `Plugin` 部分。 diff --git a/website/versioned_docs/version-2.3.1/tutorial/handler.mdx b/website/versioned_docs/version-2.3.1/tutorial/handler.mdx deleted file mode 100644 index 466b15b380e2..000000000000 --- a/website/versioned_docs/version-2.3.1/tutorial/handler.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -sidebar_position: 5 -description: 处理接收到的特定事件 - -options: - menu: - - category: tutorial - weight: 70 ---- - -# 事件处理 - -import Messenger from "@site/src/components/Messenger"; - -在我们收到事件,并被某个事件响应器正确响应后,便正式开启了对于这个事件的**处理流程**。 - -## 认识事件处理流程 - -就像我们在解决问题时需要遵循流程一样,处理一个事件也需要一套流程。在事件响应器对一个事件进行响应之后,会依次执行一系列的**事件处理依赖**(通常是函数)。简单来说,事件处理流程并不是一个函数、一个对象或一个方法,而是一整套由开发者设计的流程。 - -在这个流程中,我们**目前**只需要了解两个概念:函数形式的“事件处理依赖”(下称“事件处理函数”)和“事件响应器操作”。 - -## 事件处理函数 - -在事件响应器中,事件处理流程可以由一个或多个“事件处理函数”组成,这些事件处理函数将会按照顺序依次对事件进行处理,直到全部执行完成或被中断。我们可以采用事件响应器的“事件处理函数装饰器”来添加这些“事件处理函数”。 - -顾名思义,“事件处理函数装饰器”是一个[装饰器(decorator)](https://docs.python.org/zh-cn/3/glossary.html#term-decorator),那么它的使用方法也同[函数定义](https://docs.python.org/zh-cn/3/reference/compound_stmts.html#function-definitions)中所展示的包装用法相同。例如: - -```python {6-8} title=weather/__init__.py -from nonebot.rule import to_me -from nonebot.plugin import on_command - -weather = on_command("天气", rule=to_me(), aliases={"weather", "查天气"}, priority=10, block=True) - -@weather.handle() -async def handle_function(): - pass # do something here -``` - -如上方示例所示,我们使用 `weather` 响应器的 `handle` 装饰器装饰了一个函数 `handle_function`。`handle_function` 函数会被添加到 `weather` 的事件处理流程中。在 `weather` 响应器被触发之后,将会依次调用 `weather` 响应器的事件处理函数,即 `handle_function` 来对事件进行处理。 - -## 事件响应器操作 - -在事件处理流程中,我们可以使用事件响应器操作来进行一些交互或改变事件处理流程,例如向机器人用户发送消息或提前结束事件处理流程等。 - -事件响应器操作与事件处理函数装饰器类似,通常作为事件响应器 `Matcher` 的[类方法](https://docs.python.org/zh-cn/3/library/functions.html#classmethod)存在,因此事件响应器操作的调用方法也是 `Matcher.func()` 的形式。不过不同的是,事件响应器操作并不是装饰器,因此并不需要@进行标注。 - -```python {8,9} title=weather/__init__.py -from nonebot.rule import to_me -from nonebot.plugin import on_command - -weather = on_command("天气", rule=to_me(), aliases={"weather", "查天气"}, priority=10, block=True) - -@weather.handle() -async def handle_function(): - # await weather.send("天气是...") - await weather.finish("天气是...") -``` - -如上方示例所示,我们使用 `weather` 响应器的 `finish` 操作方法向机器人用户回复了 `天气是...` 并结束了事件处理流程。效果如下: - - - -值得注意的是,在执行 `finish` 方法时,NoneBot 会在向机器人用户发送消息内容后抛出 `FinishedException` 异常来结束事件响应流程。也就是说,在 `finish` 被执行后,后续的程序是不会被执行的。如果你需要回复机器人用户消息但不想事件处理流程结束,可以使用注释的部分中展示的 `send` 方法。 - -:::danger 警告 -由于 `finish` 是通过抛出 `FinishedException` 异常来结束事件的,因此异常可能会被未加限制的 `try-except` 捕获,影响事件处理流程正确处理,导致无法正常结束此事件。请务必在异常捕获中指定错误类型或排除所有 [MatcherException](../api/exception.md#MatcherException) 类型的异常(如下所示),或将 `finish` 移出捕获范围进行使用。 - -```python -from nonebot.exception import MatcherException - -try: - await weather.finish("天气是...") -except MatcherException: - raise -except Exception as e: - pass # do something here -``` - -::: - -目前 NoneBot 提供了多种事件响应器操作,其中包括用于机器人用户交互与流程控制两大类,进阶使用方法可以查看[会话控制](../appendices/session-control.mdx)。 diff --git a/website/versioned_docs/version-2.3.1/tutorial/matcher.md b/website/versioned_docs/version-2.3.1/tutorial/matcher.md deleted file mode 100644 index 72ca52b8faf5..000000000000 --- a/website/versioned_docs/version-2.3.1/tutorial/matcher.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -sidebar_position: 4 -description: 响应接收到的特定事件 - -options: - menu: - - category: tutorial - weight: 60 ---- - -# 事件响应器 - -事件响应器(Matcher)是对接收到的事件进行响应的基本单元,所有的事件响应器都继承自 `Matcher` 基类。 - -在 NoneBot 中,事件响应器可以通过一系列特定的规则**筛选**出**具有某种特征的事件**,并按照**特定的流程**交由**预定义的事件处理依赖**进行处理。例如,在[快速上手](../quick-start.mdx)中,我们使用了内置插件 `echo` ,它定义的事件响应器能响应机器人用户发送的“/echo hello world”消息,提取“hello world”信息并作为回复消息发送。 - -## 事件响应器辅助函数 - -NoneBot 中所有事件响应器均继承自 `Matcher` 基类,但直接使用 `Matcher.new()` 方法创建事件响应器过于繁琐且不能记录插件信息。因此,NoneBot 中提供了一系列“事件响应器辅助函数”(下称“辅助函数”)来辅助我们用**最简的方式**创建**带有不同规则预设**的事件响应器,提高代码可读性和书写效率。通常情况下,我们只需要使用辅助函数即可完成事件响应器的创建。 - -在 NoneBot 中,辅助函数以 `on()` 或 `on_()` 形式出现(例如 `on_command()`),调用后根据不同的参数返回一个 `Type[Matcher]` 类型的新事件响应器。 - -目前 NoneBot 提供了多种功能各异的辅助函数、具有共同命令名称前缀的命令组以及具有共同参数的响应器组,均可以从 `nonebot` 模块直接导入使用,具体内容参考[事件响应器进阶](../advanced/matcher.md)。 - -## 创建事件响应器 - -在上一节[创建插件](./create-plugin.md#创建插件)中,我们创建了一个 `weather` 插件,现在我们来实现他的功能。 - -我们直接使用 `on_command()` 辅助函数来创建一个事件响应器: - -```python {3} title=weather/__init__.py -from nonebot import on_command - -weather = on_command("天气") -``` - -这样,我们就获得一个名为 `weather` 的事件响应器了,这个事件响应器会对 `/天气` 开头的消息进行响应。 - -:::tip 提示 -如果一条消息中包含“@机器人”或以“机器人的昵称”开始,例如 `@bot /天气` 时,协议适配器会将 `event.is_tome()` 判断为 `True` ,同时也会自动去除 `@bot`,即事件响应器收到的信息内容为 `/天气`,方便进行命令匹配。 -::: - -### 为事件响应器添加参数 - -在辅助函数中,我们可以添加一些参数来对事件响应器进行更加精细的调整,例如事件响应器的优先级、匹配规则等。例如: - -```python {4} title=weather/__init__.py -from nonebot import on_command -from nonebot.rule import to_me - -weather = on_command("天气", rule=to_me(), aliases={"weather", "查天气"}, priority=10, block=True) -``` - -这样,我们就获得了一个可以响应 `天气`、`weather`、`查天气` 三个命令,需要私聊或 `@bot` 时才会响应,优先级为 10 ,阻断事件传播的事件响应器了。这些内容的意义和使用方法将会在后续的章节中一一介绍。 - -:::tip 提示 -需要注意的是,不同的辅助函数有不同的可选参数,在使用之前可以参考[事件响应器进阶](../advanced/matcher.md)或编辑器的提示。 -::: diff --git a/website/versioned_docs/version-2.3.1/tutorial/message.md b/website/versioned_docs/version-2.3.1/tutorial/message.md deleted file mode 100644 index 86989c493ff7..000000000000 --- a/website/versioned_docs/version-2.3.1/tutorial/message.md +++ /dev/null @@ -1,349 +0,0 @@ ---- -sidebar_position: 7 -description: 处理消息序列与消息段 - -options: - menu: - - category: tutorial - weight: 90 ---- - -# 处理消息 - -在不同平台中,一条消息可能会有承载有各种不同的表现形式,它可能是一段纯文本、一张图片、一段语音、一篇富文本文章,也有可能是多种类型的组合等等。 - -在 NoneBot 中,为确保消息的正常处理与跨平台兼容性,采用了扁平化的消息序列形式,即 `Message` 对象。消息序列是 NoneBot 中的消息载体,无论是接收还是发送的消息,都采用消息序列的形式进行处理。 - -## 认识消息类型 - -### 消息序列 `Message` - -在 NoneBot 中,消息序列 `Message` 的主要作用是用于表达“一串消息”。由于消息序列继承自 `List[MessageSegment]`,所以 `Message` 的本质是由若干消息段所组成的序列。因此,消息序列的使用方法与 `List` 有很多相似之处,例如切片、索引、拼接等。 - -在上一节的[使用依赖注入](./event-data.mdx#使用依赖注入)中,我们已经通过依赖注入 `CommandArg()` 获取了命令的参数,它的类型即是消息序列。我们使用了消息序列的 `extract_plain_text()` 方法来获取消息序列中的纯文本内容。 - -### 消息段 `MessageSegment` - -顾名思义,消息段 `MessageSegment` 是一段消息。由于消息序列的本质是由若干消息段所组成的序列,消息段可以被认为是构成消息序列的最小单位。简单来说,消息序列类似于一个自然段,而消息段则是组成自然段的一句话。同时,作为特殊消息载体的存在,绝大多数的平台都有着**独特的消息类型**,这些独特的内容均需要由对应的**协议适配器**所提供,以适应不同平台中的消息模式。**这也意味着,你需要导入对应的协议适配器中的消息序列和消息段后才能使用其特殊的工厂方法。** - -:::caution 注意 -消息段的类型是由协议适配器提供的,因此你需要参考协议适配器的文档并导入对应的消息段后才能使用其特殊的消息类型。 - -在上一节的[使用依赖注入](./event-data.mdx#使用依赖注入)中,我们导入的为 `nonebot.adapters.Message` 抽象基类,因此我们无法使用平台特有的消息类型。仅能使用 `str` 作为纯文本消息回复。 -::: - -## 使用消息序列 - -:::caution 注意 -在以下的示例中,为了更好的理解多种类型的消息组成方式,我们将使用 `Console` 协议适配器来演示消息序列的使用方法。在实际使用中,你需要确保你使用的**消息序列类型**与你所要发送的**平台类型**一致。 -::: - -通常情况下,适配器在接收到消息时,会将消息转换为消息序列,可以通过依赖注入 [`EventMessage`](../advanced/dependency.mdx#eventmessage),或者使用 `event.get_message()` 获取。 - -由于消息序列是 `List[MessageSegment]` 的子类,所以你总是可以用和操作 `List` 类似的方式来处理消息序列。例如: - -```python ->>> from nonebot.adapters.console import Message, MessageSegment ->>> message = Message([ - MessageSegment(type="text", data={"text":"hello"}), - MessageSegment(type="markdown", data={"markup":"**world**"}), -]) ->>> for segment in message: -... print(segment.type, segment.data) -... -text {'text': 'hello'} -markdown {'markup': '**world**'} ->>> len(message) -2 -``` - -### 构造消息序列 - -在使用事件响应器操作发送消息时,既可以使用 `str` 作为消息,也可以使用 `Message`、`MessageSegment` 或者 `MessageTemplate`。那么,我们就需要先构造一个消息序列。消息序列可以通过多种方式构造: - -#### 直接构造 - -`Message` 类可以直接实例化,支持 `str`、`MessageSegment`、`Iterable[MessageSegment]` 或适配器自定义类型的参数。 - -```python -from nonebot.adapters.console import Message, MessageSegment - -# str -Message("Hello, world!") -# MessageSegment -Message(MessageSegment.text("Hello, world!")) -# List[MessageSegment] -Message([MessageSegment.text("Hello, world!")]) -``` - -#### 运算构造 - -`Message` 对象可以通过 `str`、`MessageSegment` 相加构造,详情请参考[拼接消息](#拼接消息)。 - -#### 从字典数组构造 - -`Message` 对象支持 Pydantic 自定义类型构造,可以使用 Pydantic 的 `TypeAdapter` 方法进行构造。 - -```python -from pydantic import TypeAdapter -from nonebot.adapters.console import Message, MessageSegment - -# 由字典构造消息段 -TypeAdapter(MessageSegment).validate_python( - {"type": "text", "data": {"text": "text"}} -) == MessageSegment.text("text") - -# 由字典数组构造消息序列 -TypeAdapter(Message).validate_python( - [MessageSegment.text("text"), {"type": "text", "data": {"text": "text"}}], -) == Message([MessageSegment.text("text"), MessageSegment.text("text")]) -``` - -### 获取消息纯文本 - -由于消息中存在各种类型的消息段,因此 `str(message)` 通常**不能得到消息的纯文本**,而是一个消息序列的字符串表示。 - -NoneBot 为消息段定义了一个方法 `is_text()` ,可以用于判断消息段是否为纯文本;也可以使用 `message.extract_plain_text()` 方法获取消息纯文本。 - -```python -from nonebot.adapters.console import Message, MessageSegment - -# 判断消息段是否为纯文本 -MessageSegment.text("text").is_text() == True - -# 提取消息纯文本字符串 -Message( - [MessageSegment.text("text"), MessageSegment.markdown("**markup**")] -).extract_plain_text() == "text" -``` - -### 遍历 - -消息序列继承自 `List[MessageSegment]` ,因此可以使用 `for` 循环遍历消息段。 - -```python -for segment in message: - ... -``` - -### 比较 - -消息和消息段都可以使用 `==` 或 `!=` 运算符比较是否相同。 - -```python -MessageSegment.text("text") != MessageSegment.text("foo") - -some_message == Message([MessageSegment.text("text")]) -``` - -### 检查消息段 - -我们可以通过 `in` 运算符或消息序列的 `has` 方法来: - -```python -# 是否存在消息段 -MessageSegment.text("text") in message -# 是否存在指定类型的消息段 -"text" in message -``` - -我们还可以使用消息序列的 `only` 方法来检查消息中是否仅包含指定的消息段。 - -```python -# 是否都为指定消息段 -message.only(MessageSegment.text("test")) -# 是否仅包含指定类型的消息段 -message.only("text") -``` - -### 过滤、索引与切片 - -消息序列对列表的索引与切片进行了增强,在原有列表 `int` 索引与 `slice` 切片的基础上,支持 `type` 过滤索引与切片。 - -```python -from nonebot.adapters.console import Message, MessageSegment - -message = Message( - [ - MessageSegment.text("test"), - MessageSegment.markdown("test2"), - MessageSegment.markdown("test3"), - MessageSegment.text("test4"), - ] -) -# 索引 -message[0] == MessageSegment.text("test") -# 切片 -message[0:2] == Message( - [MessageSegment.text("test"), MessageSegment.markdown("test2")] -) -# 类型过滤 -message["markdown"] == Message( - [MessageSegment.markdown("test2"), MessageSegment.markdown("test3")] -) -# 类型索引 -message["markdown", 0] == MessageSegment.markdown("test2") -# 类型切片 -message["markdown", 0:2] == Message( - [MessageSegment.markdown("test2"), MessageSegment.markdown("test3")] -) -``` - -我们也可以通过消息序列的 `include`、`exclude` 方法进行类型过滤。 - -```python -message.include("text", "markdown") -message.exclude("text") -``` - -同样的,消息序列对列表的 `index`、`count` 方法也进行了增强,可以用于索引指定类型的消息段。 - -```python -# 指定类型首个消息段索引 -message.index("markdown") == 1 -# 指定类型消息段数量 -message.count("markdown") == 2 -``` - -此外,消息序列添加了一个 `get` 方法,可以用于获取指定类型指定个数的消息段。 - -```python -# 获取指定类型指定个数的消息段 -message.get("markdown", 1) == Message([MessageSegment.markdown("test2")]) -``` - -### 拼接消息 - -`str`、`Message`、`MessageSegment` 对象之间可以直接相加,相加均会返回一个新的 `Message` 对象。 - -```python -# 消息序列与消息段相加 -Message([MessageSegment.text("text")]) + MessageSegment.text("text") -# 消息序列与字符串相加 -Message([MessageSegment.text("text")]) + "text" -# 消息序列与消息序列相加 -Message([MessageSegment.text("text")]) + Message([MessageSegment.text("text")]) -# 字符串与消息序列相加 -"text" + Message([MessageSegment.text("text")]) -# 消息段与消息段相加 -MessageSegment.text("text") + MessageSegment.text("text") -# 消息段与字符串相加 -MessageSegment.text("text") + "text" -# 消息段与消息序列相加 -MessageSegment.text("text") + Message([MessageSegment.text("text")]) -# 字符串与消息段相加 -"text" + MessageSegment.text("text") -``` - -如果需要在当前消息序列后直接拼接新的消息段,可以使用 `Message.append`、`Message.extend` 方法,或者使用自加。 - -```python -msg = Message([MessageSegment.text("text")]) -# 自加 -msg += "text" -msg += MessageSegment.text("text") -msg += Message([MessageSegment.text("text")]) -# 附加 -msg.append("text") -msg.append(MessageSegment.text("text")) -# 扩展 -msg.extend([MessageSegment.text("text")]) -``` - -我们也可以通过消息段或消息序列的 `join` 方法来拼接一串消息: - -```python -seg = MessageSegment.text("text") -msg = seg.join( - [ - MessageSegment.text("first"), - Message( - [ - MessageSegment.text("second"), - MessageSegment.text("third"), - ] - ) - ] -) -msg == Message( - [ - MessageSegment.text("first"), - MessageSegment.text("text"), - MessageSegment.text("second"), - MessageSegment.text("third"), - ] -) -``` - -### 使用消息模板 - -为了提供安全可靠的跨平台模板字符,我们提供了一个消息模板功能来构建消息序列 - -它在以下常见场景中尤其有用: - -- 多行富文本编排(包含图片,文字以及表情等) -- 客制化(由 Bot 最终用户提供消息模板时) - -在事实上,它的用法和 `str.format` 极为相近,所以你在使用的时候,总是可以参考[Python 文档](https://docs.python.org/zh-cn/3/library/stdtypes.html#str.format)来达到你想要的效果,这里给出几个简单的例子。 - -默认情况下,消息模板采用 `str` 纯文本形式的格式化: - -```python title=基础格式化用法 ->>> from nonebot.adapters import MessageTemplate ->>> MessageTemplate("{} {}").format("hello", "world") -'hello world' -``` - -如果 `Message.template` 构建消息模板,那么消息模板将采用消息序列形式的格式化,此时的消息将会是平台特定的: - -:::caution 注意 -使用 `Message.template` 构建消息模板时,应注意消息序列为平台适配器提供的类型,不能使用 `nonebot.adapters.Message` 基类作为模板构建。使用基类构建模板与使用 `str` 构建模板的效果是一样的,因此请使用上述的 `MessageTemplate` 类直接构建模板。: -::: - -```python title=平台格式化用法 ->>> from nonebot.adapters.console import Message, MessageSegment ->>> Message.template("{} {}").format("hello", "world") -Message( - MessageSegment.text("hello"), - MessageSegment.text(" "), - MessageSegment.text("world") -) -``` - -消息模板支持使用消息段进行格式化: - -```python title=对消息段进行安全的拼接 ->>> from nonebot.adapters.console import Message, MessageSegment ->>> Message.template("{}{}").format(MessageSegment.markdown("**markup**"), "world") -Message( - MessageSegment(type='markdown', data={'markup': '**markup**'}), - MessageSegment(type='text', data={'text': 'world'}) -) -``` - -消息模板同样支持使用消息序列作为模板: - -```python title=以消息对象作为模板 ->>> from nonebot.adapters.console import Message, MessageSegment ->>> Message.template( -... MessageSegment.text("{user_id}") + MessageSegment.emoji("tada") + -... MessageSegment.text("{message}") -... ).format_map({"user_id": 123456, "message": "hello world"}) -Message( - MessageSegment(type='text', data={'text': '123456'}), - MessageSegment(type='emoji', data={'emoji': 'tada'}), - MessageSegment(type='text', data={'text': 'hello world'}) -) -``` - -:::caution 注意 -只有消息序列中的文本类型消息段才能被格式化,其他类型的消息段将会原样添加。 -::: - -消息模板支持使用拓展控制符来控制消息段类型: - -```python title=使用消息段的拓展控制符 ->>> from nonebot.adapters.console import Message, MessageSegment ->>> Message.template("{name:emoji}").format(name='tada') -Message(MessageSegment(type='emoji', data={'name': 'tada'})) -``` diff --git a/website/versioned_docs/version-2.3.1/tutorial/store.mdx b/website/versioned_docs/version-2.3.1/tutorial/store.mdx deleted file mode 100644 index 9332ac8ea8b5..000000000000 --- a/website/versioned_docs/version-2.3.1/tutorial/store.mdx +++ /dev/null @@ -1,267 +0,0 @@ ---- -sidebar_position: 2 -description: 从商店安装适配器和插件 - -options: - menu: - - category: tutorial - weight: 40 ---- - -# 获取商店内容 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; -import Asciinema from "@site/src/components/Asciinema"; - -:::tip 提示 - -如果你暂时没有获取商店内容的需求,可以跳过本章节。 - -::: - -NoneBot 提供了一个[商店](/store/plugins),商店内容均由社区开发者贡献。你可以在商店中查找你需要的适配器和插件等,进行安装或者参考其文档等。 - -商店中每个内容的卡片都包含了其名称和简介等信息,点击**卡片右上角**链接图标即可跳转到其主页。 - -## 安装插件 - - - -在商店插件页面中,点击你需要安装的插件下方的 `点击复制安装命令` 按钮,即可复制 `nb-cli` 命令。 - -请在你的**项目目录**下执行该命令。`nb-cli` 会自动安装插件并将其添加到加载列表中。 - - - - -```bash -nb plugin install <插件名称> -``` - - - - -```bash -$ nb plugin install -[?] 想要安装的插件名称: <插件名称> -``` - - - - -```bash -pip install <插件包名> -``` - -插件包名可以在商店插件卡片中找到,或者使用 `nb-cli` 搜索插件显示的详情中找到。安装完成后,需要参考[加载插件章节](./create-plugin.md#加载插件)自行加载。 - - - - -如果想要查看插件列表,可以使用以下命令 - -```bash -# 列出商店所有插件 -nb plugin list -# 搜索商店插件 -nb plugin search [可选关键词] -``` - -升级和卸载插件可以使用以下命令 - - - - -```bash -nb plugin update <插件名称> -nb plugin uninstall <插件名称> -``` - - - - -```bash -$ nb plugin update -[?] 想要安装的插件名称: <插件名称> -$ nb plugin uninstall -[?] 想要卸载的插件名称: <插件名称> -``` - - - - -```bash -pip install --upgrade <插件包名> -pip uninstall <插件包名> -``` - -插件包名可以在商店插件卡片中找到,或者使用 `nb-cli` 搜索插件显示的详情中找到。卸载完成后,需要自行移除插件加载。 - - - - -## 安装适配器 - - - -安装适配器与安装插件类似,只是将命令换为 `nb adapter`,这里就不再赘述。 - -请在你的**项目目录**下执行该命令。`nb-cli` 会自动安装适配器并将其添加到注册列表中。 - - - - -```bash -nb adapter install <适配器名称> -``` - - - - -```bash -$ nb adapter install -[?] 想要安装的适配器名称: <适配器名称> -``` - - - - -```bash -pip install <适配器包名> -``` - -适配器包名可以在商店适配器卡片中找到,或者使用 `nb-cli` 搜索适配器显示的详情中找到。安装完成后,需要参考[注册适配器章节](../advanced/adapter.md#注册适配器)自行注册。 - - - - -如果想要查看适配器列表,可以使用以下命令 - -```bash -# 列出商店所有适配器 -nb adapter list -# 搜索商店适配器 -nb adapter search [可选关键词] -``` - -升级和卸载适配器可以使用以下命令 - - - - -```bash -nb adapter update <适配器名称> -nb adapter uninstall <适配器名称> -``` - - - - -```bash -$ nb adapter update -[?] 想要安装的适配器名称: <适配器名称> -$ nb adapter uninstall -[?] 想要卸载的适配器名称: <适配器名称> -``` - - - - -```bash -pip install --upgrade <适配器包名> -pip uninstall <适配器包名> -``` - -适配器包名可以在商店适配器卡片中找到,或者使用 `nb-cli` 搜索适配器显示的详情中找到。卸载完成后,需要自行移除适配器加载。 - - - - -## 安装驱动器 - - - -安装驱动器与安装插件同样类似,只是将命令换为 `nb driver`,这里就不再赘述。 - -如果你使用了虚拟环境,请在你的**项目目录**下执行该命令,`nb-cli` 会自动安装驱动器到虚拟环境中。 - -请注意 `nb-cli` 并不会在安装驱动器后修改项目所使用的驱动器,请自行参考[配置方法](../appendices/config.mdx)章节以及 [`DRIVER` 配置项](../appendices/config.mdx#driver)修改驱动器。 - - - - -```bash -nb driver install <驱动器名称> -``` - - - - -```bash -$ nb driver install -[?] 想要安装的驱动器名称: <驱动器名称> -``` - - - - -```bash -pip install <驱动器包名> -``` - -驱动器包名可以在商店驱动器卡片中找到,或者使用 `nb-cli` 搜索驱动器显示的详情中找到。 - - - - -如果想要查看驱动器列表,可以使用以下命令 - -```bash -# 列出商店所有驱动器 -nb driver list -# 搜索商店驱动器 -nb driver search [可选关键词] -``` - -升级和卸载驱动器可以使用以下命令 - - - - -```bash -nb driver update <驱动器名称> -nb driver uninstall <驱动器名称> -``` - - - - -```bash -$ nb driver update -[?] 想要安装的驱动器名称: <驱动器名称> -$ nb driver uninstall -[?] 想要卸载的驱动器名称: <驱动器名称> -``` - - - - -```bash -pip install --upgrade <驱动器包名> -pip uninstall <驱动器包名> -``` - -驱动器包名可以在商店驱动器卡片中找到,或者使用 `nb-cli` 搜索驱动器显示的详情中找到。卸载完成后,需要自行移除适配器加载。 - - - diff --git a/website/versioned_docs/version-2.3.2/README.md b/website/versioned_docs/version-2.3.2/README.md deleted file mode 100644 index 28d1d57a5a08..000000000000 --- a/website/versioned_docs/version-2.3.2/README.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 0 -id: index -slug: / ---- - -# 概览 - -NoneBot2 是一个现代、跨平台、可扩展的 Python 聊天机器人框架(下称 NoneBot),它基于 Python 的类型注解和异步优先特性(兼容同步),能够为你的需求实现提供便捷灵活的支持。同时,NoneBot 拥有大量的开发者为其开发插件,用户无需编写任何代码,仅需完成环境配置及插件安装,就可以正常使用 NoneBot。 - -需要注意的是,NoneBot 仅支持 **Python 3.9 以上版本** - -## 特色 - -### 异步优先 - -NoneBot 基于 Python [asyncio](https://docs.python.org/zh-cn/3/library/asyncio.html) 编写,并在异步机制的基础上进行了一定程度的同步函数兼容。 - -### 完整的类型注解 - -NoneBot 参考 [PEP 484](https://www.python.org/dev/peps/pep-0484/) 等 PEP 完整实现了类型注解,通过 Pyright(Pylance) 检查。配合编辑器的类型推导功能,能将绝大多数的 Bug 杜绝在编辑器中([编辑器支持](./editor-support))。 - -### 开箱即用 - -NoneBot 提供了使用便捷、具有交互式功能的命令行工具--`nb-cli`,使得用户初次接触 NoneBot 时更容易上手。使用方法请阅读本文档[指南](./quick-start.mdx)以及 [CLI 文档](https://cli.nonebot.dev/)。 - -### 插件系统 - -插件系统是 NoneBot 的核心,通过它可以实现机器人的模块化以及功能扩展,便于维护和管理。 - -### 依赖注入系统 - -NoneBot 采用了一套自行定义的依赖注入系统,可以让事件的处理过程更加的简洁、清晰,增加代码的可读性,减少代码冗余。 - -#### 什么是依赖注入 - -[**『依赖注入』**](https://zh.wikipedia.org/wiki/%E6%8E%A7%E5%88%B6%E5%8F%8D%E8%BD%AC)意思是,在编程中,有一种方法可以让你的代码声明它工作和使用所需要的东西,即**『依赖』**。 - -系统(在这里是指 NoneBot)将负责做任何需要的事情,为你的代码提供这些必要依赖(即**『注入』**依赖性) - -这在你有以下情形的需求时非常有用: - -- 这部分代码拥有共享的逻辑(同样的代码逻辑多次重复) -- 共享数据库以及网络请求连接会话 - - 比如 `httpx.AsyncClient`、`aiohttp.ClientSession` 和 `sqlalchemy.Session` -- 机器人用户权限检查以及认证 -- 还有更多... - -它在完成上述工作的同时,还能尽量减少代码的耦合和重复 diff --git a/website/versioned_docs/version-2.3.2/advanced/adapter.md b/website/versioned_docs/version-2.3.2/advanced/adapter.md deleted file mode 100644 index 61f52a69a354..000000000000 --- a/website/versioned_docs/version-2.3.2/advanced/adapter.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -sidebar_position: 1 -description: 注册适配器与指定平台交互 - -options: - menu: - - category: advanced - weight: 20 ---- - -# 使用适配器 - -适配器 (Adapter) 是机器人与平台交互的核心桥梁,它负责在驱动器和机器人插件之间转换与传递消息。 - -## 适配器功能与组成 - -适配器通常有两种功能,分别是**接收事件**和**调用平台接口**。其中,接收事件是指将驱动器收到的事件消息转换为 NoneBot 定义的事件模型,然后交由机器人插件处理;调用平台接口是指将机器人插件调用平台接口的数据转换为平台指定的格式,然后交由驱动器发送,并接收接口返回数据。 - -为了实现这两种功能,适配器通常由四个部分组成: - -- **Adapter**:负责转换事件和调用接口,正确创建 Bot 对象并注册到 NoneBot 中。 -- **Bot**:负责存储平台机器人相关信息,并提供回复事件的方法。 -- **Event**:负责定义事件内容,以及事件主体对象。 -- **Message**:负责正确序列化消息,以便机器人插件处理。 - -## 注册适配器 - -在使用适配器之前,我们需要先将适配器注册到驱动器中,这样适配器就可以通过驱动器接收事件和调用接口了。我们以 Console 适配器为例,来看看如何注册适配器: - -```python {2,5} title=bot.py -import nonebot -from nonebot.adapters.console import Adapter - -driver = nonebot.get_driver() -driver.register_adapter(Adapter) -``` - -我们首先需要从适配器模块中导入所需要的适配器类,然后通过驱动器的 `register_adapter` 方法将适配器注册到驱动器中即可。如果我们需要多平台支持,可以多次调用 `register_adapter` 方法来注册多个适配器。 - -## 获取已注册的适配器 - -NoneBot 提供了 `get_adapter` 方法来获取已注册的适配器,我们可以通过适配器的名称或类型来获取指定的适配器实例: - -```python -import nonebot -from nonebot.adapters.console import Adapter - -adapters = nonebot.get_adapters() -console_adapter = nonebot.get_adapter(Adapter) -console_adapter = nonebot.get_adapter(Adapter.get_name()) -``` - -## 获取 Bot 对象 - -当前所有适配器已连接的 Bot 对象可以通过 `get_bots` 方法获取,这是一个以机器人 ID 为键的字典: - -```python -import nonebot - -bots = nonebot.get_bots() -``` - -我们也可以通过 `get_bot` 方法获取指定 ID 的 Bot 对象。如果省略 ID 参数,将会返回所有 Bot 中的第一个: - -```python -import nonebot - -bot = nonebot.get_bot("bot_id") -``` - -如果需要获取指定适配器连接的 Bot 对象,我们可以通过适配器的 `bots` 属性获取,这也是一个以机器人 ID 为键的字典: - -```python -import nonebot -from nonebot.adapters.console import Adapter - -console_adapter = nonebot.get_adapter(Adapter) -bots = console_adapter.bots -``` - -Bot 对象都具有一个 `self_id` 属性,它是机器人的唯一 ID,由适配器填写,通常为机器人的帐号 ID 或者 APP ID。 - -## 获取事件通用信息 - -适配器的所有事件模型均继承自 `Event` 基类,在[事件类型与重载](../appendices/overload.md)一节中,我们也提到了如何使用基类抽象方法来获取事件通用信息。基类能提供如下信息: - -### 事件类型 - -事件类型通常为 `meta_event`、`message`、`notice`、`request`。 - -```python -type: str = event.get_type() -``` - -### 事件名称 - -事件名称由适配器定义,通常用于日志记录。 - -```python -name: str = event.get_event_name() -``` - -### 事件描述 - -事件描述由适配器定义,通常用于日志记录。 - -```python -description: str = event.get_event_description() -``` - -### 事件日志字符串 - -事件日志字符串由事件名称和事件描述组成,用于日志记录。 - -```python -log: str = event.get_log_string() -``` - -### 事件主体 ID - -事件主体 ID 通常为机器人用户 ID。 - -```python -user_id: str = event.get_user_id() -``` - -### 事件会话 ID - -事件会话 ID 通常为机器人用户 ID 与群聊/频道 ID 组合而成。 - -```python -session_id: str = event.get_session_id() -``` - -### 事件消息 - -如果事件包含消息,则可以通过该方法获取,否则会产生异常。 - -```python -message: Message = event.get_message() -``` - -### 事件纯文本消息 - -通常为事件消息的纯文本内容,如果事件不包含消息,则会产生异常。 - -```python -text: str = event.get_plaintext() -``` - -### 事件是否与机器人有关 - -由适配器实现的判断,通常将事件目标主体为机器人、消息中包含“@机器人”或以“机器人的昵称”开始视为与机器人有关。 - -```python -is_tome: bool = event.is_tome() -``` - -## 更多 - -官方支持的适配器和社区贡献的适配器均可在[商店](/store/adapters)中查看。如果你想要开发自己的适配器,可以参考[开发文档](../developer/adapter-writing.md)。欢迎通过商店发布你的适配器。 diff --git a/website/versioned_docs/version-2.3.2/advanced/dependency.mdx b/website/versioned_docs/version-2.3.2/advanced/dependency.mdx deleted file mode 100644 index 3efc35cd2263..000000000000 --- a/website/versioned_docs/version-2.3.2/advanced/dependency.mdx +++ /dev/null @@ -1,1320 +0,0 @@ ---- -sidebar_position: 6 -description: 通过依赖注入获取上下文信息 - -options: - menu: - - category: advanced - weight: 70 ---- - -# 依赖注入 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -在事件处理流程中,事件响应器具有自己独立的上下文,例如:当前的事件、机器人等信息。在 NoneBot 中,这些信息通过依赖注入的方式提供给事件处理函数,可以让代码更加整洁可读、提升复用能力。 - -在了解如何使用依赖注入获取上下文信息之前,我们需要先了解两个概念: - -- `Dependent`:使用依赖注入的函数或其他任意可调用对象。如:事件处理函数、自定义的依赖函数等。 -- `Dependency`:依赖注入的对象。如:当前事件、机器人等。 - -在之前的文档中,我们已经多次使用了依赖注入来获取事件信息。通过对函数参数依照一定规则填写类型注解,即可获得想要的上下文信息。任何一个事件处理函数在添加到事件处理流程时,都会根据一定规则提前将其解析成一个 `Dependent` 对象,方便运行时进行注入。如果遇到无法解析的参数,将会抛出 `ValueError("Unknown parameter")` 的异常。整个依赖注入系统可以分为两部分: - -- 参数解析 - - 依据一定规则解析函数参数,识别 `Dependency` 依赖。 - - 生成 `Dependent` 对象。 -- 执行 - - 根据已经解析的 `Dependency` 依赖,执行调用。 - - 将所有 `Dependency` 的返回值根据参数名传入并调用 `Dependent` 。 - -:::danger 警告 -在依赖注入中,类型注解是非常重要的,因为它不仅可以决定依赖注入的对象,还可以触发[重载机制](../appendices/overload.md#重载)。如果类型注解与实际获得数据类型不一致,将会跳过当前 `Dependent` 对象(即事件处理函数)。 -::: - -:::tip 提示 -如果对于依赖注入的解析流程有疑问,可以调整[日志等级配置项](../appendices/config.mdx#log-level)为 `TRACE`,查看依赖解析日志。 -::: - -## 同步支持 - -对于依赖注入系统中的 `Dependent` 或者 `Dependency` 对象,均支持同步类型的函数或可调用对象。例如: - -```python {6,10} -from nonebot import on_command -from nonebot.params import Depends - -matcher = on_command("foo") - -def dependency() -> str: - return "something" - -@matcher.handle() -def _(result: str = Depends(dependency)): - ... -``` - -## 非依赖参数 - -在依赖注入解析中,任何无法解析的参数如果带有默认值,将会被视为非依赖参数。这些参数在依赖运行时将不会被注入而使用函数默认值。例如: - -```python -async def _(foo: str = "bar"): ... -``` - -## 类型依赖注入 - -这一类的依赖注入仅需要在函数参数中添加对应的类型注解即可。 - -### Bot - -获取当前事件的 Bot 对象。 - -通过标注参数为 `Bot` 类型,或者一系列 `Bot` 类型,即可获取到当前事件的 Bot 对象。为兼容性考虑,如果参数名为 `bot` 且无类型注解,也会视为 Bot 依赖注入。 - -Bot 依赖注入支持重载(即:可以标注参数为子类型)且具有[重载优先检查权](../appendices/overload.md#重载)。 - - - - -```python -from nonebot.adapters import Bot -from nonebot.adapters.console import Bot as ConsoleBot -from nonebot.adapters.onebot.v11 import Bot as OneBotV11Bot - -async def _(foo: Bot): ... -async def _(foo: ConsoleBot | OneBotV11Bot): ... -async def _(bot): ... # 兼容性处理 -``` - - - - -```python -from typing import Union - -from nonebot.adapters import Bot -from nonebot.adapters.console import Bot as ConsoleBot -from nonebot.adapters.onebot.v11 import Bot as OneBotV11Bot - -async def _(foo: Bot): ... -async def _(foo: Union[ConsoleBot, OneBotV11Bot]): ... -async def _(bot): ... # 兼容性处理 -``` - - - - -### Event - -获取当前事件。 - -通过标注参数为 `Event` 类型,或者一系列 `Event` 类型,即可获取到当前事件。为兼容性考虑,如果参数名为 `event` 且无类型注解,也会视为 Event 依赖注入。 - -Event 依赖注入支持重载(即:可以标注参数为子类型)且具有[重载优先检查权](../appendices/overload.md#重载)。 - - - - -```python -from nonebot.adapters import Event -from nonebot.adapters.onebot.v11 import PrivateMessageEvent, GroupMessageEvent - -async def _(foo: Event): ... -async def _(foo: PrivateMessageEvent | GroupMessageEvent): ... -async def _(event): ... # 兼容性处理 -``` - - - - -```python -from typing import Union - -from nonebot.adapters import Event -from nonebot.adapters.onebot.v11 import PrivateMessageEvent, GroupMessageEvent - -async def _(foo: Event): ... -async def _(foo: Union[PrivateMessageEvent, GroupMessageEvent]): ... -async def _(event): ... # 兼容性处理 -``` - - - - -### State - -获取当前[会话状态](../appendices/session-state.md)。 - -通过标注参数为 `T_State` 类型,即可获取到当前会话状态。为兼容性考虑,如果参数名为 `state` 且无类型注解,也会视为 State 依赖注入。 - -```python -from nonebot.typing import T_State - -async def _(foo: T_State): ... -``` - -### Matcher - -获取当前事件响应器实例。常用于使用[事件响应器操作](../appendices/session-control.mdx)。 - -通过标注参数为 `Matcher` 类型,或者一系列 `Matcher` 类型,即可获取到当前事件。为兼容性考虑,如果参数名为 `matcher` 且无类型注解,也会视为 Matcher 依赖注入。 - -Matcher 依赖注入支持重载(即:可以标注参数为子类型)且具有[重载优先检查权](../appendices/overload.md#重载)。 - -```python -from nonebot.matcher import Matcher - -async def _(foo: Matcher): ... -async def _(matcher): ... # 兼容性处理 -``` - -### Exception - -获取事件响应器运行中抛出的异常。该依赖注入目前仅在事件响应器运行后处理 Hook 中可用。 - -通过标注参数为异常类型,或者一系列异常类型,即可获取到事件响应器运行中抛出的异常。 - - - - -```python {5,8} -from nonebot.message import run_postprocessor -from nonebot.exception import ActionFailed, NetworkError - -@run_postprocessor -async def _(e: Exception): ... - -@run_postprocessor -async def _(e: ActionFailed | NetworkError): ... -``` - - - - -```python {6,9} -from typing import Union -from nonebot.message import run_postprocessor -from nonebot.exception import ActionFailed, NetworkError - -@run_postprocessor -async def _(e: Exception): ... - -@run_postprocessor -async def _(e: Union[ActionFailed, NetworkError]): ... -``` - - - - -## 子依赖 - -在依赖注入系统中,我们可以定义一个子依赖,来执行自定义的操作,提高代码复用性以及处理性能。 - -### 定义子依赖 - -子依赖使用 `Depends` 标记进行定义,其参数即依赖的函数或可调用对象,同样会被解析为 `Dependent` 对象,将会在依赖注入期间执行。我们来看一个例子: - - - - -```python {5,15} -from typing import Annotated - -from nonebot import on_command -from nonebot.adapters import Event -from nonebot.params import Depends - -test = on_command("test") - -async def check(event: Event) -> Event: - if event.get_user_id() in BLACKLIST: - await test.finish() - return event - -@test.handle() -async def _(event: Annotated[Event, Depends(check)]): - ... -``` - - - - -```python {3,13} -from nonebot import on_command -from nonebot.adapters import Event -from nonebot.params import Depends - -test = on_command("test") - -async def check(event: Event) -> Event: - if event.get_user_id() in BLACKLIST: - await test.finish() - return event - -@test.handle() -async def _(event: Event = Depends(check)): - ... -``` - - - - -在上面的代码中,我们使用 `Depends` 标记定义了一个子依赖 `check`。它判断事件主体用户是否在黑名单中,如果在,则直接结束事件处理流程。如果不在,则返回事件对象,以便事件处理函数可以继续执行。 - -通过将 `Depends` 包裹的子依赖作为参数的默认值,我们就可以在执行事件处理函数之前执行子依赖,并将其返回值作为参数传入事件处理函数。子依赖和普通的事件处理函数并没有区别,同样可以使用依赖注入,并且可以返回任何类型的值。但需要注意的是,如果事件处理函数参数的类型注解与子依赖返回值的类型**不一致**,将会触发[重载](../appendices/overload.md)而跳过当前事件处理函数。 - -特别的,我们可以为 `Dependent` 对象定义一系列前置子依赖,它们会在参数执行前被顺序执行,且返回值将会被忽略,例如: - -```python {11} -from nonebot import on_command -from nonebot.adapters import Event -from nonebot.params import Depends - -test = on_command("test") - -async def check(event: Event): - if event.get_user_id() in BLACKLIST: - await test.finish() - -@test.handle(parameterless=[Depends(check)]) -async def _(): - ... -``` - -### 依赖缓存 - -NoneBot 在执行子依赖时,会将其返回值缓存起来。当我们在使用子依赖时,`Depends` 具有一个参数 `use_cache`,默认为 `True`。此时在事件处理流程中,多次使用同一个子依赖时,将会使用缓存中的结果而不会重复执行。这在很多情景中非常有用,例如: - - - - -```python {7} -import random -from typing import Annotated - -async def random_result() -> int: - return random.randint(1, 100) - -async def _(x: Annotated[int, Depends(random_result)]): - print(x) -``` - - - - -```python {6} -import random - -async def random_result() -> int: - return random.randint(1, 100) - -async def _(x: int = Depends(random_result)): - print(x) -``` - - - - -此时,在同一事件处理流程中,这个随机函数的返回值将会保持一致。如果我们希望每次都重新执行子依赖,可以将 `use_cache` 设置为 `False`。 - - - - -```python {7} -import random -from typing import Annotated - -async def random_result() -> int: - return random.randint(1, 100) - -async def _(x: Annotated[int, Depends(random_result, use_cache=False)]): - print(x) -``` - - - - -```python {6} -import random - -async def random_result() -> int: - return random.randint(1, 100) - -async def _(x: int = Depends(random_result, use_cache=False)): - print(x) -``` - - - - -:::tip 提示 -缓存的生命周期与当前接收到的事件相同。接收到事件后,子依赖在首次执行时缓存,在该事件处理完成后,缓存就会被清除。 -::: - -### 类型转换与校验 - -在依赖注入系统中,我们可以对子依赖的返回值进行自动类型转换与校验。这个功能由 Pydantic 支持,因此我们通过参数类型注解自动使用 Pydantic 支持的类型转换。例如: - - - - -```python {6,9} -from typing import Annotated - -from nonebot.params import Depends -from nonebot.adapters import Event - -def get_user_id(event: Event) -> str: - return event.get_user_id() - -async def _(user_id: Annotated[int, Depends(get_user_id, validate=True)]): - print(user_id) -``` - - - - -```python {4,7} -from nonebot.params import Depends -from nonebot.adapters import Event - -def get_user_id(event: Event) -> str: - return event.get_user_id() - -async def _(user_id: int = Depends(get_user_id, validate=True)): - print(user_id) -``` - - - - -在进行类型自动转换的同时,Pydantic 还支持对数据进行更多的限制,如:大于、小于、长度等。使用方法如下: - - - - -```python {7,10} -from typing import Annotated - -from pydantic import Field -from nonebot.params import Depends -from nonebot.adapters import Event - -def get_user_id(event: Event) -> str: - return event.get_user_id() - -async def _(user_id: Annotated[int, Depends(get_user_id, validate=Field(gt=100))]): - print(user_id) -``` - - - - -```python {5,8} -from pydantic import Field -from nonebot.params import Depends -from nonebot.adapters import Event - -def get_user_id(event: Event) -> str: - return event.get_user_id() - -async def _(user_id: int = Depends(get_user_id, validate=Field(gt=100))): - print(user_id) -``` - - - - -### 类作为依赖 - -在前面的事例中,我们使用了函数作为子依赖。实际上,我们还可以使用类作为依赖。当我们在实例化一个类的时候,其实我们就在调用它,类本身也是一个可调用对象。例如: - - - - -```python {16} -from typing import Annotated -from dataclasses import dataclass - -from nonebot.params import Depends -from nonebot.adapters import Event -from nonebot.typing import T_State - -def get_context(state: T_State) -> dict: - return state.setdefault("context", {}) - -@dataclass -class ClassDependency: - event: Event - context: dict = Depends(get_context) - -async def _(data: Annotated[ClassDependency, Depends(ClassDependency)]): - print(data.event, data.context) -``` - - - - -```python {15} -from dataclasses import dataclass - -from nonebot.params import Depends -from nonebot.adapters import Event -from nonebot.typing import T_State - -def get_context(state: T_State) -> dict: - return state.setdefault("context", {}) - -@dataclass -class ClassDependency: - event: Event - context: dict = Depends(get_context) - -async def _(data: ClassDependency = Depends(ClassDependency)): - print(data.event, data.context) -``` - - - - -可以看到,我们使用 `dataclass` 定义了一个类。由于这个类的 `__init__` 方法可以被依赖注入系统解析,因此,我们可以将其作为子依赖进行声明。特别地,对于类依赖,`Depends` 的参数可以为空,NoneBot 将会使用参数的类型注解进行解析与推断: - - - - -```python -from typing import Annotated - -async def _(data: Annotated[ClassDependency, Depends()]): - print(data.event, data.context) -``` - - - - -```python -async def _(data: ClassDependency = Depends()): - print(data.event, data.context) -``` - - - - -### 生成器作为依赖 - -NoneBot 的依赖注入支持依赖项在事件处理流程结束后进行一些额外的工作,比如数据库 session 或者网络 IO 的关闭,互斥锁的解锁等等。同时,由于[依赖缓存](#依赖缓存)的存在,我们可以通过这种方式来实现共享一个 session 等功能。 - -要实现上述功能,我们可以用生成器函数作为依赖项,我们用 `yield` 关键字取代 `return` 关键字,并在 `yield` 之后进行额外的工作。 - -我们可以看下述代码段, 使用 `httpx.AsyncClient` 异步网络 IO,并在事件处理流程中共用一个 client: - - - - -```python {15} -from typing import Annotated -from collections.abc import AsyncGenerator - -import httpx -from nonebot.params import Depends - -async def get_client() -> AsyncGenerator[httpx.AsyncClient, None]: - try: - async with httpx.AsyncClient() as client: - yield client - finally: - # 在这里进行额外的工作 - - -@test.handle() -async def _(x: Annotated[httpx.AsyncClient, Depends(get_client)]): - resp = await x.get("https://nonebot.dev") -``` - - - - -```python {15} -from collections.abc import AsyncGenerator - -import httpx -from nonebot.params import Depends - -async def get_client() -> AsyncGenerator[httpx.AsyncClient, None]: - try: - async with httpx.AsyncClient() as client: - yield client - finally: - # 在这里进行额外的工作 - - -@test.handle() -async def _(x: httpx.AsyncClient = Depends(get_client)): - resp = await x.get("https://nonebot.dev") -``` - - - - -:::caution 注意 -生成器作为依赖时,其中只能进行一次 `yield`,否则将会触发异常。如果对此有疑问并想探究原因,可以参考 [contextmanager](https://docs.python.org/zh-cn/3/library/contextlib.html#contextlib.contextmanager) 和 [asynccontextmanager](https://docs.python.org/zh-cn/3/library/contextlib.html#contextlib.asynccontextmanager) 文档。事实上,NoneBot 内部就使用了这两个装饰器。 -::: - -### 可调用对象作为依赖 - -在 Python 里,为类定义 `__call__` 方法就可以使得这个类的实例成为一个可调用对象。因此,我们也可以将定义了 `__call__` 方法的类的实例作为依赖。事实上,NoneBot 的[内置响应规则](./matcher.md#内置响应规则)就广泛使用了这种方式,以 `is_type` 规则为例: - -```python -from nonebot.adapters import Event - -class IsTypeRule: - def __init__(self, *types: type[Event]): - self.types = types - - async def __call__(self, event: Event) -> bool: - return isinstance(event, self.types) -``` - -我们在使用 `is_type` 时,即实例化了 `IsTypeRule` 类,然后将实例作为响应规则依赖项传入。 - -## 其他依赖注入 - -这一类的依赖注入通常基于子依赖编写,为我们开发者提供更方便的途径获取上下文信息。 - -### EventType - -获取当前事件的类型。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import EventType - -async def _(foo: Annotated[str, EventType()]): ... -``` - - - - -```python {3} -from nonebot.params import EventType - -async def _(foo: str = EventType()): ... -``` - - - - -### EventMessage - -获取当前事件的消息。 - - - - -```python {5} -from typing import Annotated -from nonebot.adapters import Message -from nonebot.params import EventMessage - -async def _(foo: Annotated[Message, EventMessage()]): ... -``` - - - - -```python {4} -from nonebot.adapters import Message -from nonebot.params import EventMessage - -async def _(foo: Message = EventMessage()): ... -``` - - - - -### EventPlainText - -获取当前事件的消息纯文本部分。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import EventPlainText - -async def _(foo: Annotated[str, EventPlainText()]): ... -``` - - - - -```python {3} -from nonebot.params import EventPlainText - -async def _(foo: str = EventPlainText()): ... -``` - - - - -### EventToMe - -获取当前事件是否与机器人相关。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import EventToMe - -async def _(foo: Annotated[bool, EventToMe()]): ... -``` - - - - -```python {3} -from nonebot.params import EventToMe - -async def _(foo: bool = EventToMe()): ... -``` - - - - -### Command - -获取当前命令型消息的元组形式命令名。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import Command - -async def _(foo: Annotated[tuple[str, ...], Command()]): ... -``` - - - - -```python {4} -from nonebot.params import Command - -async def _(foo: tuple[str, ...] = Command()): ... -``` - - - - -:::tip 提示 -命令详情只能在**触发命令型事件响应器时**获取。如果在事件处理后续流程中获取,则会获取到不同的值。 -::: - -### RawCommand - -获取当前命令型消息的文本形式命令名。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import RawCommand - -async def _(foo: Annotated[str, RawCommand()]): ... -``` - - - - -```python {3} -from nonebot.params import RawCommand - -async def _(foo: str = RawCommand()): ... -``` - - - - -:::tip 提示 -命令详情只能在**触发命令型事件响应器时**获取。如果在事件处理后续流程中获取,则会获取到不同的值。 -::: - -### CommandArg - -获取命令型消息命令后跟随的参数。 - - - - -```python {5} -from typing import Annotated -from nonebot.adapters import Message -from nonebot.params import CommandArg - -async def _(foo: Annotated[Message, CommandArg()]): ... -``` - - - - -```python {4} -from nonebot.adapters import Message -from nonebot.params import CommandArg - -async def _(foo: Message = CommandArg()): ... -``` - - - - -:::tip 提示 -命令详情只能在**触发命令型事件响应器时**获取。如果在事件处理后续流程中获取,则会获取到不同的值。 -::: - -### CommandStart - -获取命令型消息命令前缀。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import CommandStart - -async def _(foo: Annotated[str, CommandStart()]): ... -``` - - - - -```python {3} -from nonebot.params import CommandStart - -async def _(foo: str = CommandStart()): ... -``` - - - - -:::tip 提示 -命令详情只能在**触发命令型事件响应器时**获取。如果在事件处理后续流程中获取,则会获取到不同的值。 -::: - -### CommandWhitespace - -获取命令型消息命令与参数间空白符。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import CommandWhitespace - -async def _(foo: Annotated[str, CommandWhitespace()]): ... -``` - - - - -```python {3} -from nonebot.params import CommandWhitespace - -async def _(foo: str = CommandWhitespace()): ... -``` - - - - -:::tip 提示 -命令详情只能在**触发命令型事件响应器时**获取。如果在事件处理后续流程中获取,则会获取到不同的值。 -::: - -### ShellCommandArgv - -获取 shell 命令解析前的参数列表,列表中可能包含文本字符串和富文本消息段(如:图片)。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import ShellCommandArgs - -async def _(foo: Annotated[list[str | MessageSegment], ShellCommandArgv()]): ... -``` - -```python {4} -from nonebot.params import ShellCommandArgs - -async def _(foo: list[str | MessageSegment] = ShellCommandArgv()): ... -``` - - - - -```python {4} -from typing import Union, Annotated -from nonebot.params import ShellCommandArgs - -async def _(foo: Annotated[list[Union[str, MessageSegment]], ShellCommandArgv()]): ... -``` - -```python {4} -from typing import Union -from nonebot.params import ShellCommandArgs - -async def _(foo: list[Union[str, MessageSegment]] = ShellCommandArgv()): ... -``` - - - - -### ShellCommandArgs - -获取 shell 命令解析后的参数 Namespace,支持 MessageSegment 富文本(如:图片)。 - -:::tip 提示 -如果参数解析成功,则为 parser 返回的 Namespace;如果参数解析失败,则为 [`ParserExit`](../api/exception.md#ParserExit) 异常,并携带错误码与错误信息。通过重载机制即可处理两种不同的情况。 - -由于 `ArgumentParser` 在解析到 `--help` 参数时也会抛出异常,这种情况下错误码为 `0` 且错误信息即为帮助信息。 -::: - - - - -```python {14,22} -from typing import Annotated - -from nonebot import on_shell_command -from nonebot.exception import ParserExit -from nonebot.params import ShellCommandArgs -from nonebot.rule import Namespace, ArgumentParser - -parser = ArgumentParser("demo") -# parser.add_argument ... -matcher = on_shell_command("cmd", parser=parser) - -# 解析失败 -@matcher.handle() -async def _(foo: Annotated[ParserExit, ShellCommandArgs()]): - if foo.status == 0: - foo.message # help message - else: - foo.message # error message - -# 解析成功 -@matcher.handle() -async def _(foo: Annotated[Namespace, ShellCommandArgs()]): - arg_dict = vars(foo) -``` - - - - -```python {12,20} -from nonebot import on_shell_command -from nonebot.exception import ParserExit -from nonebot.params import ShellCommandArgs -from nonebot.rule import Namespace, ArgumentParser - -parser = ArgumentParser("demo") -# parser.add_argument ... -matcher = on_shell_command("cmd", parser=parser) - -# 解析失败 -@matcher.handle() -async def _(foo: ParserExit = ShellCommandArgs()): - if foo.status == 0: - foo.message # help message - else: - foo.message # error message - -# 解析成功 -@matcher.handle() -async def _(foo: Namespace = ShellCommandArgs()): - arg_dict = vars(foo) -``` - - - - -### RegexMatched - -获取正则匹配结果的对象。 - - - - -```python {5} -from re import Match -from typing import Annotated -from nonebot.params import RegexMatched - -async def _(foo: Annotated[Match[str], RegexMatched()]): ... -``` - - - - -```python {4} -from re import Match -from nonebot.params import RegexMatched - -async def _(foo: Match[str] = RegexMatched()): ... -``` - - - - -### RegexStr - -获取正则匹配结果的文本。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import RegexStr - -async def _(foo: Annotated[str, RegexStr()]): ... -``` - - - - -```python {3} -from nonebot.params import RegexStr - -async def _(foo: str = RegexStr()): ... -``` - - - - -### RegexGroup - -获取正则匹配结果的 group 元组。 - - - - -```python {4} -from typing import Any, Annotated -from nonebot.params import RegexGroup - -async def _(foo: Annotated[tuple[Any, ...], RegexGroup()]): ... -``` - - - - -```python {4} -from typing import Any -from nonebot.params import RegexGroup - -async def _(foo: tuple[Any, ...] = RegexGroup()): ... -``` - - - - -### RegexDict - -获取正则匹配结果的 group 字典。 - - - - -```python {4} -from typing import Any, Annotated -from nonebot.params import RegexDict - -async def _(foo: Annotated[dict[str, Any], RegexDict()]): ... -``` - - - - -```python {4} -from typing import Any -from nonebot.params import RegexDict - -async def _(foo: dict[str, Any] = RegexDict()): ... -``` - - - - -### Startswith - -获取触发响应器的消息前缀字符串。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import Startswith - -async def _(foo: Annotated[str, Startswith()]): ... -``` - - - - -```python {3} -from nonebot.params import Startswith - -async def _(foo: str = Startswith()): ... -``` - - - - -### Endswith - -获取触发响应器的消息后缀字符串。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import Endswith - -async def _(foo: Annotated[str, Endswith()]): ... -``` - - - - -```python {3} -from nonebot.params import Endswith - -async def _(foo: str = Endswith()): ... -``` - - - - -### Fullmatch - -获取触发响应器的消息字符串。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import Fullmatch - -async def _(foo: Annotated[str, Fullmatch()]): ... -``` - - - - -```python {3} -from nonebot.params import Fullmatch - -async def _(foo: str = Fullmatch()): ... -``` - - - - -### Keyword - -获取触发响应器的关键字字符串。 - - - - -```python {4} -from typing import Annotated -from nonebot.params import Keyword - -async def _(foo: Annotated[str, Keyword()]): ... -``` - - - - -```python {3} -from nonebot.params import Keyword - -async def _(foo: str = Keyword()): ... -``` - - - - -### Received - -获取某次 `receive` 接收的事件。 - - - - -```python {7} -from typing import Annotated - -from nonebot.adapters import Event -from nonebot.params import Received - -@matcher.receive("id") -async def _(foo: Annotated[Event, Received("id")]): ... -``` - - - - -```python {5} -from nonebot.adapters import Event -from nonebot.params import Received - -@matcher.receive("id") -async def _(foo: Event = Received("id")): ... -``` - - - - -### LastReceived - -获取最近一次 `receive` 接收的事件。 - - - - -```python {7} -from typing import Annotated - -from nonebot.adapters import Event -from nonebot.params import LastReceived - -@matcher.receive("any") -async def _(foo: Annotated[Event, LastReceived()]): ... -``` - - - - -```python {5} -from nonebot.adapters import Event -from nonebot.params import LastReceived - -@matcher.receive("any") -async def _(foo: Event = LastReceived()): ... -``` - - - - -### Arg - -获取某次 `got` 接收的参数。如果 `Arg` 参数留空,则使用函数的参数名作为要获取的参数。 - - - - -```python {7,8} -from typing import Annotated - -from nonebot.params import Arg -from nonebot.adapters import Message - -@matcher.got("key") -async def _(key: Annotated[Message, Arg()]): ... -async def _(foo: Annotated[Message, Arg("key")]): ... -``` - - - - -```python {5,6} -from nonebot.params import Arg -from nonebot.adapters import Message - -@matcher.got("key") -async def _(key: Message = Arg()): ... -async def _(foo: Message = Arg("key")): ... -``` - - - - -### ArgStr - -获取某次 `got` 接收的参数,并转换为字符串。如果 `Arg` 参数留空,则使用函数的参数名作为要获取的参数。 - - - - -```python {6,7} -from typing import Annotated - -from nonebot.params import ArgStr - -@matcher.got("key") -async def _(key: Annotated[str, ArgStr()]): ... -async def _(foo: Annotated[str, ArgStr("key")]): ... -``` - - - - -```python {4,5} -from nonebot.params import ArgStr - -@matcher.got("key") -async def _(key: str = ArgStr()): ... -async def _(foo: str = ArgStr("key")): ... -``` - - - - -### ArgPlainText - -获取某次 `got` 接收的参数的纯文本部分。如果 `Arg` 参数留空,则使用函数的参数名作为要获取的参数。 - - - - -```python {6,7} -from typing import Annotated - -from nonebot.params import ArgPlainText - -@matcher.got("key") -async def _(key: Annotated[str, ArgPlainText()]): ... -async def _(foo: Annotated[str, ArgPlainText("key")]): ... -``` - - - - -```python {4,5} -from nonebot.params import ArgPlainText - -@matcher.got("key") -async def _(key: str = ArgPlainText()): ... -async def _(foo: str = ArgPlainText("key")): ... -``` - - - diff --git a/website/versioned_docs/version-2.3.2/advanced/driver.md b/website/versioned_docs/version-2.3.2/advanced/driver.md deleted file mode 100644 index 222921de1bf9..000000000000 --- a/website/versioned_docs/version-2.3.2/advanced/driver.md +++ /dev/null @@ -1,287 +0,0 @@ ---- -sidebar_position: 0 -description: 选择合适的驱动器运行机器人 - -options: - menu: - - category: advanced - weight: 10 ---- - -# 选择驱动器 - -驱动器 (Driver) 是机器人运行的基石,它是机器人初始化的第一步,主要负责数据收发。 - -:::important 提示 -驱动器的选择通常与机器人所使用的协议适配器相关,如果不知道该选择哪个驱动器,可以先阅读相关协议适配器文档说明。 -::: - -:::tip 提示 -如何**安装**驱动器请参考[安装驱动器](../tutorial/store.mdx#安装驱动器)。 -::: - -## 驱动器类型 - -驱动器类型大体上可以分为两种: - -- `Forward`:即客户端型驱动器,多用于使用 HTTP 轮询,连接 WebSocket 服务器等情形。 -- `Reverse`:即服务端型驱动器,多用于使用 WebHook,接收 WebSocket 客户端连接等情形。 - -客户端型驱动器可以分为以下两种: - -1. 异步发送 HTTP 请求,自定义 `HTTP Method`、`URL`、`Header`、`Body`、`Cookie`、`Proxy`、`Timeout` 等。 -2. 异步建立 WebSocket 连接上下文,自定义 `WebSocket URL`、`Header`、`Cookie`、`Proxy`、`Timeout` 等。 - -服务端型驱动器目前有: - -1. ASGI 应用框架,具有以下功能: - - 协议适配器自定义 HTTP 上报地址以及对上报数据处理的回调函数。 - - 协议适配器自定义 WebSocket 连接请求地址以及对 WebSocket 请求处理的回调函数。 - - 用户可以向 ASGI 应用添加任何服务端相关功能,如:[添加自定义路由](./routing.md)。 - -## 配置驱动器 - -驱动器的配置方法已经在[配置](../appendices/config.mdx)章节中简单进行了介绍,这里将详细介绍驱动器配置的格式。 - -NoneBot 中的客户端和服务端型驱动器可以相互配合使用,但服务端型驱动器**仅能选择一个**。所有驱动器模块都会包含一个 `Driver` 子类,即驱动器类,他可以作为驱动器单独运行。同时,客户端驱动器模块中还会提供一个 `Mixin` 子类,用于在与其他驱动器配合使用时加载。因此,驱动器配置格式采用特殊语法:`[:][+[:]]*`。 - -其中,`` 代表**驱动器模块路径**;`` 代表**驱动器类名**,默认为 `Driver`;`` 代表**驱动器混入类名**,默认为 `Mixin`。即,我们需要选择一个主要驱动器,然后在其基础上配合使用其他驱动器的功能。主要驱动器可以为客户端或服务端类型,但混入类驱动器只能为客户端类型。 - -特别的,为了简化内置驱动器模块路径,我们可以使用 `~` 符号作为内置驱动器模块路径的前缀,如 `~fastapi` 代表使用内置驱动器 `fastapi`。NoneBot 内置了多个驱动器适配,但需要安装额外依赖才能使用,具体请参考[安装驱动器](../tutorial/store.mdx#安装驱动器)。常见的驱动器配置如下: - -```dotenv -DRIVER=~fastapi -DRIVER=~aiohttp -DRIVER=~httpx+~websockets -DRIVER=~fastapi+~httpx+~websockets -``` - -## 获取驱动器 - -在 NoneBot 框架初始化完成后,我们就可以通过 `get_driver()` 方法获取全局驱动器实例: - -```python -from nonebot import get_driver - -driver = get_driver() -``` - -## 内置驱动器 - -### None - -**类型:**服务端驱动器 - -NoneBot 内置的空驱动器,不提供任何收发数据功能,可以在不需要外部网络连接时使用。 - -```env -DRIVER=~none -``` - -### FastAPI(默认) - -**类型:**ASGI 服务端驱动器 - -> FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints. - -[FastAPI](https://fastapi.tiangolo.com/) 是一个易上手、高性能的异步 Web 框架,具有极佳的编写体验。 FastAPI 可以通过类型注解、依赖注入等方式实现输入参数校验、自动生成 API 文档等功能,也可以挂载其他 ASGI、WSGI 应用。 - -```env -DRIVER=~fastapi -``` - -#### FastAPI 配置项 - -##### `fastapi_openapi_url` - -类型:`str | None` -默认值:`None` -说明:`FastAPI` 提供的 `OpenAPI` JSON 定义地址,如果为 `None`,则不提供 `OpenAPI` JSON 定义。 - -##### `fastapi_docs_url` - -类型:`str | None` -默认值:`None` -说明:`FastAPI` 提供的 `Swagger` 文档地址,如果为 `None`,则不提供 `Swagger` 文档。 - -##### `fastapi_redoc_url` - -类型:`str | None` -默认值:`None` -说明:`FastAPI` 提供的 `ReDoc` 文档地址,如果为 `None`,则不提供 `ReDoc` 文档。 - -##### `fastapi_include_adapter_schema` - -类型:`bool` -默认值:`True` -说明:`FastAPI` 提供的 `OpenAPI` JSON 定义中是否包含适配器路由的 `Schema`。 - -##### `fastapi_reload` - -:::caution 警告 -不推荐开启该配置项,在 Windows 平台上开启该功能有可能会造成预料之外的影响!替代方案:使用 `nb-cli` 命令行工具以及参数 `--reload` 启动 NoneBot。 - -```bash -nb run --reload -``` - -开启该功能后,在 uvicorn 运行时(FastAPI 提供的 ASGI 底层,即 reload 功能的实际来源),asyncio 使用的事件循环会被 uvicorn 从默认的 `ProactorEventLoop` 强制切换到 `SelectorEventLoop`。 - -> 相关信息参考 [uvicorn#529](https://github.com/encode/uvicorn/issues/529),[uvicorn#1070](https://github.com/encode/uvicorn/pull/1070),[uvicorn#1257](https://github.com/encode/uvicorn/pull/1257) - -后者(`SelectorEventLoop`)在 Windows 平台的可使用性不如前者(`ProactorEventLoop`),包括但不限于 - -1. 不支持创建子进程 -2. 最多只支持 512 个套接字 -3. ... - -> 具体信息参考 [Python 文档](https://docs.python.org/zh-cn/3/library/asyncio-platforms.html#windows) - -所以,一些使用了 asyncio 的库因此可能无法正常工作,如: - -1. [playwright](https://playwright.dev/python/docs/library#incompatible-with-selectoreventloop-of-asyncio-on-windows) - -如果在开启该功能后,原本**正常运行**的代码报错,且打印的异常堆栈信息和 asyncio 有关(异常一般为 `NotImplementedError`), -你可能就需要考虑相关库对事件循环的支持,以及是否启用该功能。 -::: - -类型:`bool` -默认值:`False` -说明:是否开启 `uvicorn` 的 `reload` 功能,需要在机器人入口文件提供 ASGI 应用路径。 - -```python title=bot.py -app = nonebot.get_asgi() -nonebot.run(app="bot:app") -``` - -##### `fastapi_reload_dirs` - -类型:`List[str] | None` -默认值:`None` -说明:重载监控文件夹列表,默认为 uvicorn 默认值 - -##### `fastapi_reload_delay` - -类型:`float | None` -默认值:`None` -说明:重载延迟,默认为 uvicorn 默认值 - -##### `fastapi_reload_includes` - -类型:`List[str] | None` -默认值:`None` -说明:要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -##### `fastapi_reload_excludes` - -类型:`List[str] | None` -默认值:`None` -说明:不要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -##### `fastapi_extra` - -类型:`Dist[str, Any]` -默认值:`{}` -说明:传递给 `FastAPI` 的其他参数 - -### Quart - -**类型:**ASGI 服务端驱动器 - -> Quart is an asyncio reimplementation of the popular Flask microframework API. - -[Quart](https://quart.palletsprojects.com/) 是一个类 Flask 的异步版本,拥有与 Flask 非常相似的接口和使用方法。 - -```env -DRIVER=~quart -``` - -#### Quart 配置项 - -##### `quart_reload` - -:::caution 警告 -不推荐开启该配置项,在 Windows 平台上开启该功能有可能会造成预料之外的影响!替代方案:使用 `nb-cli` 命令行工具以及参数 `--reload` 启动 NoneBot。 - -```bash -nb run --reload -``` - -::: - -类型:`bool` -默认值:`False` -说明:是否开启 `uvicorn` 的 `reload` 功能,需要在机器人入口文件提供 ASGI 应用路径。 - -```python title=bot.py -app = nonebot.get_asgi() -nonebot.run(app="bot:app") -``` - -##### `quart_reload_dirs` - -类型:`List[str] | None` -默认值:`None` -说明:重载监控文件夹列表,默认为 uvicorn 默认值 - -##### `quart_reload_delay` - -类型:`float | None` -默认值:`None` -说明:重载延迟,默认为 uvicorn 默认值 - -##### `quart_reload_includes` - -类型:`List[str] | None` -默认值:`None` -说明:要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -##### `quart_reload_excludes` - -类型:`List[str] | None` -默认值:`None` -说明:不要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -##### `quart_extra` - -类型:`Dist[str, Any]` -默认值:`{}` -说明:传递给 `Quart` 的其他参数 - -### HTTPX - -**类型:**HTTP 客户端驱动器 - -:::caution 注意 -本驱动器仅支持 HTTP 请求,不支持 WebSocket 连接请求。 -::: - -> [HTTPX](https://www.python-httpx.org/) is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2. - -```env -DRIVER=~httpx -``` - -### websockets - -**类型:**WebSocket 客户端驱动器 - -:::caution 注意 -本驱动器仅支持 WebSocket 连接请求,不支持 HTTP 请求。 -::: - -> [websockets](https://websockets.readthedocs.io/) is a library for building WebSocket servers and clients in Python with a focus on correctness, simplicity, robustness, and performance. - -```env -DRIVER=~websockets -``` - -### AIOHTTP - -**类型:**HTTP/WebSocket 客户端驱动器 - -> [AIOHTTP](https://docs.aiohttp.org/): Asynchronous HTTP Client/Server for asyncio and Python. - -```env -DRIVER=~aiohttp -``` diff --git a/website/versioned_docs/version-2.3.2/advanced/matcher-provider.md b/website/versioned_docs/version-2.3.2/advanced/matcher-provider.md deleted file mode 100644 index 6af8f003c8e9..000000000000 --- a/website/versioned_docs/version-2.3.2/advanced/matcher-provider.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -sidebar_position: 10 -description: 自定义事件响应器存储 - -options: - menu: - - category: advanced - weight: 110 ---- - -# 事件响应器存储 - -事件响应器是 NoneBot 处理事件的核心,它们默认存储在一个字典中。在进入会话状态后,事件响应器将会转为临时响应器,作为最高优先级同样存储于该字典中。因此,事件响应器的存储类似于会话存储,它决定了整个 NoneBot 对事件的处理行为。 - -NoneBot 默认使用 Python 的字典将事件响应器存储于内存中,但是我们也可以自定义事件响应器存储,将事件响应器存储于其他地方,例如 Redis 等。这样我们就可以实现持久化、在多实例间共享会话状态等功能。 - -## 编写存储提供者 - -事件响应器的存储提供者 `MatcherProvider` 抽象类继承自 `MutableMapping[int, list[type[Matcher]]]`,即以优先级为键,以事件响应器列表为值的映射。我们可以方便地进行逐优先级事件传播。 - -编写一个自定义的存储提供者,只需要继承并实现 `MatcherProvider` 抽象类: - -```python -from nonebot.matcher import MatcherProvider - -class CustomProvider(MatcherProvider): - ... -``` - -## 设置存储提供者 - -我们可以通过 `matchers.set_provider` 方法设置存储提供者: - -```python {3} -from nonebot.matcher import matchers - -matchers.set_provider(CustomProvider) - -assert isinstance(matchers.provider, CustomProvider) -``` diff --git a/website/versioned_docs/version-2.3.2/advanced/matcher.md b/website/versioned_docs/version-2.3.2/advanced/matcher.md deleted file mode 100644 index 635f2a1d3bdb..000000000000 --- a/website/versioned_docs/version-2.3.2/advanced/matcher.md +++ /dev/null @@ -1,338 +0,0 @@ ---- -sidebar_position: 5 -description: 事件响应器组成与内置响应规则 - -options: - menu: - - category: advanced - weight: 60 ---- - -# 事件响应器进阶 - -在[指南](../tutorial/matcher.md)与[深入](../appendices/rule.md)中,我们已经介绍了事件响应器的基本用法以及响应规则、权限控制等功能。在这一节中,我们将介绍事件响应器的组成,内置的响应规则,与第三方响应规则拓展。 - -:::tip 提示 -事件响应器允许继承,你可以通过直接继承 `Matcher` 类来创建一个新的事件响应器。 -::: - -## 事件响应器组成 - -### 事件响应器类型 - -事件响应器类型 `type` 即是该响应器所要响应的事件类型,只有在接收到的事件类型与该响应器的类型相同时,才会触发该响应器。如果类型为空字符串 `""`,则响应器将会响应所有类型的事件。事件响应器类型的检查在所有其他检查(权限控制、响应规则)之前进行。 - -NoneBot 内置了四种常用事件类型:`meta_event`、`message`、`notice`、`request`,分别对应元事件、消息、通知、请求。通常情况下,协议适配器会将事件合理地分类至这四种类型中。如果有其他类型的事件需要响应,可以自行定义新的类型。 - -### 事件触发权限 - -事件触发权限 `permission` 是一个 `Permission` 对象,这在[权限控制](../appendices/permission.mdx)一节中已经介绍过。事件触发权限会在事件响应器的类型检查通过后进行检查,如果权限检查通过,则执行响应规则检查。 - -### 事件响应规则 - -事件响应规则 `rule` 是一个 `Rule` 对象,这在[响应规则](../appendices/rule.md)一节中已经介绍过。事件响应器的响应规则会在事件响应器的权限检查通过后进行匹配,如果响应规则检查通过,则触发该响应器。 - -### 响应优先级 - -响应优先级 `priority` 是一个正整数,用于指定响应器的优先级。响应器的优先级越小,越先被触发。如果响应器的优先级相同,则按照响应器的注册顺序进行触发。 - -### 阻断 - -阻断 `block` 是一个布尔值,用于指定响应器是否阻断事件的传播。如果阻断为 `True`,则在该响应器被触发后,事件将不会再传播给其他下一优先级的响应器。 - -NoneBot 内置的事件响应器中,所有非 `command` 规则的 `message` 类型的事件响应器都会阻断事件传递,其他则不会。 - -在部分情况中,可以使用 [`stop_propagation`](../appendices/session-control.mdx#stop_propagation) 方法动态阻止事件传播,该方法需要 handler 在参数中获取 matcher 实例后调用方法。 - -### 有效期 - -事件响应器的有效期分为 `temp` 和 `expire_time` 。`temp` 是一个布尔值,用于指定响应器是否为临时响应器。如果为 `True`,则该响应器在被触发后会被自动销毁。`expire_time` 是一个 `datetime` 对象,用于指定响应器的过期时间。如果 `expire_time` 不为 `None`,则在该时间点后,该响应器会被自动销毁。 - -### 默认状态 - -事件响应器的默认状态 `default_state` 是一个 `dict` 对象,用于指定响应器的默认状态。在响应器被触发时,响应器将会初始化默认状态然后开始执行事件处理流程。 - -## 基本辅助函数 - -NoneBot 为四种类型的事件响应器提供了五个基本的辅助函数: - -- `on`:创建任何类型的事件响应器。 -- `on_metaevent`:创建元事件响应器。 -- `on_message`:创建消息事件响应器。 -- `on_request`:创建请求事件响应器。 -- `on_notice`:创建通知事件响应器。 - -除了 `on` 函数具有一个 `type` 参数外,其余参数均相同: - -- `rule`:响应规则,可以是 `Rule` 对象或者 `RuleChecker` 函数。 -- `permission`:事件触发权限,可以是 `Permission` 对象或者 `PermissionChecker` 函数。 -- `handlers`:事件处理函数列表。 -- `temp`:是否为临时响应器。 -- `expire_time`:响应器的过期时间。 -- `priority`:响应器的优先级。 -- `block`:是否阻断事件传播。 -- `state`:响应器的默认状态。 - -在消息类型的事件响应器的基础上,NoneBot 还内置了一些常用的响应规则,并结合为辅助函数来方便我们快速创建指定功能的响应器。下面我们逐个介绍。 - -## 内置响应规则 - -### `startswith` - -`startswith` 响应规则用于匹配消息纯文本部分的开头是否与指定字符串(或一系列字符串)相同。可选参数 `ignorecase` 用于指定是否忽略大小写,默认为 `False`。 - -例如,我们可以创建一个匹配消息开头为 `!` 或者 `/` 的规则: - -```python -from nonebot.rule import startswith - -rule = startswith(("!", "/"), ignorecase=False) -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_startswith - -matcher = on_startswith(("!", "/"), ignorecase=False) -``` - -### `endswith` - -`endswith` 响应规则用于匹配消息纯文本部分的结尾是否与指定字符串(或一系列字符串)相同。可选参数 `ignorecase` 用于指定是否忽略大小写,默认为 `False`。 - -例如,我们可以创建一个匹配消息结尾为 `.` 或者 `。` 的规则: - -```python -from nonebot.rule import endswith - -rule = endswith((".", "。"), ignorecase=False) -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_endswith - -matcher = on_endswith((".", "。"), ignorecase=False) -``` - -### `fullmatch` - -`fullmatch` 响应规则用于匹配消息纯文本部分是否与指定字符串(或一系列字符串)完全相同。可选参数 `ignorecase` 用于指定是否忽略大小写,默认为 `False`。 - -例如,我们可以创建一个匹配消息为 `ping` 或者 `pong` 的规则: - -```python -from nonebot.rule import fullmatch - -rule = fullmatch(("ping", "pong"), ignorecase=False) -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_fullmatch - -matcher = on_fullmatch(("ping", "pong"), ignorecase=False) -``` - -### `keyword` - -`keyword` 响应规则用于匹配消息纯文本部分是否包含指定字符串(或一系列字符串)。 - -例如,我们可以创建一个匹配消息中包含 `hello` 或者 `hi` 的规则: - -```python -from nonebot.rule import keyword - -rule = keyword("hello", "hi") -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_keyword - -matcher = on_keyword({"hello", "hi"}) -``` - -### `command` - -`command` 是最常用的响应规则,它用于匹配消息是否为命令。它会根据配置中的 [Command Start 和 Command Separator](../appendices/config.mdx#command-start-和-command-separator) 来判断消息是否为命令。 - -例如,当我们配置了 `Command Start` 为 `/`,`Command Separator` 为 `.` 时: - -```python -from nonebot.rule import command - -# 匹配 "/help" 或者 "/帮助" 开头的消息 -rule = command("help", "帮助") -# 匹配 "/help.cmd" 开头的消息 -rule = command(("help", "cmd")) -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_command - -matcher = on_command("help", aliases={"帮助"}) -``` - -此外,`command` 响应规则默认允许消息命令与参数间不加空格,如果需要严格匹配命令与参数间的空白符,可以使用 `command` 函数的 `force_whitespace` 参数。`force_whitespace` 参数可以是 bool 类型或者具体的字符串,默认为 `False`。如果为 `True`,则命令与参数间必须有任意个数的空白符;如果为字符串,则命令与参数间必须有且与给定字符串一致的空白符。 - -```python -rule = command("help", force_whitespace=True) -rule = command("help", force_whitespace=" ") -``` - -命令解析后的结果可以通过 [`Command`](./dependency.mdx#command)、[`RawCommand`](./dependency.mdx#rawcommand)、[`CommandArg`](./dependency.mdx#commandarg)、[`CommandStart`](./dependency.mdx#commandstart)、[`CommandWhitespace`](./dependency.mdx#commandwhitespace) 依赖注入获取。 - -### `shell_command` - -`shell_command` 响应规则用于匹配类 shell 命令形式的消息。它首先与 [`command`](#command) 响应规则一样进行命令匹配,如果匹配成功,则会进行进一步的参数解析。参数解析采用 `argparse` 标准库进行,在此基础上添加了消息序列 `Message` 支持。 - -例如,我们可以创建一个匹配 `/cmd` 命令并且带有 `-v` 选项与默认 `-h` 帮助选项的规则: - -```python -from nonebot.rule import shell_command, ArgumentParser - -parser = ArgumentParser() -parser.add_argument("-v", "--verbose", action="store_true") - -rule = shell_command("cmd", parser=parser) -``` - -更多关于 `argparse` 的使用方法请参考 [argparse 文档](https://docs.python.org/zh-cn/3/library/argparse.html)。我们也可以选择不提供 `parser` 参数,这样 `shell_command` 将不会解析参数,但会提供参数列表 `argv`。 - -直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_shell_command -from nonebot.rule import ArgumentParser - -parser = ArgumentParser() -parser.add_argument("-v", "--verbose", action="store_true") - -matcher = on_shell_command("cmd", parser=parser) -``` - -参数解析后的结果可以通过 [`ShellCommandArgv`](./dependency.mdx#shellcommandargv)、[`ShellCommandArgs`](./dependency.mdx#shellcommandargs) 依赖注入获取。 - -### `regex` - -`regex` 响应规则用于匹配消息是否与指定正则表达式匹配。 - -:::tip 提示 -正则表达式匹配使用 search 而非 match,如需从头匹配请使用 `r"^xxx"` 模式来确保匹配开头。 -::: - -例如,我们可以创建一个匹配消息中包含字母并且忽略大小写的规则: - -```python -from nonebot.rule import regex - -rule = regex(r"[a-z]+", flags=re.IGNORECASE) -``` - -也可以直接使用辅助函数新建一个响应器: - -```python -from nonebot import on_regex - -matcher = on_regex(r"[a-z]+", flags=re.IGNORECASE) -``` - -正则匹配后的结果可以通过 [`RegexStr`](./dependency.mdx#regexstr)、[`RegexGroup`](./dependency.mdx#regexgroup)、[`RegexDict`](./dependency.mdx#regexdict) 依赖注入获取。 - -### `to_me` - -`to_me` 响应规则用于匹配事件是否与机器人相关。 - -例如: - -```python -from nonebot.rule import to_me - -rule = to_me() -``` - -### `is_type` - -`is_type` 响应规则用于匹配事件类型是否为指定类型(或者一系列类型)。 - -例如,我们可以创建一个匹配 OneBot v11 私聊和群聊消息事件的规则: - -```python -from nonebot.rule import is_type -from nonebot.adapters.onebot.v11 import PrivateMessageEvent, GroupMessageEvent - -rule = is_type(PrivateMessageEvent, GroupMessageEvent) -``` - -## 响应器组 - -为了更方便的管理一系列功能相近的响应器,NoneBot 提供了两种响应器组,它们可以帮助我们进行响应器的统一管理。 - -### `CommandGroup` - -`CommandGroup` 可以用于管理一系列具有相同前置命令的子命令响应器。 - -例如,我们创建 `/cmd`、`/cmd.sub`、`/cmd.help` 三个命令,他们具有相同的优先级: - -```python -from nonebot import CommandGroup - -group = CommandGroup("cmd", priority=10) - -cmd = group.command(tuple()) -sub_cmd = group.command("sub") -help_cmd = group.command("help") -``` - -命令别名 aliases 默认不会添加 `CommandGroup` 设定的前缀,如果需要为 aliases 添加前缀,可以添加 `prefix_aliases=True` 参数: - -```python -from nonebot import CommandGroup - -group = CommandGroup("cmd", prefix_aliases=True) - -cmd = group.command(tuple()) -help_cmd = group.command("help", aliases={"帮助"}) -``` - -这样就能成功匹配 `/cmd`、`/cmd.help`、`/cmd.帮助` 命令。如果未设置,将默认匹配 `/cmd`、`/cmd.help`、`/帮助` 命令。 - -### `MatcherGroup` - -`MatcherGroup` 可以用于管理一系列具有相同属性的响应器。 - -例如,我们创建一个具有相同响应规则的响应器组: - -```python -from nonebot.rule import to_me -from nonebot import MatcherGroup - -group = MatcherGroup(rule=to_me()) - -matcher1 = group.on_message() -matcher2 = group.on_message() -``` - -## 第三方响应规则 - -### Alconna - -[`nonebot-plugin-alconna`](https://github.com/nonebot/plugin-alconna) 是一类提供了拓展响应规则的插件。 -该插件使用 [Alconna](https://github.com/ArcletProject/Alconna) 作为命令解析器, -是一个简单、灵活、高效的命令参数解析器, 并且不局限于解析命令式字符串。 - -该插件提供了一类新的事件响应器辅助函数 `on_alconna`,以及 `AlconnaResult` 等依赖注入函数。 - -基于 `Alconna` 的特性,该插件同时提供了一系列便捷的消息段标注。 -标注可用于在 `Alconna` 中匹配消息中除 text 外的其他消息段,也可用于快速创建各适配器下的消息段。所有标注位于 `nonebot_plugin_alconna.adapters` 中。 - -该插件同时通过提供 `UniMessage` (通用消息模型) 实现了**跨平台接收和发送消息**的功能。 - -详情请阅读最佳实践中的 [命令解析拓展](../best-practice/alconna/README.mdx) 章节。 diff --git a/website/versioned_docs/version-2.3.2/advanced/plugin-info.md b/website/versioned_docs/version-2.3.2/advanced/plugin-info.md deleted file mode 100644 index 5f45dc7d45fe..000000000000 --- a/website/versioned_docs/version-2.3.2/advanced/plugin-info.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -sidebar_position: 2 -description: 填写与获取插件相关的信息 - -options: - menu: - - category: advanced - weight: 30 ---- - -# 插件信息 - -NoneBot 是一个插件化的框架,可以通过加载插件来扩展功能。同时,我们也可以通过 NoneBot 的插件系统来获取相关信息,例如插件的名称、使用方法,用于收集帮助信息等。下面我们将介绍如何为插件添加元数据,以及如何获取插件信息。 - -## 插件元数据 - -在 NoneBot 中,插件 [`Plugin`](../api/plugin/model.md#Plugin) 对象中存储了插件系统所需要的一系列信息。包括插件的索引名称、插件模块、插件中的事件响应器、插件父子关系等。通常,只有插件开发者才需要关心这些信息,而插件使用者或者机器人用户想要看到的是插件使用方法等帮助信息。因此,我们可以为插件添加插件元数据 `PluginMetadata`,它允许插件开发者为插件添加一些额外的信息。这些信息编写于插件模块的顶层,可以直接通过源码查看,或者通过 NoneBot 插件系统获取收集到的信息,通过其他方式发送给机器人用户等。 - -现在,假设我们有一个插件 `example`, 它的模块结构如下: - -```tree {4-6} title=Project -📦 awesome-bot -├── 📂 awesome_bot -│ └── 📂 plugins -| └── 📂 example -| ├── 📜 __init__.py -| └── 📜 config.py -├── 📜 pyproject.toml -└── 📜 README.md -``` - -我们需要在插件顶层模块 `example/__init__.py` 中添加插件元数据,如下所示: - -```python {1,5-12} title=example/__init__.py -from nonebot.plugin import PluginMetadata - -from .config import Config - -__plugin_meta__ = PluginMetadata( - name="示例插件", - description="这是一个示例插件", - usage="没什么用", - type="application", - config=Config, - extra={}, -) -``` - -我们可以看到,插件元数据 `PluginMetadata` 有三个基本属性:插件名称、插件描述、插件使用方法。除此之外,还有几个可选的属性(具体填写见[发布插件](../developer/plugin-publishing.mdx#填写插件元数据)章节): - -- `type`:插件类别,发布插件必填。当前有效类别有:`library`(为其他插件编写提供功能),`application`(向机器人用户提供功能); -- `homepage`:插件项目主页,发布插件必填; -- `config`:插件的[配置类](../appendices/config.mdx#插件配置),如无配置类可不填; -- `supported_adapters`:支持的适配器模块名集合,若插件可以保证兼容所有适配器(即仅使用基本适配器功能)可不填写; -- `extra`:一个字典,可以用于存储任意信息。其他插件可以通过约定 `extra` 字典的键名来达成收集某些特殊信息的目的。 - -请注意,这里的**插件名称**是供使用者或机器人用户查看的,与插件索引名称无关。**插件索引名称(插件模块名称)**仅用于 NoneBot 插件系统**内部索引**。 - -## 获取插件信息 - -NoneBot 提供了多种获取插件对象的方法,例如获取当前所有已导入的插件: - -```python -import nonebot - -plugins: set[Plugin] = nonebot.get_loaded_plugins() -``` - -也可以通过插件索引名称获取插件对象: - -```python -import nonebot - -plugin: Plugin | None = nonebot.get_plugin("example") -``` - -或者通过模块路径获取插件对象: - -```python -import nonebot - -plugin: Plugin | None = nonebot.get_plugin_by_module_name("awesome_bot.plugins.example") -``` - -如果需要获取所有当前声明的插件名称(可能还未加载),可以使用 `get_available_plugin_names` 函数: - -```python -import nonebot - -plugin_names: set[str] = nonebot.get_available_plugin_names() -``` - -插件对象 `Plugin` 中包含了多个属性: - -- `name`:插件索引名称 -- `module`:插件模块 -- `module_name`:插件模块路径 -- `manager`:插件管理器 -- `matcher`:插件中定义的事件响应器 -- `parent_plugin`:插件的父插件 -- `sub_plugins`:插件的子插件集合 -- `metadata`:插件元数据 - -通过这些属性以及插件元数据,我们就可以收集所需要的插件信息了。 diff --git a/website/versioned_docs/version-2.3.2/advanced/plugin-nesting.md b/website/versioned_docs/version-2.3.2/advanced/plugin-nesting.md deleted file mode 100644 index 0a306d280ca9..000000000000 --- a/website/versioned_docs/version-2.3.2/advanced/plugin-nesting.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -sidebar_position: 3 -description: 编写与加载嵌套插件 - -options: - menu: - - category: advanced - weight: 40 ---- - -# 嵌套插件 - -NoneBot 支持嵌套插件,即一个插件可以包含其他插件。通过这种方式,我们可以将一个大型插件拆分成多个功能子插件,使得插件更加清晰、易于维护。我们可以直接在插件中使用 NoneBot 加载插件的方法来加载子插件。 - -## 创建嵌套插件 - -我们可以在使用 `nb-cli` 命令[创建插件](../tutorial/create-plugin.md#创建插件)时,选择直接通过模板创建一个嵌套插件: - -```bash -$ nb plugin create -[?] 插件名称: parent -[?] 使用嵌套插件? (y/N) Y -[?] 输出目录: awesome_bot/plugins -``` - -或者使用 `nb plugin create --sub-plugin` 选项直接创建一个嵌套插件。 - -## 已有插件 - -如果你已经有一个插件,想要在其中嵌套加载子插件,可以在插件的 `__init__.py` 中添加如下代码: - -```python title=parent/__init__.py -import nonebot -from pathlib import Path - -sub_plugins = nonebot.load_plugins( - str(Path(__file__).parent.joinpath("plugins").resolve()) -) -``` - -这样,`parent` 插件就会加载 `parent/plugins` 目录下的所有插件。NoneBot 会正确识别这些插件的父子关系,你可以在 `parent` 的插件信息中看到这些子插件的信息,也可以在子插件信息中看到它们的父插件信息。 diff --git a/website/versioned_docs/version-2.3.2/advanced/requiring.md b/website/versioned_docs/version-2.3.2/advanced/requiring.md deleted file mode 100644 index 1a9fe4b072d7..000000000000 --- a/website/versioned_docs/version-2.3.2/advanced/requiring.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -sidebar_position: 4 -description: 使用其他插件提供的功能 - -options: - menu: - - category: advanced - weight: 50 ---- - -# 跨插件访问 - -NoneBot 插件化系统的设计使得插件之间可以功能独立、各司其职,我们可以更好地维护和扩展插件。但是,有时候我们可能需要在不同插件之间调用功能。NoneBot 生态中就有一类插件,它们专为其他插件提供功能支持,如:[定时任务插件](../best-practice/scheduler.md)、[数据存储插件](../best-practice/data-storing.md)等。这时候我们就需要在插件之间进行跨插件访问。 - -## 插件跟踪 - -由于 NoneBot 插件系统通过 [Import Hooks](https://docs.python.org/3/reference/import.html#import-hooks) 的方式实现插件加载与跟踪管理,因此我们**不能**在 NoneBot 跟踪插件前进行模块 import,这会导致插件加载失败。即,我们不能在使用 NoneBot 提供的加载插件方法前,直接使用 `import` 语句导入插件。 - -对于在项目目录下的插件,我们通常直接使用 `load_from_toml` 等方法一次性加载所有插件。由于这些插件已经被声明,即便插件导入顺序不同,NoneBot 也能正确跟踪插件。此时,我们不需要对跨插件访问进行特殊处理。但当我们使用了外部插件,如果没有事先声明或加载插件,NoneBot 并不会将其当作插件进行跟踪,可能会出现意料之外的错误出现。 - -简单来说,我们必须在 `import` 外部插件之前,确保依赖的外部插件已经被声明或加载。 - -## 插件依赖声明 - -NoneBot 提供了一种方法来确保我们依赖的插件已经被正确加载,即使用 `require` 函数。通过 `require` 函数,我们可以在当前插件中声明依赖的插件,NoneBot 会在加载当前插件时,检查依赖的插件是否已经被加载,如果没有,会尝试优先加载依赖的插件。 - -假设我们有一个插件 `a` 依赖于插件 `b`,我们可以在插件 `a` 中使用 `require` 函数声明其依赖于插件 `b`: - -```python {3} title=a/__init__.py -from nonebot import require - -require("b") - -from b import some_function -``` - -其中,`require` 函数的参数为插件索引名称或者外部插件的模块名称。在完成依赖声明后,我们可以在插件 `a` 中直接导入插件 `b` 所提供的功能。 diff --git a/website/versioned_docs/version-2.3.2/advanced/routing.md b/website/versioned_docs/version-2.3.2/advanced/routing.md deleted file mode 100644 index efa1ac55925d..000000000000 --- a/website/versioned_docs/version-2.3.2/advanced/routing.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -sidebar_position: 9 -description: 添加服务端路由规则 - -options: - menu: - - category: advanced - weight: 100 ---- - -# 添加路由 - -在[驱动器](./driver.md)一节中,我们了解了驱动器的两种类型。既然驱动器可以作为服务端运行,那么我们就可以向驱动器添加路由规则,从而实现自定义的 API 接口等功能。在添加路由规则时,我们需要注意驱动器的类型,详情可以参考[选择驱动器](./driver.md#配置驱动器)。 - -NoneBot 中,我们可以通过两种途径向 ASGI 驱动器添加路由规则: - -1. 通过 NoneBot 的兼容层建立路由规则。 -2. 直接向 ASGI 应用添加路由规则。 - -这两种途径各有优劣,前者可以在各种服务端型驱动器下运行,但并不能直接使用 ASGI 应用框架提供的特性与功能;后者直接使用 ASGI 应用,更自由、功能完整,但只能在特定类型驱动器下运行。 - -在向驱动器添加路由规则时,我们需要注意驱动器是否为服务端类型,我们可以通过以下方式判断: - -```python -from nonebot import get_driver -from nonebot.drivers import ASGIMixin - -# highlight-next-line -can_use = isinstance(get_driver(), ASGIMixin) -``` - -## 通过兼容层添加路由 - -NoneBot 兼容层定义了两个数据类 `HTTPServerSetup` 和 `WebSocketServerSetup`,分别用于定义 HTTP 服务端和 WebSocket 服务端的路由规则。 - -### HTTP 路由 - -`HTTPServerSetup` 具有四个属性: - -- `path`:路由路径,不支持特殊占位表达式。类型为 `URL`。 -- `method`:请求方法。类型为 `str`。 -- `name`:路由名称,不可重复。类型为 `str`。 -- `handle_func`:路由处理函数。类型为 `Callable[[Request], Awaitable[Response]]`。 - -例如,我们添加一个 `/hello` 的路由,当请求方法为 `GET` 时,返回 `200 OK` 以及返回体信息: - -```python -from nonebot import get_driver -from nonebot.drivers import URL, Request, Response, ASGIMixin, HTTPServerSetup - -async def hello(request: Request) -> Response: - return Response(200, content="Hello, world!") - -if isinstance((driver := get_driver()), ASGIMixin): - driver.setup_http_server( - HTTPServerSetup( - path=URL("/hello"), - method="GET", - name="hello", - handle_func=hello, - ) - ) -``` - -对于 `Request` 和 `Response` 的详细信息,可以参考 [API 文档](../api/drivers/index.md)。 - -### WebSocket 路由 - -`WebSocketServerSetup` 具有三个属性: - -- `path`:路由路径,不支持特殊占位表达式。类型为 `URL`。 -- `name`:路由名称,不可重复。类型为 `str`。 -- `handle_func`:路由处理函数。类型为 `Callable[[WebSocket], Awaitable[Any]]`。 - -例如,我们添加一个 `/ws` 的路由,发送所有接收到的数据: - -```python -from nonebot import get_driver -from nonebot.drivers import URL, ASGIMixin, WebSocket, WebSocketServerSetup - -async def ws_handler(ws: WebSocket): - await ws.accept() - try: - while True: - data = await ws.receive() - await ws.send(data) - except WebSocketClosed as e: - # handle closed - ... - finally: - with contextlib.suppress(Exception): - await websocket.close() - # do some cleanup - -if isinstance((driver := get_driver()), ASGIMixin): - driver.setup_websocket_server( - WebSocketServerSetup( - path=URL("/ws"), - name="ws", - handle_func=ws_handler, - ) - ) -``` - -对于 `WebSocket` 的详细信息,可以参考 [API 文档](../api/drivers/index.md)。 - -## 使用 ASGI 应用添加路由 - -### 获取 ASGI 应用 - -NoneBot 服务端类型的驱动器具有两个属性 `server_app` 和 `asgi`,分别对应驱动框架应用和 ASGI 应用。通常情况下,这两个应用是同一个对象。我们可以通过 `get_app()` 方法快速获取: - -```python -import nonebot - -app = nonebot.get_app() -asgi = nonebot.get_asgi() -``` - -### 添加路由规则 - -在获取到了 ASGI 应用后,我们就可以直接使用 ASGI 应用框架提供的功能来添加路由规则了。这里我们以 [FastAPI](./driver.md#fastapi默认) 为例,演示如何添加路由规则。 - -在下面的代码中,我们添加了一个 `GET` 类型的 `/api` 路由,具体方法参考 [FastAPI 文档](https://fastapi.tiangolo.com/)。 - -```python -import nonebot -from fastapi import FastAPI - -app: FastAPI = nonebot.get_app() - -@app.get("/api") -async def custom_api(): - return {"message": "Hello, world!"} -``` diff --git a/website/versioned_docs/version-2.3.2/advanced/runtime-hook.md b/website/versioned_docs/version-2.3.2/advanced/runtime-hook.md deleted file mode 100644 index 6e3c1c414733..000000000000 --- a/website/versioned_docs/version-2.3.2/advanced/runtime-hook.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -sidebar_position: 8 -description: 在特定的生命周期中执行代码 - -options: - menu: - - category: advanced - weight: 90 ---- - -# 钩子函数 - -> [钩子编程](https://zh.wikipedia.org/wiki/%E9%92%A9%E5%AD%90%E7%BC%96%E7%A8%8B)(hooking),也称作“挂钩”,是计算机程序设计术语,指通过拦截软件模块间的函数调用、消息传递、事件传递来修改或扩展操作系统、应用程序或其他软件组件的行为的各种技术。处理被拦截的函数调用、事件、消息的代码,被称为钩子(hook)。 - -在 NoneBot 中有一系列预定义的钩子函数,可以分为两类:**全局钩子函数**和**事件处理钩子函数**,这些钩子函数可以用装饰器的形式来使用。 - -## 全局钩子函数 - -全局钩子函数是指 NoneBot 针对其本身运行过程的钩子函数。 - -这些钩子函数是由驱动器来运行的,故需要先[获得全局驱动器](./driver.md#获取驱动器)。 - -### 启动准备 - -这个钩子函数会在 NoneBot 启动时运行。很多时候,我们并不希望在模块被导入时就执行一些耗时操作,如:连接数据库,这时候我们可以在这个钩子函数中进行这些操作。 - -```python -from nonebot import get_driver - -driver = get_driver() - -@driver.on_startup -async def do_something(): - pass -``` - -### 终止处理 - -这个钩子函数会在 NoneBot 终止时运行。我们可以在这个钩子函数中进行一些清理工作,如:关闭数据库连接。 - -```python -from nonebot import get_driver - -driver = get_driver() - -@driver.on_shutdown -async def do_something(): - pass -``` - -### Bot 连接处理 - -这个钩子函数会在任何协议适配器连接 `Bot` 对象至 NoneBot 时运行。支持依赖注入,可以直接注入 `Bot` 对象。 - -```python -from nonebot import get_driver - -driver = get_driver() - -@driver.on_bot_connect -async def do_something(bot: Bot): - pass -``` - -### Bot 断开处理 - -这个钩子函数会在 `Bot` 断开与 NoneBot 的连接时运行。支持依赖注入,可以直接注入 `Bot` 对象。 - -```python -from nonebot import get_driver - -driver = get_driver() - -@driver.on_bot_disconnect -async def do_something(bot: Bot): - pass -``` - -## 事件处理钩子函数 - -这些钩子函数指的是影响 NoneBot 进行**事件处理**的函数, 这些函数可以跟普通的事件处理函数一样接受相应的参数。 - -### 事件预处理 - -这个钩子函数会在 NoneBot 接收到新的事件时运行。支持依赖注入,可以注入 `Bot` 对象、事件、会话状态。在这个钩子函数内抛出 `nonebot.exception.IgnoredException` 会使 NoneBot 忽略该事件。 - -```python -from nonebot.exception import IgnoredException -from nonebot.message import event_preprocessor - -@event_preprocessor -async def do_something(event: Event): - if not event.is_tome(): - raise IgnoredException("some reason") -``` - -### 事件后处理 - -这个钩子函数会在 NoneBot 处理事件完成后运行。支持依赖注入,可以注入 `Bot` 对象、事件、会话状态。 - -```python -from nonebot.message import event_postprocessor - -@event_postprocessor -async def do_something(event: Event): - pass -``` - -### 运行预处理 - -这个钩子函数会在 NoneBot 运行事件响应器前运行。支持依赖注入,可以注入 `Bot` 对象、事件、事件响应器、会话状态。在这个钩子函数内抛出 `nonebot.exception.IgnoredException` 也会使 NoneBot 忽略本次运行。 - -```python -from nonebot.message import run_preprocessor -from nonebot.exception import IgnoredException - -@run_preprocessor -async def do_something(event: Event, matcher: Matcher): - if not event.is_tome(): - raise IgnoredException("some reason") -``` - -### 运行后处理 - -这个钩子函数会在 NoneBot 运行事件响应器后运行。支持依赖注入,可以注入 `Bot` 对象、事件、事件响应器、会话状态、运行中产生的异常。 - -```python -from nonebot.message import run_postprocessor - -@run_postprocessor -async def do_something(event: Event, matcher: Matcher, exception: Optional[Exception]): - pass -``` - -### 平台接口调用钩子 - -这个钩子函数会在 `Bot` 对象调用平台接口时运行。在这个钩子函数中,我们可以通过引起 `MockApiException` 异常来阻止 `Bot` 对象调用平台接口并返回指定的结果。 - -```python -from nonebot.adapters import Bot -from nonebot.exception import MockApiException - -@Bot.on_calling_api -async def handle_api_call(bot: Bot, api: str, data: Dict[str, Any]): - if api == "send_msg": - raise MockApiException(result={"message_id": 123}) -``` - -### 平台接口调用后钩子 - -这个钩子函数会在 `Bot` 对象调用平台接口后运行。在这个钩子函数中,我们可以通过引起 `MockApiException` 异常来忽略平台接口返回的结果并返回指定的结果。 - -```python -from nonebot.adapters import Bot -from nonebot.exception import MockApiException - -@Bot.on_called_api -async def handle_api_result( - bot: Bot, exception: Optional[Exception], api: str, data: Dict[str, Any], result: Any -): - if not exception and api == "send_msg": - raise MockApiException(result={**result, "message_id": 123}) -``` diff --git a/website/versioned_docs/version-2.3.2/advanced/session-updating.md b/website/versioned_docs/version-2.3.2/advanced/session-updating.md deleted file mode 100644 index f804ba964c22..000000000000 --- a/website/versioned_docs/version-2.3.2/advanced/session-updating.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -sidebar_position: 7 -description: 控制会话响应对象 - -options: - menu: - - category: advanced - weight: 80 ---- - -# 会话更新 - -在 NoneBot 中,在某个事件响应器对事件响应后,即是进入了会话状态,会话状态会持续到整个事件响应流程结束。会话过程中,机器人可以与用户进行多次交互。每次需要等待用户事件时,NoneBot 将会复制一个新的临时事件响应器,并更新该事件响应器使其响应当前会话主体的消息,这个过程称为会话更新。 - -会话更新分为两部分:**更新[事件响应器类型](./matcher.md#事件响应器类型)**和**更新[事件触发权限](./matcher.md#事件触发权限)**。 - -## 更新事件响应器类型 - -通常情况下,与机器人用户进行的会话都是通过消息事件进行的,因此会话更新后的默认响应事件类型为 `message`。如果希望接收一个特定类型的消息,比如 `notice` 等,我们需要自定义响应事件类型更新函数。响应事件类型更新函数是一个 `Dependent`,可以使用依赖注入。 - -```python {3-5} -foo = on_message() - -@foo.type_updater -async def _() -> str: - return "notice" -``` - -在注册了上述响应事件类型更新函数后,当我们需要等待用户事件时,将只会响应 `notice` 类型的事件。如果希望在会话过程中的不同阶段响应不同类型的事件,我们就需要使用更复杂的逻辑来更新响应事件类型(如:根据会话状态),这里将不再展示。 - -## 更新事件触发权限 - -会话通常是由机器人与用户进行的一对一交互,因此会话更新后的默认触发权限为当前事件的会话 ID。这个会话 ID 由协议适配器生成,通常由用户 ID 和群 ID 等组成。如果希望实现更复杂的会话功能(如:多用户同时参与的会话),我们需要自定义触发权限更新函数。触发权限更新函数是一个 `Dependent`,可以使用依赖注入。 - -```python {5-7} -from nonebot.permission import User - -foo = on_message() - -@foo.permission_updater -async def _(event: Event, matcher: Matcher) -> Permission: - return Permission(User.from_event(event, perm=matcher.permission)) -``` - -上述权限更新函数是默认的权限更新函数,它将会话的触发权限更新为当前事件的会话 ID。如果我们希望响应多个用户的消息,我们可以如下修改: - -```python {5-7} -from nonebot.permission import USER - -foo = on_message() - -@foo.permission_updater -async def _(matcher: Matcher) -> Permission: - return USER("session1", "session2", perm=matcher.permission) -``` - -请注意,此处为全大写字母的 `USER` 权限,它可以匹配多个会话 ID。通过这种方式,我们可以实现多用户同时参与的会话。 - -我们已经了解了如何控制会话的更新,相信你已经能够实现更复杂的会话功能了,例如多人小游戏等等。欢迎将你的作品分享到[插件商店](/store/plugins)。 diff --git a/website/versioned_docs/version-2.3.2/api/.gitkeep b/website/versioned_docs/version-2.3.2/api/.gitkeep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/website/versioned_docs/version-2.3.2/api/adapters/_category_.json b/website/versioned_docs/version-2.3.2/api/adapters/_category_.json deleted file mode 100644 index a2253e3dcae3..000000000000 --- a/website/versioned_docs/version-2.3.2/api/adapters/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "position": 15 -} diff --git a/website/versioned_docs/version-2.3.2/api/adapters/index.md b/website/versioned_docs/version-2.3.2/api/adapters/index.md deleted file mode 100644 index 92819fd750e0..000000000000 --- a/website/versioned_docs/version-2.3.2/api/adapters/index.md +++ /dev/null @@ -1,878 +0,0 @@ ---- -sidebar_position: 0 -description: nonebot.adapters 模块 ---- - -# nonebot.adapters - -本模块定义了协议适配基类,各协议请继承以下基类。 - -使用 [Driver.register_adapter](../drivers/index.md#Driver-register-adapter) 注册适配器。 - -## _abstract class_ `Bot(adapter, self_id)` {#Bot} - -- **说明** - - Bot 基类。 - - 用于处理上报消息,并提供 API 调用接口。 - -- **参数** - - - `adapter` ([Adapter](#Adapter)): 协议适配器实例 - - - `self_id` (str): 机器人 ID - -### _instance-var_ `adapter` {#Bot-adapter} - -- **类型:** [Adapter](#Adapter) - -- **说明:** 协议适配器实例 - -### _instance-var_ `self_id` {#Bot-self-id} - -- **类型:** str - -- **说明:** 机器人 ID - -### _property_ `type` {#Bot-type} - -- **类型:** str - -- **说明:** 协议适配器名称 - -### _property_ `config` {#Bot-config} - -- **类型:** [Config](../config.md#Config) - -- **说明:** 全局 NoneBot 配置 - -### _async method_ `call_api(api, **data)` {#Bot-call-api} - -- **说明:** 调用机器人 API 接口,可以通过该函数或直接通过 bot 属性进行调用 - -- **参数** - - - `api` (str): API 名称 - - - `**data` (Any): API 数据 - -- **返回** - - - Any - -- **用法** - - ```python - await bot.call_api("send_msg", message="hello world") - await bot.send_msg(message="hello world") - ``` - -### _abstract async method_ `send(event, message, **kwargs)` {#Bot-send} - -- **说明:** 调用机器人基础发送消息接口 - -- **参数** - - - `event` ([Event](#Event)): 上报事件 - - - `message` (str | [Message](#Message) | [MessageSegment](#MessageSegment)): 要发送的消息 - - - `**kwargs` (Any): 任意额外参数 - -- **返回** - - - Any - -### _classmethod_ `on_calling_api(func)` {#Bot-on-calling-api} - -- **说明** - - 调用 api 预处理。 - - 钩子函数参数: - - - bot: 当前 bot 对象 - - api: 调用的 api 名称 - - data: api 调用的参数字典 - -- **参数** - - - `func` ([T_CallingAPIHook](../typing.md#T-CallingAPIHook)) - -- **返回** - - - [T_CallingAPIHook](../typing.md#T-CallingAPIHook) - -### _classmethod_ `on_called_api(func)` {#Bot-on-called-api} - -- **说明** - - 调用 api 后处理。 - - 钩子函数参数: - - - bot: 当前 bot 对象 - - exception: 调用 api 时发生的错误 - - api: 调用的 api 名称 - - data: api 调用的参数字典 - - result: api 调用的返回 - -- **参数** - - - `func` ([T_CalledAPIHook](../typing.md#T-CalledAPIHook)) - -- **返回** - - - [T_CalledAPIHook](../typing.md#T-CalledAPIHook) - -## _abstract class_ `Event()` {#Event} - -- **说明:** Event 基类。提供获取关键信息的方法,其余信息可直接获取。 - -- **参数** - - auto - -### _abstract method_ `get_type()` {#Event-get-type} - -- **说明:** 获取事件类型的方法,类型通常为 NoneBot 内置的四种类型。 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract method_ `get_event_name()` {#Event-get-event-name} - -- **说明:** 获取事件名称的方法。 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract method_ `get_event_description()` {#Event-get-event-description} - -- **说明:** 获取事件描述的方法,通常为事件具体内容。 - -- **参数** - - empty - -- **返回** - - - str - -### _method_ `get_log_string()` {#Event-get-log-string} - -- **说明** - - 获取事件日志信息的方法。 - - 通常你不需要修改这个方法,只有当希望 NoneBot 隐藏该事件日志时, - 可以抛出 `NoLogException` 异常。 - -- **参数** - - empty - -- **返回** - - - str - -- **异常** - - - NoLogException: 希望 NoneBot 隐藏该事件日志 - -### _abstract method_ `get_user_id()` {#Event-get-user-id} - -- **说明:** 获取事件主体 id 的方法,通常是用户 id 。 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract method_ `get_session_id()` {#Event-get-session-id} - -- **说明:** 获取会话 id 的方法,用于判断当前事件属于哪一个会话, 通常是用户 id、群组 id 组合。 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract method_ `get_message()` {#Event-get-message} - -- **说明:** 获取事件消息内容的方法。 - -- **参数** - - empty - -- **返回** - - - [Message](#Message) - -### _method_ `get_plaintext()` {#Event-get-plaintext} - -- **说明** - - 获取消息纯文本的方法。 - - 通常不需要修改,默认通过 `get_message().extract_plain_text` 获取。 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract method_ `is_tome()` {#Event-is-tome} - -- **说明:** 获取事件是否与机器人有关的方法。 - -- **参数** - - empty - -- **返回** - - - bool - -## _abstract class_ `Adapter(driver, **kwargs)` {#Adapter} - -- **说明** - - 协议适配器基类。 - - 通常,在 Adapter 中编写协议通信相关代码,如: 建立通信连接、处理接收与发送 data 等。 - -- **参数** - - - `driver` ([Driver](../drivers/index.md#Driver)): [Driver](../drivers/index.md#Driver) 实例 - - - `**kwargs` (Any): 其他由 [Driver.register_adapter](../drivers/index.md#Driver-register-adapter) 传入的额外参数 - -### _instance-var_ `driver` {#Adapter-driver} - -- **类型:** [Driver](../drivers/index.md#Driver) - -- **说明:** 实例 - -### _instance-var_ `bots` {#Adapter-bots} - -- **类型:** dict[str, [Bot](#Bot)] - -- **说明:** 本协议适配器已建立连接的 [Bot](#Bot) 实例 - -### _abstract classmethod_ `get_name()` {#Adapter-get-name} - -- **说明:** 当前协议适配器的名称 - -- **参数** - - empty - -- **返回** - - - str - -### _property_ `config` {#Adapter-config} - -- **类型:** [Config](../config.md#Config) - -- **说明:** 全局 NoneBot 配置 - -### _method_ `bot_connect(bot)` {#Adapter-bot-connect} - -- **说明** - - 告知 NoneBot 建立了一个新的 [Bot](#Bot) 连接。 - - 当有新的 [Bot](#Bot) 实例连接建立成功时调用。 - -- **参数** - - - `bot` ([Bot](#Bot)): [Bot](#Bot) 实例 - -- **返回** - - - None - -### _method_ `bot_disconnect(bot)` {#Adapter-bot-disconnect} - -- **说明** - - 告知 NoneBot [Bot](#Bot) 连接已断开。 - - 当有 [Bot](#Bot) 实例连接断开时调用。 - -- **参数** - - - `bot` ([Bot](#Bot)): [Bot](#Bot) 实例 - -- **返回** - - - None - -### _method_ `setup_http_server(setup)` {#Adapter-setup-http-server} - -- **说明:** 设置一个 HTTP 服务器路由配置 - -- **参数** - - - `setup` ([HTTPServerSetup](../drivers/index.md#HTTPServerSetup)) - -- **返回** - - - untyped - -### _method_ `setup_websocket_server(setup)` {#Adapter-setup-websocket-server} - -- **说明:** 设置一个 WebSocket 服务器路由配置 - -- **参数** - - - `setup` ([WebSocketServerSetup](../drivers/index.md#WebSocketServerSetup)) - -- **返回** - - - untyped - -### _async method_ `request(setup)` {#Adapter-request} - -- **说明:** 进行一个 HTTP 客户端请求 - -- **参数** - - - `setup` ([Request](../drivers/index.md#Request)) - -- **返回** - - - [Response](../drivers/index.md#Response) - -### _method_ `websocket(setup)` {#Adapter-websocket} - -- **说明:** 建立一个 WebSocket 客户端连接请求 - -- **参数** - - - `setup` ([Request](../drivers/index.md#Request)) - -- **返回** - - - AsyncGenerator[[WebSocket](../drivers/index.md#WebSocket), None] - -### _method_ `on_ready(func)` {#Adapter-on-ready} - -- **参数** - - - `func` (LIFESPAN_FUNC) - -- **返回** - - - LIFESPAN_FUNC - -## _abstract class_ `Message()` {#Message} - -- **说明:** 消息序列 - -- **参数** - - - `message`: 消息内容 - -### _classmethod_ `template(format_string)` {#Message-template} - -- **说明** - - 创建消息模板。 - - 用法和 `str.format` 大致相同,支持以 `Message` 对象作为消息模板并输出消息对象。 - 并且提供了拓展的格式化控制符, - 可以通过该消息类型的 `MessageSegment` 工厂方法创建消息。 - -- **参数** - - - `format_string` (str | TM): 格式化模板 - -- **返回** - - - [MessageTemplate](#MessageTemplate)[Self]: 消息格式化器 - -### _abstract classmethod_ `get_segment_class()` {#Message-get-segment-class} - -- **说明:** 获取消息段类型 - -- **参数** - - empty - -- **返回** - - - type[TMS] - -### _abstract staticmethod_ `_construct(msg)` {#Message--construct} - -- **说明:** 构造消息数组 - -- **参数** - - - `msg` (str) - -- **返回** - - - Iterable[TMS] - -### _method_ `__getitem__(args)` {#Message---getitem--} - -- **重载** - - **1.** `(args) -> Self` - - - **参数** - - - `args` (str): 消息段类型 - - - **返回** - - - Self: 所有类型为 `args` 的消息段 - - **2.** `(args) -> TMS` - - - **参数** - - - `args` (tuple[str, int]): 消息段类型和索引 - - - **返回** - - - TMS: 类型为 `args[0]` 的消息段第 `args[1]` 个 - - **3.** `(args) -> Self` - - - **参数** - - - `args` (tuple[str, slice]): 消息段类型和切片 - - - **返回** - - - Self: 类型为 `args[0]` 的消息段切片 `args[1]` - - **4.** `(args) -> TMS` - - - **参数** - - - `args` (int): 索引 - - - **返回** - - - TMS: 第 `args` 个消息段 - - **5.** `(args) -> Self` - - - **参数** - - - `args` (slice): 切片 - - - **返回** - - - Self: 消息切片 `args` - -### _method_ `__contains__(value)` {#Message---contains--} - -- **说明:** 检查消息段是否存在 - -- **参数** - - - `value` (TMS | str): 消息段或消息段类型 - -- **返回** - - - bool: 消息内是否存在给定消息段或给定类型的消息段 - -### _method_ `has(value)` {#Message-has} - -- **说明:** 与 [`__contains__`](#Message---contains--) 相同 - -- **参数** - - - `value` (TMS | str) - -- **返回** - - - bool - -### _method_ `index(value, *args)` {#Message-index} - -- **说明:** 索引消息段 - -- **参数** - - - `value` (TMS | str): 消息段或者消息段类型 - - - `*args` (SupportsIndex) - - - `arg`: start 与 end - -- **返回** - - - int: 索引 index - -- **异常** - - - ValueError: 消息段不存在 - -### _method_ `get(type_, count=None)` {#Message-get} - -- **说明:** 获取指定类型的消息段 - -- **参数** - - - `type_` (str): 消息段类型 - - - `count` (int | None): 获取个数 - -- **返回** - - - Self: 构建的新消息 - -### _method_ `count(value)` {#Message-count} - -- **说明:** 计算指定消息段的个数 - -- **参数** - - - `value` (TMS | str): 消息段或消息段类型 - -- **返回** - - - int: 个数 - -### _method_ `only(value)` {#Message-only} - -- **说明:** 检查消息中是否仅包含指定消息段 - -- **参数** - - - `value` (TMS | str): 指定消息段或消息段类型 - -- **返回** - - - bool: 是否仅包含指定消息段 - -### _method_ `append(obj)` {#Message-append} - -- **说明:** 添加一个消息段到消息数组末尾。 - -- **参数** - - - `obj` (str | TMS): 要添加的消息段 - -- **返回** - - - Self - -### _method_ `extend(obj)` {#Message-extend} - -- **说明:** 拼接一个消息数组或多个消息段到消息数组末尾。 - -- **参数** - - - `obj` (Self | Iterable[TMS]): 要添加的消息数组 - -- **返回** - - - Self - -### _method_ `join(iterable)` {#Message-join} - -- **说明:** 将多个消息连接并将自身作为分割 - -- **参数** - - - `iterable` (Iterable[TMS | Self]): 要连接的消息 - -- **返回** - - - Self: 连接后的消息 - -### _method_ `copy()` {#Message-copy} - -- **说明:** 深拷贝消息 - -- **参数** - - empty - -- **返回** - - - Self - -### _method_ `include(*types)` {#Message-include} - -- **说明:** 过滤消息 - -- **参数** - - - `*types` (str): 包含的消息段类型 - -- **返回** - - - Self: 新构造的消息 - -### _method_ `exclude(*types)` {#Message-exclude} - -- **说明:** 过滤消息 - -- **参数** - - - `*types` (str): 不包含的消息段类型 - -- **返回** - - - Self: 新构造的消息 - -### _method_ `extract_plain_text()` {#Message-extract-plain-text} - -- **说明:** 提取消息内纯文本消息 - -- **参数** - - empty - -- **返回** - - - str - -## _abstract class_ `MessageSegment()` {#MessageSegment} - -- **说明:** 消息段基类 - -- **参数** - - auto - -### _instance-var_ `type` {#MessageSegment-type} - -- **类型:** str - -- **说明:** 消息段类型 - -### _class-var_ `data` {#MessageSegment-data} - -- **类型:** dict[str, Any] - -- **说明:** 消息段数据 - -### _abstract classmethod_ `get_message_class()` {#MessageSegment-get-message-class} - -- **说明:** 获取消息数组类型 - -- **参数** - - empty - -- **返回** - - - type[TM] - -### _abstract method_ `__str__()` {#MessageSegment---str--} - -- **说明:** 该消息段所代表的 str,在命令匹配部分使用 - -- **参数** - - empty - -- **返回** - - - str - -### _method_ `__add__(other)` {#MessageSegment---add--} - -- **参数** - - - `other` (str | TMS | Iterable[TMS]) - -- **返回** - - - TM - -### _method_ `get(key, default=None)` {#MessageSegment-get} - -- **参数** - - - `key` (str) - - - `default` (Any) - -- **返回** - - - untyped - -### _method_ `keys()` {#MessageSegment-keys} - -- **参数** - - empty - -- **返回** - - - untyped - -### _method_ `values()` {#MessageSegment-values} - -- **参数** - - empty - -- **返回** - - - untyped - -### _method_ `items()` {#MessageSegment-items} - -- **参数** - - empty - -- **返回** - - - untyped - -### _method_ `join(iterable)` {#MessageSegment-join} - -- **参数** - - - `iterable` (Iterable[TMS | TM]) - -- **返回** - - - TM - -### _method_ `copy()` {#MessageSegment-copy} - -- **参数** - - empty - -- **返回** - - - Self - -### _abstract method_ `is_text()` {#MessageSegment-is-text} - -- **说明:** 当前消息段是否为纯文本 - -- **参数** - - empty - -- **返回** - - - bool - -## _class_ `MessageTemplate(template, factory=str, private_getattr=False)` {#MessageTemplate} - -- **说明:** 消息模板格式化实现类。 - -- **参数** - - - `template` (str | TM): 模板 - - - `factory` (type[str] | type[TM]): 消息类型工厂,默认为 `str` - - - `private_getattr` (bool): 是否允许在模板中访问私有属性,默认为 `False` - -### _method_ `add_format_spec(spec, name=None)` {#MessageTemplate-add-format-spec} - -- **参数** - - - `spec` (FormatSpecFunc_T) - - - `name` (str | None) - -- **返回** - - - FormatSpecFunc_T - -### _method_ `format(*args, **kwargs)` {#MessageTemplate-format} - -- **说明:** 根据传入参数和模板生成消息对象 - -- **参数** - - - `*args` - - - `**kwargs` - -- **返回** - - - TF - -### _method_ `format_map(mapping)` {#MessageTemplate-format-map} - -- **说明:** 根据传入字典和模板生成消息对象, 在传入字段名不是有效标识符时有用 - -- **参数** - - - `mapping` (Mapping[str, Any]) - -- **返回** - - - TF - -### _method_ `vformat(format_string, args, kwargs)` {#MessageTemplate-vformat} - -- **参数** - - - `format_string` (str) - - - `args` (Sequence[Any]) - - - `kwargs` (Mapping[str, Any]) - -- **返回** - - - TF - -### _method_ `get_field(field_name, args, kwargs)` {#MessageTemplate-get-field} - -- **参数** - - - `field_name` (str) - - - `args` (Sequence[Any]) - - - `kwargs` (Mapping[str, Any]) - -- **返回** - - - tuple[Any, int | str] - -### _method_ `format_field(value, format_spec)` {#MessageTemplate-format-field} - -- **参数** - - - `value` (Any) - - - `format_spec` (str) - -- **返回** - - - Any diff --git a/website/versioned_docs/version-2.3.2/api/compat.md b/website/versioned_docs/version-2.3.2/api/compat.md deleted file mode 100644 index 6e2d5af66d67..000000000000 --- a/website/versioned_docs/version-2.3.2/api/compat.md +++ /dev/null @@ -1,218 +0,0 @@ ---- -sidebar_position: 16 -description: nonebot.compat 模块 ---- - -# nonebot.compat - -本模块为 Pydantic 版本兼容层模块 - -为兼容 Pydantic V1 与 V2 版本,定义了一系列兼容函数与类供使用。 - -## _var_ `Required` {#Required} - -- **类型:** untyped - -- **说明:** Alias of Ellipsis for compatibility with pydantic v1 - -## _library-attr_ `PydanticUndefined` {#PydanticUndefined} - -- **说明:** Pydantic Undefined object - -## _library-attr_ `PydanticUndefinedType` {#PydanticUndefinedType} - -- **说明:** Pydantic Undefined type - -## _var_ `DEFAULT_CONFIG` {#DEFAULT-CONFIG} - -- **类型:** untyped - -- **说明:** Default config for validations - -## _class_ `FieldInfo(default=PydanticUndefined, **kwargs)` {#FieldInfo} - -- **说明:** FieldInfo class with extra property for compatibility with pydantic v1 - -- **参数** - - - `default` (Any) - - - `**kwargs` (Any) - -### _property_ `extra` {#FieldInfo-extra} - -- **类型:** dict[str, Any] - -- **说明** - - Extra data that is not part of the standard pydantic fields. - - For compatibility with pydantic v1. - -## _class_ `ModelField()` {#ModelField} - -- **说明:** ModelField class for compatibility with pydantic v1 - -- **参数** - - auto - -### _instance-var_ `name` {#ModelField-name} - -- **类型:** str - -- **说明:** The name of the field. - -### _instance-var_ `annotation` {#ModelField-annotation} - -- **类型:** Any - -- **说明:** The annotation of the field. - -### _instance-var_ `field_info` {#ModelField-field-info} - -- **类型:** FieldInfo - -- **说明:** The FieldInfo of the field. - -### _classmethod_ `construct(name, annotation, field_info=None)` {#ModelField-construct} - -- **说明:** Construct a ModelField from given infos. - -- **参数** - - - `name` (str) - - - `annotation` (Any) - - - `field_info` (FieldInfo | None) - -- **返回** - - - Self - -### _method_ `get_default()` {#ModelField-get-default} - -- **说明:** Get the default value of the field. - -- **参数** - - empty - -- **返回** - - - Any - -## _def_ `extract_field_info(field_info)` {#extract-field-info} - -- **说明:** Get FieldInfo init kwargs from a FieldInfo instance. - -- **参数** - - - `field_info` (BaseFieldInfo) - -- **返回** - - - dict[str, Any] - -## _def_ `model_field_validate(model_field, value, config=None)` {#model-field-validate} - -- **说明:** Validate the value pass to the field. - -- **参数** - - - `model_field` (ModelField) - - - `value` (Any) - - - `config` (ConfigDict | None) - -- **返回** - - - Any - -## _def_ `model_fields(model)` {#model-fields} - -- **说明:** Get field list of a model. - -- **参数** - - - `model` (type[BaseModel]) - -- **返回** - - - list[ModelField] - -## _def_ `model_config(model)` {#model-config} - -- **说明:** Get config of a model. - -- **参数** - - - `model` (type[BaseModel]) - -- **返回** - - - Any - -## _def_ `model_dump(model, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)` {#model-dump} - -- **参数** - - - `model` (BaseModel) - - - `include` (set[str] | None) - - - `exclude` (set[str] | None) - - - `by_alias` (bool) - - - `exclude_unset` (bool) - - - `exclude_defaults` (bool) - - - `exclude_none` (bool) - -- **返回** - - - dict[str, Any] - -## _def_ `type_validate_python(type_, data)` {#type-validate-python} - -- **说明:** Validate data with given type. - -- **参数** - - - `type_` (type[T]) - - - `data` (Any) - -- **返回** - - - T - -## _def_ `type_validate_json(type_, data)` {#type-validate-json} - -- **说明:** Validate JSON with given type. - -- **参数** - - - `type_` (type[T]) - - - `data` (str | bytes) - -- **返回** - - - T - -## _def_ `custom_validation(class_)` {#custom-validation} - -- **说明:** Use pydantic v1 like validator generator in pydantic v2 - -- **参数** - - - `class_` (type[CVC]) - -- **返回** - - - type[CVC] diff --git a/website/versioned_docs/version-2.3.2/api/config.md b/website/versioned_docs/version-2.3.2/api/config.md deleted file mode 100644 index 5c027282fe35..000000000000 --- a/website/versioned_docs/version-2.3.2/api/config.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -sidebar_position: 1 -description: nonebot.config 模块 ---- - -# nonebot.config - -本模块定义了 NoneBot 本身运行所需的配置项。 - -NoneBot 使用 [`pydantic`](https://pydantic-docs.helpmanual.io/) 以及 -[`python-dotenv`](https://saurabh-kumar.com/python-dotenv/) 来读取配置。 - -配置项需符合特殊格式或 json 序列化格式 -详情见 [`pydantic Field Type`](https://pydantic-docs.helpmanual.io/usage/types/) 文档。 - -## _class_ `Env(_env_file=ENV_FILE_SENTINEL, _env_file_encoding=None, _env_nested_delimiter=None, **values)` {#Env} - -- **说明** - - 运行环境配置。大小写不敏感。 - - 将会从 **环境变量** > **dotenv 配置文件** 的优先级读取环境信息。 - -- **参数** - - - `_env_file` (DOTENV_TYPE | None) - - - `_env_file_encoding` (str | None) - - - `_env_nested_delimiter` (str | None) - - - `**values` (Any) - -### _class-var_ `environment` {#Env-environment} - -- **类型:** str - -- **说明** - - 当前环境名。 - - NoneBot 将从 `.env.{environment}` 文件中加载配置。 - -## _class_ `Config(_env_file=ENV_FILE_SENTINEL, _env_file_encoding=None, _env_nested_delimiter=None, **values)` {#Config} - -- **说明** - - NoneBot 主要配置。大小写不敏感。 - - 除了 NoneBot 的配置项外,还可以自行添加配置项到 `.env.{environment}` 文件中。 - 这些配置将会在 json 反序列化后一起带入 `Config` 类中。 - - 配置方法参考: [配置](https://nonebot.dev/docs/appendices/config) - -- **参数** - - - `_env_file` (DOTENV_TYPE | None) - - - `_env_file_encoding` (str | None) - - - `_env_nested_delimiter` (str | None) - - - `**values` (Any) - -### _class-var_ `driver` {#Config-driver} - -- **类型:** str - -- **说明** - - NoneBot 运行所使用的 `Driver` 。继承自 [Driver](drivers/index.md#Driver) 。 - - 配置格式为 `[:][+[:]]*`。 - - `~` 为 `nonebot.drivers.` 的缩写。 - - 配置方法参考: [配置驱动器](https://nonebot.dev/docs/advanced/driver#%E9%85%8D%E7%BD%AE%E9%A9%B1%E5%8A%A8%E5%99%A8) - -### _class-var_ `host` {#Config-host} - -- **类型:** IPvAnyAddress - -- **说明:** NoneBot [ReverseDriver](drivers/index.md#ReverseDriver) 服务端监听的 IP/主机名。 - -### _class-var_ `port` {#Config-port} - -- **类型:** int - -- **说明:** NoneBot [ReverseDriver](drivers/index.md#ReverseDriver) 服务端监听的端口。 - -### _class-var_ `log_level` {#Config-log-level} - -- **类型:** int | str - -- **说明** - - NoneBot 日志输出等级,可以为 `int` 类型等级或等级名称。 - - 参考 [记录日志](https://nonebot.dev/docs/appendices/log),[loguru 日志等级](https://loguru.readthedocs.io/en/stable/api/logger.html#levels)。 - - :::tip 提示 - 日志等级名称应为大写,如 `INFO`。 - ::: - -- **用法** - - ```conf - LOG_LEVEL=25 - LOG_LEVEL=INFO - ``` - -### _class-var_ `api_timeout` {#Config-api-timeout} - -- **类型:** float | None - -- **说明:** API 请求超时时间,单位: 秒。 - -### _class-var_ `superusers` {#Config-superusers} - -- **类型:** set[str] - -- **说明:** 机器人超级用户。 - -- **用法** - - ```conf - SUPERUSERS=["12345789"] - ``` - -### _class-var_ `nickname` {#Config-nickname} - -- **类型:** set[str] - -- **说明:** 机器人昵称。 - -### _class-var_ `command_start` {#Config-command-start} - -- **类型:** set[str] - -- **说明** - - 命令的起始标记,用于判断一条消息是不是命令。 - - 参考[命令响应规则](https://nonebot.dev/docs/advanced/matcher#command)。 - -- **用法** - - ```conf - COMMAND_START=["/", ""] - ``` - -### _class-var_ `command_sep` {#Config-command-sep} - -- **类型:** set[str] - -- **说明** - - 命令的分隔标记,用于将文本形式的命令切分为元组(实际的命令名)。 - - 参考[命令响应规则](https://nonebot.dev/docs/advanced/matcher#command)。 - -- **用法** - - ```conf - COMMAND_SEP=["."] - ``` - -### _class-var_ `session_expire_timeout` {#Config-session-expire-timeout} - -- **类型:** timedelta - -- **说明:** 等待用户回复的超时时间。 - -- **用法** - - ```conf - SESSION_EXPIRE_TIMEOUT=[-][DD]D[,][HH:MM:]SS[.ffffff] - SESSION_EXPIRE_TIMEOUT=[±]P[DD]DT[HH]H[MM]M[SS]S # ISO 8601 - ``` diff --git a/website/versioned_docs/version-2.3.2/api/consts.md b/website/versioned_docs/version-2.3.2/api/consts.md deleted file mode 100644 index a3119daa9031..000000000000 --- a/website/versioned_docs/version-2.3.2/api/consts.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -sidebar_position: 9 -description: nonebot.consts 模块 ---- - -# nonebot.consts - -本模块包含了 NoneBot 事件处理过程中使用到的常量。 - -## _var_ `RECEIVE_KEY` {#RECEIVE-KEY} - -- **类型:** Literal['\_receive\_\{id\}'] - -- **说明:** `receive` 存储 key - -## _var_ `LAST_RECEIVE_KEY` {#LAST-RECEIVE-KEY} - -- **类型:** Literal['\_last\_receive'] - -- **说明:** `last_receive` 存储 key - -## _var_ `ARG_KEY` {#ARG-KEY} - -- **类型:** Literal['\{key\}'] - -- **说明:** `arg` 存储 key - -## _var_ `REJECT_TARGET` {#REJECT-TARGET} - -- **类型:** Literal['\_current\_target'] - -- **说明:** 当前 `reject` 目标存储 key - -## _var_ `REJECT_CACHE_TARGET` {#REJECT-CACHE-TARGET} - -- **类型:** Literal['\_next\_target'] - -- **说明:** 下一个 `reject` 目标存储 key - -## _var_ `PREFIX_KEY` {#PREFIX-KEY} - -- **类型:** Literal['\_prefix'] - -- **说明:** 命令前缀存储 key - -## _var_ `CMD_KEY` {#CMD-KEY} - -- **类型:** Literal['command'] - -- **说明:** 命令元组存储 key - -## _var_ `RAW_CMD_KEY` {#RAW-CMD-KEY} - -- **类型:** Literal['raw\_command'] - -- **说明:** 命令文本存储 key - -## _var_ `CMD_ARG_KEY` {#CMD-ARG-KEY} - -- **类型:** Literal['command\_arg'] - -- **说明:** 命令参数存储 key - -## _var_ `CMD_START_KEY` {#CMD-START-KEY} - -- **类型:** Literal['command\_start'] - -- **说明:** 命令开头存储 key - -## _var_ `CMD_WHITESPACE_KEY` {#CMD-WHITESPACE-KEY} - -- **类型:** Literal['command\_whitespace'] - -- **说明:** 命令与参数间空白符存储 key - -## _var_ `SHELL_ARGS` {#SHELL-ARGS} - -- **类型:** Literal['\_args'] - -- **说明:** shell 命令 parse 后参数字典存储 key - -## _var_ `SHELL_ARGV` {#SHELL-ARGV} - -- **类型:** Literal['\_argv'] - -- **说明:** shell 命令原始参数列表存储 key - -## _var_ `REGEX_MATCHED` {#REGEX-MATCHED} - -- **类型:** Literal['\_matched'] - -- **说明:** 正则匹配结果存储 key - -## _var_ `STARTSWITH_KEY` {#STARTSWITH-KEY} - -- **类型:** Literal['\_startswith'] - -- **说明:** 响应触发前缀 key - -## _var_ `ENDSWITH_KEY` {#ENDSWITH-KEY} - -- **类型:** Literal['\_endswith'] - -- **说明:** 响应触发后缀 key - -## _var_ `FULLMATCH_KEY` {#FULLMATCH-KEY} - -- **类型:** Literal['\_fullmatch'] - -- **说明:** 响应触发完整消息 key - -## _var_ `KEYWORD_KEY` {#KEYWORD-KEY} - -- **类型:** Literal['\_keyword'] - -- **说明:** 响应触发关键字 key diff --git a/website/versioned_docs/version-2.3.2/api/dependencies/_category_.json b/website/versioned_docs/version-2.3.2/api/dependencies/_category_.json deleted file mode 100644 index 6bd1772ab64d..000000000000 --- a/website/versioned_docs/version-2.3.2/api/dependencies/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "position": 13 -} diff --git a/website/versioned_docs/version-2.3.2/api/dependencies/index.md b/website/versioned_docs/version-2.3.2/api/dependencies/index.md deleted file mode 100644 index 4798cbbc4edf..000000000000 --- a/website/versioned_docs/version-2.3.2/api/dependencies/index.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -sidebar_position: 0 -description: nonebot.dependencies 模块 ---- - -# nonebot.dependencies - -本模块模块实现了依赖注入的定义与处理。 - -## _abstract class_ `Param(*args, validate=False, **kwargs)` {#Param} - -- **说明** - - 依赖注入的基本单元 —— 参数。 - - 继承自 `pydantic.fields.FieldInfo`,用于描述参数信息(不包括参数名)。 - -- **参数** - - - `*args` - - - `validate` (bool) - - - `**kwargs` (Any) - -## _class_ `Dependent()` {#Dependent} - -- **说明:** 依赖注入容器 - -- **参数** - - - `call`: 依赖注入的可调用对象,可以是任何 Callable 对象 - - - `pre_checkers`: 依赖注入解析前的参数检查 - - - `params`: 具名参数列表 - - - `parameterless`: 匿名参数列表 - - - `allow_types`: 允许的参数类型 - -### _staticmethod_ `parse_params(call, allow_types)` {#Dependent-parse-params} - -- **参数** - - - `call` (\_DependentCallable[R]) - - - `allow_types` (tuple[type[Param], ...]) - -- **返回** - - - tuple[[ModelField](../compat.md#ModelField), ...] - -### _staticmethod_ `parse_parameterless(parameterless, allow_types)` {#Dependent-parse-parameterless} - -- **参数** - - - `parameterless` (tuple[Any, ...]) - - - `allow_types` (tuple[type[Param], ...]) - -- **返回** - - - tuple[Param, ...] - -### _classmethod_ `parse(*, call, parameterless=None, allow_types)` {#Dependent-parse} - -- **参数** - - - `call` (\_DependentCallable[R]) - - - `parameterless` (Iterable[Any] | None) - - - `allow_types` (Iterable[type[Param]]) - -- **返回** - - - Dependent[R] - -### _async method_ `check(**params)` {#Dependent-check} - -- **参数** - - - `**params` (Any) - -- **返回** - - - None - -### _async method_ `solve(**params)` {#Dependent-solve} - -- **参数** - - - `**params` (Any) - -- **返回** - - - dict[str, Any] diff --git a/website/versioned_docs/version-2.3.2/api/dependencies/utils.md b/website/versioned_docs/version-2.3.2/api/dependencies/utils.md deleted file mode 100644 index d227d6fb374b..000000000000 --- a/website/versioned_docs/version-2.3.2/api/dependencies/utils.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -sidebar_position: 1 -description: nonebot.dependencies.utils 模块 ---- - -# nonebot.dependencies.utils - -## _def_ `get_typed_signature(call)` {#get-typed-signature} - -- **说明:** 获取可调用对象签名 - -- **参数** - - - `call` ((...) -> Any) - -- **返回** - - - inspect.Signature - -## _def_ `get_typed_annotation(param, globalns)` {#get-typed-annotation} - -- **说明:** 获取参数的类型注解 - -- **参数** - - - `param` (inspect.Parameter) - - - `globalns` (dict[str, Any]) - -- **返回** - - - Any - -## _def_ `check_field_type(field, value)` {#check-field-type} - -- **说明:** 检查字段类型是否匹配 - -- **参数** - - - `field` ([ModelField](../compat.md#ModelField)) - - - `value` (Any) - -- **返回** - - - Any diff --git a/website/versioned_docs/version-2.3.2/api/drivers/_category_.json b/website/versioned_docs/version-2.3.2/api/drivers/_category_.json deleted file mode 100644 index 3714fde8831d..000000000000 --- a/website/versioned_docs/version-2.3.2/api/drivers/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "position": 14 -} diff --git a/website/versioned_docs/version-2.3.2/api/drivers/aiohttp.md b/website/versioned_docs/version-2.3.2/api/drivers/aiohttp.md deleted file mode 100644 index 352e10532d2b..000000000000 --- a/website/versioned_docs/version-2.3.2/api/drivers/aiohttp.md +++ /dev/null @@ -1,204 +0,0 @@ ---- -sidebar_position: 2 -description: nonebot.drivers.aiohttp 模块 ---- - -# nonebot.drivers.aiohttp - -[AIOHTTP](https://aiohttp.readthedocs.io/en/stable/) 驱动适配器。 - -```bash -nb driver install aiohttp -# 或者 -pip install nonebot2[aiohttp] -``` - -:::tip 提示 -本驱动仅支持客户端连接 -::: - -## _class_ `Session(params=None, headers=None, cookies=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#Session} - -- **参数** - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `version` (str | [HTTPVersion](index.md#HTTPVersion)) - - - `timeout` (float | None) - - - `proxy` (str | None) - -### _async method_ `request(setup)` {#Session-request} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - [Response](index.md#Response) - -### _async method_ `setup()` {#Session-setup} - -- **参数** - - empty - -- **返回** - - - None - -### _async method_ `close()` {#Session-close} - -- **参数** - - empty - -- **返回** - - - None - -## _class_ `Mixin()` {#Mixin} - -- **说明:** AIOHTTP Mixin - -- **参数** - - auto - -### _async method_ `request(setup)` {#Mixin-request} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - [Response](index.md#Response) - -### _method_ `websocket(setup)` {#Mixin-websocket} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - AsyncGenerator[[WebSocket](index.md#WebSocket), None] - -### _method_ `get_session(params=None, headers=None, cookies=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#Mixin-get-session} - -- **参数** - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `version` (str | [HTTPVersion](index.md#HTTPVersion)) - - - `timeout` (float | None) - - - `proxy` (str | None) - -- **返回** - - - Session - -## _class_ `WebSocket(*, request, session, websocket)` {#WebSocket} - -- **说明:** AIOHTTP Websocket Wrapper - -- **参数** - - - `request` ([Request](index.md#Request)) - - - `session` (aiohttp.ClientSession) - - - `websocket` (aiohttp.ClientWebSocketResponse) - -### _async method_ `accept()` {#WebSocket-accept} - -- **参数** - - empty - -- **返回** - - - untyped - -### _async method_ `close(code=1000, reason="")` {#WebSocket-close} - -- **参数** - - - `code` (int) - - - `reason` (str) - -- **返回** - - - untyped - -### _async method_ `receive()` {#WebSocket-receive} - -- **参数** - - empty - -- **返回** - - - str - -### _async method_ `receive_text()` {#WebSocket-receive-text} - -- **参数** - - empty - -- **返回** - - - str - -### _async method_ `receive_bytes()` {#WebSocket-receive-bytes} - -- **参数** - - empty - -- **返回** - - - bytes - -### _async method_ `send_text(data)` {#WebSocket-send-text} - -- **参数** - - - `data` (str) - -- **返回** - - - None - -### _async method_ `send_bytes(data)` {#WebSocket-send-bytes} - -- **参数** - - - `data` (bytes) - -- **返回** - - - None - -## _class_ `Driver(env, config)` {#Driver} - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` ([Config](../config.md#Config)) diff --git a/website/versioned_docs/version-2.3.2/api/drivers/fastapi.md b/website/versioned_docs/version-2.3.2/api/drivers/fastapi.md deleted file mode 100644 index 4bb653740e51..000000000000 --- a/website/versioned_docs/version-2.3.2/api/drivers/fastapi.md +++ /dev/null @@ -1,242 +0,0 @@ ---- -sidebar_position: 1 -description: nonebot.drivers.fastapi 模块 ---- - -# nonebot.drivers.fastapi - -[FastAPI](https://fastapi.tiangolo.com/) 驱动适配 - -```bash -nb driver install fastapi -# 或者 -pip install nonebot2[fastapi] -``` - -:::tip 提示 -本驱动仅支持服务端连接 -::: - -## _class_ `Config()` {#Config} - -- **说明:** FastAPI 驱动框架设置,详情参考 FastAPI 文档 - -- **参数** - - auto - -### _class-var_ `fastapi_openapi_url` {#Config-fastapi-openapi-url} - -- **类型:** str | None - -- **说明:** `openapi.json` 地址,默认为 `None` 即关闭 - -### _class-var_ `fastapi_docs_url` {#Config-fastapi-docs-url} - -- **类型:** str | None - -- **说明:** `swagger` 地址,默认为 `None` 即关闭 - -### _class-var_ `fastapi_redoc_url` {#Config-fastapi-redoc-url} - -- **类型:** str | None - -- **说明:** `redoc` 地址,默认为 `None` 即关闭 - -### _class-var_ `fastapi_include_adapter_schema` {#Config-fastapi-include-adapter-schema} - -- **类型:** bool - -- **说明:** 是否包含适配器路由的 schema,默认为 `True` - -### _class-var_ `fastapi_reload` {#Config-fastapi-reload} - -- **类型:** bool - -- **说明:** 开启/关闭冷重载 - -### _class-var_ `fastapi_reload_dirs` {#Config-fastapi-reload-dirs} - -- **类型:** list[str] | None - -- **说明:** 重载监控文件夹列表,默认为 uvicorn 默认值 - -### _class-var_ `fastapi_reload_delay` {#Config-fastapi-reload-delay} - -- **类型:** float - -- **说明:** 重载延迟,默认为 uvicorn 默认值 - -### _class-var_ `fastapi_reload_includes` {#Config-fastapi-reload-includes} - -- **类型:** list[str] | None - -- **说明:** 要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -### _class-var_ `fastapi_reload_excludes` {#Config-fastapi-reload-excludes} - -- **类型:** list[str] | None - -- **说明:** 不要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -### _class-var_ `fastapi_extra` {#Config-fastapi-extra} - -- **类型:** dict[str, Any] - -- **说明:** 传递给 `FastAPI` 的其他参数。 - -## _class_ `Driver(env, config)` {#Driver} - -- **说明:** FastAPI 驱动框架。 - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` (NoneBotConfig) - -### _property_ `type` {#Driver-type} - -- **类型:** str - -- **说明:** 驱动名称: `fastapi` - -### _property_ `server_app` {#Driver-server-app} - -- **类型:** FastAPI - -- **说明:** `FastAPI APP` 对象 - -### _property_ `asgi` {#Driver-asgi} - -- **类型:** FastAPI - -- **说明:** `FastAPI APP` 对象 - -### _property_ `logger` {#Driver-logger} - -- **类型:** logging.Logger - -- **说明:** fastapi 使用的 logger - -### _method_ `setup_http_server(setup)` {#Driver-setup-http-server} - -- **参数** - - - `setup` ([HTTPServerSetup](index.md#HTTPServerSetup)) - -- **返回** - - - untyped - -### _method_ `setup_websocket_server(setup)` {#Driver-setup-websocket-server} - -- **参数** - - - `setup` ([WebSocketServerSetup](index.md#WebSocketServerSetup)) - -- **返回** - - - None - -### _method_ `run(host=None, port=None, *args, app=None, **kwargs)` {#Driver-run} - -- **说明:** 使用 `uvicorn` 启动 FastAPI - -- **参数** - - - `host` (str | None) - - - `port` (int | None) - - - `*args` - - - `app` (str | None) - - - `**kwargs` - -- **返回** - - - untyped - -## _class_ `FastAPIWebSocket(*, request, websocket)` {#FastAPIWebSocket} - -- **说明:** FastAPI WebSocket Wrapper - -- **参数** - - - `request` (BaseRequest) - - - `websocket` ([WebSocket](index.md#WebSocket)) - -### _async method_ `accept()` {#FastAPIWebSocket-accept} - -- **参数** - - empty - -- **返回** - - - None - -### _async method_ `close(code=status.WS_1000_NORMAL_CLOSURE, reason="")` {#FastAPIWebSocket-close} - -- **参数** - - - `code` (int) - - - `reason` (str) - -- **返回** - - - None - -### _async method_ `receive()` {#FastAPIWebSocket-receive} - -- **参数** - - empty - -- **返回** - - - str | bytes - -### _async method_ `receive_text()` {#FastAPIWebSocket-receive-text} - -- **参数** - - empty - -- **返回** - - - str - -### _async method_ `receive_bytes()` {#FastAPIWebSocket-receive-bytes} - -- **参数** - - empty - -- **返回** - - - bytes - -### _async method_ `send_text(data)` {#FastAPIWebSocket-send-text} - -- **参数** - - - `data` (str) - -- **返回** - - - None - -### _async method_ `send_bytes(data)` {#FastAPIWebSocket-send-bytes} - -- **参数** - - - `data` (bytes) - -- **返回** - - - None diff --git a/website/versioned_docs/version-2.3.2/api/drivers/httpx.md b/website/versioned_docs/version-2.3.2/api/drivers/httpx.md deleted file mode 100644 index f2f304ec426e..000000000000 --- a/website/versioned_docs/version-2.3.2/api/drivers/httpx.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -sidebar_position: 3 -description: nonebot.drivers.httpx 模块 ---- - -# nonebot.drivers.httpx - -[HTTPX](https://www.python-httpx.org/) 驱动适配 - -```bash -nb driver install httpx -# 或者 -pip install nonebot2[httpx] -``` - -:::tip 提示 -本驱动仅支持客户端 HTTP 连接 -::: - -## _class_ `Session(params=None, headers=None, cookies=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#Session} - -- **参数** - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `version` (str | [HTTPVersion](index.md#HTTPVersion)) - - - `timeout` (float | None) - - - `proxy` (str | None) - -### _async method_ `request(setup)` {#Session-request} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - [Response](index.md#Response) - -### _async method_ `setup()` {#Session-setup} - -- **参数** - - empty - -- **返回** - - - None - -### _async method_ `close()` {#Session-close} - -- **参数** - - empty - -- **返回** - - - None - -## _class_ `Mixin()` {#Mixin} - -- **说明:** HTTPX Mixin - -- **参数** - - auto - -### _async method_ `request(setup)` {#Mixin-request} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - [Response](index.md#Response) - -### _method_ `get_session(params=None, headers=None, cookies=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#Mixin-get-session} - -- **参数** - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `version` (str | [HTTPVersion](index.md#HTTPVersion)) - - - `timeout` (float | None) - - - `proxy` (str | None) - -- **返回** - - - Session - -## _class_ `Driver(env, config)` {#Driver} - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` ([Config](../config.md#Config)) diff --git a/website/versioned_docs/version-2.3.2/api/drivers/index.md b/website/versioned_docs/version-2.3.2/api/drivers/index.md deleted file mode 100644 index add6dfb27f66..000000000000 --- a/website/versioned_docs/version-2.3.2/api/drivers/index.md +++ /dev/null @@ -1,596 +0,0 @@ ---- -sidebar_position: 0 -description: nonebot.drivers 模块 ---- - -# nonebot.drivers - -本模块定义了驱动适配器基类。 - -各驱动请继承以下基类。 - -## _abstract class_ `Mixin()` {#Mixin} - -- **说明:** 可与其他驱动器共用的混入基类。 - -- **参数** - - auto - -### _abstract property_ `type` {#Mixin-type} - -- **类型:** str - -- **说明:** 混入驱动类型名称 - -## _abstract class_ `Driver(env, config)` {#Driver} - -- **说明** - - 驱动器基类。 - - 驱动器控制框架的启动和停止,适配器的注册,以及机器人生命周期管理。 - -- **参数** - - - `env` ([Env](../config.md#Env)): 包含环境信息的 Env 对象 - - - `config` ([Config](../config.md#Config)): 包含配置信息的 Config 对象 - -### _instance-var_ `env` {#Driver-env} - -- **类型:** str - -- **说明:** 环境名称 - -### _instance-var_ `config` {#Driver-config} - -- **类型:** [Config](../config.md#Config) - -- **说明:** 全局配置对象 - -### _property_ `bots` {#Driver-bots} - -- **类型:** dict[str, [Bot](../adapters/index.md#Bot)] - -- **说明:** 获取当前所有已连接的 Bot - -### _method_ `register_adapter(adapter, **kwargs)` {#Driver-register-adapter} - -- **说明:** 注册一个协议适配器 - -- **参数** - - - `adapter` (type[[Adapter](../adapters/index.md#Adapter)]): 适配器类 - - - `**kwargs`: 其他传递给适配器的参数 - -- **返回** - - - None - -### _abstract property_ `type` {#Driver-type} - -- **类型:** str - -- **说明:** 驱动类型名称 - -### _abstract property_ `logger` {#Driver-logger} - -- **类型:** untyped - -- **说明:** 驱动专属 logger 日志记录器 - -### _abstract method_ `run(*args, **kwargs)` {#Driver-run} - -- **说明:** 启动驱动框架 - -- **参数** - - - `*args` - - - `**kwargs` - -- **返回** - - - untyped - -### _method_ `on_startup(func)` {#Driver-on-startup} - -- **说明:** 注册一个启动时执行的函数 - -- **参数** - - - `func` (LIFESPAN_FUNC) - -- **返回** - - - LIFESPAN_FUNC - -### _method_ `on_shutdown(func)` {#Driver-on-shutdown} - -- **说明:** 注册一个停止时执行的函数 - -- **参数** - - - `func` (LIFESPAN_FUNC) - -- **返回** - - - LIFESPAN_FUNC - -### _classmethod_ `on_bot_connect(func)` {#Driver-on-bot-connect} - -- **说明** - - 装饰一个函数使他在 bot 连接成功时执行。 - - 钩子函数参数: - - - bot: 当前连接上的 Bot 对象 - -- **参数** - - - `func` ([T_BotConnectionHook](../typing.md#T-BotConnectionHook)) - -- **返回** - - - [T_BotConnectionHook](../typing.md#T-BotConnectionHook) - -### _classmethod_ `on_bot_disconnect(func)` {#Driver-on-bot-disconnect} - -- **说明** - - 装饰一个函数使他在 bot 连接断开时执行。 - - 钩子函数参数: - - - bot: 当前连接上的 Bot 对象 - -- **参数** - - - `func` ([T_BotDisconnectionHook](../typing.md#T-BotDisconnectionHook)) - -- **返回** - - - [T_BotDisconnectionHook](../typing.md#T-BotDisconnectionHook) - -## _class_ `Cookies(cookies=None)` {#Cookies} - -- **参数** - - - `cookies` (CookieTypes) - -### _method_ `set(name, value, domain="", path="/")` {#Cookies-set} - -- **参数** - - - `name` (str) - - - `value` (str) - - - `domain` (str) - - - `path` (str) - -- **返回** - - - None - -### _method_ `get(name, default=None, domain=None, path=None)` {#Cookies-get} - -- **参数** - - - `name` (str) - - - `default` (str | None) - - - `domain` (str | None) - - - `path` (str | None) - -- **返回** - - - str | None - -### _method_ `delete(name, domain=None, path=None)` {#Cookies-delete} - -- **参数** - - - `name` (str) - - - `domain` (str | None) - - - `path` (str | None) - -- **返回** - - - None - -### _method_ `clear(domain=None, path=None)` {#Cookies-clear} - -- **参数** - - - `domain` (str | None) - - - `path` (str | None) - -- **返回** - - - None - -### _method_ `update(cookies=None)` {#Cookies-update} - -- **参数** - - - `cookies` (CookieTypes) - -- **返回** - - - None - -### _method_ `as_header(request)` {#Cookies-as-header} - -- **参数** - - - `request` (Request) - -- **返回** - - - dict[str, str] - -## _class_ `Request(method, url, *, params=None, headers=None, cookies=None, content=None, data=None, json=None, files=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#Request} - -- **参数** - - - `method` (str | bytes) - - - `url` (URL | str | RawURL) - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `content` (ContentTypes) - - - `data` (DataTypes) - - - `json` (Any) - - - `files` (FilesTypes) - - - `version` (str | HTTPVersion) - - - `timeout` (float | None) - - - `proxy` (str | None) - -## _class_ `Response(status_code, *, headers=None, content=None, request=None)` {#Response} - -- **参数** - - - `status_code` (int) - - - `headers` (HeaderTypes) - - - `content` (ContentTypes) - - - `request` (Request | None) - -## _abstract class_ `ASGIMixin()` {#ASGIMixin} - -- **说明** - - ASGI 服务端基类。 - - 将后端框架封装,以满足适配器使用。 - -- **参数** - - auto - -### _abstract property_ `server_app` {#ASGIMixin-server-app} - -- **类型:** Any - -- **说明:** 驱动 APP 对象 - -### _abstract property_ `asgi` {#ASGIMixin-asgi} - -- **类型:** Any - -- **说明:** 驱动 ASGI 对象 - -### _abstract method_ `setup_http_server(setup)` {#ASGIMixin-setup-http-server} - -- **说明:** 设置一个 HTTP 服务器路由配置 - -- **参数** - - - `setup` ([HTTPServerSetup](#HTTPServerSetup)) - -- **返回** - - - None - -### _abstract method_ `setup_websocket_server(setup)` {#ASGIMixin-setup-websocket-server} - -- **说明:** 设置一个 WebSocket 服务器路由配置 - -- **参数** - - - `setup` ([WebSocketServerSetup](#WebSocketServerSetup)) - -- **返回** - - - None - -## _abstract class_ `WebSocket(*, request)` {#WebSocket} - -- **参数** - - - `request` (Request) - -### _abstract property_ `closed` {#WebSocket-closed} - -- **类型:** bool - -- **说明:** 连接是否已经关闭 - -### _abstract async method_ `accept()` {#WebSocket-accept} - -- **说明:** 接受 WebSocket 连接请求 - -- **参数** - - empty - -- **返回** - - - None - -### _abstract async method_ `close(code=1000, reason="")` {#WebSocket-close} - -- **说明:** 关闭 WebSocket 连接请求 - -- **参数** - - - `code` (int) - - - `reason` (str) - -- **返回** - - - None - -### _abstract async method_ `receive()` {#WebSocket-receive} - -- **说明:** 接收一条 WebSocket text/bytes 信息 - -- **参数** - - empty - -- **返回** - - - str | bytes - -### _abstract async method_ `receive_text()` {#WebSocket-receive-text} - -- **说明:** 接收一条 WebSocket text 信息 - -- **参数** - - empty - -- **返回** - - - str - -### _abstract async method_ `receive_bytes()` {#WebSocket-receive-bytes} - -- **说明:** 接收一条 WebSocket binary 信息 - -- **参数** - - empty - -- **返回** - - - bytes - -### _async method_ `send(data)` {#WebSocket-send} - -- **说明:** 发送一条 WebSocket text/bytes 信息 - -- **参数** - - - `data` (str | bytes) - -- **返回** - - - None - -### _abstract async method_ `send_text(data)` {#WebSocket-send-text} - -- **说明:** 发送一条 WebSocket text 信息 - -- **参数** - - - `data` (str) - -- **返回** - - - None - -### _abstract async method_ `send_bytes(data)` {#WebSocket-send-bytes} - -- **说明:** 发送一条 WebSocket binary 信息 - -- **参数** - - - `data` (bytes) - -- **返回** - - - None - -## _enum_ `HTTPVersion` {#HTTPVersion} - -- **说明:** An enumeration. - -- **参数** - - auto - - - `H10: '1.0'` - - - `H11: '1.1'` - - - `H2: '2'` - -## _abstract class_ `ForwardMixin()` {#ForwardMixin} - -- **说明:** 客户端混入基类。 - -- **参数** - - auto - -## _abstract class_ `ReverseMixin()` {#ReverseMixin} - -- **说明:** 服务端混入基类。 - -- **参数** - - auto - -## _var_ `ForwardDriver` {#ForwardDriver} - -- **类型:** ForwardMixin - -- **说明** - - 支持客户端请求的驱动器。 - - **Deprecated**,请使用 [ForwardMixin](#ForwardMixin) 或其子类代替。 - -## _var_ `ReverseDriver` {#ReverseDriver} - -- **类型:** ReverseMixin - -- **说明** - - 支持服务端请求的驱动器。 - - **Deprecated**,请使用 [ReverseMixin](#ReverseMixin) 或其子类代替。 - -## _def_ `combine_driver(driver, *mixins)` {#combine-driver} - -- **说明:** 将一个驱动器和多个混入类合并。 - -- **重载** - - **1.** `(driver) -> type[D]` - - - **参数** - - - `driver` (type[D]) - - - **返回** - - - type[D] - - **2.** `(driver, _m, *mixins) -> type[CombinedDriver]` - - - **参数** - - - `driver` (type[D]) - - - `_m` (type[[Mixin](#Mixin)]) - - - `*mixins` (type[[Mixin](#Mixin)]) - - - **返回** - - - type[CombinedDriver] - -## _abstract class_ `HTTPClientMixin()` {#HTTPClientMixin} - -- **说明:** HTTP 客户端混入基类。 - -- **参数** - - auto - -### _abstract async method_ `request(setup)` {#HTTPClientMixin-request} - -- **说明:** 发送一个 HTTP 请求 - -- **参数** - - - `setup` ([Request](#Request)) - -- **返回** - - - [Response](#Response) - -### _abstract method_ `get_session(params=None, headers=None, cookies=None, version=HTTPVersion.H11, timeout=None, proxy=None)` {#HTTPClientMixin-get-session} - -- **说明:** 获取一个 HTTP 会话 - -- **参数** - - - `params` (QueryTypes) - - - `headers` (HeaderTypes) - - - `cookies` (CookieTypes) - - - `version` (str | [HTTPVersion](#HTTPVersion)) - - - `timeout` (float | None) - - - `proxy` (str | None) - -- **返回** - - - HTTPClientSession - -## _class_ `HTTPServerSetup()` {#HTTPServerSetup} - -- **说明:** HTTP 服务器路由配置。 - -- **参数** - - auto - -## _abstract class_ `WebSocketClientMixin()` {#WebSocketClientMixin} - -- **说明:** WebSocket 客户端混入基类。 - -- **参数** - - auto - -### _abstract method_ `websocket(setup)` {#WebSocketClientMixin-websocket} - -- **说明:** 发起一个 WebSocket 连接 - -- **参数** - - - `setup` ([Request](#Request)) - -- **返回** - - - AsyncGenerator[[WebSocket](#WebSocket), None] - -## _class_ `WebSocketServerSetup()` {#WebSocketServerSetup} - -- **说明:** WebSocket 服务器路由配置。 - -- **参数** - - auto diff --git a/website/versioned_docs/version-2.3.2/api/drivers/none.md b/website/versioned_docs/version-2.3.2/api/drivers/none.md deleted file mode 100644 index df948f2fc7fb..000000000000 --- a/website/versioned_docs/version-2.3.2/api/drivers/none.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -sidebar_position: 6 -description: nonebot.drivers.none 模块 ---- - -# nonebot.drivers.none - -None 驱动适配 - -:::tip 提示 -本驱动不支持任何服务器或客户端连接 -::: - -## _class_ `Driver(env, config)` {#Driver} - -- **说明:** None 驱动框架 - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` ([Config](../config.md#Config)) - -### _property_ `type` {#Driver-type} - -- **类型:** str - -- **说明:** 驱动名称: `none` - -### _property_ `logger` {#Driver-logger} - -- **类型:** untyped - -- **说明:** none driver 使用的 logger - -### _method_ `run(*args, **kwargs)` {#Driver-run} - -- **说明:** 启动 none driver - -- **参数** - - - `*args` - - - `**kwargs` - -- **返回** - - - untyped - -### _method_ `exit(force=False)` {#Driver-exit} - -- **说明:** 退出 none driver - -- **参数** - - - `force` (bool): 强制退出 - -- **返回** - - - untyped diff --git a/website/versioned_docs/version-2.3.2/api/drivers/quart.md b/website/versioned_docs/version-2.3.2/api/drivers/quart.md deleted file mode 100644 index 65a09b647384..000000000000 --- a/website/versioned_docs/version-2.3.2/api/drivers/quart.md +++ /dev/null @@ -1,218 +0,0 @@ ---- -sidebar_position: 5 -description: nonebot.drivers.quart 模块 ---- - -# nonebot.drivers.quart - -[Quart](https://pgjones.gitlab.io/quart/index.html) 驱动适配 - -```bash -nb driver install quart -# 或者 -pip install nonebot2[quart] -``` - -:::tip 提示 -本驱动仅支持服务端连接 -::: - -## _class_ `Config()` {#Config} - -- **说明:** Quart 驱动框架设置 - -- **参数** - - auto - -### _class-var_ `quart_reload` {#Config-quart-reload} - -- **类型:** bool - -- **说明:** 开启/关闭冷重载 - -### _class-var_ `quart_reload_dirs` {#Config-quart-reload-dirs} - -- **类型:** list[str] | None - -- **说明:** 重载监控文件夹列表,默认为 uvicorn 默认值 - -### _class-var_ `quart_reload_delay` {#Config-quart-reload-delay} - -- **类型:** float - -- **说明:** 重载延迟,默认为 uvicorn 默认值 - -### _class-var_ `quart_reload_includes` {#Config-quart-reload-includes} - -- **类型:** list[str] | None - -- **说明:** 要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -### _class-var_ `quart_reload_excludes` {#Config-quart-reload-excludes} - -- **类型:** list[str] | None - -- **说明:** 不要监听的文件列表,支持 glob pattern,默认为 uvicorn 默认值 - -### _class-var_ `quart_extra` {#Config-quart-extra} - -- **类型:** dict[str, Any] - -- **说明:** 传递给 `Quart` 的其他参数。 - -## _class_ `Driver(env, config)` {#Driver} - -- **说明:** Quart 驱动框架 - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` (NoneBotConfig) - -### _property_ `type` {#Driver-type} - -- **类型:** str - -- **说明:** 驱动名称: `quart` - -### _property_ `server_app` {#Driver-server-app} - -- **类型:** Quart - -- **说明:** `Quart` 对象 - -### _property_ `asgi` {#Driver-asgi} - -- **类型:** untyped - -- **说明:** `Quart` 对象 - -### _property_ `logger` {#Driver-logger} - -- **类型:** untyped - -- **说明:** Quart 使用的 logger - -### _method_ `setup_http_server(setup)` {#Driver-setup-http-server} - -- **参数** - - - `setup` ([HTTPServerSetup](index.md#HTTPServerSetup)) - -- **返回** - - - untyped - -### _method_ `setup_websocket_server(setup)` {#Driver-setup-websocket-server} - -- **参数** - - - `setup` ([WebSocketServerSetup](index.md#WebSocketServerSetup)) - -- **返回** - - - None - -### _method_ `run(host=None, port=None, *args, app=None, **kwargs)` {#Driver-run} - -- **说明:** 使用 `uvicorn` 启动 Quart - -- **参数** - - - `host` (str | None) - - - `port` (int | None) - - - `*args` - - - `app` (str | None) - - - `**kwargs` - -- **返回** - - - untyped - -## _class_ `WebSocket(*, request, websocket_ctx)` {#WebSocket} - -- **说明:** Quart WebSocket Wrapper - -- **参数** - - - `request` (BaseRequest) - - - `websocket_ctx` (WebsocketContext) - -### _async method_ `accept()` {#WebSocket-accept} - -- **参数** - - empty - -- **返回** - - - untyped - -### _async method_ `close(code=1000, reason="")` {#WebSocket-close} - -- **参数** - - - `code` (int) - - - `reason` (str) - -- **返回** - - - untyped - -### _async method_ `receive()` {#WebSocket-receive} - -- **参数** - - empty - -- **返回** - - - str | bytes - -### _async method_ `receive_text()` {#WebSocket-receive-text} - -- **参数** - - empty - -- **返回** - - - str - -### _async method_ `receive_bytes()` {#WebSocket-receive-bytes} - -- **参数** - - empty - -- **返回** - - - bytes - -### _async method_ `send_text(data)` {#WebSocket-send-text} - -- **参数** - - - `data` (str) - -- **返回** - - - untyped - -### _async method_ `send_bytes(data)` {#WebSocket-send-bytes} - -- **参数** - - - `data` (bytes) - -- **返回** - - - untyped diff --git a/website/versioned_docs/version-2.3.2/api/drivers/websockets.md b/website/versioned_docs/version-2.3.2/api/drivers/websockets.md deleted file mode 100644 index ac8ad6f963f9..000000000000 --- a/website/versioned_docs/version-2.3.2/api/drivers/websockets.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -sidebar_position: 4 -description: nonebot.drivers.websockets 模块 ---- - -# nonebot.drivers.websockets - -[websockets](https://websockets.readthedocs.io/) 驱动适配 - -```bash -nb driver install websockets -# 或者 -pip install nonebot2[websockets] -``` - -:::tip 提示 -本驱动仅支持客户端 WebSocket 连接 -::: - -## _def_ `catch_closed(func)` {#catch-closed} - -- **参数** - - - `func` ((P) -> Coroutine[Any, Any, T]) - -- **返回** - - - (P) -> Coroutine[Any, Any, T] - -## _class_ `Mixin()` {#Mixin} - -- **说明:** Websockets Mixin - -- **参数** - - auto - -### _method_ `websocket(setup)` {#Mixin-websocket} - -- **参数** - - - `setup` ([Request](index.md#Request)) - -- **返回** - - - AsyncGenerator[[WebSocket](index.md#WebSocket), None] - -## _class_ `WebSocket(*, request, websocket)` {#WebSocket} - -- **说明:** Websockets WebSocket Wrapper - -- **参数** - - - `request` ([Request](index.md#Request)) - - - `websocket` (WebSocketClientProtocol) - -### _async method_ `accept()` {#WebSocket-accept} - -- **参数** - - empty - -- **返回** - - - untyped - -### _async method_ `close(code=1000, reason="")` {#WebSocket-close} - -- **参数** - - - `code` (int) - - - `reason` (str) - -- **返回** - - - untyped - -### _async method_ `receive()` {#WebSocket-receive} - -- **参数** - - empty - -- **返回** - - - str | bytes - -### _async method_ `receive_text()` {#WebSocket-receive-text} - -- **参数** - - empty - -- **返回** - - - str - -### _async method_ `receive_bytes()` {#WebSocket-receive-bytes} - -- **参数** - - empty - -- **返回** - - - bytes - -### _async method_ `send_text(data)` {#WebSocket-send-text} - -- **参数** - - - `data` (str) - -- **返回** - - - None - -### _async method_ `send_bytes(data)` {#WebSocket-send-bytes} - -- **参数** - - - `data` (bytes) - -- **返回** - - - None - -## _class_ `Driver(env, config)` {#Driver} - -- **参数** - - - `env` ([Env](../config.md#Env)) - - - `config` ([Config](../config.md#Config)) diff --git a/website/versioned_docs/version-2.3.2/api/exception.md b/website/versioned_docs/version-2.3.2/api/exception.md deleted file mode 100644 index 44882749ec7d..000000000000 --- a/website/versioned_docs/version-2.3.2/api/exception.md +++ /dev/null @@ -1,254 +0,0 @@ ---- -sidebar_position: 10 -description: nonebot.exception 模块 ---- - -# nonebot.exception - -本模块包含了所有 NoneBot 运行时可能会抛出的异常。 - -这些异常并非所有需要用户处理,在 NoneBot 内部运行时被捕获,并进行对应操作。 - -```bash -NoneBotException -├── ParserExit -├── ProcessException -| ├── IgnoredException -| ├── SkippedException -| | └── TypeMisMatch -| ├── MockApiException -| └── StopPropagation -├── MatcherException -| ├── PausedException -| ├── RejectedException -| └── FinishedException -├── AdapterException -| ├── NoLogException -| ├── ApiNotAvailable -| ├── NetworkError -| └── ActionFailed -└── DriverException - └── WebSocketClosed -``` - -## _class_ `NoneBotException()` {#NoneBotException} - -- **说明:** 所有 NoneBot 发生的异常基类。 - -- **参数** - - auto - -## _class_ `ParserExit()` {#ParserExit} - -- **说明:** 处理消息失败时返回的异常。 - -- **参数** - - auto - -## _class_ `ProcessException()` {#ProcessException} - -- **说明:** 事件处理过程中发生的异常基类。 - -- **参数** - - auto - -## _class_ `IgnoredException()` {#IgnoredException} - -- **说明:** 指示 NoneBot 应该忽略该事件。可由 PreProcessor 抛出。 - -- **参数** - - - `reason`: 忽略事件的原因 - -## _class_ `SkippedException()` {#SkippedException} - -- **说明** - - 指示 NoneBot 立即结束当前 `Dependent` 的运行。 - - 例如,可以在 `Handler` 中通过 [Matcher.skip](matcher.md#Matcher-skip) 抛出。 - -- **参数** - - auto - -- **用法** - - ```python - def always_skip(): - Matcher.skip() - - @matcher.handle() - async def handler(dependency = Depends(always_skip)): - # never run - ``` - -## _class_ `TypeMisMatch()` {#TypeMisMatch} - -- **说明:** 当前 `Handler` 的参数类型不匹配。 - -- **参数** - - auto - -## _class_ `MockApiException()` {#MockApiException} - -- **说明:** 指示 NoneBot 阻止本次 API 调用或修改本次调用返回值,并返回自定义内容。 可由 api hook 抛出。 - -- **参数** - - - `result`: 返回的内容 - -## _class_ `StopPropagation()` {#StopPropagation} - -- **说明** - - 指示 NoneBot 终止事件向下层传播。 - - 在 [Matcher.block](matcher.md#Matcher-block) 为 `True` - 或使用 [Matcher.stop_propagation](matcher.md#Matcher-stop-propagation) 方法时抛出。 - -- **参数** - - auto - -- **用法** - - ```python - matcher = on_notice(block=True) - # 或者 - @matcher.handle() - async def handler(matcher: Matcher): - matcher.stop_propagation() - ``` - -## _class_ `MatcherException()` {#MatcherException} - -- **说明:** 所有 Matcher 发生的异常基类。 - -- **参数** - - auto - -## _class_ `PausedException()` {#PausedException} - -- **说明** - - 指示 NoneBot 结束当前 `Handler` 并等待下一条消息后继续下一个 `Handler`。 可用于用户输入新信息。 - - 可以在 `Handler` 中通过 [Matcher.pause](matcher.md#Matcher-pause) 抛出。 - -- **参数** - - auto - -- **用法** - - ```python - @matcher.handle() - async def handler(): - await matcher.pause("some message") - ``` - -## _class_ `RejectedException()` {#RejectedException} - -- **说明** - - 指示 NoneBot 结束当前 `Handler` 并等待下一条消息后重新运行当前 `Handler`。 可用于用户重新输入。 - - 可以在 `Handler` 中通过 [Matcher.reject](matcher.md#Matcher-reject) 抛出。 - -- **参数** - - auto - -- **用法** - - ```python - @matcher.handle() - async def handler(): - await matcher.reject("some message") - ``` - -## _class_ `FinishedException()` {#FinishedException} - -- **说明** - - 指示 NoneBot 结束当前 `Handler` 且后续 `Handler` 不再被运行。可用于结束用户会话。 - - 可以在 `Handler` 中通过 [Matcher.finish](matcher.md#Matcher-finish) 抛出。 - -- **参数** - - auto - -- **用法** - - ```python - @matcher.handle() - async def handler(): - await matcher.finish("some message") - ``` - -## _class_ `AdapterException()` {#AdapterException} - -- **说明:** 代表 `Adapter` 抛出的异常,所有的 `Adapter` 都要在内部继承自这个 `Exception`。 - -- **参数** - - - `adapter_name`: 标识 adapter - -## _class_ `NoLogException()` {#NoLogException} - -- **说明** - - 指示 NoneBot 对当前 `Event` 进行处理但不显示 Log 信息。 - - 可在 [Event.get_log_string](adapters/index.md#Event-get-log-string) 时抛出 - -- **参数** - - auto - -## _class_ `ApiNotAvailable()` {#ApiNotAvailable} - -- **说明:** 在 API 连接不可用时抛出。 - -- **参数** - - auto - -## _class_ `NetworkError()` {#NetworkError} - -- **说明:** 在网络出现问题时抛出, 如: API 请求地址不正确, API 请求无返回或返回状态非正常等。 - -- **参数** - - auto - -## _class_ `ActionFailed()` {#ActionFailed} - -- **说明:** API 请求成功返回数据,但 API 操作失败。 - -- **参数** - - auto - -## _class_ `DriverException()` {#DriverException} - -- **说明:** `Driver` 抛出的异常基类。 - -- **参数** - - auto - -## _class_ `WebSocketClosed()` {#WebSocketClosed} - -- **说明:** WebSocket 连接已关闭。 - -- **参数** - - auto diff --git a/website/versioned_docs/version-2.3.2/api/index.md b/website/versioned_docs/version-2.3.2/api/index.md deleted file mode 100644 index 577535d2f6f7..000000000000 --- a/website/versioned_docs/version-2.3.2/api/index.md +++ /dev/null @@ -1,284 +0,0 @@ ---- -sidebar_position: 0 -description: nonebot 模块 ---- - -# nonebot - -本模块主要定义了 NoneBot 启动所需函数,供 bot 入口文件调用。 - -## 快捷导入 - -为方便使用,本模块从子模块导入了部分内容,以下内容可以直接通过本模块导入: - -- `on` => [`on`](plugin/on.md#on) -- `on_metaevent` => [`on_metaevent`](plugin/on.md#on-metaevent) -- `on_message` => [`on_message`](plugin/on.md#on-message) -- `on_notice` => [`on_notice`](plugin/on.md#on-notice) -- `on_request` => [`on_request`](plugin/on.md#on-request) -- `on_startswith` => [`on_startswith`](plugin/on.md#on-startswith) -- `on_endswith` => [`on_endswith`](plugin/on.md#on-endswith) -- `on_fullmatch` => [`on_fullmatch`](plugin/on.md#on-fullmatch) -- `on_keyword` => [`on_keyword`](plugin/on.md#on-keyword) -- `on_command` => [`on_command`](plugin/on.md#on-command) -- `on_shell_command` => [`on_shell_command`](plugin/on.md#on-shell-command) -- `on_regex` => [`on_regex`](plugin/on.md#on-regex) -- `on_type` => [`on_type`](plugin/on.md#on-type) -- `CommandGroup` => [`CommandGroup`](plugin/on.md#CommandGroup) -- `Matchergroup` => [`MatcherGroup`](plugin/on.md#MatcherGroup) -- `load_plugin` => [`load_plugin`](plugin/load.md#load-plugin) -- `load_plugins` => [`load_plugins`](plugin/load.md#load-plugins) -- `load_all_plugins` => [`load_all_plugins`](plugin/load.md#load-all-plugins) -- `load_from_json` => [`load_from_json`](plugin/load.md#load-from-json) -- `load_from_toml` => [`load_from_toml`](plugin/load.md#load-from-toml) -- `load_builtin_plugin` => - [`load_builtin_plugin`](plugin/load.md#load-builtin-plugin) -- `load_builtin_plugins` => - [`load_builtin_plugins`](plugin/load.md#load-builtin-plugins) -- `get_plugin` => [`get_plugin`](plugin/index.md#get-plugin) -- `get_plugin_by_module_name` => - [`get_plugin_by_module_name`](plugin/index.md#get-plugin-by-module-name) -- `get_loaded_plugins` => - [`get_loaded_plugins`](plugin/index.md#get-loaded-plugins) -- `get_available_plugin_names` => - [`get_available_plugin_names`](plugin/index.md#get-available-plugin-names) -- `get_plugin_config` => [`get_plugin_config`](plugin/index.md#get-plugin-config) -- `require` => [`require`](plugin/load.md#require) - -## _def_ `get_driver()` {#get-driver} - -- **说明** - - 获取全局 [Driver](drivers/index.md#Driver) 实例。 - - 可用于在计划任务的回调等情形中获取当前 [Driver](drivers/index.md#Driver) 实例。 - -- **参数** - - empty - -- **返回** - - - [Driver](drivers/index.md#Driver): 全局 [Driver](drivers/index.md#Driver) 对象 - -- **异常** - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - driver = nonebot.get_driver() - ``` - -## _def_ `get_adapter(name)` {#get-adapter} - -- **说明:** 获取已注册的 [Adapter](adapters/index.md#Adapter) 实例。 - -- **重载** - - **1.** `(name) -> Adapter` - - - **参数** - - - `name` (str): 适配器名称 - - - **返回** - - - [Adapter](adapters/index.md#Adapter): 指定名称的 [Adapter](adapters/index.md#Adapter) 对象 - - **2.** `(name) -> A` - - - **参数** - - - `name` (type[A]): 适配器类型 - - - **返回** - - - A: 指定类型的 [Adapter](adapters/index.md#Adapter) 对象 - -- **异常** - - - ValueError: 指定的 [Adapter](adapters/index.md#Adapter) 未注册 - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - from nonebot.adapters.console import Adapter - adapter = nonebot.get_adapter(Adapter) - ``` - -## _def_ `get_adapters()` {#get-adapters} - -- **说明:** 获取所有已注册的 [Adapter](adapters/index.md#Adapter) 实例。 - -- **参数** - - empty - -- **返回** - - - dict[str, [Adapter](adapters/index.md#Adapter)]: 所有 [Adapter](adapters/index.md#Adapter) 实例字典 - -- **异常** - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - adapters = nonebot.get_adapters() - ``` - -## _def_ `get_app()` {#get-app} - -- **说明:** 获取全局 [ASGIMixin](drivers/index.md#ASGIMixin) 对应的 Server App 对象。 - -- **参数** - - empty - -- **返回** - - - Any: Server App 对象 - -- **异常** - - - AssertionError: 全局 Driver 对象不是 [ASGIMixin](drivers/index.md#ASGIMixin) 类型 - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - app = nonebot.get_app() - ``` - -## _def_ `get_asgi()` {#get-asgi} - -- **说明:** 获取全局 [ASGIMixin](drivers/index.md#ASGIMixin) 对应的 [ASGI](https://asgi.readthedocs.io/) 对象。 - -- **参数** - - empty - -- **返回** - - - Any: ASGI 对象 - -- **异常** - - - AssertionError: 全局 Driver 对象不是 [ASGIMixin](drivers/index.md#ASGIMixin) 类型 - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - asgi = nonebot.get_asgi() - ``` - -## _def_ `get_bot(self_id=None)` {#get-bot} - -- **说明** - - 获取一个连接到 NoneBot 的 [Bot](adapters/index.md#Bot) 对象。 - - 当提供 `self_id` 时,此函数是 `get_bots()[self_id]` 的简写; - 当不提供时,返回一个 [Bot](adapters/index.md#Bot)。 - -- **参数** - - - `self_id` (str | None): 用来识别 [Bot](adapters/index.md#Bot) 的 [Bot.self_id](adapters/index.md#Bot-self-id) 属性 - -- **返回** - - - [Bot](adapters/index.md#Bot): [Bot](adapters/index.md#Bot) 对象 - -- **异常** - - - KeyError: 对应 self_id 的 Bot 不存在 - - - ValueError: 没有传入 self_id 且没有 Bot 可用 - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - assert nonebot.get_bot("12345") == nonebot.get_bots()["12345"] - - another_unspecified_bot = nonebot.get_bot() - ``` - -## _def_ `get_bots()` {#get-bots} - -- **说明:** 获取所有连接到 NoneBot 的 [Bot](adapters/index.md#Bot) 对象。 - -- **参数** - - empty - -- **返回** - - - dict[str, [Bot](adapters/index.md#Bot)]: 一个以 [Bot.self_id](adapters/index.md#Bot-self-id) 为键 - - [Bot](adapters/index.md#Bot) 对象为值的字典 - -- **异常** - - - ValueError: 全局 [Driver](drivers/index.md#Driver) 对象尚未初始化 ([nonebot.init](#init) 尚未调用) - -- **用法** - - ```python - bots = nonebot.get_bots() - ``` - -## _def_ `init(*, _env_file=None, **kwargs)` {#init} - -- **说明** - - 初始化 NoneBot 以及 全局 [Driver](drivers/index.md#Driver) 对象。 - - NoneBot 将会从 .env 文件中读取环境信息,并使用相应的 env 文件配置。 - - 也可以传入自定义的 `_env_file` 来指定 NoneBot 从该文件读取配置。 - -- **参数** - - - `_env_file` (DOTENV_TYPE | None): 配置文件名,默认从 `.env.{env_name}` 中读取配置 - - - `**kwargs` (Any): 任意变量,将会存储到 [Driver.config](drivers/index.md#Driver-config) 对象里 - -- **返回** - - - None - -- **用法** - - ```python - nonebot.init(database=Database(...)) - ``` - -## _def_ `run(*args, **kwargs)` {#run} - -- **说明:** 启动 NoneBot,即运行全局 [Driver](drivers/index.md#Driver) 对象。 - -- **参数** - - - `*args` (Any): 传入 [Driver.run](drivers/index.md#Driver-run) 的位置参数 - - - `**kwargs` (Any): 传入 [Driver.run](drivers/index.md#Driver-run) 的命名参数 - -- **返回** - - - None - -- **用法** - - ```python - nonebot.run(host="127.0.0.1", port=8080) - ``` diff --git a/website/versioned_docs/version-2.3.2/api/log.md b/website/versioned_docs/version-2.3.2/api/log.md deleted file mode 100644 index b4238ba995e8..000000000000 --- a/website/versioned_docs/version-2.3.2/api/log.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -sidebar_position: 7 -description: nonebot.log 模块 ---- - -# nonebot.log - -本模块定义了 NoneBot 的日志记录 Logger。 - -NoneBot 使用 [`loguru`][loguru] 来记录日志信息。 - -自定义 logger 请参考 [自定义日志](https://nonebot.dev/docs/appendices/log) -以及 [`loguru`][loguru] 文档。 - -[loguru]: https://github.com/Delgan/loguru - -## _var_ `logger` {#logger} - -- **类型:** Logger - -- **说明** - - NoneBot 日志记录器对象。 - - 默认信息: - - - 格式: `[%(asctime)s %(name)s] %(levelname)s: %(message)s` - - 等级: `INFO` ,根据 `config.log_level` 配置改变 - - 输出: 输出至 stdout - -- **用法** - - ```python - from nonebot.log import logger - ``` - -## _class_ `LoguruHandler()` {#LoguruHandler} - -- **说明:** logging 与 loguru 之间的桥梁,将 logging 的日志转发到 loguru。 - -- **参数** - - auto - -### _method_ `emit(record)` {#LoguruHandler-emit} - -- **参数** - - - `record` (logging.LogRecord) - -- **返回** - - - untyped - -## _def_ `default_filter(record)` {#default-filter} - -- **说明:** 默认的日志过滤器,根据 `config.log_level` 配置改变日志等级。 - -- **参数** - - - `record` (Record) - -- **返回** - - - untyped - -## _var_ `default_format` {#default-format} - -- **类型:** str - -- **说明:** 默认日志格式 diff --git a/website/versioned_docs/version-2.3.2/api/matcher.md b/website/versioned_docs/version-2.3.2/api/matcher.md deleted file mode 100644 index b529af158172..000000000000 --- a/website/versioned_docs/version-2.3.2/api/matcher.md +++ /dev/null @@ -1,749 +0,0 @@ ---- -sidebar_position: 3 -description: nonebot.matcher 模块 ---- - -# nonebot.matcher - -本模块实现事件响应器的创建与运行,并提供一些快捷方法来帮助用户更好的与机器人进行对话。 - -## _class_ `Matcher()` {#Matcher} - -- **说明:** 事件响应器类 - -- **参数** - - empty - -### _class-var_ `type` {#Matcher-type} - -- **类型:** ClassVar[str] - -- **说明:** 事件响应器类型 - -### _class-var_ `rule` {#Matcher-rule} - -- **类型:** ClassVar[[Rule](rule.md#Rule)] - -- **说明:** 事件响应器匹配规则 - -### _class-var_ `permission` {#Matcher-permission} - -- **类型:** ClassVar[[Permission](permission.md#Permission)] - -- **说明:** 事件响应器触发权限 - -### _class-var_ `handlers` {#Matcher-handlers} - -- **类型:** ClassVar[list[[Dependent](dependencies/index.md#Dependent)[Any]]] - -- **说明:** 事件响应器拥有的事件处理函数列表 - -### _class-var_ `priority` {#Matcher-priority} - -- **类型:** ClassVar[int] - -- **说明:** 事件响应器优先级 - -### _class-var_ `block` {#Matcher-block} - -- **类型:** bool - -- **说明:** 事件响应器是否阻止事件传播 - -### _class-var_ `temp` {#Matcher-temp} - -- **类型:** ClassVar[bool] - -- **说明:** 事件响应器是否为临时 - -### _class-var_ `expire_time` {#Matcher-expire-time} - -- **类型:** ClassVar[datetime | None] - -- **说明:** 事件响应器过期时间点 - -### _classmethod_ `new(type_="", rule=None, permission=None, handlers=None, temp=False, priority=1, block=False, *, plugin=None, module=None, source=None, expire_time=None, default_state=None, default_type_updater=None, default_permission_updater=None)` {#Matcher-new} - -- **说明:** 创建一个新的事件响应器,并存储至 `matchers <#matchers>`\_ - -- **参数** - - - `type_` (str): 事件响应器类型,与 `event.get_type()` 一致时触发,空字符串表示任意 - - - `rule` ([Rule](rule.md#Rule) | None): 匹配规则 - - - `permission` ([Permission](permission.md#Permission) | None): 权限 - - - `handlers` (list[[T\_Handler](typing.md#T-Handler) | [Dependent](dependencies/index.md#Dependent)[Any]] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器,即触发一次后删除 - - - `priority` (int): 响应优先级 - - - `block` (bool): 是否阻止事件向更低优先级的响应器传播 - - - `plugin` ([Plugin](plugin/model.md#Plugin) | None): **Deprecated.** 事件响应器所在插件 - - - `module` (ModuleType | None): **Deprecated.** 事件响应器所在模块 - - - `source` (MatcherSource | None): 事件响应器源代码上下文信息 - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `default_state` ([T_State](typing.md#T-State) | None): 默认状态 `state` - - - `default_type_updater` ([T_TypeUpdater](typing.md#T-TypeUpdater) | [Dependent](dependencies/index.md#Dependent)[str] | None): 默认事件类型更新函数 - - - `default_permission_updater` ([T_PermissionUpdater](typing.md#T-PermissionUpdater) | [Dependent](dependencies/index.md#Dependent)[[Permission](permission.md#Permission)] | None): 默认会话权限更新函数 - -- **返回** - - - type[Matcher]: 新的事件响应器类 - -### _classmethod_ `destroy()` {#Matcher-destroy} - -- **说明:** 销毁当前的事件响应器 - -- **参数** - - empty - -- **返回** - - - None - -### _classmethod_ `check_perm(bot, event, stack=None, dependency_cache=None)` {#Matcher-check-perm} - -- **说明:** 检查是否满足触发权限 - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): 上报事件 - - - `stack` (AsyncExitStack | None): 异步上下文栈 - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None): 依赖缓存 - -- **返回** - - - bool: 是否满足权限 - -### _classmethod_ `check_rule(bot, event, state, stack=None, dependency_cache=None)` {#Matcher-check-rule} - -- **说明:** 检查是否满足匹配规则 - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): 上报事件 - - - `state` ([T_State](typing.md#T-State)): 当前状态 - - - `stack` (AsyncExitStack | None): 异步上下文栈 - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None): 依赖缓存 - -- **返回** - - - bool: 是否满足匹配规则 - -### _classmethod_ `type_updater(func)` {#Matcher-type-updater} - -- **说明:** 装饰一个函数来更改当前事件响应器的默认响应事件类型更新函数 - -- **参数** - - - `func` ([T_TypeUpdater](typing.md#T-TypeUpdater)): 响应事件类型更新函数 - -- **返回** - - - [T_TypeUpdater](typing.md#T-TypeUpdater) - -### _classmethod_ `permission_updater(func)` {#Matcher-permission-updater} - -- **说明:** 装饰一个函数来更改当前事件响应器的默认会话权限更新函数 - -- **参数** - - - `func` ([T_PermissionUpdater](typing.md#T-PermissionUpdater)): 会话权限更新函数 - -- **返回** - - - [T_PermissionUpdater](typing.md#T-PermissionUpdater) - -### _classmethod_ `append_handler(handler, parameterless=None)` {#Matcher-append-handler} - -- **参数** - - - `handler` ([T_Handler](typing.md#T-Handler)) - - - `parameterless` (Iterable[Any] | None) - -- **返回** - - - [Dependent](dependencies/index.md#Dependent)[Any] - -### _classmethod_ `handle(parameterless=None)` {#Matcher-handle} - -- **说明:** 装饰一个函数来向事件响应器直接添加一个处理函数 - -- **参数** - - - `parameterless` (Iterable[Any] | None): 非参数类型依赖列表 - -- **返回** - - - ([T_Handler](typing.md#T-Handler)) -> [T_Handler](typing.md#T-Handler) - -### _classmethod_ `receive(id="", parameterless=None)` {#Matcher-receive} - -- **说明:** 装饰一个函数来指示 NoneBot 在接收用户新的一条消息后继续运行该函数 - -- **参数** - - - `id` (str): 消息 ID - - - `parameterless` (Iterable[Any] | None): 非参数类型依赖列表 - -- **返回** - - - ([T_Handler](typing.md#T-Handler)) -> [T_Handler](typing.md#T-Handler) - -### _classmethod_ `got(key, prompt=None, parameterless=None)` {#Matcher-got} - -- **说明** - - 装饰一个函数来指示 NoneBot 获取一个参数 `key` - - 当要获取的 `key` 不存在时接收用户新的一条消息再运行该函数, - 如果 `key` 已存在则直接继续运行 - -- **参数** - - - `key` (str): 参数名 - - - `prompt` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 在参数不存在时向用户发送的消息 - - - `parameterless` (Iterable[Any] | None): 非参数类型依赖列表 - -- **返回** - - - ([T_Handler](typing.md#T-Handler)) -> [T_Handler](typing.md#T-Handler) - -### _classmethod_ `send(message, **kwargs)` {#Matcher-send} - -- **说明:** 发送一条消息给当前交互用户 - -- **参数** - - - `message` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate)): 消息内容 - - - `**kwargs` (Any): [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - Any - -### _classmethod_ `finish(message=None, **kwargs)` {#Matcher-finish} - -- **说明:** 发送一条消息给当前交互用户并结束当前事件响应器 - -- **参数** - - - `message` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 消息内容 - - - `**kwargs`: [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - NoReturn - -### _classmethod_ `pause(prompt=None, **kwargs)` {#Matcher-pause} - -- **说明:** 发送一条消息给当前交互用户并暂停事件响应器,在接收用户新的一条消息后继续下一个处理函数 - -- **参数** - - - `prompt` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 消息内容 - - - `**kwargs`: [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - NoReturn - -### _classmethod_ `reject(prompt=None, **kwargs)` {#Matcher-reject} - -- **说明:** 最近使用 `got` / `receive` 接收的消息不符合预期, 发送一条消息给当前交互用户并将当前事件处理流程中断在当前位置,在接收用户新的一个事件后从头开始执行当前处理函数 - -- **参数** - - - `prompt` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 消息内容 - - - `**kwargs`: [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - NoReturn - -### _classmethod_ `reject_arg(key, prompt=None, **kwargs)` {#Matcher-reject-arg} - -- **说明:** 最近使用 `got` 接收的消息不符合预期, 发送一条消息给当前交互用户并将当前事件处理流程中断在当前位置,在接收用户新的一条消息后从头开始执行当前处理函数 - -- **参数** - - - `key` (str): 参数名 - - - `prompt` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 消息内容 - - - `**kwargs`: [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - NoReturn - -### _classmethod_ `reject_receive(id="", prompt=None, **kwargs)` {#Matcher-reject-receive} - -- **说明:** 最近使用 `receive` 接收的消息不符合预期, 发送一条消息给当前交互用户并将当前事件处理流程中断在当前位置,在接收用户新的一个事件后从头开始执行当前处理函数 - -- **参数** - - - `id` (str): 消息 id - - - `prompt` (str | [Message](adapters/index.md#Message) | [MessageSegment](adapters/index.md#MessageSegment) | [MessageTemplate](adapters/index.md#MessageTemplate) | None): 消息内容 - - - `**kwargs`: [Bot.send](adapters/index.md#Bot-send) 的参数, 请参考对应 adapter 的 bot 对象 api - -- **返回** - - - NoReturn - -### _classmethod_ `skip()` {#Matcher-skip} - -- **说明** - - 跳过当前事件处理函数,继续下一个处理函数 - - 通常在事件处理函数的依赖中使用。 - -- **参数** - - empty - -- **返回** - - - NoReturn - -### _method_ `get_receive(id, default=None)` {#Matcher-get-receive} - -- **说明** - - 获取一个 `receive` 事件 - - 如果没有找到对应的事件,返回 `default` 值 - -- **重载** - - **1.** `(id) -> Event | None` - - - **参数** - - - `id` (str) - - - **返回** - - - [Event](adapters/index.md#Event) | None - - **2.** `(id, default) -> Event | T` - - - **参数** - - - `id` (str) - - - `default` (T) - - - **返回** - - - [Event](adapters/index.md#Event) | T - -### _method_ `set_receive(id, event)` {#Matcher-set-receive} - -- **说明:** 设置一个 `receive` 事件 - -- **参数** - - - `id` (str) - - - `event` ([Event](adapters/index.md#Event)) - -- **返回** - - - None - -### _method_ `get_last_receive(default=None)` {#Matcher-get-last-receive} - -- **说明** - - 获取最近一次 `receive` 事件 - - 如果没有事件,返回 `default` 值 - -- **重载** - - **1.** `() -> Event | None` - - - **参数** - - empty - - - **返回** - - - [Event](adapters/index.md#Event) | None - - **2.** `(default) -> Event | T` - - - **参数** - - - `default` (T) - - - **返回** - - - [Event](adapters/index.md#Event) | T - -### _method_ `get_arg(key, default=None)` {#Matcher-get-arg} - -- **说明** - - 获取一个 `got` 消息 - - 如果没有找到对应的消息,返回 `default` 值 - -- **重载** - - **1.** `(key) -> Message | None` - - - **参数** - - - `key` (str) - - - **返回** - - - [Message](adapters/index.md#Message) | None - - **2.** `(key, default) -> Message | T` - - - **参数** - - - `key` (str) - - - `default` (T) - - - **返回** - - - [Message](adapters/index.md#Message) | T - -### _method_ `set_arg(key, message)` {#Matcher-set-arg} - -- **说明:** 设置一个 `got` 消息 - -- **参数** - - - `key` (str) - - - `message` ([Message](adapters/index.md#Message)) - -- **返回** - - - None - -### _method_ `set_target(target, cache=True)` {#Matcher-set-target} - -- **参数** - - - `target` (str) - - - `cache` (bool) - -- **返回** - - - None - -### _method_ `get_target(default=None)` {#Matcher-get-target} - -- **重载** - - **1.** `() -> str | None` - - - **参数** - - empty - - - **返回** - - - str | None - - **2.** `(default) -> str | T` - - - **参数** - - - `default` (T) - - - **返回** - - - str | T - -### _method_ `stop_propagation()` {#Matcher-stop-propagation} - -- **说明:** 阻止事件传播 - -- **参数** - - empty - -- **返回** - - - untyped - -### _async method_ `update_type(bot, event, stack=None, dependency_cache=None)` {#Matcher-update-type} - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)) - - - `event` ([Event](adapters/index.md#Event)) - - - `stack` (AsyncExitStack | None) - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None) - -- **返回** - - - str - -### _async method_ `update_permission(bot, event, stack=None, dependency_cache=None)` {#Matcher-update-permission} - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)) - - - `event` ([Event](adapters/index.md#Event)) - - - `stack` (AsyncExitStack | None) - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None) - -- **返回** - - - [Permission](permission.md#Permission) - -### _async method_ `resolve_reject()` {#Matcher-resolve-reject} - -- **参数** - - empty - -- **返回** - - - untyped - -### _method_ `ensure_context(bot, event)` {#Matcher-ensure-context} - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)) - - - `event` ([Event](adapters/index.md#Event)) - -- **返回** - - - untyped - -### _async method_ `simple_run(bot, event, state, stack=None, dependency_cache=None)` {#Matcher-simple-run} - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)) - - - `event` ([Event](adapters/index.md#Event)) - - - `state` ([T_State](typing.md#T-State)) - - - `stack` (AsyncExitStack | None) - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None) - -- **返回** - - - untyped - -### _async method_ `run(bot, event, state, stack=None, dependency_cache=None)` {#Matcher-run} - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)) - - - `event` ([Event](adapters/index.md#Event)) - - - `state` ([T_State](typing.md#T-State)) - - - `stack` (AsyncExitStack | None) - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None) - -- **返回** - - - untyped - -## _var_ `matchers` {#matchers} - -- **类型:** untyped - -## _class_ `MatcherManager()` {#MatcherManager} - -- **说明** - - 事件响应器管理器 - - 实现了常用字典操作,用于管理事件响应器。 - -- **参数** - - empty - -### _method_ `keys()` {#MatcherManager-keys} - -- **参数** - - empty - -- **返回** - - - KeysView[int] - -### _method_ `values()` {#MatcherManager-values} - -- **参数** - - empty - -- **返回** - - - ValuesView[list[type[[Matcher](#Matcher)]]] - -### _method_ `items()` {#MatcherManager-items} - -- **参数** - - empty - -- **返回** - - - ItemsView[int, list[type[[Matcher](#Matcher)]]] - -### _method_ `get(key, default=None)` {#MatcherManager-get} - -- **重载** - - **1.** `(key) -> list[type[Matcher]] | None` - - - **参数** - - - `key` (int) - - - **返回** - - - list[type[[Matcher](#Matcher)]] | None - - **2.** `(key, default) -> list[type[Matcher]] | T` - - - **参数** - - - `key` (int) - - - `default` (T) - - - **返回** - - - list[type[[Matcher](#Matcher)]] | T - -### _method_ `pop(key)` {#MatcherManager-pop} - -- **参数** - - - `key` (int) - -- **返回** - - - list[type[[Matcher](#Matcher)]] - -### _method_ `popitem()` {#MatcherManager-popitem} - -- **参数** - - empty - -- **返回** - - - tuple[int, list[type[[Matcher](#Matcher)]]] - -### _method_ `clear()` {#MatcherManager-clear} - -- **参数** - - empty - -- **返回** - - - None - -### _method_ `update(__m)` {#MatcherManager-update} - -- **参数** - - - `__m` (MutableMapping[int, list[type[[Matcher](#Matcher)]]]) - -- **返回** - - - None - -### _method_ `setdefault(key, default)` {#MatcherManager-setdefault} - -- **参数** - - - `key` (int) - - - `default` (list[type[[Matcher](#Matcher)]]) - -- **返回** - - - list[type[[Matcher](#Matcher)]] - -### _method_ `set_provider(provider_class)` {#MatcherManager-set-provider} - -- **说明:** 设置事件响应器存储器 - -- **参数** - - - `provider_class` (type[[MatcherProvider](#MatcherProvider)]): 事件响应器存储器类 - -- **返回** - - - None - -## _abstract class_ `MatcherProvider(matchers)` {#MatcherProvider} - -- **说明:** 事件响应器存储器基类 - -- **参数** - - - `matchers` (Mapping[int, list[type[[Matcher](#Matcher)]]]): 当前存储器中已有的事件响应器 - -## _var_ `DEFAULT_PROVIDER_CLASS` {#DEFAULT-PROVIDER-CLASS} - -- **类型:** untyped - -- **说明:** 默认存储器类型 diff --git a/website/versioned_docs/version-2.3.2/api/message.md b/website/versioned_docs/version-2.3.2/api/message.md deleted file mode 100644 index 905b2de36d3b..000000000000 --- a/website/versioned_docs/version-2.3.2/api/message.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -sidebar_position: 2 -description: nonebot.message 模块 ---- - -# nonebot.message - -本模块定义了事件处理主要流程。 - -NoneBot 内部处理并按优先级分发事件给所有事件响应器,提供了多个插槽以进行事件的预处理等。 - -## _def_ `event_preprocessor(func)` {#event-preprocessor} - -- **说明** - - 事件预处理。 - - 装饰一个函数,使它在每次接收到事件并分发给各响应器之前执行。 - -- **参数** - - - `func` ([T_EventPreProcessor](typing.md#T-EventPreProcessor)) - -- **返回** - - - [T_EventPreProcessor](typing.md#T-EventPreProcessor) - -## _def_ `event_postprocessor(func)` {#event-postprocessor} - -- **说明** - - 事件后处理。 - - 装饰一个函数,使它在每次接收到事件并分发给各响应器之后执行。 - -- **参数** - - - `func` ([T_EventPostProcessor](typing.md#T-EventPostProcessor)) - -- **返回** - - - [T_EventPostProcessor](typing.md#T-EventPostProcessor) - -## _def_ `run_preprocessor(func)` {#run-preprocessor} - -- **说明** - - 运行预处理。 - - 装饰一个函数,使它在每次事件响应器运行前执行。 - -- **参数** - - - `func` ([T_RunPreProcessor](typing.md#T-RunPreProcessor)) - -- **返回** - - - [T_RunPreProcessor](typing.md#T-RunPreProcessor) - -## _def_ `run_postprocessor(func)` {#run-postprocessor} - -- **说明** - - 运行后处理。 - - 装饰一个函数,使它在每次事件响应器运行后执行。 - -- **参数** - - - `func` ([T_RunPostProcessor](typing.md#T-RunPostProcessor)) - -- **返回** - - - [T_RunPostProcessor](typing.md#T-RunPostProcessor) - -## _async def_ `check_and_run_matcher(Matcher, bot, event, state, stack=None, dependency_cache=None)` {#check-and-run-matcher} - -- **说明:** 检查并运行事件响应器。 - -- **参数** - - - `Matcher` (type[[Matcher](matcher.md#Matcher)]): 事件响应器 - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): Event 对象 - - - `state` ([T_State](typing.md#T-State)): 会话状态 - - - `stack` (AsyncExitStack | None): 异步上下文栈 - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None): 依赖缓存 - -- **返回** - - - None - -## _async def_ `handle_event(bot, event)` {#handle-event} - -- **说明:** 处理一个事件。调用该函数以实现分发事件。 - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): Event 对象 - -- **返回** - - - None - -- **用法** - - ```python - import asyncio - asyncio.create_task(handle_event(bot, event)) - ``` diff --git a/website/versioned_docs/version-2.3.2/api/params.md b/website/versioned_docs/version-2.3.2/api/params.md deleted file mode 100644 index 47a5d3fa6e4d..000000000000 --- a/website/versioned_docs/version-2.3.2/api/params.md +++ /dev/null @@ -1,510 +0,0 @@ ---- -sidebar_position: 4 -description: nonebot.params 模块 ---- - -# nonebot.params - -本模块定义了依赖注入的各类参数。 - -## _def_ `Arg(key=None)` {#Arg} - -- **说明:** Arg 参数消息 - -- **参数** - - - `key` (str | None) - -- **返回** - - - Any - -## _def_ `ArgStr(key=None)` {#ArgStr} - -- **说明:** Arg 参数消息文本 - -- **参数** - - - `key` (str | None) - -- **返回** - - - str - -## _def_ `Depends(dependency=None, *, use_cache=True, validate=False)` {#Depends} - -- **说明:** 子依赖装饰器 - -- **参数** - - - `dependency` ([T_Handler](typing.md#T-Handler) | None): 依赖函数。默认为参数的类型注释。 - - - `use_cache` (bool): 是否使用缓存。默认为 `True`。 - - - `validate` (bool | PydanticFieldInfo): 是否使用 Pydantic 类型校验。默认为 `False`。 - -- **返回** - - - Any - -- **用法** - - ```python - def depend_func() -> Any: - return ... - - def depend_gen_func(): - try: - yield ... - finally: - ... - - async def handler( - param_name: Any = Depends(depend_func), - gen: Any = Depends(depend_gen_func), - ): - ... - ``` - -## _class_ `ArgParam(*args, key, type, **kwargs)` {#ArgParam} - -- **说明** - - Arg 注入参数 - - 本注入解析事件响应器操作 `got` 所获取的参数。 - - 可以通过 `Arg`、`ArgStr`、`ArgPlainText` 等函数参数 `key` 指定获取的参数, - 留空则会根据参数名称获取。 - -- **参数** - - - `*args` - - - `key` (str) - - - `type` (Literal['message', 'str', 'plaintext']) - - - `**kwargs` (Any) - -## _class_ `BotParam(*args, checker=None, **kwargs)` {#BotParam} - -- **说明** - - 注入参数。 - - 本注入解析所有类型为且仅为 [Bot](adapters/index.md#Bot) 及其子类或 `None` 的参数。 - - 为保证兼容性,本注入还会解析名为 `bot` 且没有类型注解的参数。 - -- **参数** - - - `*args` - - - `checker` ([ModelField](compat.md#ModelField) | None) - - - `**kwargs` (Any) - -## _class_ `EventParam(*args, checker=None, **kwargs)` {#EventParam} - -- **说明** - - 注入参数 - - 本注入解析所有类型为且仅为 [Event](adapters/index.md#Event) 及其子类或 `None` 的参数。 - - 为保证兼容性,本注入还会解析名为 `event` 且没有类型注解的参数。 - -- **参数** - - - `*args` - - - `checker` ([ModelField](compat.md#ModelField) | None) - - - `**kwargs` (Any) - -## _class_ `StateParam(*args, validate=False, **kwargs)` {#StateParam} - -- **说明** - - 事件处理状态注入参数 - - 本注入解析所有类型为 `T_State` 的参数。 - - 为保证兼容性,本注入还会解析名为 `state` 且没有类型注解的参数。 - -- **参数** - - - `*args` - - - `validate` (bool) - - - `**kwargs` (Any) - -## _class_ `DependParam(*args, dependent, use_cache, **kwargs)` {#DependParam} - -- **说明** - - 子依赖注入参数。 - - 本注入解析所有子依赖注入,然后将它们的返回值作为参数值传递给父依赖。 - - 本注入应该具有最高优先级,因此应该在其他参数之前检查。 - -- **参数** - - - `*args` - - - `dependent` ([Dependent](dependencies/index.md#Dependent)) - - - `use_cache` (bool) - - - `**kwargs` (Any) - -## _def_ `ArgPlainText(key=None)` {#ArgPlainText} - -- **说明:** Arg 参数消息纯文本 - -- **参数** - - - `key` (str | None) - -- **返回** - - - str - -## _class_ `DefaultParam(*args, validate=False, **kwargs)` {#DefaultParam} - -- **说明** - - 默认值注入参数 - - 本注入解析所有剩余未能解析且具有默认值的参数。 - - 本注入参数应该具有最低优先级,因此应该在所有其他注入参数之后使用。 - -- **参数** - - - `*args` - - - `validate` (bool) - - - `**kwargs` (Any) - -## _class_ `MatcherParam(*args, checker=None, **kwargs)` {#MatcherParam} - -- **说明** - - 事件响应器实例注入参数 - - 本注入解析所有类型为且仅为 [Matcher](matcher.md#Matcher) 及其子类或 `None` 的参数。 - - 为保证兼容性,本注入还会解析名为 `matcher` 且没有类型注解的参数。 - -- **参数** - - - `*args` - - - `checker` ([ModelField](compat.md#ModelField) | None) - - - `**kwargs` (Any) - -## _class_ `ExceptionParam(*args, validate=False, **kwargs)` {#ExceptionParam} - -- **说明** - - 的异常注入参数 - - 本注入解析所有类型为 `Exception` 或 `None` 的参数。 - - 为保证兼容性,本注入还会解析名为 `exception` 且没有类型注解的参数。 - -- **参数** - - - `*args` - - - `validate` (bool) - - - `**kwargs` (Any) - -## _def_ `EventType()` {#EventType} - -- **说明:** 类型参数 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `EventMessage()` {#EventMessage} - -- **说明:** 消息参数 - -- **参数** - - empty - -- **返回** - - - Any - -## _def_ `EventPlainText()` {#EventPlainText} - -- **说明:** 纯文本消息参数 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `EventToMe()` {#EventToMe} - -- **说明:** `to_me` 参数 - -- **参数** - - empty - -- **返回** - - - bool - -## _def_ `Command()` {#Command} - -- **说明:** 消息命令元组 - -- **参数** - - empty - -- **返回** - - - tuple[str, ...] - -## _def_ `RawCommand()` {#RawCommand} - -- **说明:** 消息命令文本 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `CommandArg()` {#CommandArg} - -- **说明:** 消息命令参数 - -- **参数** - - empty - -- **返回** - - - Any - -## _def_ `CommandStart()` {#CommandStart} - -- **说明:** 消息命令开头 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `CommandWhitespace()` {#CommandWhitespace} - -- **说明:** 消息命令与参数之间的空白 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `ShellCommandArgs()` {#ShellCommandArgs} - -- **说明:** shell 命令解析后的参数字典 - -- **参数** - - empty - -- **返回** - - - Any - -## _def_ `ShellCommandArgv()` {#ShellCommandArgv} - -- **说明:** shell 命令原始参数列表 - -- **参数** - - empty - -- **返回** - - - Any - -## _def_ `RegexMatched()` {#RegexMatched} - -- **说明:** 正则匹配结果 - -- **参数** - - empty - -- **返回** - - - Match[str] - -## _def_ `RegexStr(*groups)` {#RegexStr} - -- **说明:** 正则匹配结果文本 - -- **重载** - - **1.** `(__group=0) -> str` - - - **参数** - - - `__group` (Literal[0]) - - - **返回** - - - str - - **2.** `(__group) -> str | Any` - - - **参数** - - - `__group` (str | int) - - - **返回** - - - str | Any - - **3.** `(__group1, __group2, *groups) -> tuple[str | Any, ...]` - - - **参数** - - - `__group1` (str | int) - - - `__group2` (str | int) - - - `*groups` (str | int) - - - **返回** - - - tuple[str | Any, ...] - -## _def_ `RegexGroup()` {#RegexGroup} - -- **说明:** 正则匹配结果 group 元组 - -- **参数** - - empty - -- **返回** - - - tuple[Any, ...] - -## _def_ `RegexDict()` {#RegexDict} - -- **说明:** 正则匹配结果 group 字典 - -- **参数** - - empty - -- **返回** - - - dict[str, Any] - -## _def_ `Startswith()` {#Startswith} - -- **说明:** 响应触发前缀 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `Endswith()` {#Endswith} - -- **说明:** 响应触发后缀 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `Fullmatch()` {#Fullmatch} - -- **说明:** 响应触发完整消息 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `Keyword()` {#Keyword} - -- **说明:** 响应触发关键字 - -- **参数** - - empty - -- **返回** - - - str - -## _def_ `Received(id=None, default=None)` {#Received} - -- **说明:** `receive` 事件参数 - -- **参数** - - - `id` (str | None) - - - `default` (Any) - -- **返回** - - - Any - -## _def_ `LastReceived(default=None)` {#LastReceived} - -- **说明:** `last_receive` 事件参数 - -- **参数** - - - `default` (Any) - -- **返回** - - - Any diff --git a/website/versioned_docs/version-2.3.2/api/permission.md b/website/versioned_docs/version-2.3.2/api/permission.md deleted file mode 100644 index acb6b643275e..000000000000 --- a/website/versioned_docs/version-2.3.2/api/permission.md +++ /dev/null @@ -1,208 +0,0 @@ ---- -sidebar_position: 6 -description: nonebot.permission 模块 ---- - -# nonebot.permission - -本模块是 [Matcher.permission](matcher.md#Matcher-permission) 的类型定义。 - -每个[事件响应器](matcher.md#Matcher) -拥有一个 [Permission](#Permission),其中是 `PermissionChecker` 的集合。 -只要有一个 `PermissionChecker` 检查结果为 `True` 时就会继续运行。 - -## _def_ `USER(*users, perm=None)` {#USER} - -- **说明** - - 匹配当前事件属于指定会话。 - - 如果 `perm` 中仅有 `User` 类型的权限检查函数,则会去除原有检查函数的会话 ID 限制。 - -- **参数** - - - `*users` (str) - - - `perm` (Permission | None): 需要同时满足的权限 - - - `user`: 会话白名单 - -- **返回** - - - untyped - -## _class_ `User(users, perm=None)` {#User} - -- **说明:** 检查当前事件是否属于指定会话。 - -- **参数** - - - `users` (tuple[str, ...]): 会话 ID 元组 - - - `perm` (Permission | None): 需同时满足的权限 - -### _classmethod_ `from_event(event, perm=None)` {#User-from-event} - -- **说明** - - 从事件中获取会话 ID。 - - 如果 `perm` 中仅有 `User` 类型的权限检查函数,则会去除原有的会话 ID 限制。 - -- **参数** - - - `event` ([Event](adapters/index.md#Event)): Event 对象 - - - `perm` (Permission | None): 需同时满足的权限 - -- **返回** - - - Self - -### _classmethod_ `from_permission(*users, perm=None)` {#User-from-permission} - -- **说明** - - 指定会话与权限。 - - 如果 `perm` 中仅有 `User` 类型的权限检查函数,则会去除原有的会话 ID 限制。 - -- **参数** - - - `*users` (str): 会话白名单 - - - `perm` (Permission | None): 需同时满足的权限 - -- **返回** - - - Self - -## _class_ `Permission(*checkers)` {#Permission} - -- **说明** - - 权限类。 - - 当事件传递时,在 [Matcher](matcher.md#Matcher) 运行前进行检查。 - -- **参数** - - - `*checkers` ([T_PermissionChecker](typing.md#T-PermissionChecker) | [Dependent](dependencies/index.md#Dependent)[bool]): PermissionChecker - -- **用法** - - ```python - Permission(async_function) | sync_function - # 等价于 - Permission(async_function, sync_function) - ``` - -### _instance-var_ `checkers` {#Permission-checkers} - -- **类型:** set[[Dependent](dependencies/index.md#Dependent)[bool]] - -- **说明:** 存储 `PermissionChecker` - -### _async method_ `__call__(bot, event, stack=None, dependency_cache=None)` {#Permission---call--} - -- **说明:** 检查是否满足某个权限。 - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): Event 对象 - - - `stack` (AsyncExitStack | None): 异步上下文栈 - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None): 依赖缓存 - -- **返回** - - - bool - -## _class_ `Message()` {#Message} - -- **说明:** 检查是否为消息事件 - -- **参数** - - auto - -## _class_ `Notice()` {#Notice} - -- **说明:** 检查是否为通知事件 - -- **参数** - - auto - -## _class_ `Request()` {#Request} - -- **说明:** 检查是否为请求事件 - -- **参数** - - auto - -## _class_ `MetaEvent()` {#MetaEvent} - -- **说明:** 检查是否为元事件 - -- **参数** - - auto - -## _var_ `MESSAGE` {#MESSAGE} - -- **类型:** [Permission](#Permission) - -- **说明** - - 匹配任意 `message` 类型事件 - - 仅在需要同时捕获不同类型事件时使用,优先使用 message type 的 Matcher。 - -## _var_ `NOTICE` {#NOTICE} - -- **类型:** [Permission](#Permission) - -- **说明** - - 匹配任意 `notice` 类型事件 - - 仅在需要同时捕获不同类型事件时使用,优先使用 notice type 的 Matcher。 - -## _var_ `REQUEST` {#REQUEST} - -- **类型:** [Permission](#Permission) - -- **说明** - - 匹配任意 `request` 类型事件 - - 仅在需要同时捕获不同类型事件时使用,优先使用 request type 的 Matcher。 - -## _var_ `METAEVENT` {#METAEVENT} - -- **类型:** [Permission](#Permission) - -- **说明** - - 匹配任意 `meta_event` 类型事件 - - 仅在需要同时捕获不同类型事件时使用,优先使用 meta_event type 的 Matcher。 - -## _class_ `SuperUser()` {#SuperUser} - -- **说明:** 检查当前事件是否是消息事件且属于超级管理员 - -- **参数** - - auto - -## _var_ `SUPERUSER` {#SUPERUSER} - -- **类型:** [Permission](#Permission) - -- **说明:** 匹配任意超级用户事件 diff --git a/website/versioned_docs/version-2.3.2/api/plugin/_category_.json b/website/versioned_docs/version-2.3.2/api/plugin/_category_.json deleted file mode 100644 index 14e3de02a88f..000000000000 --- a/website/versioned_docs/version-2.3.2/api/plugin/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "position": 12 -} diff --git a/website/versioned_docs/version-2.3.2/api/plugin/index.md b/website/versioned_docs/version-2.3.2/api/plugin/index.md deleted file mode 100644 index bc6644e04cc7..000000000000 --- a/website/versioned_docs/version-2.3.2/api/plugin/index.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -sidebar_position: 0 -description: nonebot.plugin 模块 ---- - -# nonebot.plugin - -本模块为 NoneBot 插件开发提供便携的定义函数。 - -## 快捷导入 - -为方便使用,本模块从子模块导入了部分内容,以下内容可以直接通过本模块导入: - -- `on` => [`on`](on.md#on) -- `on_metaevent` => [`on_metaevent`](on.md#on-metaevent) -- `on_message` => [`on_message`](on.md#on-message) -- `on_notice` => [`on_notice`](on.md#on-notice) -- `on_request` => [`on_request`](on.md#on-request) -- `on_startswith` => [`on_startswith`](on.md#on-startswith) -- `on_endswith` => [`on_endswith`](on.md#on-endswith) -- `on_fullmatch` => [`on_fullmatch`](on.md#on-fullmatch) -- `on_keyword` => [`on_keyword`](on.md#on-keyword) -- `on_command` => [`on_command`](on.md#on-command) -- `on_shell_command` => [`on_shell_command`](on.md#on-shell-command) -- `on_regex` => [`on_regex`](on.md#on-regex) -- `on_type` => [`on_type`](on.md#on-type) -- `CommandGroup` => [`CommandGroup`](on.md#CommandGroup) -- `Matchergroup` => [`MatcherGroup`](on.md#MatcherGroup) -- `load_plugin` => [`load_plugin`](load.md#load-plugin) -- `load_plugins` => [`load_plugins`](load.md#load-plugins) -- `load_all_plugins` => [`load_all_plugins`](load.md#load-all-plugins) -- `load_from_json` => [`load_from_json`](load.md#load-from-json) -- `load_from_toml` => [`load_from_toml`](load.md#load-from-toml) -- `load_builtin_plugin` => - [`load_builtin_plugin`](load.md#load-builtin-plugin) -- `load_builtin_plugins` => - [`load_builtin_plugins`](load.md#load-builtin-plugins) -- `require` => [`require`](load.md#require) -- `PluginMetadata` => [`PluginMetadata`](model.md#PluginMetadata) - -## _def_ `get_plugin(plugin_id)` {#get-plugin} - -- **说明** - - 获取已经导入的某个插件。 - - 如果为 `load_plugins` 文件夹导入的插件,则为文件(夹)名。 - - 如果为嵌套的子插件,标识符为 `父插件标识符:子插件文件(夹)名`。 - -- **参数** - - - `plugin_id` (str): 插件标识符,即 [Plugin.id\_](model.md#Plugin-id-)。 - -- **返回** - - - [Plugin](model.md#Plugin) | None - -## _def_ `get_plugin_by_module_name(module_name)` {#get-plugin-by-module-name} - -- **说明** - - 通过模块名获取已经导入的某个插件。 - - 如果提供的模块名为某个插件的子模块,同样会返回该插件。 - -- **参数** - - - `module_name` (str): 模块名,即 [Plugin.module_name](model.md#Plugin-module-name)。 - -- **返回** - - - [Plugin](model.md#Plugin) | None - -## _def_ `get_loaded_plugins()` {#get-loaded-plugins} - -- **说明:** 获取当前已导入的所有插件。 - -- **参数** - - empty - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -## _def_ `get_available_plugin_names()` {#get-available-plugin-names} - -- **说明:** 获取当前所有可用的插件标识符(包含尚未加载的插件)。 - -- **参数** - - empty - -- **返回** - - - set[str] - -## _def_ `get_plugin_config(config)` {#get-plugin-config} - -- **说明:** 从全局配置获取当前插件需要的配置项。 - -- **参数** - - - `config` (type[C]) - -- **返回** - - - C diff --git a/website/versioned_docs/version-2.3.2/api/plugin/load.md b/website/versioned_docs/version-2.3.2/api/plugin/load.md deleted file mode 100644 index e526e712cd08..000000000000 --- a/website/versioned_docs/version-2.3.2/api/plugin/load.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -sidebar_position: 1 -description: nonebot.plugin.load 模块 ---- - -# nonebot.plugin.load - -本模块定义插件加载接口。 - -## _def_ `load_plugin(module_path)` {#load-plugin} - -- **说明:** 加载单个插件,可以是本地插件或是通过 `pip` 安装的插件。 - -- **参数** - - - `module_path` (str | Path): 插件名称 `path.to.your.plugin` 或插件路径 `pathlib.Path(path/to/your/plugin)` - -- **返回** - - - [Plugin](model.md#Plugin) | None - -## _def_ `load_plugins(*plugin_dir)` {#load-plugins} - -- **说明:** 导入文件夹下多个插件,以 `_` 开头的插件不会被导入! - -- **参数** - - - `*plugin_dir` (str): 文件夹路径 - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -## _def_ `load_all_plugins(module_path, plugin_dir)` {#load-all-plugins} - -- **说明:** 导入指定列表中的插件以及指定目录下多个插件,以 `_` 开头的插件不会被导入! - -- **参数** - - - `module_path` (Iterable[str]): 指定插件集合 - - - `plugin_dir` (Iterable[str]): 指定文件夹路径集合 - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -## _def_ `load_from_json(file_path, encoding="utf-8")` {#load-from-json} - -- **说明:** 导入指定 json 文件中的 `plugins` 以及 `plugin_dirs` 下多个插件。 以 `_` 开头的插件不会被导入! - -- **参数** - - - `file_path` (str): 指定 json 文件路径 - - - `encoding` (str): 指定 json 文件编码 - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -- **用法** - - ```json title=plugins.json - { - "plugins": ["some_plugin"], - "plugin_dirs": ["some_dir"] - } - ``` - - ```python - nonebot.load_from_json("plugins.json") - ``` - -## _def_ `load_from_toml(file_path, encoding="utf-8")` {#load-from-toml} - -- **说明:** 导入指定 toml 文件 `[tool.nonebot]` 中的 `plugins` 以及 `plugin_dirs` 下多个插件。 以 `_` 开头的插件不会被导入! - -- **参数** - - - `file_path` (str): 指定 toml 文件路径 - - - `encoding` (str): 指定 toml 文件编码 - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -- **用法** - - ```toml title=pyproject.toml - [tool.nonebot] - plugins = ["some_plugin"] - plugin_dirs = ["some_dir"] - ``` - - ```python - nonebot.load_from_toml("pyproject.toml") - ``` - -## _def_ `load_builtin_plugin(name)` {#load-builtin-plugin} - -- **说明:** 导入 NoneBot 内置插件。 - -- **参数** - - - `name` (str): 插件名称 - -- **返回** - - - [Plugin](model.md#Plugin) | None - -## _def_ `load_builtin_plugins(*plugins)` {#load-builtin-plugins} - -- **说明:** 导入多个 NoneBot 内置插件。 - -- **参数** - - - `*plugins` (str): 插件名称列表 - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -## _def_ `require(name)` {#require} - -- **说明:** 声明依赖插件。 - -- **参数** - - - `name` (str): 插件模块名或插件标识符,仅在已声明插件的情况下可使用标识符。 - -- **返回** - - - ModuleType - -- **异常** - - - RuntimeError: 插件无法加载 - -## _def_ `inherit_supported_adapters(*names)` {#inherit-supported-adapters} - -- **说明** - - 获取已加载插件的适配器支持状态集合。 - - 如果传入了多个插件名称,返回值会自动取交集。 - -- **参数** - - - `*names` (str): 插件名称列表。 - -- **返回** - - - set[str] | None - -- **异常** - - - RuntimeError: 插件未加载 - - - ValueError: 插件缺少元数据 diff --git a/website/versioned_docs/version-2.3.2/api/plugin/manager.md b/website/versioned_docs/version-2.3.2/api/plugin/manager.md deleted file mode 100644 index 51a7c10e4f33..000000000000 --- a/website/versioned_docs/version-2.3.2/api/plugin/manager.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -sidebar_position: 5 -description: nonebot.plugin.manager 模块 ---- - -# nonebot.plugin.manager - -本模块实现插件加载流程。 - -参考: [import hooks](https://docs.python.org/3/reference/import.html#import-hooks), [PEP302](https://www.python.org/dev/peps/pep-0302/) - -## _class_ `PluginManager(plugins=None, search_path=None)` {#PluginManager} - -- **说明:** 插件管理器。 - -- **参数** - - - `plugins` (Iterable[str] | None): 独立插件模块名集合。 - - - `search_path` (Iterable[str] | None): 插件搜索路径(文件夹),相对于当前工作目录。 - -### _property_ `third_party_plugins` {#PluginManager-third-party-plugins} - -- **类型:** set[str] - -- **说明:** 返回所有独立插件标识符。 - -### _property_ `searched_plugins` {#PluginManager-searched-plugins} - -- **类型:** set[str] - -- **说明:** 返回已搜索到的插件标识符。 - -### _property_ `available_plugins` {#PluginManager-available-plugins} - -- **类型:** set[str] - -- **说明:** 返回当前插件管理器中可用的插件标识符。 - -### _property_ `controlled_modules` {#PluginManager-controlled-modules} - -- **类型:** dict[str, str] - -- **说明:** 返回当前插件管理器中控制的插件标识符与模块路径映射字典。 - -### _method_ `load_plugin(name)` {#PluginManager-load-plugin} - -- **说明** - - 加载指定插件。 - - 可以使用完整插件模块名或者插件标识符加载。 - -- **参数** - - - `name` (str): 插件名称或插件标识符。 - -- **返回** - - - [Plugin](model.md#Plugin) | None - -### _method_ `load_all_plugins()` {#PluginManager-load-all-plugins} - -- **说明:** 加载所有可用插件。 - -- **参数** - - empty - -- **返回** - - - set[[Plugin](model.md#Plugin)] - -## _class_ `PluginFinder()` {#PluginFinder} - -- **参数** - - auto - -### _method_ `find_spec(fullname, path, target=None)` {#PluginFinder-find-spec} - -- **参数** - - - `fullname` (str) - - - `path` (Sequence[str] | None) - - - `target` (ModuleType | None) - -- **返回** - - - untyped - -## _class_ `PluginLoader(manager, fullname, path)` {#PluginLoader} - -- **参数** - - - `manager` (PluginManager) - - - `fullname` (str) - - - `path` (str) - -### _method_ `create_module(spec)` {#PluginLoader-create-module} - -- **参数** - - - `spec` - -- **返回** - - - ModuleType | None - -### _method_ `exec_module(module)` {#PluginLoader-exec-module} - -- **参数** - - - `module` (ModuleType) - -- **返回** - - - None diff --git a/website/versioned_docs/version-2.3.2/api/plugin/model.md b/website/versioned_docs/version-2.3.2/api/plugin/model.md deleted file mode 100644 index e43f84cd9b79..000000000000 --- a/website/versioned_docs/version-2.3.2/api/plugin/model.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -sidebar_position: 3 -description: nonebot.plugin.model 模块 ---- - -# nonebot.plugin.model - -本模块定义插件相关信息。 - -## _class_ `PluginMetadata()` {#PluginMetadata} - -- **说明:** 插件元信息,由插件编写者提供 - -- **参数** - - auto - -### _instance-var_ `name` {#PluginMetadata-name} - -- **类型:** str - -- **说明:** 插件名称 - -### _instance-var_ `description` {#PluginMetadata-description} - -- **类型:** str - -- **说明:** 插件功能介绍 - -### _instance-var_ `usage` {#PluginMetadata-usage} - -- **类型:** str - -- **说明:** 插件使用方法 - -### _class-var_ `type` {#PluginMetadata-type} - -- **类型:** str | None - -- **说明:** 插件类型,用于商店分类 - -### _class-var_ `homepage` {#PluginMetadata-homepage} - -- **类型:** str | None - -- **说明:** 插件主页 - -### _class-var_ `config` {#PluginMetadata-config} - -- **类型:** type[BaseModel] | None - -- **说明:** 插件配置项 - -### _class-var_ `supported_adapters` {#PluginMetadata-supported-adapters} - -- **类型:** set[str] | None - -- **说明** - - 插件支持的适配器模块路径 - - 格式为 `[:]`,`~` 为 `nonebot.adapters.` 的缩写。 - - `None` 表示支持**所有适配器**。 - -### _class-var_ `extra` {#PluginMetadata-extra} - -- **类型:** dict[Any, Any] - -- **说明:** 插件额外信息,可由插件编写者自由扩展定义 - -### _method_ `get_supported_adapters()` {#PluginMetadata-get-supported-adapters} - -- **说明:** 获取当前已安装的插件支持适配器类列表 - -- **参数** - - empty - -- **返回** - - - set[type[[Adapter](../adapters/index.md#Adapter)]] | None - -## _class_ `Plugin()` {#Plugin} - -- **说明:** 存储插件信息 - -- **参数** - - auto - -### _instance-var_ `name` {#Plugin-name} - -- **类型:** str - -- **说明:** 插件名称,NoneBot 使用 文件/文件夹 名称作为插件名称 - -### _instance-var_ `module` {#Plugin-module} - -- **类型:** ModuleType - -- **说明:** 插件模块对象 - -### _instance-var_ `module_name` {#Plugin-module-name} - -- **类型:** str - -- **说明:** 点分割模块路径 - -### _instance-var_ `manager` {#Plugin-manager} - -- **类型:** [PluginManager](manager.md#PluginManager) - -- **说明:** 导入该插件的插件管理器 - -### _class-var_ `matcher` {#Plugin-matcher} - -- **类型:** set[type[[Matcher](../matcher.md#Matcher)]] - -- **说明:** 插件加载时定义的 `Matcher` - -### _class-var_ `parent_plugin` {#Plugin-parent-plugin} - -- **类型:** Plugin | None - -- **说明:** 父插件 - -### _class-var_ `sub_plugins` {#Plugin-sub-plugins} - -- **类型:** set[Plugin] - -- **说明:** 子插件集合 - -### _property_ `id_` {#Plugin-id-} - -- **类型:** str - -- **说明:** 插件索引标识 diff --git a/website/versioned_docs/version-2.3.2/api/plugin/on.md b/website/versioned_docs/version-2.3.2/api/plugin/on.md deleted file mode 100644 index 68df8478c3d6..000000000000 --- a/website/versioned_docs/version-2.3.2/api/plugin/on.md +++ /dev/null @@ -1,948 +0,0 @@ ---- -sidebar_position: 2 -description: nonebot.plugin.on 模块 ---- - -# nonebot.plugin.on - -本模块定义事件响应器便携定义函数。 - -## _def_ `store_matcher(matcher)` {#store-matcher} - -- **说明:** 存储一个事件响应器到插件。 - -- **参数** - - - `matcher` (type[[Matcher](../matcher.md#Matcher)]): 事件响应器 - -- **返回** - - - None - -## _def_ `get_matcher_plugin(depth=...)` {#get-matcher-plugin} - -- **说明** - - 获取事件响应器定义所在插件。 - - **Deprecated**, 请使用 [get_matcher_source](#get-matcher-source) 获取信息。 - -- **参数** - - - `depth` (int): 调用栈深度 - -- **返回** - - - [Plugin](model.md#Plugin) | None - -## _def_ `get_matcher_module(depth=...)` {#get-matcher-module} - -- **说明** - - 获取事件响应器定义所在模块。 - - **Deprecated**, 请使用 [get_matcher_source](#get-matcher-source) 获取信息。 - -- **参数** - - - `depth` (int): 调用栈深度 - -- **返回** - - - ModuleType | None - -## _def_ `get_matcher_source(depth=...)` {#get-matcher-source} - -- **说明:** 获取事件响应器定义所在源码信息。 - -- **参数** - - - `depth` (int): 调用栈深度 - -- **返回** - - - MatcherSource | None - -## _def_ `on(type="", rule=..., permission=..., *, handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on} - -- **说明:** 注册一个基础事件响应器,可自定义类型。 - -- **参数** - - - `type` (str): 事件响应器类型 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_metaevent(rule=..., permission=..., *, handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-metaevent} - -- **说明:** 注册一个元事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_message(rule=..., permission=..., *, handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-message} - -- **说明:** 注册一个消息事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_notice(rule=..., permission=..., *, handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-notice} - -- **说明:** 注册一个通知事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_request(rule=..., permission=..., *, handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-request} - -- **说明:** 注册一个请求事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_startswith(msg, rule=..., ignorecase=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-startswith} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**以指定内容开头时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息开头内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `ignorecase` (bool): 是否忽略大小写 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_endswith(msg, rule=..., ignorecase=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-endswith} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**以指定内容结尾时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息结尾内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `ignorecase` (bool): 是否忽略大小写 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_fullmatch(msg, rule=..., ignorecase=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-fullmatch} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**与指定内容完全一致时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息全匹配内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `ignorecase` (bool): 是否忽略大小写 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_keyword(keywords, rule=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-keyword} - -- **说明:** 注册一个消息事件响应器,并且当消息纯文本部分包含关键词时响应。 - -- **参数** - - - `keywords` (set[str]): 关键词列表 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_command(cmd, rule=..., aliases=..., force_whitespace=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-command} - -- **说明** - - 注册一个消息事件响应器,并且当消息以指定命令开头时响应。 - - 命令匹配规则参考: `命令形式匹配 `\_ - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `force_whitespace` (str | bool | None): 是否强制命令后必须有指定空白符 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_shell_command(cmd, rule=..., aliases=..., parser=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-shell-command} - -- **说明** - - 注册一个支持 `shell_like` 解析参数的命令消息事件响应器。 - - 与普通的 `on_command` 不同的是,在添加 `parser` 参数时, 响应器会自动处理消息。 - - 可以通过 [ShellCommandArgv](../params.md#ShellCommandArgv) 获取原始参数列表, - 通过 [ShellCommandArgs](../params.md#ShellCommandArgs) 获取解析后的参数字典。 - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `parser` ([ArgumentParser](../rule.md#ArgumentParser) | None): `nonebot.rule.ArgumentParser` 对象 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_regex(pattern, flags=..., rule=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-regex} - -- **说明** - - 注册一个消息事件响应器,并且当消息匹配正则表达式时响应。 - - 命令匹配规则参考: `正则匹配 `\_ - -- **参数** - - - `pattern` (str): 正则表达式 - - - `flags` (int | re.RegexFlag): 正则匹配标志 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _def_ `on_type(types, rule=..., *, permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#on-type} - -- **说明:** 注册一个事件响应器,并且当事件为指定类型时响应。 - -- **参数** - - - `types` (type[[Event](../adapters/index.md#Event)] | tuple[type[[Event](../adapters/index.md#Event)], ...]): 事件类型 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _class_ `CommandGroup(cmd, prefix_aliases=..., *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#CommandGroup} - -- **参数** - - - `cmd` (str | tuple[str, ...]) - - - `prefix_aliases` (bool) - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None) - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None) - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None) - - - `temp` (bool) - - - `expire_time` (datetime | timedelta | None) - - - `priority` (int) - - - `block` (bool) - - - `state` ([T_State](../typing.md#T-State) | None) - -### _method_ `command(cmd, *, rule=..., aliases=..., force_whitespace=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#CommandGroup-command} - -- **说明:** 注册一个新的命令。新参数将会覆盖命令组默认值 - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `force_whitespace` (str | bool | None): 是否强制命令后必须有指定空白符 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `shell_command(cmd, *, rule=..., aliases=..., parser=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#CommandGroup-shell-command} - -- **说明:** 注册一个新的 `shell_like` 命令。新参数将会覆盖命令组默认值 - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `parser` ([ArgumentParser](../rule.md#ArgumentParser) | None): `nonebot.rule.ArgumentParser` 对象 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -## _class_ `MatcherGroup(*, type=..., rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup} - -- **参数** - - - `type` (str) - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None) - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None) - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None) - - - `temp` (bool) - - - `expire_time` (datetime | timedelta | None) - - - `priority` (int) - - - `block` (bool) - - - `state` ([T_State](../typing.md#T-State) | None) - -### _method_ `on(*, type=..., rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on} - -- **说明:** 注册一个基础事件响应器,可自定义类型。 - -- **参数** - - - `type` (str): 事件响应器类型 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_metaevent(*, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-metaevent} - -- **说明:** 注册一个元事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_message(*, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-message} - -- **说明:** 注册一个消息事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_notice(*, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-notice} - -- **说明:** 注册一个通知事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_request(*, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-request} - -- **说明:** 注册一个请求事件响应器。 - -- **参数** - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_startswith(msg, *, ignorecase=..., rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-startswith} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**以指定内容开头时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息开头内容 - - - `ignorecase` (bool): 是否忽略大小写 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_endswith(msg, *, ignorecase=..., rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-endswith} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**以指定内容结尾时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息结尾内容 - - - `ignorecase` (bool): 是否忽略大小写 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_fullmatch(msg, *, ignorecase=..., rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-fullmatch} - -- **说明:** 注册一个消息事件响应器,并且当消息的**文本部分**与指定内容完全一致时响应。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息全匹配内容 - - - `ignorecase` (bool): 是否忽略大小写 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_keyword(keywords, *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-keyword} - -- **说明:** 注册一个消息事件响应器,并且当消息纯文本部分包含关键词时响应。 - -- **参数** - - - `keywords` (set[str]): 关键词列表 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_command(cmd, aliases=..., force_whitespace=..., *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-command} - -- **说明** - - 注册一个消息事件响应器,并且当消息以指定命令开头时响应。 - - 命令匹配规则参考: `命令形式匹配 `\_ - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `force_whitespace` (str | bool | None): 是否强制命令后必须有指定空白符 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_shell_command(cmd, aliases=..., parser=..., *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-shell-command} - -- **说明** - - 注册一个支持 `shell_like` 解析参数的命令消息事件响应器。 - - 与普通的 `on_command` 不同的是,在添加 `parser` 参数时, 响应器会自动处理消息。 - - 可以通过 [ShellCommandArgv](../params.md#ShellCommandArgv) 获取原始参数列表, - 通过 [ShellCommandArgs](../params.md#ShellCommandArgs) 获取解析后的参数字典。 - -- **参数** - - - `cmd` (str | tuple[str, ...]): 指定命令内容 - - - `aliases` (set[str | tuple[str, ...]] | None): 命令别名 - - - `parser` ([ArgumentParser](../rule.md#ArgumentParser) | None): `nonebot.rule.ArgumentParser` 对象 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_regex(pattern, flags=..., *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-regex} - -- **说明** - - 注册一个消息事件响应器,并且当消息匹配正则表达式时响应。 - - 命令匹配规则参考: `正则匹配 `\_ - -- **参数** - - - `pattern` (str): 正则表达式 - - - `flags` (int | re.RegexFlag): 正则匹配标志 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] - -### _method_ `on_type(types, *, rule=..., permission=..., handlers=..., temp=..., expire_time=..., priority=..., block=..., state=...)` {#MatcherGroup-on-type} - -- **说明:** 注册一个事件响应器,并且当事件为指定类型时响应。 - -- **参数** - - - `types` (type[[Event](../adapters/index.md#Event)] | tuple[type[[Event](../adapters/index.md#Event)]]): 事件类型 - - - `rule` ([Rule](../rule.md#Rule) | [T_RuleChecker](../typing.md#T-RuleChecker) | None): 事件响应规则 - - - `permission` ([Permission](../permission.md#Permission) | [T_PermissionChecker](../typing.md#T-PermissionChecker) | None): 事件响应权限 - - - `handlers` (list[[T_Handler](../typing.md#T-Handler) | [Dependent](../dependencies/index.md#Dependent)] | None): 事件处理函数列表 - - - `temp` (bool): 是否为临时事件响应器(仅执行一次) - - - `expire_time` (datetime | timedelta | None): 事件响应器最终有效时间点,过时即被删除 - - - `priority` (int): 事件响应器优先级 - - - `block` (bool): 是否阻止事件向更低优先级传递 - - - `state` ([T_State](../typing.md#T-State) | None): 默认 state - -- **返回** - - - type[[Matcher](../matcher.md#Matcher)] diff --git a/website/versioned_docs/version-2.3.2/api/rule.md b/website/versioned_docs/version-2.3.2/api/rule.md deleted file mode 100644 index a0f2c044f582..000000000000 --- a/website/versioned_docs/version-2.3.2/api/rule.md +++ /dev/null @@ -1,402 +0,0 @@ ---- -sidebar_position: 5 -description: nonebot.rule 模块 ---- - -# nonebot.rule - -本模块是 [Matcher.rule](matcher.md#Matcher-rule) 的类型定义。 - -每个[事件响应器](matcher.md#Matcher)拥有一个 -[Rule](#Rule),其中是 `RuleChecker` 的集合。 -只有当所有 `RuleChecker` 检查结果为 `True` 时继续运行。 - -## _class_ `Rule(*checkers)` {#Rule} - -- **说明** - - 规则类。 - - 当事件传递时,在 [Matcher](matcher.md#Matcher) 运行前进行检查。 - -- **参数** - - - `*checkers` ([T_RuleChecker](typing.md#T-RuleChecker) | [Dependent](dependencies/index.md#Dependent)[bool]): RuleChecker - -- **用法** - - ```python - Rule(async_function) & sync_function - # 等价于 - Rule(async_function, sync_function) - ``` - -### _instance-var_ `checkers` {#Rule-checkers} - -- **类型:** set[[Dependent](dependencies/index.md#Dependent)[bool]] - -- **说明:** 存储 `RuleChecker` - -### _async method_ `__call__(bot, event, state, stack=None, dependency_cache=None)` {#Rule---call--} - -- **说明:** 检查是否符合所有规则 - -- **参数** - - - `bot` ([Bot](adapters/index.md#Bot)): Bot 对象 - - - `event` ([Event](adapters/index.md#Event)): Event 对象 - - - `state` ([T_State](typing.md#T-State)): 当前 State - - - `stack` (AsyncExitStack | None): 异步上下文栈 - - - `dependency_cache` ([T_DependencyCache](typing.md#T-DependencyCache) | None): 依赖缓存 - -- **返回** - - - bool - -## _class_ `CMD_RESULT()` {#CMD-RESULT} - -- **参数** - - auto - -## _class_ `TRIE_VALUE()` {#TRIE-VALUE} - -- **说明:** TRIE_VALUE(command_start, command) - -- **参数** - - auto - -## _class_ `StartswithRule(msg, ignorecase=False)` {#StartswithRule} - -- **说明:** 检查消息纯文本是否以指定字符串开头。 - -- **参数** - - - `msg` (tuple[str, ...]): 指定消息开头字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -## _def_ `startswith(msg, ignorecase=False)` {#startswith} - -- **说明:** 匹配消息纯文本开头。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息开头字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -- **返回** - - - [Rule](#Rule) - -## _class_ `EndswithRule(msg, ignorecase=False)` {#EndswithRule} - -- **说明:** 检查消息纯文本是否以指定字符串结尾。 - -- **参数** - - - `msg` (tuple[str, ...]): 指定消息结尾字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -## _def_ `endswith(msg, ignorecase=False)` {#endswith} - -- **说明:** 匹配消息纯文本结尾。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息开头字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -- **返回** - - - [Rule](#Rule) - -## _class_ `FullmatchRule(msg, ignorecase=False)` {#FullmatchRule} - -- **说明:** 检查消息纯文本是否与指定字符串全匹配。 - -- **参数** - - - `msg` (tuple[str, ...]): 指定消息全匹配字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -## _def_ `fullmatch(msg, ignorecase=False)` {#fullmatch} - -- **说明:** 完全匹配消息。 - -- **参数** - - - `msg` (str | tuple[str, ...]): 指定消息全匹配字符串元组 - - - `ignorecase` (bool): 是否忽略大小写 - -- **返回** - - - [Rule](#Rule) - -## _class_ `KeywordsRule(*keywords)` {#KeywordsRule} - -- **说明:** 检查消息纯文本是否包含指定关键字。 - -- **参数** - - - `*keywords` (str): 指定关键字元组 - -## _def_ `keyword(*keywords)` {#keyword} - -- **说明:** 匹配消息纯文本关键词。 - -- **参数** - - - `*keywords` (str): 指定关键字元组 - -- **返回** - - - [Rule](#Rule) - -## _class_ `CommandRule(cmds, force_whitespace=None)` {#CommandRule} - -- **说明:** 检查消息是否为指定命令。 - -- **参数** - - - `cmds` (list[tuple[str, ...]]): 指定命令元组列表 - - - `force_whitespace` (str | bool | None): 是否强制命令后必须有指定空白符 - -## _def_ `command(*cmds, force_whitespace=None)` {#command} - -- **说明** - - 匹配消息命令。 - - 根据配置里提供的 [`command_start`](config.md#Config-command-start), - [`command_sep`](config.md#Config-command-sep) 判断消息是否为命令。 - - 可以通过 [Command](params.md#Command) 获取匹配成功的命令(例: `("test",)`), - 通过 [RawCommand](params.md#RawCommand) 获取匹配成功的原始命令文本(例: `"/test"`), - 通过 [CommandArg](params.md#CommandArg) 获取匹配成功的命令参数。 - -- **参数** - - - `*cmds` (str | tuple[str, ...]): 命令文本或命令元组 - - - `force_whitespace` (str | bool | None): 是否强制命令后必须有指定空白符 - -- **返回** - - - [Rule](#Rule) - -- **用法** - - 使用默认 `command_start`, `command_sep` 配置情况下: - - 命令 `("test",)` 可以匹配: `/test` 开头的消息 - 命令 `("test", "sub")` 可以匹配: `/test.sub` 开头的消息 - -:::tip 提示 -命令内容与后续消息间无需空格! -::: - -## _class_ `ArgumentParser()` {#ArgumentParser} - -- **说明** - - `shell_like` 命令参数解析器,解析出错时不会退出程序。 - - 支持 [Message](adapters/index.md#Message) 富文本解析。 - -- **参数** - - auto - -- **用法** - - 用法与 `argparse.ArgumentParser` 相同, - 参考文档: [argparse](https://docs.python.org/3/library/argparse.html) - -### _method_ `parse_known_args(args=None, namespace=None)` {#ArgumentParser-parse-known-args} - -- **重载** - - **1.** `(args=None, namespace=None) -> tuple[Namespace, list[str | MessageSegment]]` - - - **参数** - - - `args` (Sequence[str | [MessageSegment](adapters/index.md#MessageSegment)] | None) - - - `namespace` (None) - - - **返回** - - - tuple[Namespace, list[str | [MessageSegment](adapters/index.md#MessageSegment)]] - - **2.** `(args, namespace) -> tuple[T, list[str | MessageSegment]]` - - - **参数** - - - `args` (Sequence[str | [MessageSegment](adapters/index.md#MessageSegment)] | None) - - - `namespace` (T) - - - **返回** - - - tuple[T, list[str | [MessageSegment](adapters/index.md#MessageSegment)]] - - **3.** `(*, namespace) -> tuple[T, list[str | MessageSegment]]` - - - **参数** - - - `namespace` (T) - - - **返回** - - - tuple[T, list[str | [MessageSegment](adapters/index.md#MessageSegment)]] - -## _class_ `ShellCommandRule(cmds, parser)` {#ShellCommandRule} - -- **说明:** 检查消息是否为指定 shell 命令。 - -- **参数** - - - `cmds` (list[tuple[str, ...]]): 指定命令元组列表 - - - `parser` (ArgumentParser | None): 可选参数解析器 - -## _def_ `shell_command(*cmds, parser=None)` {#shell-command} - -- **说明** - - 匹配 `shell_like` 形式的消息命令。 - - 根据配置里提供的 [`command_start`](config.md#Config-command-start), - [`command_sep`](config.md#Config-command-sep) 判断消息是否为命令。 - - 可以通过 [Command](params.md#Command) 获取匹配成功的命令 - (例: `("test",)`), - 通过 [RawCommand](params.md#RawCommand) 获取匹配成功的原始命令文本 - (例: `"/test"`), - 通过 [ShellCommandArgv](params.md#ShellCommandArgv) 获取解析前的参数列表 - (例: `["arg", "-h"]`), - 通过 [ShellCommandArgs](params.md#ShellCommandArgs) 获取解析后的参数字典 - (例: `{"arg": "arg", "h": True}`)。 - - :::caution 警告 - 如果参数解析失败,则通过 [ShellCommandArgs](params.md#ShellCommandArgs) - 获取的将是 [ParserExit](exception.md#ParserExit) 异常。 - ::: - -- **参数** - - - `*cmds` (str | tuple[str, ...]): 命令文本或命令元组 - - - `parser` (ArgumentParser | None): [ArgumentParser](#ArgumentParser) 对象 - -- **返回** - - - [Rule](#Rule) - -- **用法** - - 使用默认 `command_start`, `command_sep` 配置,更多示例参考 - [argparse](https://docs.python.org/3/library/argparse.html) 标准库文档。 - - ```python - from nonebot.rule import ArgumentParser - - parser = ArgumentParser() - parser.add_argument("-a", action="store_true") - - rule = shell_command("ls", parser=parser) - ``` - -:::tip 提示 -命令内容与后续消息间无需空格! -::: - -## _class_ `RegexRule(regex, flags=0)` {#RegexRule} - -- **说明:** 检查消息字符串是否符合指定正则表达式。 - -- **参数** - - - `regex` (str): 正则表达式 - - - `flags` (int): 正则表达式标记 - -## _def_ `regex(regex, flags=0)` {#regex} - -- **说明** - - 匹配符合正则表达式的消息字符串。 - - 可以通过 [RegexStr](params.md#RegexStr) 获取匹配成功的字符串, - 通过 [RegexGroup](params.md#RegexGroup) 获取匹配成功的 group 元组, - 通过 [RegexDict](params.md#RegexDict) 获取匹配成功的 group 字典。 - -- **参数** - - - `regex` (str): 正则表达式 - - - `flags` (int | re.RegexFlag): 正则表达式标记 - -- **返回** - - - [Rule](#Rule) - -:::tip 提示 -正则表达式匹配使用 search 而非 match,如需从头匹配请使用 `r"^xxx"` 来确保匹配开头 -::: -:::tip 提示 -正则表达式匹配使用 `EventMessage` 的 `str` 字符串, -而非 `EventMessage` 的 `PlainText` 纯文本字符串 -::: - -## _class_ `ToMeRule()` {#ToMeRule} - -- **说明:** 检查事件是否与机器人有关。 - -- **参数** - - auto - -## _def_ `to_me()` {#to-me} - -- **说明:** 匹配与机器人有关的事件。 - -- **参数** - - empty - -- **返回** - - - [Rule](#Rule) - -## _class_ `IsTypeRule(*types)` {#IsTypeRule} - -- **说明:** 检查事件类型是否为指定类型。 - -- **参数** - - - `*types` (type[[Event](adapters/index.md#Event)]) - -## _def_ `is_type(*types)` {#is-type} - -- **说明:** 匹配事件类型。 - -- **参数** - - - `*types` (type[[Event](adapters/index.md#Event)]): 事件类型 - -- **返回** - - - [Rule](#Rule) diff --git a/website/versioned_docs/version-2.3.2/api/typing.md b/website/versioned_docs/version-2.3.2/api/typing.md deleted file mode 100644 index 986eb3005f91..000000000000 --- a/website/versioned_docs/version-2.3.2/api/typing.md +++ /dev/null @@ -1,303 +0,0 @@ ---- -sidebar_position: 11 -description: nonebot.typing 模块 ---- - -# nonebot.typing - -本模块定义了 NoneBot 模块中共享的一些类型。 - -使用 Python 的 Type Hint 语法, -参考 [`PEP 484`](https://www.python.org/dev/peps/pep-0484/), -[`PEP 526`](https://www.python.org/dev/peps/pep-0526/) 和 -[`typing`](https://docs.python.org/3/library/typing.html)。 - -## _def_ `overrides(InterfaceClass)` {#overrides} - -- **说明:** 标记一个方法为父类 interface 的 implement - -- **参数** - - - `InterfaceClass` (object) - -- **返回** - - - untyped - -## _def_ `type_has_args(type_)` {#type-has-args} - -- **参数** - - - `type_` (type[Any]) - -- **返回** - - - bool - -## _def_ `origin_is_union(origin)` {#origin-is-union} - -- **参数** - - - `origin` (type[Any] | None) - -- **返回** - - - bool - -## _def_ `origin_is_literal(origin)` {#origin-is-literal} - -- **说明:** 判断是否是 Literal 类型 - -- **参数** - - - `origin` (type[Any] | None) - -- **返回** - - - bool - -## _def_ `all_literal_values(type_)` {#all-literal-values} - -- **说明:** 获取 Literal 类型包含的所有值 - -- **参数** - - - `type_` (type[Any]) - -- **返回** - - - list[Any] - -## _def_ `origin_is_annotated(origin)` {#origin-is-annotated} - -- **说明:** 判断是否是 Annotated 类型 - -- **参数** - - - `origin` (type[Any] | None) - -- **返回** - - - bool - -## _def_ `is_none_type(type_)` {#is-none-type} - -- **说明:** 判断是否是 None 类型 - -- **参数** - - - `type_` (type[Any]) - -- **返回** - - - bool - -## _def_ `evaluate_forwardref(ref, globalns, localns)` {#evaluate-forwardref} - -- **参数** - - - `ref` (ForwardRef) - - - `globalns` (dict[str, Any]) - - - `localns` (dict[str, Any]) - -- **返回** - - - Any - -## _class_ `StateFlag()` {#StateFlag} - -- **参数** - - auto - -## _var_ `T_State` {#T-State} - -- **类型:** dict[Any, Any] - -- **说明:** 事件处理状态 State 类型 - -## _var_ `T_BotConnectionHook` {#T-BotConnectionHook} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - Bot 连接建立时钩子函数 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_BotDisconnectionHook` {#T-BotDisconnectionHook} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - Bot 连接断开时钩子函数 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_CallingAPIHook` {#T-CallingAPIHook} - -- **类型:** ([Bot](adapters/index.md#Bot), str, dict[str, Any]) -> Awaitable[Any] - -- **说明:** `bot.call_api` 钩子函数 - -## _var_ `T_CalledAPIHook` {#T-CalledAPIHook} - -- **类型:** ([Bot](adapters/index.md#Bot), Exception | None, str, dict[str, Any], Any) -> Awaitable[Any] - -- **说明:** `bot.call_api` 后执行的函数,参数分别为 bot, exception, api, data, result - -## _var_ `T_EventPreProcessor` {#T-EventPreProcessor} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - 事件预处理函数 EventPreProcessor 类型 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_EventPostProcessor` {#T-EventPostProcessor} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - 事件后处理函数 EventPostProcessor 类型 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_RunPreProcessor` {#T-RunPreProcessor} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - 事件响应器运行前预处理函数 RunPreProcessor 类型 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - MatcherParam: Matcher 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_RunPostProcessor` {#T-RunPostProcessor} - -- **类型:** \_DependentCallable[Any] - -- **说明** - - 事件响应器运行后后处理函数 RunPostProcessor 类型 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - MatcherParam: Matcher 对象 - - ExceptionParam: 异常对象(可能为 None) - - DefaultParam: 带有默认值的参数 - -## _var_ `T_RuleChecker` {#T-RuleChecker} - -- **类型:** \_DependentCallable[bool] - -- **说明** - - RuleChecker 即判断是否响应事件的处理函数。 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_PermissionChecker` {#T-PermissionChecker} - -- **类型:** \_DependentCallable[bool] - -- **说明** - - PermissionChecker 即判断事件是否满足权限的处理函数。 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_Handler` {#T-Handler} - -- **类型:** \_DependentCallable[Any] - -- **说明:** Handler 处理函数。 - -## _var_ `T_TypeUpdater` {#T-TypeUpdater} - -- **类型:** \_DependentCallable[str] - -- **说明** - - TypeUpdater 在 Matcher.pause, Matcher.reject 时被运行,用于更新响应的事件类型。 默认会更新为 `message`。 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - MatcherParam: Matcher 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_PermissionUpdater` {#T-PermissionUpdater} - -- **类型:** \_DependentCallable[[Permission](permission.md#Permission)] - -- **说明** - - PermissionUpdater 在 Matcher.pause, Matcher.reject 时被运行,用于更新会话对象权限。 默认会更新为当前事件的触发对象。 - - 依赖参数: - - - DependParam: 子依赖参数 - - BotParam: Bot 对象 - - EventParam: Event 对象 - - StateParam: State 对象 - - MatcherParam: Matcher 对象 - - DefaultParam: 带有默认值的参数 - -## _var_ `T_DependencyCache` {#T-DependencyCache} - -- **类型:** dict[\_DependentCallable[Any], Task[Any]] - -- **说明:** 依赖缓存, 用于存储依赖函数的返回值 diff --git a/website/versioned_docs/version-2.3.2/api/utils.md b/website/versioned_docs/version-2.3.2/api/utils.md deleted file mode 100644 index 976bb1a2a0f0..000000000000 --- a/website/versioned_docs/version-2.3.2/api/utils.md +++ /dev/null @@ -1,280 +0,0 @@ ---- -sidebar_position: 8 -description: nonebot.utils 模块 ---- - -# nonebot.utils - -本模块包含了 NoneBot 的一些工具函数 - -## _def_ `escape_tag(s)` {#escape-tag} - -- **说明** - - 用于记录带颜色日志时转义 `` 类型特殊标签 - - 参考: [loguru color 标签](https://loguru.readthedocs.io/en/stable/api/logger.html#color) - -- **参数** - - - `s` (str): 需要转义的字符串 - -- **返回** - - - str - -## _def_ `deep_update(mapping, *updating_mappings)` {#deep-update} - -- **说明:** 深度更新合并字典 - -- **参数** - - - `mapping` (dict[K, Any]) - - - `*updating_mappings` (dict[K, Any]) - -- **返回** - - - dict[K, Any] - -## _def_ `lenient_issubclass(cls, class_or_tuple)` {#lenient-issubclass} - -- **说明:** 检查 cls 是否是 class_or_tuple 中的一个类型子类并忽略类型错误。 - -- **参数** - - - `cls` (Any) - - - `class_or_tuple` (type[Any] | tuple[type[Any], ...]) - -- **返回** - - - bool - -## _def_ `generic_check_issubclass(cls, class_or_tuple)` {#generic-check-issubclass} - -- **说明** - - 检查 cls 是否是 class_or_tuple 中的一个类型子类。 - - 特别的: - - - 如果 cls 是 `typing.Union` 或 `types.UnionType` 类型, - 则会检查其中的所有类型是否是 class_or_tuple 中一个类型的子类或 None。 - - 如果 cls 是 `typing.Literal` 类型, - 则会检查其中的所有值是否是 class_or_tuple 中一个类型的实例。 - - 如果 cls 是 `typing.TypeVar` 类型, - 则会检查其 `__bound__` 或 `__constraints__` - 是否是 class_or_tuple 中一个类型的子类或 None。 - -- **参数** - - - `cls` (Any) - - - `class_or_tuple` (type[Any] | tuple[type[Any], ...]) - -- **返回** - - - bool - -## _def_ `type_is_complex(type_)` {#type-is-complex} - -- **说明:** 检查 type\_ 是否是复杂类型 - -- **参数** - - - `type_` (type[Any]) - -- **返回** - - - bool - -## _def_ `is_coroutine_callable(call)` {#is-coroutine-callable} - -- **说明:** 检查 call 是否是一个 callable 协程函数 - -- **参数** - - - `call` ((...) -> Any) - -- **返回** - - - bool - -## _def_ `is_gen_callable(call)` {#is-gen-callable} - -- **说明:** 检查 call 是否是一个生成器函数 - -- **参数** - - - `call` ((...) -> Any) - -- **返回** - - - bool - -## _def_ `is_async_gen_callable(call)` {#is-async-gen-callable} - -- **说明:** 检查 call 是否是一个异步生成器函数 - -- **参数** - - - `call` ((...) -> Any) - -- **返回** - - - bool - -## _def_ `run_sync(call)` {#run-sync} - -- **说明:** 一个用于包装 sync function 为 async function 的装饰器 - -- **参数** - - - `call` ((P) -> R): 被装饰的同步函数 - -- **返回** - - - (P) -> Coroutine[None, None, R] - -## _def_ `run_sync_ctx_manager(cm)` {#run-sync-ctx-manager} - -- **说明:** 一个用于包装 sync context manager 为 async context manager 的执行函数 - -- **参数** - - - `cm` (AbstractContextManager[T]) - -- **返回** - - - AsyncGenerator[T, None] - -## _async def_ `run_coro_with_catch(coro, exc, return_on_err=None)` {#run-coro-with-catch} - -- **说明:** 运行协程并当遇到指定异常时返回指定值。 - -- **重载** - - **1.** `(coro, exc, return_on_err=None) -> T | None` - - - **参数** - - - `coro` (Coroutine[Any, Any, T]) - - - `exc` (tuple[type[Exception], ...]) - - - `return_on_err` (None) - - - **返回** - - - T | None - - **2.** `(coro, exc, return_on_err) -> T | R` - - - **参数** - - - `coro` (Coroutine[Any, Any, T]) - - - `exc` (tuple[type[Exception], ...]) - - - `return_on_err` (R) - - - **返回** - - - T | R - -- **参数** - - - `coro`: 要运行的协程 - - - `exc`: 要捕获的异常 - - - `return_on_err`: 当发生异常时返回的值 - -- **返回** - - 协程的返回值或发生异常时的指定值 - -## _def_ `get_name(obj)` {#get-name} - -- **说明:** 获取对象的名称 - -- **参数** - - - `obj` (Any) - -- **返回** - - - str - -## _def_ `path_to_module_name(path)` {#path-to-module-name} - -- **说明:** 转换路径为模块名 - -- **参数** - - - `path` (Path) - -- **返回** - - - str - -## _def_ `resolve_dot_notation(obj_str, default_attr, default_prefix=None)` {#resolve-dot-notation} - -- **说明:** 解析并导入点分表示法的对象 - -- **参数** - - - `obj_str` (str) - - - `default_attr` (str) - - - `default_prefix` (str | None) - -- **返回** - - - Any - -## _class_ `classproperty(func)` {#classproperty} - -- **说明:** 类属性装饰器 - -- **参数** - - - `func` ((Any) -> T) - -## _class_ `DataclassEncoder()` {#DataclassEncoder} - -- **说明:** 可以序列化 [Message](adapters/index.md#Message)(List[Dataclass]) 的 `JSONEncoder` - -- **参数** - - auto - -### _method_ `default(o)` {#DataclassEncoder-default} - -- **参数** - - - `o` - -- **返回** - - - untyped - -## _def_ `logger_wrapper(logger_name)` {#logger-wrapper} - -- **说明:** 用于打印 adapter 的日志。 - -- **参数** - - - `logger_name` (str): adapter 的名称 - -- **返回** - - - untyped: 日志记录函数 - - 日志记录函数的参数: - - - level: 日志等级 - - message: 日志信息 - - exception: 异常信息 diff --git a/website/versioned_docs/version-2.3.2/appendices/api-calling.mdx b/website/versioned_docs/version-2.3.2/appendices/api-calling.mdx deleted file mode 100644 index ab6ce23d9ec1..000000000000 --- a/website/versioned_docs/version-2.3.2/appendices/api-calling.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -sidebar_position: 4 -description: 使用平台接口,完成更多功能 - -options: - menu: - - category: appendices - weight: 50 ---- - -# 使用平台接口 - -import Messenger from "@/components/Messenger"; - -在 NoneBot 中,除了使用事件响应器操作发送文本消息外,我们还可以直接通过使用协议适配器提供的方法来使用平台特定的接口,完成发送特殊消息、获取信息等其他平台提供的功能。同时,在部分无法使用事件响应器的情况中,例如[定时任务](../best-practice/scheduler.md),我们也可以使用平台接口来完成需要的功能。 - -## 发送平台特殊消息 - -在之前的章节中,我们介绍了如何向用户发送文本消息以及[如何处理平台消息](../tutorial/message.md),现在我们来向用户发送平台特殊消息。 - -:::caution 注意 -在以下的示例中,我们将使用 `Console` 协议适配器来演示如何发送平台消息。在实际使用中,你需要确保你使用的**消息序列类型**与你所要发送的**平台类型**一致。 -::: - -```python {4,7-17} title=weather/__init__.py -import inspect -from nonebot.adapters.console import MessageSegment - -@weather.got("location", prompt=MessageSegment.emoji("question") + "请输入地名") -async def got_location(location: str = ArgPlainText()): - result = await weather.send( - MessageSegment.markdown( - inspect.cleandoc( - f""" - # {location} - - - 今天 - - ⛅ 多云 20℃~24℃ - """ - ) - ) - ) -``` - - - -在上面的示例中,我们使用了 `Console` 协议适配器提供的 `MessageSegment` 类来发送平台特定的消息 `emoji` 和 `markdown`。这两种消息可以显示在终端中,但是无法在其他平台上使用。在事件响应器操作中,我们可以使用 `str`、消息序列、消息段、消息模板四种类型来发送消息,但其中只有 `str` 和[纯文本形式的消息模板类型](../tutorial/message.md#使用消息模板)消息可以在所有平台上使用。 - -`send` 事件响应器操作实际上是由协议适配器通过调用平台 API 来实现的,通常会将 API 调用的结果作为返回值返回。 - -## 调用平台 API - -在 NoneBot 中,我们可以通过 `Bot` 对象来调用协议适配器支持的平台 API,来完成更多的功能。 - -### 获取 Bot - -在调用平台 API 之前,我们首先要获得 Bot 对象。有两种方式可以获得 Bot 对象。 - -在事件处理流程的上下文中,我们可以直接使用依赖注入 Bot 来获取: - -```python {1,4} title=weather/__init__.py -from nonebot.adapters import Bot - -@weather.got("location", prompt="请输入地名") -async def got_location(bot: Bot, location: str = ArgPlainText()): - ... -``` - -依赖注入会确保你获得的 Bot 对象与类型注解的 Bot 类型一致。也就是说,如果你使用的是 Bot 基类,将会允许任何平台的 Bot 对象;如果你使用的是平台特定的 Bot 类型,将会只允许该平台的 Bot 对象,其他类型的 Bot 将会跳过这个事件处理函数。更多详情请参考[事件处理重载](./overload.md)。 - -在其他情况下,我们可以通过 NoneBot 提供的方法来获取 Bot 对象,这些方法将会在[使用适配器](../advanced/adapter.md#获取-bot-对象)中详细介绍: - -```python {4,6} -from nonebot import get_bot - -# 获取当前所有 Bot 中的第一个 -bot = get_bot() -# 获取指定 ID 的 Bot -bot = get_bot("bot_id") -``` - -### 调用 API - -在获得 Bot 对象后,我们可以通过 Bot 的实例方法来调用平台 API: - -```python {2,5} -# 通过 bot.api_name(**kwargs) 的方法调用 API -result = await bot.get_user_info(user_id=12345678) - -# 通过 bot.call_api(api_name, **kwargs) 的方法调用 API -result = await bot.call_api("get_user_info", user_id=12345678) -``` - -:::caution 注意 -实际可以使用的 API 以及参数取决于平台提供的接口以及协议适配器的实现,请参考协议适配器以及平台文档。 -::: - -在了解了如何调用 API 后,我们可以来改进 `weather` 插件,使得消息发送后,调用 `Console` 接口响铃提醒机器人用户: - -```python {4,18} title=weather/__init__.py -from nonebot.adapters.console import Bot, MessageSegment - -@weather.got("location", prompt=MessageSegment.emoji("question") + "请输入地名") -async def got_location(bot: Bot, location: str = ArgPlainText()): - await weather.send( - MessageSegment.markdown( - inspect.cleandoc( - f""" - # {location} - - - 今天 - - ⛅ 多云 20℃~24℃ - """ - ) - ) - ) - await bot.bell() -``` diff --git a/website/versioned_docs/version-2.3.2/appendices/config.mdx b/website/versioned_docs/version-2.3.2/appendices/config.mdx deleted file mode 100644 index 72a2fa79463e..000000000000 --- a/website/versioned_docs/version-2.3.2/appendices/config.mdx +++ /dev/null @@ -1,632 +0,0 @@ ---- -sidebar_position: 0 -description: 读取用户配置来控制插件行为 - -options: - menu: - - category: appendices - weight: 10 ---- - -# 配置 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -配置是项目中非常重要的一部分,为了方便我们控制机器人的行为,NoneBot 提供了一套配置系统。下面我们将会补充[指南](../quick-start.mdx)中的天气插件,使其能够读取用户配置。在这之前,我们需要先了解一下配置系统,如果你已经了解了 NoneBot 中的配置方法,可以跳转到[编写插件配置](#插件配置)。 - -NoneBot 使用 [`pydantic`](https://docs.pydantic.dev/) 以及 [`python-dotenv`](https://saurabh-kumar.com/python-dotenv/) 来读取 dotenv 配置文件以及环境变量,从而控制机器人行为。配置文件需要符合 dotenv 格式,复杂数据类型需使用 JSON 格式或 [pydantic 支持格式](https://docs.pydantic.dev/usage/types/)填写。 - -NoneBot 内置的配置项列表及含义可以在[内置配置项](#内置配置项)中查看。 - -:::caution 注意 - -NoneBot 自 2.2.0 起兼容了 Pydantic v1 与 v2 版本,以下文档中 Pydantic 相关示例均采用 v2 版本用法。 - -如果在使用商店或其他第三方插件的过程中遇到 Pydantic 相关警告或报错,例如: - -```python -pydantic_core._pydantic_core.ValidationError: 1 validation error for Config - Input should be a valid dictionary or instance of Config [type=model_type, input_value=Config(...), input_type=Config] -``` - -请考虑降级 Pydantic 至 v1 版本: - -```bash -pip install --force-reinstall 'pydantic~=1.10' -``` - -::: - -## 配置项的加载 - -在 NoneBot 中,我们可以把配置途径分为 **直接传入**、**系统环境变量**、**dotenv 配置文件** 三种,其加载优先级依次由高到低。 - -### 直接传入 - -在 NoneBot 初始化的过程中,可以通过 `nonebot.init()` 传入任意合法的 Python 变量,也可以在初始化完成后直接赋值。 - -通常,在初始化前的传参会在机器人的入口文件(如 `bot.py`)中进行,而初始化后的赋值可以在任何地方进行。 - -```python {4,8,9} title=bot.py -import nonebot - -# 初始化时 -nonebot.init(custom_config1="config on init") - -# 初始化后 -config = nonebot.get_driver().config -config.custom_config1 = "changed after init" -config.custom_config2 = "new config after init" -``` - -### 系统环境变量 - -在 dotenv 配置文件中定义的配置项,也会在环境变量中进行寻找。如果在环境变量中发现同名配置项(大小写不敏感),将会覆盖 dotenv 中所填值。 - -例如,在 dotenv 配置文件中存在配置项 `custom_config`: - -```dotenv -CUSTOM_CONFIG=config in dotenv -``` - -同时,设置环境变量: - -```bash -# windows cmd -set CUSTOM_CONFIG 'config in environment variables' -# windows powershell -$Env:CUSTOM_CONFIG='config in environment variables' -# linux/macOS -export CUSTOM_CONFIG='config in environment variables' -``` - -那最终 NoneBot 所读取的内容为环境变量中的内容,即 `config in environment variables`。 - -:::caution 注意 -NoneBot 不会自发读取未被定义的配置项的环境变量,如果需要读取某一环境变量需要在 dotenv 配置文件中进行声明。 -::: - -### dotenv 配置文件 - -dotenv 是一种便捷的跨平台配置通用模式,也是我们推荐的配置方式。 - -NoneBot 在启动时将会从系统环境变量或者 `.env` 文件中寻找配置项 `ENVIRONMENT` (大小写不敏感),默认值为 `prod`。这将决定 NoneBot 后续进一步加载环境配置的文件路径 `.env.{ENVIRONMENT}`。 - -#### 配置项解析 - -dotenv 文件中的配置值使用 JSON 进行解析。如果配置项值无法被解析,将作为**字符串**处理。例如: - -```dotenv -STRING_CONFIG=some string -LIST_CONFIG=[1, 2, 3] -DICT_CONFIG={"key": "value"} -MULTILINE_CONFIG=' -[ - { - "item_key": "item_value" - } -] -' -EMPTY_CONFIG= -NULL_CONFIG -``` - -将被解析为: - -```python -dotenv_config = { - "string_config": "some string", - "list_config": [1, 2, 3], - "dict_config": {"key": "value"}, - "multiline_config": [{"item_key": "item_value"}], - "empty_config": "", - "null_config": None -} -``` - -特别的,NoneBot 支持使用 `env_nested_delimiter` 配置嵌套字典,在层与层之间使用 `__` 分隔即可: - -```dotenv -DICT={"k1": "v1", "k2": null} -DICT__K2=v2 -DICT__K3=v3 -DICT__INNER__K4=v4 -``` - -将被解析为: - -```python -dotenv_config = { - "dict": { - "k1": "v1", - "k2": "v2", - "k3": "v3", - "inner": { - "k4": "v4" - } - } -} -``` - -#### .env 文件 - -`.env` 文件是基础配置文件,该文件中的配置项在不同环境下都会被加载,但会被 `.env.{ENVIRONMENT}` 文件中的配置所**覆盖**。 - -我们可以在 `.env` 文件中写入当前的环境信息: - -```dotenv -ENVIRONMENT=dev -COMMON_CONFIG=common config # 这个配置项在任何环境中都会被加载 -``` - -这样,我们在启动 NoneBot 时就会从 `.env.dev` 文件中加载剩余配置项。 - -:::tip 提示 -在生产环境中,可以通过设置环境变量 `ENVIRONMENT=prod` 来确保 NoneBot 读取正确的环境配置。 -::: - -#### .env.\{ENVIRONMENT\} 文件 - -`.env.{ENVIRONMENT}` 文件类似于预设,可以让我们在多套不同的配置方案中灵活切换,默认 NoneBot 会读取 `.env.prod` 配置。如果你使用了 `nb-cli` 创建 `simple` 项目,那么将含有两套预设配置:`.env.dev` 和 `.env.prod`。 - -在 NoneBot 初始化时,可以指定加载某个环境配置文件: - -```python -nonebot.init(_env_file=".env.dev") -``` - -这将忽略在 `.env` 文件或环境变量中指定的 `ENVIRONMENT` 配置项。 - -## 读取配置项 - -NoneBot 的全局配置对象可以通过 `driver` 获取,如: - -```python -import nonebot - -config = nonebot.get_driver().config -``` - -如果我们需要获取某个配置项,可以直接通过 `config` 对象的属性访问: - -```python -superusers = config.superusers -``` - -如果配置项不存在,将会抛出异常。 - -## 插件配置 - -在一个涉及大量配置项的项目中,通过直接读取配置项的方式显然并不高效。同时,由于额外的全局配置项没有预先定义,开发时编辑器将无法提示字段与类型,并且运行时没有对配置项直接进行合法性检查。那么就需要一种方式来规范定义插件配置项。 - -在 NoneBot 中,我们使用强大高效的 `pydantic` 来定义配置模型,这个模型可以被用于配置的读取和类型检查等。例如在 `weather` 插件目录中新建 `config.py` 来定义一个模型: - -```python title=weather/config.py -from pydantic import BaseModel, field_validator - -class Config(BaseModel): - weather_api_key: str - weather_command_priority: int = 10 - weather_plugin_enabled: bool = True - - @field_validator("weather_command_priority") - @classmethod - def check_priority(cls, v: int) -> int: - if v >= 1: - return v - raise ValueError("weather command priority must greater than 1") -``` - -在 `config.py` 中,我们定义了一个 `Config` 类,它继承自 `pydantic.BaseModel`,并定义了一些配置项。在 `Config` 类中,我们还定义了一个 `check_priority` 方法,它用于检查 `weather_command_priority` 配置项的合法性。更多关于 `pydantic` 的编写方式,可以参考 [pydantic 官方文档](https://docs.pydantic.dev/)。 - -在定义好配置模型后,我们可以在插件加载时获取全局配置,导入插件自身的配置模型并使用: - -```python {5,11} title=weather/__init__.py -from nonebot import get_plugin_config - -from .config import Config - -plugin_config = get_plugin_config(Config) - -weather = on_command( - "天气", - rule=to_me(), - aliases={"weather", "查天气"}, - priority=plugin_config.weather_command_priority, - block=True, -) -``` - -然后,我们便可以从 `plugin_config` 中读取配置了,例如 `plugin_config.weather_api_key`。 - -这种方式可以简洁、高效地读取配置项,同时也可以设置默认值或者在运行时对配置项进行合法性检查,防止由于配置项导致的插件出错等情况出现。 - -:::tip 提示 -发布插件应该为自身的事件响应器提供可配置的优先级,以便插件使用者可以自定义多个插件间的响应顺序。 -::: - -由于插件配置项是从全局配置中读取的,通常我们需要在配置项名称前面添加前缀名,以防止配置项冲突。例如在上方的示例中,我们就添加了配置项前缀 `weather_`。但是这样会导致在使用配置项时过长的变量名,因此我们可以使用 `pydantic` 的 `alias` 或者通过配置 scope 来简化配置项名称。这里我们以 scope 配置为例: - -```python title=weather/config.py -from pydantic import BaseModel - -class ScopedConfig(BaseModel): - api_key: str - command_priority: int = 10 - plugin_enabled: bool = True - -class Config(BaseModel): - weather: ScopedConfig -``` - -```python title=weather/__init__.py -from nonebot import get_plugin_config - -from .config import Config - -plugin_config = get_plugin_config(Config).weather -``` - -这样我们就可以省略插件配置项名称中的前缀 `weather_` 了。但需要注意的是,如果我们使用了 scope 配置,那么在配置文件中也需要使用 [`env_nested_delimiter` 格式](#配置项解析),例如: - -```dotenv -WEATHER__API_KEY=123456 -WEATHER__COMMAND_PRIORITY=10 -``` - -## 内置配置项 - -配置项 API 文档可以前往 [Config 类](../api/config.md#Config)查看。 - -### Driver - -- **类型**: `str` -- **默认值**: `"~fastapi"` - -NoneBot 运行所使用的驱动器。具体配置方法可以参考[安装驱动器](../tutorial/store.mdx#安装驱动器)和[选择驱动器](../advanced/driver.md)。 - - - - -```dotenv -DRIVER=~fastapi+~httpx+~websockets -``` - - - - -```bash -# windows cmd -set DRIVER '~fastapi+~httpx+~websockets' -# windows powershell -$Env:DRIVER='~fastapi+~httpx+~websockets' -# linux/macOS -export DRIVER='~fastapi+~httpx+~websockets' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(driver="~fastapi+~httpx+~websockets") -``` - - - - -### Host - -- **类型**: `IPvAnyAddress` -- **默认值**: `127.0.0.1` - -当 NoneBot 作为服务端时,监听的 IP / 主机名。 - - - - -```dotenv -HOST=127.0.0.1 -``` - - - - -```bash -# windows cmd -set HOST '127.0.0.1' -# windows powershell -$Env:HOST='127.0.0.1' -# linux/macOS -export HOST='127.0.0.1' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(host="127.0.0.1") -``` - - - - -### Port - -- **类型**: `int` (1 ~ 65535) -- **默认值**: `8080` - -当 NoneBot 作为服务端时,监听的端口。 - - - - -```dotenv -PORT=8080 -``` - - - - -```bash -# windows cmd -set PORT '8080' -# windows powershell -$Env:PORT='8080' -# linux/macOS -export PORT='8080' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(port=8080) -``` - - - - -### Log Level - -- **类型**: `int | str` -- **默认值**: `INFO` - -NoneBot 日志输出等级,可以为 `int` 类型等级或等级名称。具体等级对照表参考 [loguru 日志等级](https://loguru.readthedocs.io/en/stable/api/logger.html#levels)。 - -:::tip 提示 -日志等级名称应为大写,如 `INFO`。 -::: - - - - -```dotenv -LOG_LEVEL=DEBUG -``` - - - - -```bash -# windows cmd -set LOG_LEVEL 'DEBUG' -# windows powershell -$Env:LOG_LEVEL='DEBUG' -# linux/macOS -export LOG_LEVEL='DEBUG' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(log_level="DEBUG") -``` - - - - -### API Timeout - -- **类型**: `float | None` -- **默认值**: `30.0` - -调用平台接口的超时时间,单位为秒。`None` 表示不设置超时时间。 - - - - -```dotenv -API_TIMEOUT=10.0 -``` - - - - -```bash -# windows cmd -set API_TIMEOUT '10.0' -# windows powershell -$Env:API_TIMEOUT='10.0' -# linux/macOS -export API_TIMEOUT='10.0' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(api_timeout=10.0) -``` - - - - -### SuperUsers - -- **类型**: `set[str]` -- **默认值**: `set()` - -机器人超级用户,可以使用权限 [`SUPERUSER`](../api/permission.md#SUPERUSER)。 - - - - -```dotenv -SUPERUSERS=["123123123"] -``` - - - - -```bash -# windows cmd -set SUPERUSERS '["123123123"]' -# windows powershell -$Env:SUPERUSERS='["123123123"]' -# linux/macOS -export SUPERUSERS='["123123123"]' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(superusers={"123123123"}) -``` - - - - -### Nickname - -- **类型**: `set[str]` -- **默认值**: `set()` - -机器人昵称,通常协议适配器会根据用户是否 @bot 或者是否以机器人昵称开头来判断是否是向机器人发送的消息。 - - - - -```dotenv -NICKNAME=["bot"] -``` - - - - -```bash -# windows cmd -set NICKNAME '["bot"]' -# windows powershell -$Env:NICKNAME='["bot"]' -# linux/macOS -export NICKNAME='["bot"]' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(nickname={"bot"}) -``` - - - - -### Command Start 和 Command Separator - -- **类型**: `set[str]` -- **默认值**: - - Command Start: `{"/"}` - - Command Separator: `{"."}` - -命令消息的起始符和分隔符。用于 [`command`](../advanced/matcher.md#command) 规则。 - - - - -```dotenv -COMMAND_START=["/", ""] -COMMAND_SEP=[".", " "] -``` - - - - -```bash -# windows cmd -set COMMAND_START '["/", ""]' -set COMMAND_SEP '[".", " "]' -# windows powershell -$Env:COMMAND_START='["/", ""]' -$Env:COMMAND_SEP='[".", " "]' -# linux/macOS -export COMMAND_START='["/", ""]' -export COMMAND_SEP='[".", " "]' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(command_start={"/", ""}, command_sep={".", " "}) -``` - - - - -### Session Expire Timeout - -- **类型**: `timedelta` -- **默认值**: `timedelta(minutes=2)` - -用户会话超时时间,配置格式参考 [Datetime Types](https://docs.pydantic.dev/latest/api/standard_library_types/#datetimetimedelta)。 - - - - -```dotenv -SESSION_EXPIRE_TIMEOUT=00:02:00 -``` - - - - -```bash -# windows cmd -set SESSION_EXPIRE_TIMEOUT '00:02:00' -# windows powershell -$Env:SESSION_EXPIRE_TIMEOUT='00:02:00' -# linux/macOS -export SESSION_EXPIRE_TIMEOUT='00:02:00' -``` - - - - -```python title=bot.py -import nonebot - -nonebot.init(session_expire_timeout=120) -``` - - - diff --git a/website/versioned_docs/version-2.3.2/appendices/log.md b/website/versioned_docs/version-2.3.2/appendices/log.md deleted file mode 100644 index 7fb68686f172..000000000000 --- a/website/versioned_docs/version-2.3.2/appendices/log.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -sidebar_position: 6 -description: 记录与控制日志 - -options: - menu: - - category: appendices - weight: 70 ---- - -# 日志 - -无论是在开发还是在生产环境中,日志都是一个重要的功能,可以帮助我们了解运行状况、排查问题等。虽然我们可以使用 `print` 来将需要的信息输出到控制台,但是这种方式难以控制,而且不利于日志的归档、分析等。NoneBot 使用优秀的 [Loguru](https://loguru.readthedocs.io/) 库来进行日志记录。 - -## 记录日志 - -我们可以从 NoneBot 中导入 `logger` 对象,然后使用 `logger` 对象的方法来记录日志。 - -```python -from nonebot import logger - -logger.trace("This is a trace message") -logger.debug("This is a debug message") -logger.info("This is an info message") -logger.success("This is a success message") -logger.warning("This is a warning message") -logger.error("This is an error message") -logger.critical("This is a critical message") -``` - -我们仅需一行代码即可记录对应级别的日志。日志可以通过配置 [`LOG_LEVEL` 配置项](./config.mdx#log-level)来过滤输出等级,控制台中仅会输出大于等于 `LOG_LEVEL` 的日志。默认的 `LOG_LEVEL` 为 `INFO`,即只会输出 `INFO`、`SUCCESS`、`WARNING`、`ERROR`、`CRITICAL` 级别的日志。 - -如果需要记录 `Exception traceback` 日志,可以向 `logger` 添加 `exception` 选项: - -```python {4} -try: - 1 / 0 -except ZeroDivisionError: - logger.opt(exception=True).error("ZeroDivisionError") -``` - -如果需要输出彩色日志,可以向 `logger` 添加 `colors` 选项: - -```python -logger.opt(colors=True).warning("We got a BIG problem") -``` - -更多日志记录方法请参考 [Loguru 文档](https://loguru.readthedocs.io/)。 - -## 自定义日志输出 - -NoneBot 在启动时会添加一个默认的日志处理器,该处理器会将日志输出到**stdout**,并且根据 `LOG_LEVEL` 配置项过滤日志等级。 - -默认的日志格式为: - -```text -{time:MM-DD HH:mm:ss} [{level}] {name} | {message} -``` - -我们可以从 `nonebot.log` 模块导入以使用 NoneBot 的默认格式和过滤器: - -```python -from nonebot.log import default_format, default_filter -``` - -如果需要自定义日志格式,我们需要移除 NoneBot 默认的日志处理器并添加新的日志处理器。例如,在机器人入口文件中 `nonebot.init` 之前添加以下内容: - -```python title=bot.py -from nonebot.log import logger_id - -# 移除 NoneBot 默认的日志处理器 -logger.remove(logger_id) -# 添加新的日志处理器 -logger.add( - sys.stdout, - level=0, - diagnose=True, - format="{time:MM-DD HH:mm:ss} [{level}] {name} | {message}", - filter=default_filter -) -``` - -如果想要输出日志到文件,我们可以使用 `logger.add` 方法添加文件处理器: - -```python title=bot.py -logger.add("error.log", level="ERROR", format=default_format, rotation="1 week") -``` - -更多日志处理器的使用方法请参考 [Loguru 文档](https://loguru.readthedocs.io/)。 - -## 重定向 logging 日志 - -`logging` 是 Python 标准库中的日志模块,NoneBot 提供了一个 logging handler 用于将 `logging` 日志重定向到 `loguru` 处理。 - -```python -from nonebot.log import LoguruHandler - -# root logger 添加 LoguruHandler -logging.basicConfig(handlers=[LoguruHandler()]) -# 或者为其他 logging.Logger 添加 LoguruHandler -logger.addHandler(LoguruHandler()) -``` diff --git a/website/versioned_docs/version-2.3.2/appendices/overload.md b/website/versioned_docs/version-2.3.2/appendices/overload.md deleted file mode 100644 index 2ade4b5b5825..000000000000 --- a/website/versioned_docs/version-2.3.2/appendices/overload.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -sidebar_position: 7 -description: 根据事件类型进行不同的处理 - -options: - menu: - - category: appendices - weight: 80 ---- - -# 事件类型与重载 - -在之前的示例中,我们已经了解了如何[获取事件信息](../tutorial/event-data.mdx)以及[使用平台接口](./api-calling.mdx)。但是,事件信息通常不仅仅包含消息这一个内容,还有其他平台提供的信息,例如消息发送时间、消息发送者等等。同时,在使用平台接口时,我们需要确保使用的**平台接口**与所要发送的**平台类型**一致,对不同类型的事件需要做出不同的处理。在本章节中,我们将介绍如何获取事件更多的信息以及根据事件类型进行不同的处理。 - -## 事件类型 - -在 NoneBot 中,事件均是 `nonebot.adapters.Event` 基类的子类型,基类对一些必要的属性进行了抽象,子类型则根据不同的平台进行了实现。在[自定义权限](./permission.mdx#自定义权限)一节中,我们就使用了 `Event` 的抽象方法 `get_user_id` 来获取事件发送者 ID,这个方法由协议适配器进行了实现,返回机器人用户对应的平台 ID。更多的基类抽象方法可以在[使用适配器](../advanced/adapter.md#获取事件通用信息)中查看。 - -既然事件是基类的子类型,我们实际可以获得的信息通常多于基类抽象方法所提供的。如果我们不满足于基类能获得的信息,我们可以小小的修改一下事件处理函数的事件参数类型注解,使其变为子类型,这样我们就可以通过协议适配器定义的子类型来获取更多的信息。我们以 `Console` 协议适配器为例: - -```python {4} title=weather/__init__.py -from nonebot.adapters.console import MessageEvent - -@weather.got("location", prompt="请输入地名") -async def got_location(event: MessageEvent, location: str = ArgPlainText()): - await weather.finish(f"{event.time.strftime('%Y-%m-%d')} {location} 的天气是...") -``` - -在上面的代码中,我们获取了 `Console` 协议适配器的消息事件提供的发送时间 `time` 属性。 - -:::caution 注意 -如果**基类**就能满足你的需求,那么就**不要修改**事件参数类型注解,这样可以使你的代码更加**通用**,可以在更多平台上运行。如何根据不同平台事件类型进行不同的处理,我们将在[重载](#重载)一节中介绍。 -::: - -## 重载 - -我们在编写机器人时,常常会遇到这样一个问题:如何对私聊和群聊消息进行不同的处理?如何对不同平台的事件进行不同的处理?针对这些问题,NoneBot 提供了一个便捷而高效的解决方案 ── 重载。简单来说,依赖函数会根据其参数的类型注解来决定是否执行,忽略不符合其参数类型注解的情况。这样,我们就可以通过修改事件参数类型注解来实现对不同事件的处理,或者修改 `Bot` 参数类型注解来实现使用不同平台的接口。我们以 `OneBot` 协议适配器为例: - -```python {4,8} -from nonebot.adapters.onebot.v11 import PrivateMessageEvent, GroupMessageEvent - -@matcher.handle() -async def handle_private(event: PrivateMessageEvent): - await matcher.finish("私聊消息") - -@matcher.handle() -async def handle_group(event: GroupMessageEvent): - await matcher.finish("群聊消息") -``` - -这样,机器人用户就会在私聊和群聊中分别收到不同的回复。同样的,我们也可以通过修改 `Bot` 参数类型注解来实现使用不同平台的接口: - -```python -from nonebot.adapters.console import Bot as ConsoleBot -from nonebot.adapters.onebot.v11 import Bot as OneBot - -@matcher.handle() -async def handle_console(bot: ConsoleBot): - await bot.bell() - -@matcher.handle() -async def handle_onebot(bot: OneBot): - await bot.send_group_message(group_id=123123, message="OneBot") -``` - -:::caution 注意 -重载机制对所有的参数类型注解都有效,因此,依赖注入也可以使用这个特性来对不同的返回值进行处理。 - -但 Bot、Event 和 Matcher 三者的参数类型注解具有最高检查优先级,如果三者任一类型注解不匹配,那么其他依赖注入将不会执行(如:`Depends`)。 -::: - -:::tip 提示 -如何更好地编写一个跨平台的插件,我们将在[最佳实践](../best-practice/multi-adapter.mdx)中介绍。 -::: diff --git a/website/versioned_docs/version-2.3.2/appendices/permission.mdx b/website/versioned_docs/version-2.3.2/appendices/permission.mdx deleted file mode 100644 index eac451839753..000000000000 --- a/website/versioned_docs/version-2.3.2/appendices/permission.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -sidebar_position: 5 -description: 控制事件响应器的权限 - -options: - menu: - - category: appendices - weight: 60 ---- - -# 权限控制 - -import Messenger from "@site/src/components/Messenger"; - -**权限控制**是机器人在实际应用中需要解决的重点问题之一,NoneBot 提供了灵活的权限控制机制 —— `Permission`。 - -类似于响应规则 `Rule`,`Permission` 是由非负整数个 `PermissionChecker` 所共同组成的**用于筛选事件**的对象。但需要特别说明的是,权限和响应规则有如下区别: - -1. 权限检查**先于**响应规则检查 -2. `Permission` 只需**其中一个** `PermissionChecker` 返回 `True` 时就会检查通过 -3. 权限检查进行时,上下文中并不存在会话状态 `state` -4. `Rule` 仅在**初次触发**事件响应器时进行检查,在余下的会话中并不会限制事件;而 `Permission` 会**持续生效**,在连续对话中一直对事件主体加以限制。 - -## 基础使用 - -通常情况下,`Permission` 更侧重于对于**触发事件的机器人用户**的筛选,例如由 NoneBot 自身提供的 `SUPERUSER` 权限,便是筛选出会话发起者是否为超级用户。它可以对输入的用户进行鉴别,如果符合要求则会被认为通过并返回 `True`,反之则返回 `False`。 - -简单来说,`Permission` 是一个用于筛选出符合要求的用户的机制,可以通过 `Permission` 精确的控制响应对象的覆盖范围,从而拒绝掉我们所不希望的事件。 - -例如,我们可以在 `weather` 插件中添加一个超级用户可用的指令: - -```python {2,8} title=weather/__init__.py -from typing import Tuple -from nonebot.permission import SUPERUSER - -manage = on_command( - ("天气", "启用"), - rule=to_me(), - aliases={("天气", "禁用")}, - permission=SUPERUSER, -) - -@manage.handle() -async def control(cmd: Tuple[str, str] = Command()): - _, action = cmd - if action == "启用": - plugin_config.weather_plugin_enabled = True - elif action == "禁用": - plugin_config.weather_plugin_enabled = False - await manage.finish(f"天气插件已{action}") -``` - -如上方示例所示,在注册事件响应器时,我们设置了 `permission` 参数,那么这个事件处理器在触发事件前的检查阶段会对用户身份进行验证,如果不符合我们设置的条件(此处即为**超级用户**)则不会响应。此时,我们向机器人发送 `/天气.禁用` 指令,机器人不会有任何响应,因为我们还不是机器人的超级管理员。我们在 dotenv 文件中设置了 `SUPERUSERS` 配置项之后,机器人就会响应我们的指令了。 - -```dotenv title=.env -SUPERUSERS=["console_user"] -``` - - - -## 自定义权限 - -与事件响应规则类似,`PermissionChecker` 也是一个返回值为 `bool` 类型的依赖函数,即 `PermissionChecker` 支持依赖注入。例如,我们可以限制用户的指令调用次数: - -```python title=weather/__init__.py -from nonebot.adapters import Event - -fake_db: Dict[str, int] = {} - -async def limit_permission(event: Event): - count = fake_db.setdefault(event.get_user_id(), 100) - if count > 0: - fake_db[event.get_user_id()] -= 1 - return True - return False - -weather = on_command("天气", permission=limit_permission) -``` - -## 权限组合 - -权限之间可以通过 `|` 运算符进行组合,使得任意一个权限检查返回 `True` 时通过。例如: - -```python {4-6} -perm1 = Permission(foo_checker) -perm2 = Permission(bar_checker) - -perm = perm1 | perm2 -perm = perm1 | bar_checker -perm = foo_checker | perm2 -``` - -同样的,我们也无需担心组合了一个 `None` 值,`Permission` 会自动忽略 `None` 值。 - -```python -assert (perm | None) is perm -``` - -## 主动使用权限 - -除了在事件响应器中使用权限外,我们也可以主动使用权限来判断事件是否符合条件。例如: - -```python {3} -perm = Permission(some_checker) - -result: bool = await perm(bot, event) -``` - -我们只需要传入 `Bot` 实例、事件,`Permission` 会并发调用所有 `PermissionChecker` 进行检查,并返回结果。 diff --git a/website/versioned_docs/version-2.3.2/appendices/rule.md b/website/versioned_docs/version-2.3.2/appendices/rule.md deleted file mode 100644 index a4e55a87dfdf..000000000000 --- a/website/versioned_docs/version-2.3.2/appendices/rule.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -sidebar_position: 1 -description: 自定义响应规则 - -options: - menu: - - category: appendices - weight: 20 ---- - -# 响应规则 - -机器人在实际应用中,往往会接收到多种多样的事件类型,NoneBot 通过响应规则来控制事件的处理。 - -在[指南](../tutorial/matcher.md#为事件响应器添加参数)中,我们为 `weather` 命令添加了一个 `rule=to_me()` 参数,这个参数就是一个响应规则,确保只有在私聊或者 `@bot` 时才会响应。 - -响应规则是一个 `Rule` 对象,它由一系列的 `RuleChecker` 函数组成,每个 `RuleChecker` 函数都会检查事件是否符合条件,如果所有的检查都通过,则事件会被处理。 - -## RuleChecker - -`RuleChecker` 是一个返回值为 `bool` 类型的依赖函数,即 `RuleChecker` 支持依赖注入。我们可以根据上一节中添加的[配置项](./config.mdx#插件配置),在 `weather` 插件目录中编写一个响应规则: - -```python {3,4} title=weather/__init__.py -plugin_config = get_plugin_config(Config) - -async def is_enable() -> bool: - return plugin_config.weather_plugin_enabled - -weather = on_command("天气", rule=is_enable) -``` - -在上面的代码中,我们定义了一个函数 `is_enable`,它会检查配置项 `weather_plugin_enabled` 是否为 `True`。这个函数 `is_enable` 即为一个 `RuleChecker`。 - -## Rule - -`Rule` 是若干个 `RuleChecker` 的集合,它会并发调用每个 `RuleChecker`,只有当所有 `RuleChecker` 检查通过时匹配成功。例如:我们可以组合两个 `RuleChecker`,一个用于检查插件是否启用,一个用于检查用户是否在黑名单中: - -```python {10} -from nonebot.rule import Rule -from nonebot.adapters import Event - -async def is_enable() -> bool: - return plugin_config.weather_plugin_enabled - -async def is_blacklisted(event: Event) -> bool: - return event.get_user_id() not in BLACKLIST - -rule = Rule(is_enable, is_blacklisted) - -weather = on_command("天气", rule=rule) -``` - -## 合并响应规则 - -在定义响应规则时,我们可以将规则进行细分,来更好地复用规则。而在使用时,我们需要合并多个规则。除了使用 `Rule` 对象来组合多个 `RuleChecker` 外,我们还可以对 `Rule` 对象进行合并。在原 `weather` 插件中,我们可以将 `rule=to_me()` 与 `rule=is_enable` 使用 `&` 运算符合并: - -```python {10} title=weather/__init__.py -from nonebot.rule import to_me - -plugin_config = get_plugin_config(Config) - -async def is_enable() -> bool: - return plugin_config.weather_plugin_enabled - -weather = on_command( - "天气", - rule=to_me() & is_enable, - aliases={"weather", "查天气"}, - priority=plugin_config.weather_command_priority - block=True, -) -``` - -这样,`weather` 命令就只会在插件启用且在私聊或者 `@bot` 时才会响应。 - -合并响应规则可以有多种形式,例如: - -```python {4-6} -rule1 = Rule(foo_checker) -rule2 = Rule(bar_checker) - -rule = rule1 & rule2 -rule = rule1 & bar_checker -rule = foo_checker & rule2 -``` - -同时,我们也无需担心合并了一个 `None` 值,`Rule` 会忽略 `None` 值。 - -```python -assert (rule & None) is rule -``` - -## 主动使用响应规则 - -除了在事件响应器中使用响应规则外,我们也可以主动使用响应规则来判断事件是否符合条件。例如: - -```python {3} -rule = Rule(some_checker) - -result: bool = await rule(bot, event, state) -``` - -我们只需要传入 `Bot` 对象、事件和会话状态,`Rule` 会并发调用所有 `RuleChecker` 进行检查,并返回结果。 - -## 内置响应规则 - -NoneBot 内置了一些常用的响应规则,可以直接通过事件响应器辅助函数或者自行合并其他规则使用。内置响应规则列表可以参考[事件响应器进阶](../advanced/matcher.md) diff --git a/website/versioned_docs/version-2.3.2/appendices/session-control.mdx b/website/versioned_docs/version-2.3.2/appendices/session-control.mdx deleted file mode 100644 index c98bf2bf2b0f..000000000000 --- a/website/versioned_docs/version-2.3.2/appendices/session-control.mdx +++ /dev/null @@ -1,397 +0,0 @@ ---- -sidebar_position: 2 -description: 更灵活的会话控制 - -options: - menu: - - category: appendices - weight: 30 ---- - -# 会话控制 - -import Messenger from "@site/src/components/Messenger"; - -在[指南](../tutorial/event-data.mdx#使用依赖注入)的 `weather` 插件中,我们使用依赖注入获取了机器人用户发送的地名参数,并根据地名参数进行相应的回复。但是,一问一答的对话模式仅仅适用于简单的对话场景,如果我们想要实现更复杂的对话模式,就需要使用会话控制。 - -## 询问并获取用户输入 - -在 `weather` 插件中,我们对于用户未输入地名参数的情况直接回复了 `请输入地名` 并结束了事件流程。但是,这样用户体验并不好,需要重新输入指令和地名参数才能获取天气回复。我们现在来实现询问并获取用户地名参数的功能。 - -### 询问用户 - -我们可以使用事件响应器操作中的 `got` 装饰器来表示当前事件处理流程需要询问并获取用户输入的消息: - -```python {6} title=weather/__init__.py -@weather.handle() -async def handle_function(args: Message = CommandArg()): - if location := args.extract_plain_text(): - await weather.finish(f"今天{location}的天气是...") - -@weather.got("location", prompt="请输入地名") -async def got_location(): - ... -``` - -在上面的代码中,我们使用 `got` 事件响应器操作来向用户发送 `prompt` 消息,并等待用户的回复。用户的回复消息将会被作为 `location` 参数存储于事件响应器状态中。 - -:::tip 提示 -事件处理函数根据定义的顺序依次执行。 -::: - -### 获取用户输入 - -在询问以及用户回复之后,我们就可以获取到我们需要的 `location` 参数了。我们使用 `ArgPlainText` 依赖注入来获取参数纯文本信息: - -```python {9} title=weather/__init__.py -from nonebot.params import ArgPlainText - -@weather.handle() -async def handle_function(args: Message = CommandArg()): - if location := args.extract_plain_text(): - await weather.finish(f"今天{location}的天气是...") - -@weather.got("location", prompt="请输入地名") -async def got_location(location: str = ArgPlainText()): - await weather.finish(f"今天{location}的天气是...") -``` - - - -在上面的代码中,我们在 `got_location` 函数中定义了一个依赖注入参数 `location`,他的值将会是用户回复的消息纯文本信息。获取到用户输入的地名参数后,我们就可以进行天气查询并回复了。 - -:::tip 提示 -如果想要获取用户回复的消息对象 `Message` ,可以使用 `Arg` 依赖注入。 -::: - -### 跳过询问 - -在上面的代码中,如果用户在输入天气指令时,同时提供了地名参数,我们直接回复了天气信息,这部分的逻辑是和询问用户地名参数之后的逻辑一致的。如果在复杂的业务场景下,我们希望这部分代码应该复用以减少代码冗余。我们可以使用事件响应器操作中的 `set_arg` 来主动设置一个参数: - -```python {4,6} title=weather/__init__.py -from nonebot.matcher import Matcher - -@weather.handle() -async def handle_function(matcher: Matcher, args: Message = CommandArg()): - if args.extract_plain_text(): - matcher.set_arg("location", args) - -@weather.got("location", prompt="请输入地名") -async def got_location(location: str = ArgPlainText()): - await weather.finish(f"今天{location}的天气是...") -``` - -请注意,设置参数需要使用依赖注入来获取 `Matcher` 实例以确保上下文正确,且参数值应为 `Message` 对象。 - -在 `location` 参数被设置之后,`got` 事件响应器操作将不再会询问并等待用户的回复,而是直接进入 `got_location` 函数。 - -## 请求重新输入 - -在实际的业务场景中,用户的输入很有可能并非是我们所期望的,而结束事件处理流程让用户重新发送指令也不是一个好的体验。这时我们可以使用 `reject` 事件响应器操作来请求用户重新输入: - -```python {8,9} title=weather/__init__.py -@weather.handle() -async def handle_function(matcher: Matcher, args: Message = CommandArg()): - if args.extract_plain_text(): - matcher.set_arg("location", args) - -@weather.got("location", prompt="请输入地名") -async def got_location(location: str = ArgPlainText()): - if location not in ["北京", "上海", "广州", "深圳"]: - await weather.reject(f"你想查询的城市 {location} 暂不支持,请重新输入!") - await weather.finish(f"今天{location}的天气是...") -``` - - - -在上面的代码中,我们在 `got_location` 函数中判断用户输入的地名是否在支持的城市列表中,如果不在,则使用 `reject` 事件响应器操作。操作将会向用户发送 `reject` 参数中的消息,并等待用户回复后,重新执行 `got_location` 函数。通过 `got` 和 `reject` 事件响应器操作,我们实现了类似于**循环**的执行方式。 - -`reject` 事件响应器操作与 `finish` 类似,NoneBot 会在向机器人用户发送消息内容后抛出 `RejectedException` 异常来暂停事件响应流程以等待用户输入。也就是说,在 `reject` 被执行后,后续的程序同样是不会被执行的。 - -## 更多事件响应器操作 - -在之前的章节中,我们已经大致了解了五个事件响应器操作:`handle`、`got`、`finish`、`send` 和 `reject`。现在我们来完整地介绍一下这些操作。 - -事件响应器操作可以分为两大类:**交互操作**和**流程控制操作**。我们可以通过交互操作来与用户进行交互,而流程控制操作则可以用来控制事件处理流程的执行。 - -:::tip 提示 -事件处理流程按照事件处理函数添加顺序执行,已经结束的事件处理函数不可能被恢复执行。 -::: - -### handle - -`handle` 事件响应器操作是一个装饰器,用于向事件处理流程添加一个事件处理函数。 - -```python -@matcher.handle() -async def handle_func(): - ... -``` - -`handle` 装饰器支持嵌套操作,即一个事件处理函数可以被添加多次: - -```python -@matcher.handle() -@matcher.handle() -async def handle_func(): - # 这个函数会被执行两次 - ... -``` - -### got - -`got` 事件响应器操作也是一个装饰器,它会在当前装饰的事件处理函数运行之前,中断当前事件处理流程,等待接收一个新的事件。它可以通过 `prompt` 参数来向用户发送询问消息,然后等待用户的回复消息,贴近对话形式会话。 - -`got` 装饰器接受一个参数 `key` 和一个可选参数 `prompt`。当会话状态中不存在 `key` 对应的消息时,会向用户发送 `prompt` 参数的消息,并等待用户回复。`prompt` 参数的类型和 [`send`](#send) 事件响应器操作的参数类型一致。 - -在事件处理函数中,可以通过依赖注入的方式来获取接收到的消息,参考:[`Arg`](../advanced/dependency.mdx#arg)、[`ArgStr`](../advanced/dependency.mdx#argstr)、[`ArgPlainText`](../advanced/dependency.mdx#argplaintext)。 - -```python -@matcher.got("key", prompt="请输入...") -async def got_func(key: Message = Arg()): - ... -``` - -`got` 装饰器支持与 `got` 和 `receive` 装饰器嵌套操作,即一个事件处理函数可以在接收多个事件或消息后执行: - -```python -@matcher.got("key1", prompt="请输入key1...") -@matcher.got("key2", prompt="请输入key2...") -@matcher.receive("key3") -async def got_func(key1: Message = Arg(), key2: Message = Arg(), key3: Event = Received("key3")): - ... -``` - -### receive - -`receive` 事件响应器操作也是一个装饰器,它会在当前装饰的事件处理函数运行之前,中断当前事件处理流程,等待接收一个新的事件。与 `got` 不同的是,`receive` 不会向用户发送询问消息,并且等待一个用户事件。可以接收的事件类型取决于[会话更新](../advanced/session-updating.md)。 - -`receive` 装饰器接受一个可选参数 id,用于标识当前需要接收的事件,如果不指定,则默认为空 `""`。 - -在事件处理函数中,可以通过依赖注入的方式来获取接收到的事件,参考:[`Received`](../advanced/dependency.mdx#received)、[`LastReceived`](../advanced/dependency.mdx#lastreceived)。 - -```python -@matcher.receive("id") -async def receive_func(event: Event = Received("id")): - ... -``` - -`receive` 装饰器支持与 `got` 和 `receive` 装饰器嵌套操作,即一个事件处理函数可以在接收多个事件或消息后执行: - -```python -@matcher.receive("key1") -@matcher.got("key2", prompt="请输入key2...") -@matcher.got("key3", prompt="请输入key3...") -async def receive_func(key1: Event = Received("key1"), key2: Message = Arg(), key3: Message = Arg()): - ... -``` - -### send - -`send` 事件响应器操作用于向用户回复一条消息。协议适配器会根据当前 event 选择回复的途径。 - -`send` 操作接受一个参数 message 和其他任何协议适配器接受的参数。message 参数类型可以是字符串、消息序列、消息段或者消息模板。消息模板将会使用会话状态字典进行渲染后发送。 - -这个操作等同于使用 `bot.send(event, message, **kwargs)`,但不需要自行传入 `event`。 - -```python -@matcher.handle() -async def _(): - await matcher.send("Hello world!") -``` - -### finish - -向用户回复一条消息(可选),并立即结束**整个处理流程**。 - -参数与 [`send`](#send) 相同。 - -```python -@matcher.handle() -async def _(): - await matcher.finish("Hello world!") - # 下面的代码不会被执行 -``` - -### pause - -向用户回复一条消息(可选),立即结束**当前**事件处理函数,等待接收一个新的事件后进入**下一个**事件处理函数。 - -参数与 [`send`](#send) 相同。 - -```python -@matcher.handle() -async def _(): - if need_confirm: - await matcher.pause("请在两分钟内确认执行") - -@matcher.handle() -async def _(): - ... -``` - -### reject - -向用户回复一条消息(可选),立即结束**当前**事件处理函数,等待接收一个新的事件后再次执行**当前**事件处理函数。 - -`reject` 可以用于拒绝当前 `receive` 接收的事件或 `got` 接收的参数。通常在用户回复不符合格式或标准需要重新输入,或者用于循环进行用户交互。 - -参数与 [`send`](#send) 相同。 - -```python -@matcher.got("arg") -async def _(arg: str = ArgPlainText()): - if not is_valid(arg): - await matcher.reject("Invalid arg!") -``` - -### reject_arg - -向用户回复一条消息(可选),立即结束**当前**事件处理函数,等待接收一个新的消息后再次执行**当前**事件处理函数。 - -`reject_arg` 用于拒绝指定 `got` 接收的参数,通常在嵌套装饰器时使用。 - -`reject_arg` 操作接受一个 key 参数以及可选的 prompt 参数。prompt 参数与 [`send`](#send) 相同。 - -```python -@matcher.got("a") -@matcher.got("b") -async def _(a: str = ArgPlainText(), b: str = ArgPlainText()): - if a not in b: - await matcher.reject_arg("a", "Invalid a!") -``` - -### reject_receive - -向用户回复一条消息(可选),立即结束**当前**事件处理函数,等待接收一个新的事件后再次执行**当前**事件处理函数。 - -`reject_receive` 用于拒绝指定 `receive` 接收的事件,通常在嵌套装饰器时使用。 - -`reject_receive` 操作接受一个可选的 id 参数以及可选的 prompt 参数。id 参数默认为空 `""`,prompt 参数与 [`send`](#send) 相同。 - -```python -@matcher.receive("a") -@matcher.receive("b") -async def _(a: Event = Received("a"), b: Event = Received("b")): - if a.get_user_id() != b.get_user_id(): - await matcher.reject_receive("a") -``` - -### skip - -立即结束当前事件处理函数,进入下一个事件处理函数。 - -通常在依赖注入中使用,用于跳过当前事件处理函数的执行。 - -```python -from nonebot.params import Depends - -async def dependency(): - matcher.skip() - -@matcher.handle() -async def _(check=Depends(dependency)): - # 这个函数不会被执行 -``` - -### stop_propagation - -阻止事件向更低优先级的事件响应器传播。 - -```python -from nonebot.matcher import Matcher - -@foo.handle() -async def _(matcher: Matcher): - matcher.stop_propagation() -``` - -:::caution 注意 -`stop_propagation` 操作是实例方法,需要先通过依赖注入获取事件响应器实例再进行调用。 -::: - -### get_arg - -获取一个 `got` 接收的参数。 - -`get_arg` 操作接受一个 key 参数和一个可选的 default 参数。当参数不存在时,将返回 default 或 `None`。 - -```python -from nonebot.matcher import Matcher - -@matcher.handle() -async def _(matcher: Matcher): - key = matcher.get_arg("key", default=None) -``` - -### set_arg - -设置 / 覆盖一个 `got` 接收的参数。 - -`set_arg` 操作接受一个 key 参数和一个 value 参数。请注意,value 参数必须是消息序列对象,如需存储其他数据请使用[会话状态](./session-state.md)。 - -```python -from nonebot.matcher import Matcher - -@matcher.handle() -async def _(matcher: Matcher): - matcher.set_arg("key", Message("value")) -``` - -### get_receive - -获取一个 `receive` 接收的事件。 - -`get_receive` 操作接受一个 id 参数和一个可选的 default 参数。当事件不存在时,将返回 default 或 `None`。 - -```python -from nonebot.matcher import Matcher - -@matcher.handle() -async def _(matcher: Matcher): - event = matcher.get_receive("id", default=None) -``` - -### get_last_receive - -获取最近的一个 `receive` 接收的事件。 - -`get_last_receive` 操作接受一个可选的 default 参数。当事件不存在时,将返回 default 或 `None`。 - -```python -from nonebot.matcher import Matcher - -@matcher.handle() -async def _(matcher: Matcher): - event = matcher.get_last_receive(default=None) -``` - -### set_receive - -设置 / 覆盖一个 `receive` 接收的事件。 - -`set_receive` 操作接受一个 id 参数和一个 event 参数。请注意,event 参数必须是事件对象,如需存储其他数据请使用[会话状态](./session-state.md)。 - -```python -from nonebot.matcher import Matcher - -@matcher.handle() -async def _(matcher: Matcher): - matcher.set_receive("key", Event()) -``` diff --git a/website/versioned_docs/version-2.3.2/appendices/session-state.md b/website/versioned_docs/version-2.3.2/appendices/session-state.md deleted file mode 100644 index d6780fc9921e..000000000000 --- a/website/versioned_docs/version-2.3.2/appendices/session-state.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -sidebar_position: 3 -description: 会话状态信息 - -options: - menu: - - category: appendices - weight: 40 ---- - -# 会话状态 - -在事件处理流程中,和用户交互的过程即是会话。在会话中,我们可能需要记录一些信息,例如用户的重试次数等等,以便在会话中的不同阶段进行判断和处理。这些信息都可以存储于会话状态中。 - -NoneBot 中的会话状态是一个字典,可以通过类型 `T_State` 来获取。字典内可以存储任意类型的数据,但是要注意的是,NoneBot 本身会在会话状态中存储一些信息,因此不要使用 [NoneBot 使用的键名](../api/consts.md)。 - -```python -from nonebot.typing import T_State - -@matcher.got("key", prompt="请输入密码") -async def _(state: T_State, key: str = ArgPlainText()): - if key != "some password": - try_count = state.get("try_count", 1) - if try_count >= 3: - await matcher.finish("密码错误次数过多") - else: - state["try_count"] = try_count + 1 - await matcher.reject("密码错误,请重新输入") - await matcher.finish("密码正确") -``` - -会话状态的生命周期与事件处理流程相同,在期间的任何一个事件处理函数都可以进行读写。 - -```python -from nonebot.typing import T_State - -@matcher.handle() -async def _(state: T_State): - state["key"] = "value" - -@matcher.handle() -async def _(state: T_State): - await matcher.finish(state["key"]) -``` - -会话状态还可以用于发送动态消息,消息模板在发送时会使用会话状态字典进行渲染。消息模板的使用方法已经在[消息处理](../tutorial/message.md#使用消息模板)中介绍过,这里不再赘述。 - -```python -from nonebot.typing import T_State -from nonebot.adapters import MessageTemplate - -@matcher.handle() -async def _(state: T_State): - state["username"] = "user" - -@matcher.got("password", prompt=MessageTemplate("请输入 {username} 的密码")) -async def _(): - await matcher.finish(MessageTemplate("密码为 {password}")) -``` diff --git a/website/versioned_docs/version-2.3.2/appendices/whats-next.md b/website/versioned_docs/version-2.3.2/appendices/whats-next.md deleted file mode 100644 index 4b1a3f3fc56f..000000000000 --- a/website/versioned_docs/version-2.3.2/appendices/whats-next.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -sidebar_position: 99 -description: 下一步──进阶! ---- - -# 下一步 - -至此,我们已经了解了 NoneBot 的大多数功能用法,相信你已经可以独自写出一个插件了。现在你可以选择: - -- 即刻开始插件编写! -- 更深入地了解 NoneBot 的[更多功能和原理](../advanced/plugin-info.md)! diff --git a/website/versioned_docs/version-2.3.2/best-practice/alconna/README.mdx b/website/versioned_docs/version-2.3.2/best-practice/alconna/README.mdx deleted file mode 100644 index b6f79eacecc8..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/alconna/README.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -sidebar_position: 1 -description: Alconna 命令解析拓展 - -slug: /best-practice/alconna/ ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# Alconna 插件 - -[`nonebot-plugin-alconna`](https://github.com/nonebot/plugin-alconna) 是一类提供了拓展响应规则的插件。 -该插件使用 [Alconna](https://github.com/ArcletProject/Alconna) 作为命令解析器, -是一个简单、灵活、高效的命令参数解析器,并且不局限于解析命令式字符串。 - -该插件提供了一类新的事件响应器辅助函数 `on_alconna`,以及 `AlconnaResult` 等依赖注入函数。 - -该插件声明了一个 `Matcher` 的子类 `AlconnaMatcher`,并在 `AlconnaMatcher` 中添加了一些新的方法,例如: - -- `assign`:基于 `Alconna` 解析结果,执行满足目标路径的处理函数 -- `dispatch`:类似 `CommandGroup`,对目标路径创建一个新的 `AlconnaMatcher`,并将解析结果分配给该 `AlconnaMatcher` -- `got_path`:类似 `got`,但是可以指定目标路径,并且能够验证解析结果是否可用 -- ... - -基于 `Alconna` 的特性,该插件同时提供了一系列便捷的消息段标注。 -标注可用于在 `Alconna` 中匹配消息中除 text 外的其他消息段,也可用于快速创建各适配器下的消息段。所有标注位于 `nonebot_plugin_alconna.adapters` 中。 - -该插件同时通过提供 `UniMessage` (通用消息模型) 实现了**跨平台接收和发送消息**的功能。 - -## 安装插件 - -在使用前请先安装 `nonebot-plugin-alconna` 插件至项目环境中,可参考[获取商店插件](../../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如: - -在**项目目录**下执行以下命令: - - - - -```shell -nb plugin install nonebot-plugin-alconna -``` - - - - -```shell -pip install nonebot-plugin-alconna -``` - - - - - -```shell -pdm add nonebot-plugin-alconna -``` - - - - -## 导入插件 - -由于 `nonebot-plugin-alconna` 作为插件,因此需要在使用前对其进行**加载**并**导入**其中的 `on_alconna` 来使用命令拓展。使用 `require` 方法可轻松完成这一过程,可参考 [跨插件访问](../../advanced/requiring.md) 一节进行了解。 - -```python -from nonebot import require - -require("nonebot_plugin_alconna") - -from nonebot_plugin_alconna import on_alconna -``` - -## 使用插件 - -在前面的[深入指南](../../appendices/session-control.mdx)中,我们已经得到了一个天气插件。 -现在我们将使用 `Alconna` 来改写这个插件。 - -
- 插件示例 - -```python title=weather/__init__.py -from nonebot import on_command -from nonebot.rule import to_me -from nonebot.matcher import Matcher -from nonebot.adapters import Message -from nonebot.params import CommandArg, ArgPlainText - -weather = on_command("天气", rule=to_me(), aliases={"weather", "天气预报"}) - -@weather.handle() -async def handle_function(matcher: Matcher, args: Message = CommandArg()): - if args.extract_plain_text(): - matcher.set_arg("location", args) - -@weather.got("location", prompt="请输入地名") -async def got_location(location: str = ArgPlainText()): - if location not in ["北京", "上海", "广州", "深圳"]: - await weather.reject(f"你想查询的城市 {location} 暂不支持,请重新输入!") - await weather.finish(f"今天{location}的天气是...") -``` - -
- -```python {5-9,13-15,17-18} -from nonebot.rule import to_me -from arclet.alconna import Alconna, Args -from nonebot_plugin_alconna import Match, on_alconna - -weather = on_alconna( - Alconna("天气", Args["location?", str]), - aliases={"weather", "天气预报"}, - rule=to_me(), -) - - -@weather.handle() -async def handle_function(location: Match[str]): - if location.available: - weather.set_path_arg("location", location.result) - -@weather.got_path("location", prompt="请输入地名") -async def got_location(location: str): - if location not in ["北京", "上海", "广州", "深圳"]: - await weather.reject(f"你想查询的城市 {location} 暂不支持,请重新输入!") - await weather.finish(f"今天{location}的天气是...") -``` - -在上面的代码中,我们使用 `Alconna` 来解析命令,`on_alconna` 用来创建响应器,使用 `Match` 来获取解析结果。 - -关于更多 `Alconna` 的使用方法,可参考 [Alconna 文档](https://arclet.top/docs/tutorial/alconna), -或阅读 [Alconna 基本介绍](./command.md) 一节。 - -关于更多 `on_alconna` 的使用方法,可参考 [插件文档](https://github.com/nonebot/plugin-alconna/blob/master/docs.md), -或阅读 [响应规则的使用](./matcher.mdx) 一节。 - -## 交流与反馈 - -QQ 交流群: [🔗 链接](https://jq.qq.com/?_wv=1027&k=PUPOnCSH) - -友链: [📚 文档](https://graiax.cn/guide/message_parser/alconna.html) diff --git a/website/versioned_docs/version-2.3.2/best-practice/alconna/_category_.json b/website/versioned_docs/version-2.3.2/best-practice/alconna/_category_.json deleted file mode 100644 index d8e7367fe9d1..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/alconna/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Alconna 命令解析拓展", - "position": 6 -} diff --git a/website/versioned_docs/version-2.3.2/best-practice/alconna/command.md b/website/versioned_docs/version-2.3.2/best-practice/alconna/command.md deleted file mode 100644 index e5df7cbdd761..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/alconna/command.md +++ /dev/null @@ -1,640 +0,0 @@ ---- -sidebar_position: 2 -description: Alconna 基本介绍 ---- - -# Alconna 本体 - -[`Alconna`](https://github.com/ArcletProject/Alconna) 隶属于 `ArcletProject`,是一个简单、灵活、高效的命令参数解析器, 并且不局限于解析命令式字符串。 - -我们通过一个例子来讲解 **Alconna** 的核心 —— `Args`, `Subcommand`, `Option`: - -```python -from arclet.alconna import Alconna, Args, Subcommand, Option - - -alc = Alconna( - "pip", - Subcommand( - "install", - Args["package", str], - Option("-r|--requirement", Args["file", str]), - Option("-i|--index-url", Args["url", str]), - ) -) - -res = alc.parse("pip install nonebot2 -i URL") - -print(res) -# matched=True, header_match=(origin='pip' result='pip' matched=True groups={}), subcommands={'install': (value=Ellipsis args={'package': 'nonebot2'} options={'index-url': (value=None args={'url': 'URL'})} subcommands={})}, other_args={'package': 'nonebot2', 'url': 'URL'} - -print(res.all_matched_args) -# {'package': 'nonebot2', 'url': 'URL'} -``` - -这段代码通过`Alconna`创捷了一个接受主命令名为`pip`, 子命令为`install`且子命令接受一个 **Args** 参数`package`和二个 **Option** 参数`-r`和`-i`的命令参数解析器, 通过`parse`方法返回解析结果 **Arparma** 的实例。 - -## 命令头 - -命令头是指命令的前缀 (Prefix) 与命令名 (Command) 的组合,例如 !help 中的 ! 与 help。 - -| 前缀 | 命令名 | 匹配内容 | 说明 | -| :--------------------------: | :--------: | :---------------------------------------------------------: | :--------------: | -| - | "foo" | `"foo"` | 无前缀的纯文字头 | -| - | 123 | `123` | 无前缀的元素头 | -| - | "re:\d{2}" | `"32"` | 无前缀的正则头 | -| - | int | `123` 或 `"456"` | 无前缀的类型头 | -| [int, bool] | - | `True` 或 `123` | 无名的元素类头 | -| ["foo", "bar"] | - | `"foo"` 或 `"bar"` | 无名的纯文字头 | -| ["foo", "bar"] | "baz" | `"foobaz"` 或 `"barbaz"` | 纯文字头 | -| [int, bool] | "foo" | `[123, "foo"]` 或 `[False, "foo"]` | 类型头 | -| [123, 4567] | "foo" | `[123, "foo"]` 或 `[4567, "foo"]` | 元素头 | -| [nepattern.NUMBER] | "bar" | `[123, "bar"]` 或 `[123.456, "bar"]` | 表达式头 | -| [123, "foo"] | "bar" | `[123, "bar"]` 或 `"foobar"` 或 `["foo", "bar"]` | 混合头 | -| [(int, "foo"), (456, "bar")] | "baz" | `[123, "foobaz"]` 或 `[456, "foobaz"]` 或 `[456, "barbaz"]` | 对头 | - -对于无前缀的类型头,此时会将传入的值尝试转为 BasePattern,例如 `int` 会转为 `nepattern.INTEGER`。如此该命令头会匹配对应的类型, 例如 `int` 会匹配 `123` 或 `"456"`,但不会匹配 `"foo"`。解析后,Alconna 会将命令头匹配到的值转为对应的类型,例如 `int` 会将 `"123"` 转为 `123`。 - -:::tip - -**正则内容只在命令名上生效,前缀中的正则会被转义** - -::: - -除了通过传入 `re:xxx` 来使用正则表达式外,Alconna 还提供了一种更加简洁的方式来使用正则表达式,称为 Bracket Header: - -```python -from alconna import Alconna - - -alc = Alconna(".rd{roll:int}") -assert alc.parse(".rd123").header["roll"] == 123 -``` - -Bracket Header 类似 python 里的 f-string 写法,通过 `"{}"` 声明匹配类型 - -`"{}"` 中的内容为 "name:type or pat": - -- `"{}"`, `"{:}"` ⇔ `"(.+)"`, 占位符 -- `"{foo}"` ⇔ `"(?P<foo>.+)"` -- `"{:\d+}"` ⇔ `"(\d+)"` -- `"{foo:int}"` ⇔ `"(?P<foo>\d+)"`,其中 `"int"` 部分若能转为 `BasePattern` 则读取里面的表达式 - -## 参数声明(Args) - -`Args` 是用于声明命令参数的组件, 可以通过以下几种方式构造 **Args** : - -- `Args[key, var, default][key1, var1, default1][...]` -- `Args[(key, var, default)]` -- `Args.key[var, default]` - -其中,key **一定**是字符串,而 var 一般为参数的类型,default 为具体的值或者 **arclet.alconna.args.Field** - -其与函数签名类似,但是允许含有默认值的参数在前;同时支持 keyword-only 参数不依照构造顺序传入 (但是仍需要在非 keyword-only 参数之后)。 - -### key - -`key` 的作用是用以标记解析出来的参数并存放于 **Arparma** 中,以方便用户调用。 - -其有三种为 Args 注解的标识符: `?`、`/`、 `!`, 标识符与 key 之间建议以 `;` 分隔: - -- `!` 标识符表示该处传入的参数应**不是**规定的类型,或**不在**指定的值中。 -- `?` 标识符表示该参数为**可选**参数,会在无参数匹配时跳过。 -- `/` 标识符表示该参数的类型注解需要隐藏。 - -另外,对于参数的注释也可以标记在 `key` 中,其与 key 或者标识符 以 `#` 分割: -`foo#这是注释;?` 或 `foo?#这是注释` - -:::tip - -`Args` 中的 `key` 在实际命令中并不需要传入(keyword 参数除外): - -```python -from arclet.alconna import Alconna, Args - - -alc = Alconna("test", Args["foo", str]) -alc.parse("test --foo abc") # 错误 -alc.parse("test abc") # 正确 -``` - -若需要 `test --foo abc`,你应该使用 `Option`: - -```python -from arclet.alconna import Alconna, Args, Option - - -alc = Alconna("test", Option("--foo", Args["foo", str])) -``` - -::: - -### var - -var 负责命令参数的**类型检查**与**类型转化** - -`Args` 的`var`表面上看需要传入一个 `type`,但实际上它需要的是一个 `nepattern.BasePattern` 的实例: - -```python -from arclet.alconna import Args -from nepattern import BasePattern - - -# 表示 foo 参数需要匹配一个 @number 样式的字符串 -args = Args["foo", BasePattern("@\d+")] -``` - -`pip` 示例中可以传入 `str` 是因为 `str` 已经注册在了 `nepattern.global_patterns` 中,因此会替换为 `nepattern.global_patterns[str]` - -`nepattern.global_patterns`默认支持的类型有: - -- `str`: 匹配任意字符串 -- `int`: 匹配整数 -- `float`: 匹配浮点数 -- `bool`: 匹配 `True` 与 `False` 以及他们小写形式 -- `hex`: 匹配 `0x` 开头的十六进制字符串 -- `url`: 匹配网址 -- `email`: 匹配 `xxxx@xxx` 的字符串 -- `ipv4`: 匹配 `xxx.xxx.xxx.xxx` 的字符串 -- `list`: 匹配类似 `["foo","bar","baz"]` 的字符串 -- `dict`: 匹配类似 `{"foo":"bar","baz":"qux"}` 的字符串 -- `datetime`: 传入一个 `datetime` 支持的格式字符串,或时间戳 -- `Any`: 匹配任意类型 -- `AnyString`: 匹配任意类型,转为 `str` -- `Number`: 匹配 `int` 与 `float`,转为 `int` - -同时可以使用 typing 中的类型: - -- `Literal[X]`: 匹配其中的任意一个值 -- `Union[X, Y]`: 匹配其中的任意一个类型 -- `Optional[xxx]`: 会自动将默认值设为 `None`,并在解析失败时使用默认值 -- `List[X]`: 匹配一个列表,其中的元素为 `X` 类型 -- `Dict[X, Y]`: 匹配一个字典,其中的 key 为 `X` 类型,value 为 `Y` 类型 -- ... - -:::tip - -几类特殊的传入标记: - -- `"foo"`: 匹配字符串 "foo" (若没有某个 `BasePattern` 与之关联) -- `RawStr("foo")`: 匹配字符串 "foo" (即使有 `BasePattern` 与之关联也不会被替换) -- `"foo|bar|baz"`: 匹配 "foo" 或 "bar" 或 "baz" -- `[foo, bar, Baz, ...]`: 匹配其中的任意一个值或类型 -- `Callable[[X], Y]`: 匹配一个参数为 `X` 类型的值,并返回通过该函数调用得到的 `Y` 类型的值 -- `"re:xxx"`: 匹配一个正则表达式 `xxx`,会返回 Match[0] -- `"rep:xxx"`: 匹配一个正则表达式 `xxx`,会返回 `re.Match` 对象 -- `{foo: bar, baz: qux}`: 匹配字典中的任意一个键, 并返回对应的值 (特殊的键 ... 会匹配任意的值) -- ... - -**特别的**,你可以不传入 `var`,此时会使用 `key` 作为 `var`, 匹配 `key` 字符串。 - -::: - -#### MultiVar 与 KeyWordVar - -`MultiVar` 是一个特殊的标注,用于告知解析器该参数可以接受多个值,类似于函数中的 `*args`,其构造方法形如 `MultiVar(str)`。 - -同样的还有 `KeyWordVar`,类似于函数中的 `*, name: type`,其构造方法形如 `KeyWordVar(str)`,用于告知解析器该参数为一个 keyword-only 参数。 - -:::tip - -`MultiVar` 与 `KeyWordVar` 组合时,代表该参数为一个可接受多个 key-value 的参数,类似于函数中的 `**kwargs`,其构造方法形如 `MultiVar(KeyWordVar(str))` - -`MultiVar` 与 `KeyWordVar` 也可以传入 `default` 参数,用于指定默认值 - -`MultiVar` 不能在 `KeyWordVar` 之后传入 - -::: - -### default - -`default` 传入的是该参数的默认值或者 `Field`,以携带对于该参数的更多信息。 - -默认情况下 (即不声明) `default` 的值为特殊值 `Empty`。这也意味着你可以将默认值设置为 `None` 表示默认值为空值。 - -`Field` 构造需要的参数说明如下: - -- default: 参数单元的默认值 -- alias: 参数单元默认值的别名 -- completion: 参数单元的补全说明生成函数 -- unmatch_tips: 参数单元的错误提示生成函数,其接收一个表示匹配失败的元素的参数 -- missing_tips: 参数单元的缺失提示生成函数 - -## 选项与子命令(Option & Subcommand) - -`Option` 和 `Subcommand` 可以传入一组 `alias`,如 `Option("--foo|-F|--FOO|-f")`,`Subcommand("foo", alias=["F"])` - -传入别名后,选项与子命令会选择其中长度最长的作为其名称。若传入为 "--foo|-f",则命令名称为 "--foo" - -:::tip 特别提醒!!! - -Option 的名字或别名**没有要求**必须在前面写上 `-` - -Option 与 Subcommand 的唯一区别在于 Subcommand 可以传入自己的 **Option** 与 **Subcommand** - -::: - -他们拥有如下共同参数: - -- `help_text`: 传入该组件的帮助信息 -- `dest`: 被指定为解析完成时标注匹配结果的标识符,不传入时默认为选项或子命令的名称 (name) -- `requires`: 一段指定顺序的字符串列表,作为唯一的前置序列与命令嵌套替换 - 对于命令 `test foo bar baz qux ` 来讲,因为`foo bar baz` 仅需要判断是否相等, 所以可以这么编写: - -```python -Alconna("test", Option("qux", Args.a[int], requires=["foo", "bar", "baz"])) -``` - -- `default`: 默认值,在该组件未被解析时使用使用该值替换。 - 特别的,使用 `OptionResult` 或 `SubcomanndResult` 可以设置包括参数字典在内的默认值: - -```python -from arclet.alconna import Option, OptionResult - -opt1 = Option("--foo", default=False) -opt2 = Option("--foo", default=OptionResult(value=False, args={"bar": 1})) -``` - -### Action - -`Option` 可以特别设置传入一类 `Action`,作为解析操作 - -`Action` 分为三类: - -- `store`: 无 Args 时, 仅存储一个值, 默认为 Ellipsis; 有 Args 时, 后续的解析结果会覆盖之前的值 -- `append`: 无 Args 时, 将多个值存为列表, 默认为 Ellipsis; 有 Args 时, 每个解析结果会追加到列表中, 当存在默认值并且不为列表时, 会自动将默认值变成列表, 以保证追加的正确性 -- `count`: 无 Args 时, 计数器加一; 有 Args 时, 表现与 STORE 相同, 当存在默认值并且不为数字时, 会自动将默认值变成 1, 以保证计数器的正确性。 - -`Alconna` 提供了预制的几类 `Action`: - -- `store`(默认),`store_value`,`store_true`,`store_false` -- `append`,`append_value` -- `count` - -## 解析结果(Arparma) - -`Alconna.parse` 会返回由 **Arparma** 承载的解析结果 - -`Arparma` 有如下属性: - -- 调试类 - - - matched: 是否匹配成功 - - error_data: 解析失败时剩余的数据 - - error_info: 解析失败时的异常内容 - - origin: 原始命令,可以类型标注 - -- 分析类 - - header_match: 命令头部的解析结果,包括原始头部、解析后头部、解析结果与可能的正则匹配组 - - main_args: 命令的主参数的解析结果 - - options: 命令所有选项的解析结果 - - subcommands: 命令所有子命令的解析结果 - - other_args: 除主参数外的其他解析结果 - - all_matched_args: 所有 Args 的解析结果 - -`Arparma` 同时提供了便捷的查询方法 `query[type]()`,会根据传入的 `path` 查找参数并返回 - -`path` 支持如下: - -- `main_args`, `options`, ...: 返回对应的属性 -- `args`: 返回 all_matched_args -- `main_args.xxx`, `options.xxx`, ...: 返回字典中 `xxx`键对应的值 -- `args.xxx`: 返回 all_matched_args 中 `xxx`键对应的值 -- `options.foo`, `foo`: 返回选项 `foo` 的解析结果 (OptionResult) -- `options.foo.value`, `foo.value`: 返回选项 `foo` 的解析值 -- `options.foo.args`, `foo.args`: 返回选项 `foo` 的解析参数字典 -- `options.foo.args.bar`, `foo.bar`: 返回选项 `foo` 的参数字典中 `bar` 键对应的值 ... - -## 元数据(CommandMeta) - -`Alconna` 的元数据相当于其配置,拥有以下条目: - -- `description`: 命令的描述 -- `usage`: 命令的用法 -- `example`: 命令的使用样例 -- `author`: 命令的作者 -- `fuzzy_match`: 命令是否开启模糊匹配 -- `fuzzy_threshold`: 模糊匹配阈值 -- `raise_exception`: 命令是否抛出异常 -- `hide`: 命令是否对 manager 隐藏 -- `hide_shortcut`: 命令的快捷指令是否在 help 信息中隐藏 -- `keep_crlf`: 命令解析时是否保留换行字符 -- `compact`: 命令是否允许第一个参数紧随头部 -- `strict`: 命令是否严格匹配,若为 False 则未知参数将作为名为 $extra 的参数 -- `context_style`: 命令上下文插值的风格,None 为关闭,bracket 为 `{...}`,parentheses 为 `$(...)` -- `extra`: 命令的自定义额外信息 - -元数据一定使用 `meta=...` 形式传入: - -```python -from arclet.alconna import Alconna, CommandMeta - -alc = Alconna(..., meta=CommandMeta("foo", example="bar")) -``` - -## 命名空间配置 - -命名空间配置 (以下简称命名空间) 相当于 `Alconna` 的默认配置,其优先度低于 `CommandMeta`。 - -`Alconna` 默认使用 "Alconna" 命名空间。 - -命名空间有以下几个属性: - -- name: 命名空间名称 -- prefixes: 默认前缀配置 -- separators: 默认分隔符配置 -- formatter_type: 默认格式化器类型 -- fuzzy_match: 默认是否开启模糊匹配 -- raise_exception: 默认是否抛出异常 -- builtin_option_name: 默认的内置选项名称(--help, --shortcut, --comp) -- disable_builtin_options: 默认禁用的内置选项(--help, --shortcut, --comp) -- enable_message_cache: 默认是否启用消息缓存 -- compact: 默认是否开启紧凑模式 -- strict: 命令是否严格匹配 -- context_style: 命令上下文插值的风格 -- ... - -### 新建命名空间并替换 - -```python -from arclet.alconna import Alconna, namespace, Namespace, Subcommand, Args, config - - -ns = Namespace("foo", prefixes=["/"]) # 创建 "foo"命名空间配置, 它要求创建的Alconna的主命令前缀必须是/ - -alc = Alconna("pip", Subcommand("install", Args["package", str]), namespace=ns) # 在创建Alconna时候传入命名空间以替换默认命名空间 - -# 可以通过with方式创建命名空间 -with namespace("bar") as np1: - np1.prefixes = ["!"] # 以上下文管理器方式配置命名空间,此时配置会自动注入上下文内创建的命令 - np1.formatter_type = ShellTextFormatter # 设置此命名空间下的命令的 formatter 默认为 ShellTextFormatter - np1.builtin_option_name["help"] = {"帮助", "-h"} # 设置此命名空间下的命令的帮助选项名称 - -# 你还可以使用config来管理所有命名空间并切换至任意命名空间 -config.namespaces["foo"] = ns # 将命名空间挂载到 config 上 - -alc = Alconna("pip", Subcommand("install", Args["package", str]), namespace=config.namespaces["foo"]) # 也是同样可以切换到"foo"命名空间 -``` - -### 修改默认的命名空间 - -```python -from arclet.alconna import config, namespace, Namespace - - -config.default_namespace.prefixes = [...] # 直接修改默认配置 - -np = Namespace("xxx", prefixes=[...]) -config.default_namespace = np # 更换默认的命名空间 - -with namespace(config.default_namespace.name) as np: - np.prefixes = [...] -``` - -## 快捷指令 - -快捷命令可以做到标识一段命令, 并且传递参数给原命令 - -一般情况下你可以通过 `Alconna.shortcut` 进行快捷指令操作 (创建,删除) - -`shortcut` 的第一个参数为快捷指令名称,第二个参数为 `ShortcutArgs`,作为快捷指令的配置: - -```python -class ShortcutArgs(TypedDict): - """快捷指令参数""" - - command: NotRequired[str] - """快捷指令的命令""" - args: NotRequired[list[Any]] - """快捷指令的附带参数""" - fuzzy: NotRequired[bool] - """是否允许命令后随参数""" - prefix: NotRequired[bool] - """是否调用时保留指令前缀""" - wrapper: NotRequired[ShortcutRegWrapper] - """快捷指令的正则匹配结果的额外处理函数""" - humanized: NotRequired[str] - """快捷指令的人类可读描述""" -``` - -### args的使用 - -```python -from arclet.alconna import Alconna, Args - - -alc = Alconna("setu", Args["count", int]) - -alc.shortcut("涩图(\d+)张", {"args": ["{0}"]}) -# 'Alconna::setu 的快捷指令: "涩图(\\d+)张" 添加成功' - -alc.parse("涩图3张").query("count") -# 3 -``` - -### command的使用 - -```python -from arclet.alconna import Alconna, Args - - -alc = Alconna("eval", Args["content", str]) - -alc.shortcut("echo", {"command": "eval print(\\'{*}\\')"}) -# 'Alconna::eval 的快捷指令: "echo" 添加成功' - -alc.shortcut("echo", delete=True) # 删除快捷指令 -# 'Alconna::eval 的快捷指令: "echo" 删除成功' - -@alc.bind() # 绑定一个命令执行器, 若匹配成功则会传入参数, 自动执行命令执行器 -def cb(content: str): - eval(content, {}, {}) - -alc.parse('eval print(\\"hello world\\")') -# hello world - -alc.parse("echo hello world!") -# hello world! -``` - -当 `fuzzy` 为 False 时,第一个例子中传入 `"涩图1张 abc"` 之类的快捷指令将视为解析失败 - -快捷指令允许三类特殊的 placeholder: - -- `{%X}`: 如 `setu {%0}`,表示此处填入快捷指令后随的第 X 个参数。 - -例如,若快捷指令为 `涩图`, 配置为 `{"command": "setu {%0}"}`, 则指令 `涩图 1` 相当于 `setu 1` - -- `{*}`: 表示此处填入所有后随参数,并且可以通过 `{*X}` 的方式指定组合参数之间的分隔符。 - -- `{X}`: 表示此处填入可能的正则匹配的组: - -- 若 `command` 中存在匹配组 `(xxx)`,则 `{X}` 表示第 X 个匹配组的内容 -- 若 `command` 中存储匹配组 `(?P...)`, 则 `{X}` 表示 **名字** 为 X 的匹配结果 - -除此之外, 通过 **Alconna** 内置选项 `--shortcut` 可以动态操作快捷指令 - -例如: - -- `cmd --shortcut ` 来增加一个快捷指令 -- `cmd --shortcut list` 来列出当前指令的所有快捷指令 -- `cmd --shortcut delete key` 来删除一个快捷指令 - -```python -from arclet.alconna import Alconna, Args - - -alc = Alconna("eval", Args["content", str]) - -alc.shortcut("echo", {"command": "eval print(\\'{*}\\')"}) - -alc.parse("eval --shortcut list") -# 'echo' -``` - -## 紧凑命令 - -`Alconna`, `Option` 与 `Subcommand` 可以设置 `compact=True` 使得解析命令时允许名称与后随参数之间没有分隔: - -```python -from arclet.alconna import Alconna, Option, CommandMeta, Args - - -alc = Alconna("test", Args["foo", int], Option("BAR", Args["baz", str], compact=True), meta=CommandMeta(compact=True)) - -assert alc.parse("test123 BARabc").matched -``` - -这使得我们可以实现如下命令: - -```python -from arclet.alconna import Alconna, Option, Args, append - - -alc = Alconna("gcc", Option("--flag|-F", Args["content", str], action=append, compact=True)) -print(alc.parse("gcc -Fabc -Fdef -Fxyz").query[list]("flag.content")) -# ['abc', 'def', 'xyz'] -``` - -当 `Option` 的 `action` 为 `count` 时,其自动支持 `compact` 特性: - -```python -from arclet.alconna import Alconna, Option, count - - -alc = Alconna("pp", Option("--verbose|-v", action=count, default=0)) -print(alc.parse("pp -vvv").query[int]("verbose.value")) -# 3 -``` - -## 模糊匹配 - -模糊匹配会应用在任意需要进行名称判断的地方,如 **命令名称**,**选项名称** 和 **参数名称** (如指定需要传入参数名称)。 - -```python -from arclet.alconna import Alconna, CommandMeta - - -alc = Alconna("test_fuzzy", meta=CommandMeta(fuzzy_match=True)) - -alc.parse("test_fuzy") -# test_fuzy is not matched. Do you mean "test_fuzzy"? -``` - -## 半自动补全 - -半自动补全为用户提供了推荐后续输入的功能 - -补全默认通过 `--comp` 或 `-cp` 或 `?` 触发:(命名空间配置可修改名称) - -```python -from arclet.alconna import Alconna, Args, Option - - -alc = Alconna("test", Args["abc", int]) + Option("foo") + Option("bar") -alc.parse("test --comp") - -''' -output - -以下是建议的输入: -* -* --help -* -h -* -sct -* --shortcut -* foo -* bar -''' -``` - -## Duplication - -**Duplication** 用来提供更好的自动补全,类似于 **ArgParse** 的 **Namespace** - -普通情况下使用,需要利用到 **ArgsStub**、**OptionStub** 和 **SubcommandStub** 三个部分 - -以pip为例,其对应的 Duplication 应如下构造: - -```python -from arclet.alconna import Alconna, Args, Option, OptionResult, Duplication, SubcommandStub, Subcommand, count - - -class MyDup(Duplication): - verbose: OptionResult - install: SubcommandStub - - -alc = Alconna( - "pip", - Subcommand( - "install", - Args["package", str], - Option("-r|--requirement", Args["file", str]), - Option("-i|--index-url", Args["url", str]), - ), - Option("-v|--version"), - Option("-v|--verbose", action=count), -) - -res = alc.parse("pip -v install ...") # 不使用duplication获得的提示较少 -print(res.query("install")) -# (value=Ellipsis args={'package': '...'} options={} subcommands={}) - -result = alc.parse("pip -v install ...", duplication=MyDup) -print(result.install) -# SubcommandStub(_origin=Subcommand('install', args=Args('package': str)), _value=Ellipsis, available=True, args=ArgsStub(_origin=Args('package': str), _value={'package': '...'}, available=True), dest='install', options=[OptionStub(_origin=Option('requirement', args=Args('file': str)), _value=None, available=False, args=ArgsStub(_origin=Args('file': str), _value={}, available=False), dest='requirement', aliases=['r', 'requirement'], name='requirement'), OptionStub(_origin=Option('index-url', args=Args('url': str)), _value=None, available=False, args=ArgsStub(_origin=Args('url': str), _value={}, available=False), dest='index-url', aliases=['index-url', 'i'], name='index-url')], subcommands=[], name='install') -``` - -**Duplication** 也可以如 **Namespace** 一样直接标明参数名称和类型: - -```python -from typing import Optional -from arclet.alconna import Duplication - - -class MyDup(Duplication): - package: str - file: Optional[str] = None - url: Optional[str] = None -``` - -## 上下文插值 - -当 `context_style` 条目被设置后,传入的命令中符合上下文插值的字段会被自动替换成当前上下文中的信息。 - -上下文可以在 `parse` 中传入: - -```python -from arclet.alconna import Alconna, Args, CommandMeta - -alc = Alconna("test", Args["foo", int], meta=CommandMeta(context_style="parentheses")) - -alc.parse("test $(bar)", {"bar": 123}) -# {"foo": 123} -``` - -context_style 的值分两种: - -- `"bracket"`: 插值格式为 `{...}`,例如 `{foo}` -- `"parentheses"`: 插值格式为 `$(...)`,例如 `$(bar)` diff --git a/website/versioned_docs/version-2.3.2/best-practice/alconna/config.md b/website/versioned_docs/version-2.3.2/best-practice/alconna/config.md deleted file mode 100644 index ebce8d57a86a..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/alconna/config.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -sidebar_position: 4 -description: 配置项 ---- - -# 配置项 - -## alconna_auto_send_output - -- **类型**: `bool` -- **默认值**: `False` - -是否全局启用输出信息自动发送,不启用则会在触发特殊内置选项后仍然将解析结果传递至响应器。 - -## alconna_use_command_start - -- **类型**: `bool` -- **默认值**: `False` - -是否读取 Nonebot 的配置项 `COMMAND_START` 来作为全局的 Alconna 命令前缀 - -## alconna_auto_completion - -- **类型**: `bool` -- **默认值**: `False` - -是否全局启用命令自动补全,启用后会在参数缺失或触发 `--comp` 选项时自自动启用交互式补全。 - -## alconna_use_origin - -- **类型**: `bool` -- **默认值**: `False` - -是否全局使用原始消息 (即未经过 to_me 等处理的),该选项会影响到 Alconna 的匹配行为。 - -## alconna_use_command_sep - -- **类型**: `bool` -- **默认值**: `False` - -是否读取 Nonebot 的配置项 `COMMAND_SEP` 来作为全局的 Alconna 命令分隔符。 - -## alconna_global_extensions - -- **类型**: `List[str]` -- **默认值**: `[]` - -全局加载的扩展,路径以 . 分隔,如 `foo.bar.baz:DemoExtension`。 - -## alconna_context_style - -- **类型**: `Optional[Literal["bracket", "parentheses"]]` -- **默认值**: `None` - -全局命令上下文插值的风格,None 为关闭,bracket 为 `{...}`,parentheses 为 `$(...)`。 - -## alconna_enable_saa_patch - -- **类型**: `bool` -- **默认值**: `False` - -是否启用 SAA 补丁。 - -## alconna_apply_filehost - -- **类型**: `bool` -- **默认值**: `False` - -是否启用文件托管。 - -## alconna_apply_fetch_targets - -- **类型**: `bool` -- **默认值**: `False` - -是否启动时拉取一次发送对象列表。 diff --git a/website/versioned_docs/version-2.3.2/best-practice/alconna/matcher.mdx b/website/versioned_docs/version-2.3.2/best-practice/alconna/matcher.mdx deleted file mode 100644 index be9a670f7b3d..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/alconna/matcher.mdx +++ /dev/null @@ -1,607 +0,0 @@ ---- -sidebar_position: 3 -description: 响应规则的使用 ---- - -import Messenger from "@site/src/components/Messenger"; - -# Alconna 插件 - -展示: - -```python -from nonebot_plugin_alconna import At, Image, on_alconna -from arclet.alconna import Args, Option, Alconna, Arparma, MultiVar, Subcommand - - -alc = Alconna( - ["/", "!"], - "role-group", - Subcommand( - "add", - Args["name", str], - Option("member", Args["target", MultiVar(At)]), - ), - Option("list"), - Option("icon", Args["icon", Image]) -) -rg = on_alconna(alc, auto_send_output=True) - - -@rg.handle() -async def _(result: Arparma): - if result.find("list"): - img: bytes = await gen_role_group_list_image() - await rg.finish(Image(raw=img)) - if result.find("add"): - group = await create_role_group(result.query[str]("add.name")) - if result.find("add.member"): - ats = result.query[tuple[At, ...]]("add.member.target") - group.extend(member.target for member in ats) - await rg.finish("添加成功") -``` - -## 响应器使用 - -本插件基于 **Alconna**,为 **Nonebot** 提供了一类新的事件响应器辅助函数 `on_alconna`: - -```python -def on_alconna( - command: Alconna | str, - skip_for_unmatch: bool = True, - auto_send_output: bool = False, - aliases: set[str | tuple[str, ...]] | None = None, - comp_config: CompConfig | None = None, - extensions: list[type[Extension] | Extension] | None = None, - exclude_ext: list[type[Extension] | str] | None = None, - use_origin: bool = False, - use_cmd_start: bool = False, - use_cmd_sep: bool = False, - **kwargs, - ..., -): -``` - -- `command`: Alconna 命令或字符串,字符串将通过 `AlconnaFormat` 转换为 Alconna 命令 -- `skip_for_unmatch`: 是否在命令不匹配时跳过该响应 -- `auto_send_output`: 是否自动发送输出信息并跳过响应 -- `aliases`: 命令别名, 作用类似于 `on_command` 中的 aliases -- `comp_config`: 补全会话配置, 不传入则不启用补全会话 -- `extensions`: 需要加载的匹配扩展, 可以是扩展类或扩展实例 -- `exclude_ext`: 需要排除的匹配扩展, 可以是扩展类或扩展的id -- `use_origin`: 是否使用未经 to_me 等处理过的消息 -- `use_cmd_start`: 是否使用 COMMAND_START 作为命令前缀 -- `use_cmd_sep`: 是否使用 COMMAND_SEP 作为命令分隔符 - -`on_alconna` 返回的是 `Matcher` 的子类 `AlconnaMatcher` ,其拓展了如下方法: - -- `.assign(path, value, or_not)`: 用于对包含多个选项/子命令的命令的分派处理(具体请看[条件控制](./matcher.mdx#条件控制)) -- `.got_path(path, prompt, middleware)`: 在 `got` 方法的基础上,会以 path 对应的参数为准,读取传入 message 的最后一个消息段并验证转换 -- `.set_path_arg(key, value)`, `.get_path_arg(key)`: 类似 `set_arg` 和 `got_arg`,为 `got_path` 的特化版本 -- `.reject_path(path[, prompt, fallback])`: 类似于 `reject_arg`,对应 `got_path` -- `.dispatch`: 同样的分派处理,但是是类似 `CommandGroup` 一样返回新的 `AlconnaMatcher` -- `.got`, `send`, `reject`, ... : 拓展了 prompt 类型,即支持使用 `UniMessage` 作为 prompt - -实例: - -```python -from nonebot import require -require("nonebot_plugin_alconna") - -from arclet.alconna import Alconna, Option, Args -from nonebot_plugin_alconna import on_alconna, Match, UniMessage - - -login = on_alconna(Alconna(["/"], "login", Args["password?", str], Option("-r|--recall"))) # 这里["/"]指命令前缀必须是/ - -# /login -r 触发 -@login.assign("recall") -async def login_exit(): - await login.finish("已退出") - -# /login xxx 触发 -@login.assign("password") -async def login_handle(pw: Match[str]): - if pw.available: - login.set_path_arg("password", pw.result) - -# /login 触发 -@login.got_path("password", prompt=UniMessage.template("{:At(user, $event.get_user_id())} 请输入密码")) -async def login_got(password: str): - assert password - await login.send("登录成功") -``` - -## 依赖注入 - -本插件提供了一系列依赖注入函数,便于在响应函数中获取解析结果: - -- `AlconnaResult`: `CommandResult` 类型的依赖注入函数 -- `AlconnaMatches`: `Arparma` 类型的依赖注入函数 -- `AlconnaDuplication`: `Duplication` 类型的依赖注入函数 -- `AlconnaMatch`: `Match` 类型的依赖注入函数 -- `AlconnaQuery`: `Query` 类型的依赖注入函数 - -同时,基于 [`Annotated` 支持](https://github.com/nonebot/nonebot2/pull/1832),添加了两类注解: - -- `AlcMatches`:同 `AlconnaMatches` -- `AlcResult`:同 `AlconnaResult` - -可以看到,本插件提供了几类额外的模型: - -- `CommandResult`: 解析结果,包括了源命令 `source: Alconna` ,解析结果 `result: Arparma`,以及可能的输出信息 `output: str | None` 字段 -- `Match`: 匹配项,表示参数是否存在于 `all_matched_args` 内,可用 `Match.available` 判断是否匹配,`Match.result` 获取匹配的值 -- `Query`: 查询项,表示参数是否可由 `Arparma.query` 查询并获得结果,可用 `Query.available` 判断是否查询成功,`Query.result` 获取查询结果 - -**Alconna** 默认依赖注入的目标参数皆不需要使用依赖注入函数, 该效果对于 `AlconnaMatcher.got_path` 下的 Arg 同样有效: - -```python -async def handle( - result: CommandResult, - arp: Arparma, - dup: Duplication, - source: Alconna, - abc: str, # 类似 Match, 但是若匹配结果不存在对应字段则跳过该 handler - foo: Match[str], - bar: Query[int] = Query("ttt.bar", 0) # Query 仍然需要一个默认值来传递 path 参数 -): - ... -``` - -:::note - -如果你更喜欢 Depends 式的依赖注入,`nonebot_plugin_alconna` 同时提供了一系列的依赖注入函数,他们包括: - -- `AlconnaResult`: `CommandResult` 类型的依赖注入函数 -- `AlconnaMatches`: `Arparma` 类型的依赖注入函数 -- `AlconnaDuplication`: `Duplication` 类型的依赖注入函数 -- `AlconnaMatch`: `Match` 类型的依赖注入函数,其能够额外传入一个 middleware 函数来处理得到的参数 -- `AlconnaQuery`: `Query` 类型的依赖注入函数,其能够额外传入一个 middleware 函数来处理得到的参数 -- `AlconnaExecResult`: 提供挂载在命令上的 callback 的返回结果 (`Dict[str, Any]`) 的依赖注入函数 -- `AlconnaExtension`: 提供指定类型的 `Extension` 的依赖注入函数 - -::: - -实例: - -```python -from nonebot import require -require("nonebot_plugin_alconna") - -from nonebot_plugin_alconna import ( - on_alconna, - Match, - Query, - AlconnaMatch, - AlcResult -) -from arclet.alconna import Alconna, Args, Option, Arparma - - -test = on_alconna( - Alconna( - "test", - Option("foo", Args["bar", int]), - Option("baz", Args["qux", bool, False]) - ), - auto_send_output=True -) - -@test.handle() -async def handle_test1(result: AlcResult): - await test.send(f"matched: {result.matched}") - await test.send(f"maybe output: {result.output}") - -@test.handle() -async def handle_test2(result: Arparma): - await test.send(f"head result: {result.header_result}") - await test.send(f"args: {result.all_matched_args}") - -@test.handle() -async def handle_test3(bar: Match[int] = AlconnaMatch("bar")): - if bar.available: - await test.send(f"foo={bar.result}") - -@test.handle() -async def handle_test4(qux: Query[bool] = Query("baz.qux", False)): - if qux.available: - await test.send(f"baz.qux={qux.result}") -``` - -## 多平台适配 - -本插件提供了通用消息段标注, 通用消息段序列, 使插件使用者可以忽略平台之间字段的差异 - -响应器使用示例中使用了消息段标注,其中 `At` 属于通用标注,而 `Image` 属于 `onebot12` 适配器下的标注。 - -具体介绍和使用请查看 [通用信息组件](./uniseg.mdx#通用消息段) - -本插件为以下适配器提供了专门的适配器标注: - -| 协议名称 | 路径 | -| ------------------------------------------------------------------- | ------------------------------------ | -| [OneBot 协议](https://github.com/nonebot/adapter-onebot) | adapters.onebot11, adapters.onebot12 | -| [Telegram](https://github.com/nonebot/adapter-telegram) | adapters.telegram | -| [飞书](https://github.com/nonebot/adapter-feishu) | adapters.feishu | -| [GitHub](https://github.com/nonebot/adapter-github) | adapters.github | -| [QQ bot](https://github.com/nonebot/adapter-qq) | adapters.qq | -| [钉钉](https://github.com/nonebot/adapter-ding) | adapters.ding | -| [Dodo](https://github.com/nonebot/adapter-dodo) | adapters.dodo | -| [Console](https://github.com/nonebot/adapter-console) | adapters.console | -| [开黑啦](https://github.com/Tian-que/nonebot-adapter-kaiheila) | adapters.kook | -| [Mirai](https://github.com/ieew/nonebot_adapter_mirai2) | adapters.mirai | -| [Ntchat](https://github.com/JustUndertaker/adapter-ntchat) | adapters.ntchat | -| [MineCraft](https://github.com/17TheWord/nonebot-adapter-minecraft) | adapters.minecraft | -| [BiliBili Live](https://github.com/wwweww/adapter-bilibili) | adapters.bilibili | -| [Walle-Q](https://github.com/onebot-walle/nonebot_adapter_walleq) | adapters.onebot12 | -| [Discord](https://github.com/nonebot/adapter-discord) | adapters.discord | -| [Red 协议](https://github.com/nonebot/adapter-red) | adapters.red | -| [Satori 协议](https://github.com/nonebot/adapter-satori) | adapters.satori | - -## 条件控制 - -本插件可以通过 `assign` 来控制一个具体的响应函数是否在不满足条件时跳过响应。 - -```python -... -from nonebot import require -require("nonebot_plugin_alconna") -... - -from arclet.alconna import Alconna, Subcommand, Option, Args -from nonebot_plugin_alconna import on_alconna, CommandResult - - -pip = Alconna( - "pip", - Subcommand( - "install", Args["pak", str], - Option("--upgrade"), - Option("--force-reinstall") - ), - Subcommand("list", Option("--out-dated")) -) - -pip_cmd = on_alconna(pip) - -# 仅在命令为 `pip install pip` 时响应 -@pip_cmd.assign("install.pak", "pip") -async def update(res: CommandResult): - ... - -# 仅在命令为 `pip list` 时响应 -@pip_cmd.assign("list") -async def list_(res: CommandResult): - ... - -# 在命令为 `pip install xxx` 时响应 -@pip_cmd.assign("install") -async def install(res: CommandResult): - ... -``` - -此外,使用 `AlconnaMatcher.dispatch` 还能像 `CommandGroup` 一样为每个分发设置独立的 matcher: - -```python -update_cmd = pip_cmd.dispatch("install.pak", "pip") - -@update_cmd.handle() -async def update(arp: CommandResult): - ... -``` - -另外,`AlconnaMatcher` 有类似于 `got` 的 `got_path`: - -```python -from nonebot_plugin_alconna import At, Match, UniMessage, on_alconna - - -test_cmd = on_alconna(Alconna("test", Args["target?", Union[str, At]])) - -@test_cmd.handle() -async def tt_h(target: Match[Union[str, At]]): - if target.available: - test_cmd.set_path_arg("target", target.result) - -@test_cmd.got_path("target", prompt="请输入目标") -async def tt(target: Union[str, At]): - await test_cmd.send(UniMessage(["ok\n", target])) -``` - -`got_path` 与 `assign`,`Match`,`Query` 等地方一样,都需要指明 `path` 参数 (即对应 Arg 验证的路径) - -`got_path` 会获取消息的最后一个消息段并转为 path 对应的类型,例如示例中 `target` 对应的 Arg 里要求 str 或 At,则 got 后用户输入的消息只有为 text 或 at 才能进入处理函数。 - -:::tip - -`path` 支持 ~XXX 语法,其会把 ~ 替换为可能的父级路径: - -```python - pip = Alconna( - "pip", - Subcommand( - "install", - Args["pak", str], - Option("--upgrade|-U"), - Option("--force-reinstall"), - ), - Subcommand("list", Option("--out-dated")), - ) - - pipcmd = on_alconna(pip) - pip_install_cmd = pipcmd.dispatch("install") - - - @pip_install_cmd.assign("~upgrade") - async def pip1_u(pak: Query[str] = Query("~pak")): - await pip_install_cmd.finish(f"pip upgrading {pak.result}...") -``` - -::: - -## 响应器创建装饰 - -本插件提供了一个 `funcommand` 装饰器, 其用于将一个接受任意参数, 返回 `str` 或 `Message` 或 `MessageSegment` 的函数转换为命令响应器: - -```python -from nonebot_plugin_alconna import funcommand - - -@funcommand() -async def echo(msg: str): - return msg -``` - -其等同于: - -```python -from arclet.alconna import Alconna, Args -from nonebot_plugin_alconna import on_alconna, AlconnaMatch, Match - - -echo = on_alconna(Alconna("echo", Args["msg", str])) - -@echo.handle() -async def echo_exit(msg: Match[str] = AlconnaMatch("msg")): - await echo.finish(msg.result) - -``` - -## 类Koishi构造器 - -本插件提供了一个 `Command` 构造器,其基于 `arclet.alconna.tools` 中的 `AlconnaString`, 以类似 `Koishi` 中注册命令的方式来构建一个 **AlconnaMatcher** : - -```python -from nonebot_plugin_alconna import Command, Arparma - - -book = ( - Command("book", "测试") - .option("writer", "-w ") - .option("writer", "--anonymous", {"id": 0}) - .usage("book [-w | --anonymous]") - .shortcut("测试", {"args": ["--anonymous"]}) - .build() -) - -@book.handle() -async def _(arp: Arparma): - await book.send(str(arp.options)) -``` - -甚至,你可以设置 `action` 来设定响应行为: - -```python -book = ( - Command("book", "测试") - .option("writer", "-w ") - .option("writer", "--anonymous", {"id": 0}) - .usage("book [-w | --anonymous]") - .shortcut("测试", {"args": ["--anonymous"]}) - .action(lambda options: str(options)) # 会自动通过 bot.send 发送 - .build() -) -``` - -## 返回值中间件 - -在 `AlconnaMatch`,`AlconnaQuery` 或 `got_path` 中,你可以使用 `middleware` 参数来传入一个对返回值进行处理的函数: - -```python -from nonebot_plugin_alconna import image_fetch - - -mask_cmd = on_alconna( - Alconna("search", Args["img?", Image]), -) - - -@mask_cmd.handle() -async def mask_h(matcher: AlconnaMatcher, img: Match[bytes] = AlconnaMatch("img", image_fetch)): - result = await search_img(img.result) - await matcher.send(result.content) -``` - -其中,`image_fetch` 是一个中间件,其接受一个 `Image` 对象,并提取图片的二进制数据返回。 - -## 匹配拓展 - -本插件提供了一个 `Extension` 类,其用于自定义 AlconnaMatcher 的部分行为 - -例如一个 `LLMExtension` 可以如下实现 (仅举例): - -```python -from nonebot_plugin_alconna import Extension, Alconna, on_alconna, Interface - - -class LLMExtension(Extension): - @property - def priority(self) -> int: - return 10 - - @property - def id(self) -> str: - return "LLMExtension" - - def __init__(self, llm): - self.llm = llm - - def post_init(self, alc: Alconna) -> None: - self.llm.add_context(alc.command, alc.meta.description) - - async def receive_wrapper(self, bot, event, receive): - resp = await self.llm.input(str(receive)) - return receive.__class__(resp.content) - - def before_catch(self, name, annotation, default): - return name == "llm" - - def catch(self, interface: Interface): - if interface.name == "llm": - return self.llm - -matcher = on_alconna( - Alconna(...), - extensions=[LLMExtension(LLM)] -) -... -``` - -那么添加了 `LLMExtension` 的响应器便能接受任何能通过 llm 翻译为具体命令的自然语言消息,同时可以在响应器中为所有 `llm` 参数注入模型变量。 - -目前 `Extension` 的功能有: - -- `validate`: 对于事件的来源适配器或 bot 选择是否接受响应 -- `output_converter`: 输出信息的自定义转换方法 -- `message_provider`: 从传入事件中自定义提取消息的方法 -- `receive_provider`: 对传入的消息 (Message 或 UniMessage) 的额外处理 -- `context_provider`: 对命令上下文的额外处理 -- `permission_check`: 命令对消息解析并确认头部匹配(即确认选择响应)时对发送者的权限判断 -- `parse_wrapper`: 对命令解析结果的额外处理 -- `send_wrapper`: 对发送的消息 (Message 或 UniMessage) 的额外处理 -- `before_catch`: 自定义依赖注入的绑定确认函数 -- `catch`: 自定义依赖注入处理函数 -- `post_init`: 响应器创建后对命令对象的额外处理 - -例如内置的 `DiscordSlashExtension`,其可自动将 Alconna 对象翻译成 slash 指令并注册,且将收到的指令交互事件转为指令供命令解析: - -```python -from nonebot_plugin_alconna import Match, on_alconna -from nonebot_plugin_alconna.builtins.extensions.discord import DiscordSlashExtension - - -alc = Alconna( - ["/"], - "permission", - Subcommand("add", Args["plugin", str]["priority?", int]), - Option("remove", Args["plugin", str]["time?", int]), - meta=CommandMeta(description="权限管理"), -) - -matcher = on_alconna(alc, extensions=[DiscordSlashExtension()]) - -@matcher.assign("add") -async def add(plugin: Match[str], priority: Match[int]): - await matcher.finish(f"added {plugin.result} with {priority.result if priority.available else 0}") - -@matcher.assign("remove") -async def remove(plugin: Match[str], time: Match[int]): - await matcher.finish(f"removed {plugin.result} with {time.result if time.available else -1}") -``` - -目前插件提供了 4 个内置的 `Extension`,它们在 `nonebot_plugin_alconna.builtins.extensions` 下: - -- `ReplyRecordExtension`: 将消息事件中的回复暂存在 extension 中,使得解析用的消息不带回复信息,同时可以在后续的处理中获取回复信息。 -- `DiscordSlashExtension`: 将 Alconna 的命令自动转换为 Discord 的 Slash Command,并将 Slash Command 的交互事件转换为消息交给 Alconna 处理。 -- `MarkdownOutputExtension`: 将 Alconna 的自动输出转换为 Markdown 格式 -- `TelegramSlashExtension`: 将 Alconna 的命令注册在 Telegram 上以获得提示。 - -:::tip - -全局的 Extension 可延迟加载 (即若有全局拓展加载于部分 AlconnaMatcher 之后,这部分响应器会被追加拓展) - -::: - -## 补全会话 - -补全会话基于 [`半自动补全`](./command.md#半自动补全),用于指令参数缺失或参数错误时给予交互式提示,类似于 `got-reject`: - -```python -from nonebot_plugin_alconna import Alconna, Args, Field, At, on_alconna - -alc = Alconna( - "添加教师", - Args["name", str, Field(completion=lambda: "请输入姓名")], - Args["phone", int, Field(completion=lambda: "请输入手机号")], - Args["at", [str, At], Field(completion=lambda: "请输入教师号")], -) - -cmd = on_alconna(alc, comp_config={"lite": True}, skip_for_unmatch=False) - -@cmd.handle() -async def handle(result: Arparma): - cmd.finish("添加成功") -``` - -此时,当用户输入 `添加教师` 时,会自动提示用户输入姓名,手机号和教师号,用户输入后会自动进入下一个提示: - - - -补全会话配置如下: - -```python -class CompConfig(TypedDict): - tab: NotRequired[str] - """用于切换提示的指令的名称""" - enter: NotRequired[str] - """用于输入提示的指令的名称""" - exit: NotRequired[str] - """用于退出会话的指令的名称""" - timeout: NotRequired[int] - """超时时间""" - hide_tabs: NotRequired[bool] - """是否隐藏所有提示""" - hides: NotRequired[Set[Literal["tab", "enter", "exit"]]] - """隐藏的指令""" - disables: NotRequired[Set[Literal["tab", "enter", "exit"]]] - """禁用的指令""" - lite: NotRequired[bool] - """是否使用简洁版本的补全会话(相当于同时配置 disables、hides、hide_tabs)""" -``` - -## 内置插件 - -类似于 Nonebot 本身提供的内置插件,`nonebot_plugin_alconna` 提供了两个内置插件:`echo` 和 `help`。 - -你可以用本插件的 `load_builtin_plugin(s)` 来加载它们: - -```python -from nonebot_plugin_alconna import load_builtin_plugins - -load_builtin_plugins("echo", "help") -``` - -其中 `help` 仅能列出所有 Alconna 指令。 - - diff --git a/website/versioned_docs/version-2.3.2/best-practice/alconna/uniseg.mdx b/website/versioned_docs/version-2.3.2/best-practice/alconna/uniseg.mdx deleted file mode 100644 index 8b7d5b6e588a..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/alconna/uniseg.mdx +++ /dev/null @@ -1,590 +0,0 @@ ---- -sidebar_position: 5 -description: 通用消息组件 ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# 通用消息组件 - -`uniseg` 模块属于 `nonebot-plugin-alconna` 的子插件,其提供了一套通用的消息组件,用于在 `nonebot-plugin-alconna` 下构建通用消息。 - -## 通用消息段 - -适配器下的消息段标注会匹配适配器特定的 `MessageSegment`, 而通用消息段与适配器消息段的区别在于: -通用消息段会匹配多个适配器中相似类型的消息段,并返回 `uniseg` 模块中定义的 [`Segment` 模型](https://nonebot.dev/docs/next/best-practice/alconna/utils#%E9%80%9A%E7%94%A8%E6%B6%88%E6%81%AF%E6%AE%B5), 以达到**跨平台接收消息**的作用。 - -`nonebot-plugin-alconna.uniseg` 提供了类似 `MessageSegment` 的通用消息段,并可在 `Alconna` 下直接标注使用: - -```python -class Segment: - """基类标注""" - children: List["Segment"] - -class Text(Segment): - """Text对象, 表示一类文本元素""" - text: str - styles: Dict[Tuple[int, int], List[str]] - -class At(Segment): - """At对象, 表示一类提醒某用户的元素""" - flag: Literal["user", "role", "channel"] - target: str - display: Optional[str] - -class AtAll(Segment): - """AtAll对象, 表示一类提醒所有人的元素""" - here: bool - -class Emoji(Segment): - """Emoji对象, 表示一类表情元素""" - id: str - name: Optional[str] - -class Media(Segment): - url: Optional[str] - id: Optional[str] - path: Optional[Union[str, Path]] - raw: Optional[Union[bytes, BytesIO]] - mimetype: Optional[str] - name: str - - to_url: ClassVar[Optional[MediaToUrl]] - -class Image(Media): - """Image对象, 表示一类图片元素""" - -class Audio(Media): - """Audio对象, 表示一类音频元素""" - duration: Optional[int] - -class Voice(Media): - """Voice对象, 表示一类语音元素""" - duration: Optional[int] - -class Video(Media): - """Video对象, 表示一类视频元素""" - -class File(Segment): - """File对象, 表示一类文件元素""" - id: str - name: Optional[str] - -class Reply(Segment): - """Reply对象,表示一类回复消息""" - id: str - """此处不一定是消息ID,可能是其他ID,如消息序号等""" - msg: Optional[Union[Message, str]] - origin: Optional[Any] - -class Reference(Segment): - """Reference对象,表示一类引用消息。转发消息 (Forward) 也属于此类""" - id: Optional[str] - """此处不一定是消息ID,可能是其他ID,如消息序号等""" - children: List[Union[RefNode, CustomNode]] - -class Hyper(Segment): - """Hyper对象,表示一类超级消息。如卡片消息、ark消息、小程序等""" - format: Literal["xml", "json"] - raw: Optional[str] - content: Optional[Union[dict, list]] - -class Other(Segment): - """其他 Segment""" - origin: MessageSegment - -``` - -:::tip - -或许你注意到了 `Segment` 上有一个 `children` 属性。 - -这是因为在 [`Satori`](https://satori.js.org/zh-CN/) 协议的规定下,一类元素可以用其子元素来代表一类兼容性消息 -(例如,qq 的商场表情在某些平台上可以用图片代替)。 - -为此,本插件提供了两种方式来表达 "获取子元素" 的方法: - -```python -from nonebot_plugin_alconna.builtins.uniseg.chronocat import MarketFace -from nonebot_plugin_alconna import Args, Image, Alconna, select, select_first - -# 表示这个指令需要的图片要么直接是 Image 要么是在 MarketFace 元素内的 Image -alc1 = Alconna("make_meme", Args["img", [Image, Image.from_(MarketFace)]]) - -# 表示这个指令需要的图片会在目标元素下进行搜索,将所有符合 Image 的元素选出来并将第一个作为结果 -alc2 = Alconna("make_meme", Args["img", select(Image, index=0)]) # 也可以使用 select_first(Image) -``` - -::: - -## 通用消息序列 - -`nonebot-plugin-alconna.uniseg` 同时提供了一个类似于 `Message` 的 `UniMessage` 类型,其元素为经过通用标注转换后的通用消息段。 - -你可以用如下方式获取 `UniMessage`: - - - - -通过提供的 `UniversalMessage` 或 `UniMsg` 依赖注入器来获取 `UniMessage`。 - -```python -from nonebot_plugin_alconna.uniseg import UniMsg, At, Reply - - -matcher = on_xxx(...) - -@matcher.handle() -async def _(msg: UniMsg): - reply = msg[Reply, 0] - print(reply.origin) - if msg.has(At): - ats = msg.get(At) - print(ats) - ... -``` - - - - -注意,`generate` 方法在响应器以外的地方如果不传入 `event` 与 `bot` 则无法处理 reply。 - -```python -from nonebot import Message, EventMessage -from nonebot_plugin_alconna.uniseg import UniMessage - - -matcher = on_xxx(...) - -@matcher.handle() -async def _(message: Message = EventMessage()): - msg = await UniMessage.generate(message=message) - msg1 = UniMessage.generate_without_reply(message=message) -``` - - - - -不仅如此,你还可以通过 `UniMessage` 的 `export` 与 `send` 方法来**跨平台发送消息**。 - -`UniMessage.export` 会通过传入的 `bot: Bot` 参数,或上下文中的 `Bot` 对象读取适配器信息,并使用对应的生成方法把通用消息转为适配器对应的消息序列: - -```python -from nonebot import Bot, on_command -from nonebot_plugin_alconna.uniseg import Image, UniMessage - - -test = on_command("test") - -@test.handle() -async def handle_test(): - await test.send(await UniMessage(Image(path="path/to/img")).export()) -``` - -除此之外 `UniMessage.send` 方法基于 `UniMessage.export` 并调用各适配器下的发送消息方法,返回一个 `Receipt` 对象,用于修改/撤回消息: - -```python -from nonebot import Bot, on_command -from nonebot_plugin_alconna.uniseg import UniMessage - - -test = on_command("test") - -@test.handle() -async def handle(): - receipt = await UniMessage.text("hello!").send(at_sender=True, reply_to=True) - await receipt.recall(delay=1) -``` - -而在 `AlconnaMatcher` 下,`got`, `send`, `reject` 等可以发送消息的方法皆支持使用 `UniMessage`,不需要手动调用 export 方法: - -```python -from arclet.alconna import Alconna, Args -from nonebot_plugin_alconna import Match, AlconnaMatcher, on_alconna -from nonebot_plugin_alconna.uniseg import At, UniMessage - - -test_cmd = on_alconna(Alconna("test", Args["target?", At])) - -@test_cmd.handle() -async def tt_h(matcher: AlconnaMatcher, target: Match[At]): - if target.available: - matcher.set_path_arg("target", target.result) - -@test_cmd.got_path("target", prompt="请输入目标") -async def tt(target: At): - await test_cmd.send(UniMessage([target, "\ndone."])) -``` - -:::caution - -在响应器以外的地方,除非启用了 `alconna_apply_fetch_targets` 配置项,否则 `bot` 参数必须手动传入。 - -::: - -### 构造 - -如同 `Message`, `UniMessage` 可以传入单个字符串/消息段,或可迭代的字符串/消息段: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, At - - -msg = UniMessage("Hello") -msg1 = UniMessage(At("user", "124")) -msg2 = UniMessage(["Hello", At("user", "124")]) -``` - -`UniMessage` 上同时存在便捷方法,令其可以链式地添加消息段: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, At, Image - - -msg = UniMessage.text("Hello").at("124").image(path="/path/to/img") -assert msg == UniMessage( - ["Hello", At("user", "124"), Image(path="/path/to/img")] -) -``` - -### 拼接消息 - -`str`、`UniMessage`、`Segment` 对象之间可以直接相加,相加均会返回一个新的 `UniMessage` 对象: - -```python -# 消息序列与消息段相加 -UniMessage("text") + Text("text") -# 消息序列与字符串相加 -UniMessage([Text("text")]) + "text" -# 消息序列与消息序列相加 -UniMessage("text") + UniMessage([Text("text")]) -# 字符串与消息序列相加 -"text" + UniMessage([Text("text")]) -# 消息段与消息段相加 -Text("text") + Text("text") -# 消息段与字符串相加 -Text("text") + "text" -# 消息段与消息序列相加 -Text("text") + UniMessage([Text("text")]) -# 字符串与消息段相加 -"text" + Text("text") -``` - -如果需要在当前消息序列后直接拼接新的消息段,可以使用 `Message.append`、`Message.extend` 方法,或者使用自加: - -```python -msg = UniMessage([Text("text")]) -# 自加 -msg += "text" -msg += Text("text") -msg += UniMessage([Text("text")]) -# 附加 -msg.append(Text("text")) -# 扩展 -msg.extend([Text("text")]) -``` - -### 使用消息模板 - -`UniMessage.template` 同样类似于 `Message.template`,可以用于格式化消息,大体用法参考 [消息模板](../../tutorial/message#使用消息模板)。 - -这里额外说明 `UniMessage.template` 的拓展控制符 - -相比 `Message`,UniMessage 对于 `{:XXX}` 做了另一类拓展。其能够识别例如 At(xxx, yyy) 或 Emoji(aaa, bbb)的字符串并执行 - -以 At(...) 为例: - -```python title=使用通用消息段的拓展控制符 ->>> from nonebot_plugin_alconna.uniseg import UniMessage ->>> UniMessage.template("{:At(user, target)}").format(target="123") -UniMessage(At("user", "123")) ->>> UniMessage.template("{:At(type=user, target=id)}").format(id="123") -UniMessage(At("user", "123")) ->>> UniMessage.template("{:At(type=user, target=123)}").format() -UniMessage(At("user", "123")) -``` - -而在 `AlconnaMatcher` 中,`{:XXX}` 更进一步地提供了获取 `event` 和 `bot` 中的属性的功能: - -```python title=在AlconnaMatcher中使用通用消息段的拓展控制符 -from arclet.alconna import Alconna, Args -from nonebot_plugin_alconna import At, Match, UniMessage, AlconnaMatcher, on_alconna - - -test_cmd = on_alconna(Alconna("test", Args["target?", At])) - -@test_cmd.handle() -async def tt_h(matcher: AlconnaMatcher, target: Match[At]): - if target.available: - matcher.set_path_arg("target", target.result) - -@test_cmd.got_path( - "target", - prompt=UniMessage.template("{:At(user, $event.get_user_id())} 请确认目标") -) -async def tt(): - await test_cmd.send( - UniMessage.template("{:At(user, $event.get_user_id())} 已确认目标为 {target}") - ) -``` - -另外也有 `$message_id` 与 `$target` 两个特殊值。 - -### 检查消息段 - -我们可以通过 `in` 运算符或消息序列的 `has` 方法来: - -```python -# 是否存在消息段 -At("user", "1234") in message -# 是否存在指定类型的消息段 -At in message -``` - -我们还可以使用 `only` 方法来检查消息中是否仅包含指定的消息段: - -```python -# 是否都为 "test" -message.only("test") -# 是否仅包含指定类型的消息段 -message.only(Text) -``` - -### 获取消息纯文本 - -类似于 `Message.extract_plain_text()`,用于获取通用消息的纯文本: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, At - - -# 提取消息纯文本字符串 -assert UniMessage( - [At("user", "1234"), "text"] -).extract_plain_text() == "text" -``` - -### 遍历 - -通用消息序列继承自 `List[Segment]` ,因此可以使用 `for` 循环遍历消息段: - -```python -for segment in message: # type: Segment - ... -``` - -### 过滤、索引与切片 - -消息序列对列表的索引与切片进行了增强,在原有列表 `int` 索引与 `slice` 切片的基础上,支持 `type` 过滤索引与切片: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, At, Text, Reply - - -message = UniMessage( - [ - Reply(...), - "text1", - At("user", "1234"), - "text2" - ] -) -# 索引 -message[0] == Reply(...) -# 切片 -message[0:2] == UniMessage([Reply(...), Text("text1")]) -# 类型过滤 -message[At] == Message([At("user", "1234")]) -# 类型索引 -message[At, 0] == At("user", "1234") -# 类型切片 -message[Text, 0:2] == UniMessage([Text("text1"), Text("text2")]) -``` - -我们也可以通过消息序列的 `include`、`exclude` 方法进行类型过滤: - -```python -message.include(Text, At) -message.exclude(Reply) -``` - -同样的,消息序列对列表的 `index`、`count` 方法也进行了增强,可以用于索引指定类型的消息段: - -```python -# 指定类型首个消息段索引 -message.index(Text) == 1 -# 指定类型消息段数量 -message.count(Text) == 2 -``` - -此外,消息序列添加了一个 `get` 方法,可以用于获取指定类型指定个数的消息段: - -```python -# 获取指定类型指定个数的消息段 -message.get(Text, 1) == UniMessage([Text("test1")]) -``` - -## 消息发送 - -前面提到,通用消息可用 `UniMessage.send` 发送自身: - -```python -async def send( - self, - target: Union[Event, Target, None] = None, - bot: Optional[Bot] = None, - fallback: bool = True, - at_sender: Union[str, bool] = False, - reply_to: Union[str, bool] = False, -) -> Receipt: -``` - -实际上,`UniMessage` 同时提供了获取消息事件 id 与消息发送对象的方法: - - - - -通过提供的 `MessageTarget`, `MessageId` 或 `MsgTarget`, `MsgId` 依赖注入器来获取消息事件 id 与消息发送对象。 - -```python -from nonebot_plugin_alconna.uniseg import MessageId, MsgTarget - - -matcher = on_xxx(...) - -@matcher.handle() -asycn def _(target: MsgTarget, msg_id: MessageId): - ... -``` - - - - -```python -from nonebot import Event, Bot -from nonebot_plugin_alconna.uniseg import UniMessage, Target - - -matcher = on_xxx(...) - -@matcher.handle() -asycn def _(bot: Bot, event: Event): - target: Target = UniMessage.get_target(event, bot) - msg_id: str = UniMessage.get_message_id(event, bot) - -``` - - - - -`send`, `get_target`, `get_message_id` 中与 `event`, `bot` 相关的参数都会尝试从上下文中获取对象。 - -### 消息发送对象 - -消息发送对象是用来描述响应消息时的发送对象或者主动发送消息时的目标对象的对象,它包含了以下属性: - -```python -class Target: - id: str - """目标id;若为群聊则为group_id或者channel_id,若为私聊则为user_id""" - parent_id: str - """父级id;若为频道则为guild_id,其他情况下可能为空字符串(例如 Feishu 下可作为部门 id)""" - channel: bool - """是否为频道,仅当目标平台符合频道概念时""" - private: bool - """是否为私聊""" - source: str - """可能的事件id""" - self_id: Union[str, None] - """机器人id,若为 None 则 Bot 对象会随机选择""" - selector: Union[Callable[[Bot], Awaitable[bool]], None] - """选择器,用于在多个 Bot 对象中选择特定 Bot""" - extra: Dict[str, Any] - """额外信息,用于适配器扩展""" -``` - -其构造时需要如下参数: - -- `id` 为目标id;若为群聊则为 group_id 或者 channel_id,若为私聊则为user_id -- `parent_id` 为父级id;若为频道则为 guild_id,其他情况下可能为空字符串(例如 Feishu 下可作为部门 id) -- `channel` 为是否为频道,仅当目标平台符合频道概念时 -- `private` 为是否为私聊 -- `source` 为可能的事件id -- `self_id` 为机器人id,若为 None 则 Bot 对象会随机选择 -- `selector` 为选择器,用于在多个 Bot 对象中选择特定 Bot -- `scope` 为适配器范围,用于传入内置的特定选择器 -- `adapter` 为适配器名称,若为 None 则需要明确指定 Bot 对象 -- `platform` 为平台名称,仅当目标适配器存在多个平台时使用 -- `extra` 为额外信息,用于适配器扩展 - -通过 `Target` 对象,我们可以在 `UniMessage.send` 中指定发送对象: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, MsgTarget, Target, SupportScope - - -matcher = on_xxx(...) - -@matcher.handle() -async def _(target: MsgTarget): - await UniMessage("Hello!").send(target=target) - target1 = Target("xxxx", scope=SupportScope.qq_client) - await UniMessage("Hello!").send(target=target1) -``` - -### 主动发送消息 - -`UniMessage.send` 也可以用于主动发送消息: - -```python -from nonebot_plugin_alconna.uniseg import UniMessage, Target, SupportScope -from nonebot import get_driver - - -driver = get_driver() - -@driver.on_startup -async def on_startup(): - target = Target("xxxx", scope=SupportScope.qq_client) - await UniMessage("Hello!").send(target=target) -``` - -## 自定义消息段 - -`uniseg` 提供了部分方法来允许用户自定义 Segment 的序列化和反序列化: - -```python -from dataclasses import dataclass - -from nonebot.adapters import Bot -from nonebot.adapters import MessageSegment as BaseMessageSegment -from nonebot.adapters.satori import Custom, Message, MessageSegment - -from nonebot_plugin_alconna.uniseg.builder import MessageBuilder -from nonebot_plugin_alconna.uniseg.exporter import MessageExporter -from nonebot_plugin_alconna.uniseg import Segment, custom_handler, custom_register - - -@dataclass -class MarketFace(Segment): - tabId: str - faceId: str - key: str - - -@custom_register(MarketFace, "chronocat:marketface") -def mfbuild(builder: MessageBuilder, seg: BaseMessageSegment): - if not isinstance(seg, Custom): - raise ValueError("MarketFace can only be built from Satori Message") - return MarketFace(**seg.data)(*builder.generate(seg.children)) - - -@custom_handler(MarketFace) -async def mfexport(exporter: MessageExporter, seg: MarketFace, bot: Bot, fallback: bool): - if exporter.get_message_type() is Message: - return MessageSegment("chronocat:marketface", seg.data)(await exporter.export(seg.children, bot, fallback)) - -``` - -具体而言,你可以使用 `custom_register` 来增加一个从 MessageSegment 到 Segment 的处理方法;使用 `custom_handler` 来增加一个从 Segment 到 MessageSegment 的处理方法。 diff --git a/website/versioned_docs/version-2.3.2/best-practice/data-storing.md b/website/versioned_docs/version-2.3.2/best-practice/data-storing.md deleted file mode 100644 index ffa4f61a71a4..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/data-storing.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -sidebar_position: 1 -description: 存储数据文件到本地 ---- - -# 数据存储 - -在使用插件的过程中,难免会需要存储一些持久化数据,例如用户的个人信息、群组的信息等。除了使用数据库等第三方存储之外,还可以使用本地文件来自行管理数据。NoneBot 提供了 `nonebot-plugin-localstore` 插件,可用于获取正确的数据存储路径并写入数据。 - -## 安装插件 - -在使用前请先安装 `nonebot-plugin-localstore` 插件至项目环境中,可参考[获取商店插件](../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如: - -在**项目目录**下执行以下命令: - -```bash -nb plugin install nonebot-plugin-localstore -``` - -## 使用插件 - -`nonebot-plugin-localstore` 插件兼容 Windows、Linux 和 macOS 等操作系统,使用时无需关心操作系统的差异。同时插件提供 `nb-cli` 脚本,可以使用 `nb localstore` 命令来检查数据存储路径。 - -在使用本插件前同样需要使用 `require` 方法进行**加载**并**导入**需要使用的方法,可参考 [跨插件访问](../advanced/requiring.md) 一节进行了解,如: - -```python -from nonebot import require - -require("nonebot_plugin_localstore") - -import nonebot_plugin_localstore as store - -# 获取插件缓存目录 -cache_dir = store.get_cache_dir("plugin_name") -# 获取插件缓存文件 -cache_file = store.get_cache_file("plugin_name", "file_name") -# 获取插件数据目录 -data_dir = store.get_data_dir("plugin_name") -# 获取插件数据文件 -data_file = store.get_data_file("plugin_name", "file_name") -# 获取插件配置目录 -config_dir = store.get_config_dir("plugin_name") -# 获取插件配置文件 -config_file = store.get_config_file("plugin_name", "file_name") -``` - -:::danger 警告 -在 Windows 和 macOS 系统下,插件的数据目录和配置目录是同一个目录,因此在使用时需要注意避免文件名冲突。 -::: - -插件提供的方法均返回一个 `pathlib.Path` 路径,可以参考 [pathlib 文档](https://docs.python.org/zh-cn/3/library/pathlib.html)来了解如何使用。常用的方法有: - -```python -from pathlib import Path - -data_file = store.get_data_file("plugin_name", "file_name") -# 写入文件内容 -data_file.write_text("Hello World!") -# 读取文件内容 -data = data_file.read_text() -``` - -:::note 提示 - -对于嵌套插件,子插件的存储目录将位于父插件存储目录下。 - -::: - -## 配置项 - -### localstore_cache_dir - -自定义缓存目录 - -默认值: - -- macOS: `~/Library/Caches/` -- Unix: `~/.cache/` (XDG default) -- Windows: `C:\Users\\AppData\Local\\Cache` - -```dotenv -LOCALSTORE_CACHE_DIR=/tmp/cache -``` - -### localstore_data_dir - -自定义数据目录 - -默认值: - -- macOS: `~/Library/Application Support/` -- Unix: `~/.local/share/` or in $XDG_DATA_HOME, if defined -- Win XP (not roaming): `C:\Documents and Settings\\Application Data\` -- Win 7 (not roaming): `C:\Users\\AppData\Local\` - -```dotenv -LOCALSTORE_DATA_DIR=/tmp/data -``` - -### localstore_config_dir - -自定义配置目录 - -默认值: - -- macOS: same as user_data_dir -- Unix: `~/.config/` -- Win XP (roaming): `C:\Documents and Settings\\Local Settings\Application Data\` -- Win 7 (roaming): `C:\Users\\AppData\Roaming\` - -```dotenv -LOCALSTORE_CONFIG_DIR=/tmp/config -``` - -### localstore_plugin_cache_dir - -自定义插件缓存目录 - -默认值:`{}` - -```dotenv -LOCALSTORE_PLUGIN_CACHE_DIR=' -{ - "plugin_id": "/tmp/plugin_cache" -} -' -``` - -### localstore_plugin_data_dir - -自定义插件数据目录 - -默认值:`{}` - -```dotenv -LOCALSTORE_PLUGIN_DATA_DIR=' -{ - "plugin_id": "/tmp/plugin_data" -} -' -``` - -### localstore_plugin_config_dir - -自定义插件配置目录 - -默认值:`{}` - -```dotenv -LOCALSTORE_PLUGIN_CONFIG_DIR=' -{ - "plugin_id": "/tmp/plugin_config" -} -' -``` diff --git a/website/versioned_docs/version-2.3.2/best-practice/database/README.mdx b/website/versioned_docs/version-2.3.2/best-practice/database/README.mdx deleted file mode 100644 index 0f8a157234ce..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/database/README.mdx +++ /dev/null @@ -1,145 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# 数据库 - -[`nonebot-plugin-orm`](https://github.com/nonebot/plugin-orm) 是 NoneBot 的数据库支持插件。 -本插件基于 [SQLAlchemy](https://www.sqlalchemy.org/) 和 [Alembic](https://alembic.sqlalchemy.org/),提供了许多与 NoneBot 紧密集成的功能: - -- 多 Engine / Connection 支持 -- Session 管理 -- 关系模型管理、依赖注入支持 -- 数据库迁移 - -## 安装 - - - - -```shell -nb plugin install nonebot-plugin-orm -``` - - - - -```shell -pip install nonebot-plugin-orm -``` - - - - - -```shell -pdm add nonebot-plugin-orm -``` - - - - -## 数据库驱动和后端 - -本插件只提供了 ORM 功能,没有数据库后端,也没有直接连接数据库后端的能力。 -所以你需要另行安装数据库驱动和数据库后端,并且配置数据库连接信息。 - -### SQLite - -[SQLite](https://www.sqlite.org/) 是一个轻量级的嵌入式数据库,它的数据以单文件的形式存储在本地,不需要单独的数据库后端。 -SQLite 非常适合用于开发环境和小型应用,但是不适合用于大型应用的生产环境。 - -虽然不需要另行安装数据库后端,但你仍然需要安装数据库驱动: - - - - -```shell -pip install "nonebot-plugin-orm[sqlite]" -``` - - - - - -```shell -pdm add "nonebot-plugin-orm[sqlite]" -``` - - - - -默认情况下,数据库文件为 `/nonebot-plugin-orm/db.sqlite3`(数据目录由 [nonebot-plugin-localstore](../data-storing) 提供)。 -或者,你可以通过配置 `SQLALCHEMY_DATABASE_URL` 来指定数据库文件路径: - -```shell -SQLALCHEMY_DATABASE_URL=sqlite+aiosqlite:///file_path -``` - -### PostgreSQL - -[PostgreSQL](https://www.postgresql.org/) 是世界上最先进的开源关系数据库之一,对各种高级且广泛应用的功能有最好的支持,是中小型应用的首选数据库。 - - - - -```shell -pip install nonebot-plugin-orm[postgresql] -``` - - - - - -```shell -pdm add nonebot-plugin-orm[postgresql] -``` - - - - -```shell -SQLALCHEMY_DATABASE_URL=postgresql+psycopg://user:password@host:port/dbname[?key=value&key=value...] -``` - -### MySQL / MariaDB - -[MySQL](https://www.mysql.com/) 和 [MariaDB](https://mariadb.com/) 是经典的开源关系数据库,适合用于中小型应用。 - - - - -```shell -pip install nonebot-plugin-orm[mysql] -``` - - - - - -```shell -pdm add nonebot-plugin-orm[mysql] -``` - - - - -```shell -SQLALCHEMY_DATABASE_URL=mysql+aiomysql://user:password@host:port/dbname[?key=value&key=value...] -``` - -## 使用 - -本插件提供了数据库迁移功能(此功能依赖于 [nb-cli 脚手架](../../quick-start#安装脚手架))。 -在安装了新的插件或机器人之后,你需要执行一次数据库迁移操作,将数据库同步至与机器人一致的状态: - -```shell -nb orm upgrade -``` - -运行完毕后,可以检查一下: - -```shell -nb orm check -``` - -如果输出是 `没有检测到新的升级操作`,那么恭喜你,数据库已经迁移完成了,你可以启动机器人了。 diff --git a/website/versioned_docs/version-2.3.2/best-practice/database/_category_.json b/website/versioned_docs/version-2.3.2/best-practice/database/_category_.json deleted file mode 100644 index 4c6eeb3a4d30..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/database/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "数据库", - "position": 7 -} diff --git a/website/versioned_docs/version-2.3.2/best-practice/database/developer/README.md b/website/versioned_docs/version-2.3.2/best-practice/database/developer/README.md deleted file mode 100644 index 8b6bf65866e3..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/database/developer/README.md +++ /dev/null @@ -1,378 +0,0 @@ -# 开发者指南 - -开发者指南内容较多,故分为了一个示例以及数个专题。 -阅读(并且最好跟随实践)示例后,你将会对使用 `nonebot-plugin-orm` 开发插件有一个基本的认识。 -如果想要更深入地学习关于 [SQLAlchemy](https://www.sqlalchemy.org/) 和 [Alembic](https://alembic.sqlalchemy.org/) 的知识,或者在使用过程中遇到了问题,可以查阅专题以及其官方文档。 - -## 示例 - -### 模型定义 - -首先,我们需要设计存储的数据的结构。 -例如天气插件,需要存储**什么地方 (`location`)** 的**天气是什么 (`weather`)**。 -其中,一个地方只会有一种天气,而不同地方可能有相同的天气。 -所以,我们可以设计出如下的模型: - -```python title=weather/__init__.py showLineNumbers -from nonebot_plugin_orm import Model -from sqlalchemy.orm import Mapped, mapped_column - - -class Weather(Model): - location: Mapped[str] = mapped_column(primary_key=True) - weather: Mapped[str] -``` - -其中,`primary_key=True` 意味着此列 (`location`) 是主键,即内容是唯一的且非空的。 -每一个模型必须有至少一个主键。 - -我们可以用以下代码检查模型生成的数据库模式是否正确: - -```python -from sqlalchemy.schema import CreateTable - -print(CreateTable(Weather.__table__)) -``` - -```sql -CREATE TABLE weather_weather ( - location VARCHAR NOT NULL, - weather VARCHAR NOT NULL, - CONSTRAINT pk_weather_weather PRIMARY KEY (location) -) -``` - -可以注意到表名是 `weather_weather` 而不是 `Weather` 或者 `weather`。 -这是因为 `nonebot-plugin-orm` 会自动为模型生成一个表名,规则是:`<插件模块名>_<类名小写>`。 - -你也可以通过指定 `__tablename__` 属性来自定义表名: - -```python {2} -class Weather(Model): - __tablename__ = "weather" - ... -``` - -```sql {1} -CREATE TABLE weather ( - ... -) -``` - -但是,并不推荐你这么做,因为这可能会导致不同插件间的表名重复,引发冲突。 -特别是当你会发布插件时,你并不知道其他插件会不会使用相同的表名。 - -### 首次迁移 - -我们成功定义了模型,现在启动机器人试试吧: - -```shell -$ nb run -01-02 15:04:05 [SUCCESS] nonebot | NoneBot is initializing... -01-02 15:04:05 [ERROR] nonebot_plugin_orm | 启动检查失败 -01-02 15:04:05 [ERROR] nonebot | Application startup failed. Exiting. -Traceback (most recent call last): - ... -click.exceptions.UsageError: 检测到新的升级操作: -[('add_table', - Table('weather', MetaData(), Column('location', String(), table=, primary_key=True, nullable=False), Column('weather', String(), table=, nullable=False), schema=None))] -``` - -咦,发生了什么? -`nonebot-plugin-orm` 试图阻止我们启动机器人。 -原来是我们定义了模型,但是数据库中并没有对应的表,这会导致插件不能正常运行。 -所以,我们需要迁移数据库。 - -首先,我们需要创建一个迁移脚本: - -```shell -nb orm revision -m "first revision" --branch-label weather -``` - -其中,`-m` 参数是迁移脚本的描述,`--branch-label` 参数是迁移脚本的分支,一般为插件模块名。 -执行命令过后,出现了一个 `weather/migrations` 目录,其中有一个 `xxxxxxxxxxxx_first_revision.py` 文件: - -```shell {4,5} -weather -├── __init__.py -├── config.py -└── migrations - └── xxxxxxxxxxxx_first_revision.py -``` - -这就是我们创建的迁移脚本,它记录了数据库模式的变化。 -我们可以查看一下它的内容: - -```python title=weather/migrations/xxxxxxxxxxxx_first_revision.py {25-33,39-41} showLineNumbers -"""first revision - -迁移 ID: xxxxxxxxxxxx -父迁移: -创建时间: 2006-01-02 15:04:05.999999 - -""" - -from __future__ import annotations - -from collections.abc import Sequence - -import sqlalchemy as sa -from alembic import op - -revision: str = "xxxxxxxxxxxx" -down_revision: str | Sequence[str] | None = None -branch_labels: str | Sequence[str] | None = ("weather",) -depends_on: str | Sequence[str] | None = None - - -def upgrade(name: str = "") -> None: - if name: - return - # ### commands auto generated by Alembic - please adjust! ### - op.create_table( - "weather_weather", - sa.Column("location", sa.String(), nullable=False), - sa.Column("weather", sa.String(), nullable=False), - sa.PrimaryKeyConstraint("location", name=op.f("pk_weather_weather")), - info={"bind_key": "weather"}, - ) - # ### end Alembic commands ### - - -def downgrade(name: str = "") -> None: - if name: - return - # ### commands auto generated by Alembic - please adjust! ### - op.drop_table("weather_weather") - # ### end Alembic commands ### -``` - -可以注意到脚本的主体部分(其余是模版代码,请勿修改)是: - -```python -# ### commands auto generated by Alembic - please adjust! ### -op.create_table( # CREATE TABLE - "weather_weather", # weather_weather - sa.Column("location", sa.String(), nullable=False), # location VARCHAR NOT NULL, - sa.Column("weather", sa.String(), nullable=False), # weather VARCHAR NOT NULL, - sa.PrimaryKeyConstraint("location", name=op.f("pk_weather_weather")), # CONSTRAINT pk_weather_weather PRIMARY KEY (location) - info={"bind_key": "weather"}, -) -# ### end Alembic commands ### -``` - -```python -# ### commands auto generated by Alembic - please adjust! ### -op.drop_table("weather_weather") # DROP TABLE weather_weather; -# ### end Alembic commands ### -``` - -虽然我们不是很懂这些代码的意思,但是可以注意到它们几乎与 SQL 语句 (DDL) 一一对应。 -显然,它们是用来创建和删除表的。 - -我们还可以注意到,`upgrade()` 和 `downgrade()` 函数中的代码是**互逆**的。 -也就是说,执行一次 `upgrade()` 函数,再执行一次 `downgrade()` 函数后,数据库的模式就会回到原来的状态。 - -这就是迁移脚本的作用:记录数据库模式的变化,以便我们在不同的环境中(例如开发环境和生产环境)**可复现地**、**可逆地**同步数据库模式,正如 git 对我们的代码做的事情那样。 - -对了,不要忘记还有一段注释:`commands auto generated by Alembic - please adjust!`。 -它在提醒我们,这些代码是由 Alembic 自动生成的,我们应该检查它们,并且根据需要进行调整。 - -:::caution 注意 -迁移脚本冗长且繁琐,我们一般不会手写它们,而是由 Alembic 自动生成。 -一般情况下,Alembic 足够智能,可以正确地生成迁移脚本。 -但是,在复杂或有歧义的情况下,我们可能需要手动调整迁移脚本。 -所以,**永远要检查迁移脚本,并且在开发环境中测试!** - -**迁移脚本中任何一处错误都足以使数据付之东流!** -::: - -确定迁移脚本正确后,我们就可以执行迁移脚本,将数据库模式同步到数据库中: - -```shell -nb orm upgrade -``` - -现在,我们可以正常启动机器人了。 - -开发过程中,我们可能会频繁地修改模型,这意味着我们需要频繁地创建并执行迁移脚本,非常繁琐。 -实际上,此时我们不在乎数据安全,只需要数据库模式与模型定义一致即可。 -所以,我们可以关闭 `nonebot-plugin-orm` 的启动检查: - -```shell title=.env.dev -ALEMBIC_STARTUP_CHECK=false -``` - -现在,每次启动机器人时,数据库模式会自动与模型定义同步,无需手动迁移。 - -### 会话管理 - -我们已经成功定义了模型,并且迁移了数据库,现在可以开始使用数据库了……吗? -并不能,因为模型只是数据结构的定义,并不能通过它操作数据(如果你曾经使用过 [Tortoise ORM](https://tortoise.github.io/),可能会知道 `await Weather.get(location="上海")` 这样的面向对象编程。 -但是 SQLAlchemy 不同,选择了命令式编程)。 -我们需要使用**会话**操作数据: - -```python title=weather/__init__.py {10,13} showLineNumbers -from nonebot import on_command -from nonebot.adapters import Message -from nonebot.params import CommandArg -from nonebot_plugin_orm import async_scoped_session - -weather = on_command("天气") - - -@weather.handle() -async def _(session: async_scoped_session, args: Message = CommandArg()): - location = args.extract_plain_text() - - if wea := await session.get(Weather, location): - await weather.finish(f"今天{location}的天气是{wea.weather}") - - await weather.finish(f"未查询到{location}的天气") -``` - -我们通过 `session: async_scoped_session` 依赖注入获得了一个会话,然后使用 `await session.get(Weather, location)` 查询数据库。 -`async_scoped_session` 是一个有作用域限制的会话,作用域为当前事件、当前事件响应器。 -会话产生的模型实例(例如此处的 `wea := await session.get(Weather, location)`)作用域与会话相同。 - -:::caution 注意 -此处提到的“会话”指的是 ORM 会话,而非 [NoneBot 会话](../../../appendices/session-control),两者的生命周期也是不同的(NoneBot 会话的生命周期中可能包含多个事件,不同的事件也会有不同的事件响应器)。 -具体而言,就是不要将 ORM 会话和模型实例存储在 NoneBot 会话状态中: - -```python {12} -from nonebot.params import ArgPlainText -from nonebot.typing import T_State - - -@weather.got("location", prompt="请输入地名") -async def _(state: T_State, session: async_scoped_session, location: str = ArgPlainText()): - wea = await session.get(Weather, location) - - if not wea: - await weather.finish(f"未查询到{location}的天气") - - state["weather"] = wea # 不要这么做,除非你知道自己在做什么 -``` - -当然非要这么做也不是不可以: - -```python {6} -@weather.handle() -async def _(state: T_State, session: async_scoped_session): - # 通过 await session.merge(state["weather"]) 获得了此 ORM 会话中的相应模型实例, - # 而非直接使用会话状态中的模型实例, - # 因为先前的 ORM 会话已经关闭了。 - wea = await session.merge(state["weather"]) - await weather.finish(f"今天{state['location']}的天气是{wea.weather}") -``` - -::: - -当有数据更改时,我们需要提交事务,也要注意会话作用域问题: - -```python title=weather/__init__.py {12,20} showLineNumbers -from nonebot.params import Depends - - -async def get_weather( - session: async_scoped_session, args: Message = CommandArg() -) -> Weather: - location = args.extract_plain_text() - - if not (wea := await session.get(Weather, location)): - wea = Weather(location=location, weather="未知") - session.add(wea) - # await session.commit() # 不应该在其他地方提交事务 - - return wea - - -@weather.handle() -async def _(session: async_scoped_session, wea: Weather = Depends(get_weather)): - await weather.send(f"今天的天气是{wea.weather}") - await session.commit() # 而应该在事件响应器结束前提交事务 -``` - -当然我们也可以获得一个新的会话,不过此时就要手动管理会话了: - -```python title=weather/__init__.py {5-6} showLineNumbers -from nonebot_plugin_orm import get_session - - -async def get_weather(location: str) -> str: - session = get_session() - async with session.begin(): - wea = await session.get(Weather, location) - - if not wea: - wea = Weather(location=location, weather="未知") - session.add(wea) - - return wea.weather - - -@weather.handle() -async def _(args: Message = CommandArg()): - wea = await get_weather(args.extract_plain_text()) - await weather.send(f"今天的天气是{wea}") -``` - -### 依赖注入 - -在上面的示例中,我们都是通过会话获得数据的。 -不过,我们也可以通过依赖注入获得数据: - -```python title=weather/__init__.py {12-14} showLineNumbers -from sqlalchemy import select -from nonebot.params import Depends -from nonebot_plugin_orm import SQLDepends - - -def extract_arg_plain_text(args: Message = CommandArg()) -> str: - return args.extract_plain_text() - - -@weather.handle() -async def _( - wea: Weather = SQLDepends( - select(Weather).where(Weather.location == Depends(extract_arg_plain_text)) - ), -): - await weather.send(f"今天的天气是{wea.weather}") -``` - -其中,`SQLDepends` 是一个特殊的依赖注入,它会根据类型标注和 SQL 语句提供数据,SQL 语句中也可以有子依赖。 - -不同的类型标注也会获得不同形式的数据: - -```python title=weather/__init__.py {5} showLineNumbers -from collections.abc import Sequence - -@weather.handle() -async def _( - weas: Sequence[Weather] = SQLDepends( - select(Weather).where(Weather.weather == Depends(extract_arg_plain_text)) - ), -): - await weather.send(f"今天的天气是{weas[0].weather}的城市有{','.join(wea.location for wea in weas)}") -``` - -支持的类型标注请参见 [依赖注入](dependency)。 - -我们也可以像 [类作为依赖](../../../advanced/dependency#类作为依赖) 那样,在类属性中声明子依赖: - -```python title=weather/__init__.py {5-6,10} showLineNumbers -from collections.abc import Sequence - -class Weather(Model): - location: Mapped[str] = mapped_column(primary_key=True) - weather: Mapped[str] = Depends(extract_arg_plain_text) - # weather: Annotated[Mapped[str], Depends(extract_arg_plain_text)] # Annotated 支持 - - -@weather.handle() -async def _(weas: Sequence[Weather]): - await weather.send( - f"今天的天气是{weas[0].weather}的城市有{','.join(wea.location for wea in weas)}" - ) -``` diff --git a/website/versioned_docs/version-2.3.2/best-practice/database/developer/_category_.json b/website/versioned_docs/version-2.3.2/best-practice/database/developer/_category_.json deleted file mode 100644 index 999af8e69b92..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/database/developer/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "开发者指南", - "position": 3 -} diff --git a/website/versioned_docs/version-2.3.2/best-practice/database/developer/dependency.md b/website/versioned_docs/version-2.3.2/best-practice/database/developer/dependency.md deleted file mode 100644 index 6496d6a106d5..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/database/developer/dependency.md +++ /dev/null @@ -1,240 +0,0 @@ ---- -sidebar_position: 3 -description: 依赖注入 ---- - -# 依赖注入 - -`nonebot-plugin-orm` 提供了强大且灵活的依赖注入,可以方便地帮助你获取数据库会话和查询数据。 - -## 数据库会话 - -### AsyncSession - -新数据库会话,常用于有独立的数据库操作逻辑的插件。 - -```python {13,26} -from nonebot import on_message -from nonebot.params import Depends -from nonebot_plugin_orm import AsyncSession, Model, async_scoped_session -from sqlalchemy.orm import Mapped, mapped_column - -message = on_message() - - -class Message(Model): - id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True) - - -async def get_message(session: AsyncSession) -> Message: - # 等价于 session = get_session() - async with session: - msg = Message() - - session.add(msg) - await session.commit() - await session.refresh(msg) - - return msg - - -@message.handle() -async def _(session: async_scoped_session, msg: Message = Depends(get_message)): - await session.rollback() # 无法回退 get_message() 中的更改 - await message.send(str(msg.id)) # msg 被存储,msg.id 递增 -``` - -### async_scoped_session - -数据库作用域会话,常用于事件响应器和有与响应逻辑相关的数据库操作逻辑的插件。 - -```python {13,26} -from nonebot import on_message -from nonebot.params import Depends -from nonebot_plugin_orm import Model, async_scoped_session -from sqlalchemy.orm import Mapped, mapped_column - -message = on_message() - - -class Message(Model): - id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True) - - -async def get_message(session: async_scoped_session) -> Message: - # 等价于 session = get_scoped_session() - msg = Message() - - session.add(msg) - await session.flush() - await session.refresh(msg) - - return msg - - -@message.handle() -async def _(session: async_scoped_session, msg: Message = Depends(get_message)): - await session.rollback() # 可以回退 get_message() 中的更改 - await message.send(str(msg.id)) # msg 没有被存储,msg.id 不变 -``` - -## 查询数据 - -### Model - -支持类作为依赖。 - -```python -from typing import Annotated - -from nonebot.params import Depends -from nonebot_plugin_orm import Model -from sqlalchemy.orm import Mapped, mapped_column - - -def get_id() -> int: ... - - -class Message(Model): - id: Annotated[Mapped[int], Depends(get_id)] = mapped_column( - primary_key=True, autoincrement=True - ) - - -async def _(msg: Message): - # 等价于 msg = ( - # await (await session.stream(select(Message).where(Message.id == get_id()))) - # .scalars() - # .one_or_none() - # ) - ... -``` - -### SQLDepends - -参数为一个 SQL 语句,决定依赖注入的内容,SQL 语句中可以使用子依赖。 - -```python {11-13} -from nonebot.params import Depends -from nonebot_plugin_orm import Model, SQLDepends -from sqlalchemy import select - - -def get_id() -> int: ... - - -async def _( - model: Model = SQLDepends(select(Model).where(Model.id == Depends(get_id))), -): ... -``` - -参数可以是任意 SQL 语句,但不建议使用 `select` 以外的语句,因为语句可能没有返回值(`returning` 除外),而且代码不清晰。 - -### 类型标注 - -类型标注决定依赖注入的数据结构,主要影响以下几个层面: - -- 迭代器(`session.execute()`)或异步迭代器(`session.stream()`) -- 标量(`session.execute().scalars()`)或元组(`session.execute()`) -- 一个(`session.execute().one_or_none()`,注意 `None` 时可能触发 [重载](../../../appendices/overload#重载))或全部(`session.execute()` / `session.execute().all()`) -- 连续(`session().execute()`)或分块(`session.execute().partitions()`) - -具体如下(可以使用父类型作为类型标注): - -- ```python - async def _(rows_partitions: AsyncIterator[Sequence[Tuple[Model, ...]]]): - # 等价于 rows_partitions = await (await session.stream(sql).partitions()) - - async for partition in rows_partitions: - for row in partition: - print(row[0], row[1], ...) - ``` - -- ```python - async def _(model_partitions: AsyncIterator[Sequence[Model]]): - # 等价于 model_partitions = await (await session.stream(sql).scalars().partitions()) - - async for partition in model_partitions: - for model in partition: - print(model) - ``` - -- ```python - async def _(row_partitions: Iterator[Sequence[Tuple[Model, ...]]]): - # 等价于 row_partitions = await session.execute(sql).partitions() - - for partition in rows_partitions: - for row in partition: - print(row[0], row[1], ...) - ``` - -- ```python - async def _(model_partitions: Iterator[Sequence[Model]]): - # 等价于 model_partitions = await (await session.execute(sql).scalars().partitions()) - - for partition in model_partitions: - for model in partition: - print(model) - ``` - -- ```python - async def _(rows: sa_async.AsyncResult[Tuple[Model, ...]]): - # 等价于 rows = await session.stream(sql) - - async for row in rows: - print(row[0], row[1], ...) - ``` - -- ```python - async def _(models: sa_async.AsyncScalarResult[Model]): - # 等价于 models = await session.stream(sql).scalars() - - async for model in models: - print(model) - ``` - -- ```python - async def _(rows: sa.Result[Tuple[Model, ...]]): - # 等价于 rows = await session.execute(sql) - - for row in rows: - print(row[0], row[1], ...) - ``` - -- ```python - async def _(models: sa.ScalarResult[Model]): - # 等价于 models = await session.execute(sql).scalars() - - for model in models: - print(model) - ``` - -- ```python - async def _(rows: Sequence[Tuple[Model, ...]]): - # 等价于 rows = await (await session.stream(sql).all()) - - for row in rows: - print(row[0], row[1], ...) - ``` - -- ```python - async def _(models: Sequence[Model]): - # 等价于 models = await (await session.stream(sql).scalars().all()) - - for model in models: - print(model) - ``` - -- ```python - async def _(row: Tuple[Model, ...]): - # 等价于 row = await (await session.stream(sql).one_or_none()) - - print(row[0], row[1], ...) - ``` - -- ```python - async def _(model: Model): - # 等价于 model = await (await session.stream(sql).scalars().one_or_none()) - - print(model) - ``` diff --git a/website/versioned_docs/version-2.3.2/best-practice/database/developer/test.md b/website/versioned_docs/version-2.3.2/best-practice/database/developer/test.md deleted file mode 100644 index 654ee7234aea..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/database/developer/test.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -sidebar_position: 2 -description: 测试 ---- - -# 测试 - -百思不如一试,测试是发现问题的最佳方式。 - -不同的用户会有不同的配置,为了提高项目的兼容性,我们需要在不同数据库后端上测试。 -手动进行大量的、重复的测试不可靠,也不现实,因此我们推荐使用 [GitHub Actions](https://github.com/features/actions) 进行自动化测试: - -```yaml title=.github/workflows/test.yml {12-42,52-53} showLineNumbers -name: Test - -on: - push: - branches: - - main - -jobs: - test: - runs-on: ubuntu-latest - - strategy: - matrix: - db: - - sqlite+aiosqlite:///db.sqlite3 - - postgresql+psycopg://postgres:postgres@localhost:5432/postgres - - mysql+aiomysql://mysql:mysql@localhost:3306/mymysql - - fail-fast: false - - env: - SQLALCHEMY_DATABASE_URL: ${{ matrix.db }} - - services: - postgresql: - image: ${{ startsWith(matrix.db, 'postgresql') && 'postgres' || '' }} - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - ports: - - 5432:5432 - - mysql: - image: ${{ startsWith(matrix.db, 'mysql') && 'mysql' || '' }} - env: - MYSQL_ROOT_PASSWORD: mysql - MYSQL_USER: mysql - MYSQL_PASSWORD: mysql - MYSQL_DATABASE: mymysql - ports: - - 3306:3306 - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Run migrations - run: pipx run nb-cli orm upgrade - - - name: Run tests - run: pytest -``` - -如果项目还需要考虑跨平台和跨 Python 版本兼容,测试矩阵中还需要增加这两个维度。 -但是,我们没必要在所有平台和 Python 版本上运行所有数据库的测试,因为很显然,PostgreSQL 和 MySQL 这类独立的数据库后端不会受平台和 Python 影响,而且 Github Actions 的非 Linux 平台不支持运行独立服务: - -| | Python 3.9 | Python 3.10 | Python 3.11 | Python 3.12 | -| ----------- | ---------- | ----------- | ----------- | --------------------------- | -| **Linux** | SQLite | SQLite | SQLite | SQLite / PostgreSQL / MySQL | -| **Windows** | SQLite | SQLite | SQLite | SQLite | -| **macOS** | SQLite | SQLite | SQLite | SQLite | - -```yaml title=.github/workflows/test.yml {12-24} showLineNumbers -name: Test - -on: - push: - branches: - - main - -jobs: - test: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.9", "3.10", "3.11", "3.12"] - db: ["sqlite+aiosqlite:///db.sqlite3"] - - include: - - os: ubuntu-latest - python-version: "3.12" - db: postgresql+psycopg://postgres:postgres@localhost:5432/postgres - - os: ubuntu-latest - python-version: "3.12" - db: mysql+aiomysql://mysql:mysql@localhost:3306/mymysql - - fail-fast: false - - env: - SQLALCHEMY_DATABASE_URL: ${{ matrix.db }} - - services: - postgresql: - image: ${{ startsWith(matrix.db, 'postgresql') && 'postgres' || '' }} - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - ports: - - 5432:5432 - - mysql: - image: ${{ startsWith(matrix.db, 'mysql') && 'mysql' || '' }} - env: - MYSQL_ROOT_PASSWORD: mysql - MYSQL_USER: mysql - MYSQL_PASSWORD: mysql - MYSQL_DATABASE: mymysql - ports: - - 3306:3306 - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Run migrations - run: pipx run nb-cli orm upgrade - - - name: Run tests - run: pytest -``` diff --git a/website/versioned_docs/version-2.3.2/best-practice/database/user.md b/website/versioned_docs/version-2.3.2/best-practice/database/user.md deleted file mode 100644 index 9bfc0ada6674..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/database/user.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -sidebar_position: 2 -description: 用户指南 ---- - -# 用户指南 - -`nonebot-plugin-orm` 功能强大且复杂,使用上有一定难度。 -不过,对于用户而言,只需要掌握部分功能即可。 - -:::caution 注意 -请注意区分插件的项目名(如:`nonebot-plugin-wordcloud`)和模块名(如:`nonebot_plugin_wordcloud`)。`nonebot-plugin-orm` 中统一使用插件模块名。参见 [插件命名规范](../../developer/plugin-publishing#插件命名规范)。 -::: - -## 示例 - -### 创建新机器人 - -我们想要创建一个机器人,并安装 `nonebot-plugin-wordcloud` 插件,只需要执行以下命令: - -```shell -nb init # 初始化项目文件夹 - -pip install nonebot-plugin-orm[sqlite] # 安装 nonebot-plugin-orm,并附带 SQLite 支持 - -nb plugin install nonebot-plugin-wordcloud # 安装插件 - -# nb orm heads # 查看有什么插件使用到了数据库(可选) - -nb orm upgrade # 升级数据库 - -# nb orm check # 检查一下数据库模式是否与模型定义一致(可选) - -nb run # 启动机器人 -``` - -### 卸载插件 - -我们已经安装了 `nonebot-plugin-wordcloud` 插件,但是现在想要卸载它,并且**删除它的数据**,只需要执行以下命令: - -```shell -nb plugin uninstall nonebot-plugin-wordcloud # 卸载插件 - -# nb orm heads # 查看有什么插件使用到了数据库。(可选) - -nb orm downgrade nonebot_plugin_wordcloud@base # 降级数据库,删除数据 - -# nb orm check # 检查一下数据库模式是否与模型定义一致(可选) -``` - -## CLI - -接下来,让我们了解下示例中出现的 CLI 命令的含义: - -### heads - -显示所有的分支头。一般一个分支对应一个插件。 - -```shell -nb orm heads -``` - -输出格式为 `<迁移 ID> (<插件模块名>) (<头部类型>)`: - -``` -46327b837dd8 (nonebot_plugin_chatrecorder) (head) -9492159f98f7 (nonebot_plugin_user) (head) -71a72119935f (nonebot_plugin_session_orm) (effective head) -ade8cdca5470 (nonebot_plugin_wordcloud) (head) -``` - -### upgrade - -升级数据库。每次安装新的插件或更新插件版本后,都需要执行此命令。 - -```shell -nb orm upgrade <插件模块名>@<迁移 ID> -``` - -其中,`<插件模块名>@<迁移 ID>` 是可选参数。如果不指定,则会将所有分支升级到最新版本,这也是最常见的用法: - -```shell -nb orm upgrade -``` - -### downgrade - -降级数据库。当需要回滚插件版本或删除插件时,可以执行此命令。 - -```shell -nb orm downgrade <插件模块名>@<迁移 ID> -``` - -其中,`<迁移 ID>` 也可以是 `base`,即回滚到初始状态。常用于卸载插件后删除其数据: - -```shell -nb orm downgrade <插件模块名>@base -``` - -### check - -检查数据库模式是否与模型定义一致。机器人启动前会自动运行此命令(`ALEMBIC_STARTUP_CHECK=true` 时),并在检查失败时阻止启动。 - -```shell -nb orm check -``` - -## 配置 - -### sqlalchemy_database_url - -默认数据库连接 URL。参见 [数据库驱动和后端](.#数据库驱动和后端) 和 [引擎配置 — SQLAlchemy 2.0 文档](https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls)。 - -```shell -SQLALCHEMY_DATABASE_URL=dialect+driver://username:password@host:port/database -``` - -### sqlalchemy_bind - -bind keys(一般为插件模块名)到数据库连接 URL、[`create_async_engine()`](https://docs.sqlalchemy.org/en/20/orm/extensions/asyncio.html#sqlalchemy.ext.asyncio.create_async_engine) 参数字典或 [`AsyncEngine`](https://docs.sqlalchemy.org/en/20/orm/extensions/asyncio.html#sqlalchemy.ext.asyncio.AsyncEngine) 实例的字典。 -例如,我们想要让 `nonebot-plugin-wordcloud` 插件使用一个 SQLite 数据库,并开启 [Echo 选项](https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine.params.echo) 便于 debug,而其他插件使用默认的 PostgreSQL 数据库,可以这样配置: - -```shell -SQLALCHEMY_BINDS='{ - "": "postgresql+psycopg://scott:tiger@localhost/mydatabase", - "nonebot_plugin_wordcloud": { - "url": "sqlite+aiosqlite://", - "echo": true - } -}' -``` - -### sqlalchemy_engine_options - -[`create_async_engine()`](https://docs.sqlalchemy.org/en/20/orm/extensions/asyncio.html#sqlalchemy.ext.asyncio.create_async_engine) 默认参数字典。 - -```shell -SQLALCHEMY_ENGINE_OPTIONS='{ - "pool_size": 5, - "max_overflow": 10, - "pool_timeout": 30, - "pool_recycle": 3600, - "echo": true -}' -``` - -### sqlalchemy_echo - -开启 [Echo 选项](https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine.params.echo) 和 [Echo Pool 选项](https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine.params.echo_pool) 便于 debug。 - -```shell -SQLALCHEMY_ECHO=true -``` - -:::caution 注意 -以上配置之间有覆盖关系,遵循特殊优先于一般的原则,具体为 [`sqlalchemy_database_url`](#sqlalchemy_database_url) > [`sqlalchemy_bind`](#sqlalchemy_bind) > [`sqlalchemy_echo`](#sqlalchemy_echo) > [`sqlalchemy_engine_options`](#sqlalchemy_engine_options)。 -但覆盖顺序并非显而易见,出于清晰考虑,请只配置必要的选项。 -::: diff --git a/website/versioned_docs/version-2.3.2/best-practice/deployment.mdx b/website/versioned_docs/version-2.3.2/best-practice/deployment.mdx deleted file mode 100644 index 8c33520b4f7f..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/deployment.mdx +++ /dev/null @@ -1,299 +0,0 @@ ---- -sidebar_position: 3 -description: 部署你的机器人 ---- - -# 部署 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -在编写完成各类插件后,我们需要长期运行机器人来使得用户能够正常使用。通常,我们会使用云服务器来部署机器人。 - -我们在开发插件时,机器人运行的环境称为开发环境;而在部署后,机器人运行的环境称为生产环境。与开发环境不同的是,在生产环境中,开发者通常不能随意地修改/添加/删除代码,开启或停止服务。 - -## 部署前准备 - -### 项目依赖管理 - -由于部署后的机器人运行在生产环境中,因此,为确保机器人能够正常运行,我们需要保证机器人的运行环境与开发环境一致。我们可以通过以下几种方式来进行依赖管理: - - - - -[Poetry](https://python-poetry.org/) 是一个 Python 项目的依赖管理工具。它可以通过声明项目所依赖的库,为你管理(安装/更新)它们。Poetry 提供了一个 `poetry.lock` 文件,以确保可重复安装,并可以构建用于分发的项目。 - -Poetry 会在安装依赖时自动生成 `poetry.lock` 文件,在**项目目录**下执行以下命令: - -```bash -# 初始化 poetry 配置 -poetry init -# 添加项目依赖,这里以 nonebot2[fastapi] 为例 -poetry add nonebot2[fastapi] -``` - - - - -[PDM](https://pdm.fming.dev/) 是一个现代 Python 项目的依赖管理工具。它采用 [PEP621](https://www.python.org/dev/peps/pep-0621/) 标准,依赖解析快速;同时支持 [PEP582](https://www.python.org/dev/peps/pep-0582/) 和 [virtualenv](https://virtualenv.pypa.io/)。PDM 提供了一个 `pdm.lock` 文件,以确保可重复安装,并可以构建用于分发的项目。 - -PDM 会在安装依赖时自动生成 `pdm.lock` 文件,在**项目目录**下执行以下命令: - -```bash -# 初始化 pdm 配置 -pdm init -# 添加项目依赖,这里以 nonebot2[fastapi] 为例 -pdm add nonebot2[fastapi] -``` - - - - -[pip](https://pip.pypa.io/) 是 Python 包管理工具。他并不是一个依赖管理工具,为了尽可能保证环境的一致性,我们可以使用 `requirements.txt` 文件来声明依赖。 - -```bash -pip freeze > requirements.txt -``` - - - - -### 安装 Docker - -[Docker](https://www.docker.com/) 是一个应用容器引擎,可以让开发者打包应用以及依赖包到一个可移植的镜像中,然后发布到服务器上。 - -我们可以参考 [Docker 官方文档](https://docs.docker.com/get-docker/) 来安装 Docker 。 - -在 Linux 上,我们可以使用以下一键脚本来安装 Docker 以及 Docker Compose Plugin: - -```bash -curl -fsSL https://get.docker.com | sh -s -- --mirror Aliyun -``` - -在 Windows/macOS 上,我们可以使用 [Docker Desktop](https://docs.docker.com/desktop/) 来安装 Docker 以及 Docker Compose Plugin。 - -### 安装脚手架 Docker 插件 - -我们可以使用 [nb-cli-plugin-docker](https://github.com/nonebot/cli-plugin-docker) 来快速部署机器人。 - -插件可以帮助我们生成配置文件并构建 Docker 镜像,以及启动/停止/重启机器人。使用以下命令安装脚手架 Docker 插件: - -```bash -nb self install nb-cli-plugin-docker -``` - -## Docker 部署 - -### 快速部署 - -使用脚手架命令即可一键生成配置并部署: - -```bash -nb docker up -``` - -当看到 `Running` 字样时,说明机器人已经启动成功。我们可以通过以下命令来查看机器人的运行日志: - - - - -```bash -nb docker logs -``` - - - - -```bash -docker compose logs -``` - - - - -如果需要停止机器人,我们可以使用以下命令: - - - - -```bash -nb docker down -``` - - - - -```bash -docker compose down -``` - - - - -### 自定义部署 - -在部分情况下,我们需要事先生成 Docker 配置文件,再到生产环境进行部署;或者自动生成的配置文件并不能满足复杂场景,需要根据实际需求手动修改配置文件。我们可以使用以下命令来生成基础配置文件: - -```bash -nb docker generate -``` - -nb-cli 将会在项目目录下生成 `docker-compose.yml` 和 `Dockerfile` 等配置文件。在 nb-cli 完成配置文件的生成后,我们可以根据部署环境的实际情况使用 nb-cli 或者 Docker Compose 来启动机器人。 - -我们可以参考 [Dockerfile 文件规范](https://docs.docker.com/engine/reference/builder/)和 [Compose 文件规范](https://docs.docker.com/compose/compose-file/)修改这两个文件。 - -修改完成后我们可以直接启动或者手动构建镜像: - - - - -```bash -# 启动机器人 -nb docker up -# 手动构建镜像 -nb docker build -``` - - - - -```bash -# 启动机器人 -docker compose up -d -# 手动构建镜像 -docker compose build -``` - - - - -### 持续集成 - -我们可以使用 GitHub Actions 来实现持续集成(CI),我们只需要在 GitHub 上发布 Release 即可自动构建镜像并推送至镜像仓库。 - -首先,我们需要在 [Docker Hub](https://hub.docker.com/) (或者其他平台,如:[GitHub Packages](https://github.com/features/packages)、[阿里云容器镜像服务](https://www.alibabacloud.com/zh/product/container-registry)等)上创建镜像仓库,用于存放镜像。 - -前往项目仓库的 `Settings` > `Secrets` > `actions` 栏目 `New Repository Secret` 添加构建所需的密钥: - -- `DOCKERHUB_USERNAME`: 你的 Docker Hub 用户名 -- `DOCKERHUB_TOKEN`: 你的 Docker Hub PAT([创建方法](https://docs.docker.com/docker-hub/access-tokens/)) - -将以下文件添加至**项目目录**下的 `.github/workflows/` 目录下,并将文件中高亮行中的仓库名称替换为你的仓库名称: - -```yaml title=.github/workflows/build.yml -name: Docker Hub Release - -on: - push: - tags: - - "v*" - -jobs: - docker: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Setup Docker - uses: docker/setup-buildx-action@v2 - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Generate Tags - uses: docker/metadata-action@v4 - id: metadata - with: - images: | - # highlight-next-line - {organization}/{repository} - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=sha - - - name: Build and Publish - uses: docker/build-push-action@v4 - with: - context: . - push: true - tags: ${{ steps.metadata.outputs.tags }} - labels: ${{ steps.metadata.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max -``` - -### 持续部署 - -在完成发布并构建镜像后,我们可以自动将镜像部署到服务器上。 - -前往项目仓库的 `Settings` > `Secrets` > `actions` 栏目 `New Repository Secret` 添加部署所需的密钥: - -- `DEPLOY_HOST`: 部署服务器的 SSH 地址 -- `DEPLOY_USER`: 部署服务器用户名 -- `DEPLOY_KEY`: 部署服务器私钥([创建方法](https://github.com/appleboy/ssh-action#setting-up-a-ssh-key)) -- `DEPLOY_PATH`: 部署服务器上的项目路径 - -将以下文件添加至**项目目录**下的 `.github/workflows/` 目录下,在构建成功后触发部署: - -```yaml title=.github/workflows/deploy.yml -name: Deploy - -on: - workflow_run: - workflows: - - Docker Hub Release - types: - - completed - -jobs: - deploy: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - name: Start Deployment - uses: bobheadxi/deployments@v1 - id: deployment - with: - step: start - token: ${{ secrets.GITHUB_TOKEN }} - env: bot - - - name: Run Remote SSH Command - uses: appleboy/ssh-action@master - env: - DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }} - with: - host: ${{ secrets.DEPLOY_HOST }} - username: ${{ secrets.DEPLOY_USER }} - key: ${{ secrets.DEPLOY_KEY }} - envs: DEPLOY_PATH - script: | - cd $DEPLOY_PATH - docker compose up -d --pull always - - - name: update deployment status - uses: bobheadxi/deployments@v0.6.2 - if: always() - with: - step: finish - token: ${{ secrets.GITHUB_TOKEN }} - status: ${{ job.status }} - env: ${{ steps.deployment.outputs.env }} - deployment_id: ${{ steps.deployment.outputs.deployment_id }} -``` - -将上一部分的 `docker-compose.yml` 文件以及 `.env.prod` 配置文件添加至 `DEPLOY_PATH` 目录下,并修改 `docker-compose.yml` 文件中的镜像配置,替换为 Docker Hub 的仓库名称: - -```diff -- build: . -+ image: {organization}/{repository}:latest -``` diff --git a/website/versioned_docs/version-2.3.2/best-practice/error-tracking.md b/website/versioned_docs/version-2.3.2/best-practice/error-tracking.md deleted file mode 100644 index a28a22d152a5..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/error-tracking.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -sidebar_position: 2 -description: 使用 sentry 进行错误跟踪 ---- - -# 错误跟踪 - -在应用实际运行过程中,可能会出现各种各样的错误。可能是由于代码逻辑错误,也可能是由于用户输入错误,甚至是由于第三方服务的错误。这些错误都会导致应用的运行出现问题,这时候就需要对错误进行跟踪,以便及时发现问题并进行修复。NoneBot 提供了 `nonebot-plugin-sentry` 插件,支持 [sentry](https://sentry.io/) 平台,可以方便地进行错误跟踪。 - -## 安装插件 - -在使用前请先安装 `nonebot-plugin-sentry` 插件至项目环境中,可参考[获取商店插件](../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如: - -在**项目目录**下执行以下命令: - -```bash -nb plugin install nonebot-plugin-sentry -``` - -## 使用插件 - -在安装完成之后,仅需要对插件进行简单的配置即可使用。 - -### 获取 sentry DSN - -前往 [sentry](https://sentry.io/) 平台,注册并创建一个新的项目,然后在项目设置中找到 `Client Keys (DSN)`,复制其中的 `DSN` 值。 - -### 配置插件 - -:::caution 注意 -错误跟踪通常在生产环境中使用,因此开发环境中 `sentry_dsn` 留空即会停用插件。 -::: - -在项目 dotenv 配置文件中添加以下配置即可使用: - -```dotenv -SENTRY_DSN= -``` - -## 配置项 - -配置项具体含义参考 [Sentry Docs](https://docs.sentry.io/platforms/python/configuration/options/)。 - -- `sentry_dsn: str` -- `sentry_debug: bool = False` -- `sentry_release: str | None = None` -- `sentry_release: str | None = None` -- `sentry_environment: str | None = nonebot env` -- `sentry_server_name: str | None = None` -- `sentry_sample_rate: float = 1.` -- `sentry_max_breadcrumbs: int = 100` -- `sentry_attach_stacktrace: bool = False` -- `sentry_send_default_pii: bool = False` -- `sentry_in_app_include: List[str] = Field(default_factory=list)` -- `sentry_in_app_exclude: List[str] = Field(default_factory=list)` -- `sentry_request_bodies: str = "medium"` -- `sentry_with_locals: bool = True` -- `sentry_ca_certs: str | None = None` -- `sentry_before_send: Callable[[Any, Any], Any | None] | None = None` -- `sentry_before_breadcrumb: Callable[[Any, Any], Any | None] | None = None` -- `sentry_transport: Any | None = None` -- `sentry_http_proxy: str | None = None` -- `sentry_https_proxy: str | None = None` -- `sentry_shutdown_timeout: int = 2` diff --git a/website/versioned_docs/version-2.3.2/best-practice/multi-adapter.mdx b/website/versioned_docs/version-2.3.2/best-practice/multi-adapter.mdx deleted file mode 100644 index 5afb42ad4fa7..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/multi-adapter.mdx +++ /dev/null @@ -1,183 +0,0 @@ ---- -sidebar_position: 4 -description: 插件跨平台支持 ---- - -# 插件跨平台支持 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -由于不同平台的事件与接口之间,存在着极大的差异性,NoneBot 通过[重载](../appendices/overload.md)的方式,使得插件可以在不同平台上正确响应。但为了减少跨平台的兼容性问题,我们应该尽可能的使用基类方法实现原生跨平台,而不是使用特定平台的方法。当基类方法无法满足需求时,我们可以使用依赖注入的方式,将特定平台的事件或机器人注入到事件处理函数中,实现针对特定平台的处理。 - -:::tip 提示 -如果需要在多平台上**使用**跨平台插件,首先应该根据[注册适配器](../advanced/adapter.md#注册适配器)一节,为机器人注册各平台对应的适配器。 -::: - -## 基于基类的跨平台 - -在[事件通用信息](../advanced/adapter.md#获取事件通用信息)中,我们了解了事件基类能够提供的通用信息。同时,[事件响应器操作](../appendices/session-control.mdx#更多事件响应器操作)也为我们提供了基本的用户交互方式。使用这些方法,可以让我们的插件运行在任何平台上。例如,一个简单的命令处理插件: - -```python {5,11} -from nonebot import on_command -from nonebot.adapters import Event - -async def is_blacklisted(event: Event) -> bool: - return event.get_user_id() not in BLACKLIST - -weather = on_command("天气", rule=is_blacklisted, priority=10, block=True) - -@weather.handle() -async def handle_function(): - await weather.finish("今天的天气是...") -``` - -由于此插件仅使用了事件通用信息和事件响应器操作的纯文本交互方式,这些方法不使用特定平台的信息或接口,因此是原生跨平台的,并不需要额外处理。但在一些较为复杂的需求下,例如发送图片消息时,并非所有平台都具有统一的接口,因此基类便无能为力,我们需要引入特定平台的适配器了。 - -## 基于重载的跨平台 - -重载是 NoneBot 跨平台操作的核心,在[事件类型与重载](../appendices/overload.md#重载)一节中,我们初步了解了如何通过类型注解来实现针对不同平台事件的处理方式。在[依赖注入](../advanced/dependency.mdx)一节中,我们又对依赖注入的使用方法进行了详细的介绍。结合这两节内容,我们可以实现更复杂的跨平台操作。 - -### 处理近似事件 - -对于一系列**差异不大**的事件,我们往往具有相同的处理逻辑。这时,我们不希望将相同的逻辑编写两遍,而应该复用代码,以实现在同一个事件处理函数中处理多个近似事件。我们可以使用[事件重载](../advanced/dependency.mdx#Event)的特性来实现这一功能。例如: - - - - -```python -from nonebot import on_command -from nonebot.adapters import Message -from nonebot.params import CommandArg -from nonebot.adapters.onebot.v11 import MessageEvent as OnebotV11MessageEvent -from nonebot.adapters.onebot.v12 import MessageEvent as OnebotV12MessageEvent - -echo = on_command("echo", priority=10, block=True) - -@echo.handle() -async def handle_function(event: OnebotV11MessageEvent | OnebotV12MessageEvent, args: Message = CommandArg()): - await echo.finish(args) -``` - - - - -```python -from typing import Union - -from nonebot import on_command -from nonebot.adapters import Message -from nonebot.params import CommandArg -from nonebot.adapters.onebot.v11 import MessageEvent as OnebotV11MessageEvent -from nonebot.adapters.onebot.v12 import MessageEvent as OnebotV12MessageEvent - -echo = on_command("echo", priority=10, block=True) - -@echo.handle() -async def handle_function(event: Union[OnebotV11MessageEvent, OnebotV12MessageEvent], args: Message = CommandArg()): - await echo.finish(args) -``` - - - - -### 在依赖注入中使用重载 - -NoneBot 依赖注入系统提供了自定义子依赖的方法,子依赖的类型同样会影响到事件处理函数的重载行为。例如: - -```python -from datetime import datetime - -from nonebot import on_command -from nonebot.adapters.console import MessageEvent - -echo = on_command("echo", priority=10, block=True) - -def get_event_time(event: MessageEvent): - return event.time - -# 处理控制台消息事件 -@echo.handle() -async def handle_function(time: datetime = Depends(get_event_time)): - await echo.finish(time.strftime("%Y-%m-%d %H:%M:%S")) -``` - -示例中 ,我们为 `handle_function` 事件处理函数注入了自定义的 `get_event_time` 子依赖,而此子依赖注入参数为 Console 适配器的 `MessageEvent`。因此 `handle_function` 仅会响应 Console 适配器的 `MessageEvent` ,而不能响应其他事件。 - -### 处理多平台事件 - -不同平台的事件之间,往往存在着极大的差异性。为了满足我们插件的跨平台运行,通常我们需要抽离业务逻辑,以保证代码的复用性。一个合理的做法是,在事件响应器的处理流程中,首先先针对不同平台的事件分别进行处理,提取出核心业务逻辑所需要的信息;然后再将这些信息传递给业务逻辑处理函数;最后将业务逻辑的输出以各平台合适的方式返回给用户。也就是说,与平台绑定的处理部分应该与平台无关部分尽量分离。例如: - -```python -import inspect - -from nonebot import on_command -from nonebot.typing import T_State -from nonebot.matcher import Matcher -from nonebot.adapters import Message -from nonebot.params import CommandArg, ArgPlainText -from nonebot.adapters.console import Bot as ConsoleBot -from nonebot.adapters.onebot.v11 import Bot as OnebotBot -from nonebot.adapters.console import MessageSegment as ConsoleMessageSegment - -weather = on_command("天气", priority=10, block=True) - -@weather.handle() -async def handle_function(matcher: Matcher, args: Message = CommandArg()): - if args.extract_plain_text(): - matcher.set_arg("location", args) - - -async def get_weather(state: T_State, location: str = ArgPlainText()): - if location not in ["北京", "上海", "广州", "深圳"]: - await weather.reject(f"你想查询的城市 {location} 暂不支持,请重新输入!") - - state["weather"] = "⛅ 多云 20℃~24℃" - - -# 处理控制台询问 -@weather.got( - "location", - prompt=ConsoleMessageSegment.emoji("question") + "请输入地名", - parameterless=[Depends(get_weather)], -) -async def handle_console(bot: ConsoleBot): - pass - -# 处理 OneBot 询问 -@weather.got( - "location", - prompt="请输入地名", - parameterless=[Depends(get_weather)], -) -async def handle_onebot(bot: OnebotBot): - pass - -# 通过依赖注入或事件处理函数来进行业务逻辑处理 - -# 处理控制台回复 -@weather.handle() -async def handle_console_reply(bot: ConsoleBot, state: T_State, location: str = ArgPlainText()): - await weather.send( - ConsoleMessageSegment.markdown( - inspect.cleandoc( - f""" - # {location} - - - 今天 - - {state['weather']} - """ - ) - ) - ) - -# 处理 OneBot 回复 -@weather.handle() -async def handle_onebot_reply(bot: OnebotBot, state: T_State, location: str = ArgPlainText()): - await weather.send(f"今天{location}的天气是{state['weather']}") -``` - -:::tip 提示 -NoneBot 社区中有一些插件,例如[all4one](https://github.com/nonepkg/nonebot-plugin-all4one)、[send-anything-anywhere](https://github.com/felinae98/nonebot-plugin-send-anything-anywhere),可以帮助你更好地处理跨平台功能,包括事件处理和消息发送等。 -::: diff --git a/website/versioned_docs/version-2.3.2/best-practice/scheduler.md b/website/versioned_docs/version-2.3.2/best-practice/scheduler.md deleted file mode 100644 index 229b27abba19..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/scheduler.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -sidebar_position: 0 -description: 定时执行任务 ---- - -# 定时任务 - -[APScheduler](https://apscheduler.readthedocs.io/en/3.x/) (Advanced Python Scheduler) 是一个 Python 第三方库,其强大的定时任务功能被广泛应用于各个场景。在 NoneBot 中,定时任务作为一个额外功能,依赖于基于 APScheduler 开发的 [`nonebot-plugin-apscheduler`](https://github.com/nonebot/plugin-apscheduler) 插件进行支持。 - -## 安装插件 - -在使用前请先安装 `nonebot-plugin-apscheduler` 插件至项目环境中,可参考[获取商店插件](../tutorial/store.mdx#安装插件)来了解并选择安装插件的方式。如: - -在**项目目录**下执行以下命令: - -```bash -nb plugin install nonebot-plugin-apscheduler -``` - -## 使用插件 - -`nonebot-plugin-apscheduler` 本质上是对 [APScheduler](https://apscheduler.readthedocs.io/en/3.x/) 进行了封装以适用于 NoneBot 开发,因此其使用方式与 APScheduler 本身并无显著区别。在此我们会简要介绍其调用方法,更多的使用方面的功能请参考[APScheduler 官方文档](https://apscheduler.readthedocs.io/en/3.x/userguide.html)。 - -### 导入调度器 - -由于 `nonebot_plugin_apscheduler` 作为插件,因此需要在使用前对其进行**加载**并**导入**其中的 `scheduler` 调度器来创建定时任务。使用 `require` 方法可轻松完成这一过程,可参考 [跨插件访问](../advanced/requiring.md) 一节进行了解。 - -```python -from nonebot import require - -require("nonebot_plugin_apscheduler") - -from nonebot_plugin_apscheduler import scheduler -``` - -### 添加定时任务 - -在 [APScheduler 官方文档](https://apscheduler.readthedocs.io/en/3.x/userguide.html#adding-jobs) 中提供了以下两种直接添加任务的方式: - -```python -from nonebot import require - -require("nonebot_plugin_apscheduler") - -from nonebot_plugin_apscheduler import scheduler - -# 基于装饰器的方式 -@scheduler.scheduled_job("cron", hour="*/2", id="job_0", args=[1], kwargs={arg2: 2}) -async def run_every_2_hour(arg1: int, arg2: int): - pass - -# 基于 add_job 方法的方式 -def run_every_day(arg1: int, arg2: int): - pass - -scheduler.add_job( - run_every_day, "interval", days=1, id="job_1", args=[1], kwargs={arg2: 2} -) -``` - -:::caution 注意 -由于 APScheduler 的定时任务并不是**由事件响应器所触发的事件**,因此其任务函数无法同[事件处理函数](../tutorial/handler.mdx#事件处理函数)一样通过[依赖注入](../tutorial/event-data.mdx#认识依赖注入)获取上下文信息,也无法通过事件响应器对象的方法进行任何操作,因此我们需要使用[调用平台 API](../appendices/api-calling.mdx#调用平台-api)的方式来获取信息或收发消息。 - -相对于事件处理依赖而言,编写定时任务更像是编写普通的函数,需要我们自行获取信息以及发送信息,请**不要**将事件处理依赖的特殊语法用于定时任务! -::: - -关于 APScheduler 的更多使用方法,可以参考 [APScheduler 官方文档](https://apscheduler.readthedocs.io/en/3.x/index.html) 进行了解。 - -### 配置项 - -#### apscheduler_autostart - -- **类型**: `bool` -- **默认值**: `True` - -是否自动启动 `scheduler` ,若不启动需要自行调用 `scheduler.start()`。 - -#### apscheduler_log_level - -- **类型**: `int` -- **默认值**: `30` - -apscheduler 输出的日志等级 - -- `WARNING` = `30` (默认) -- `INFO` = `20` -- `DEBUG` = `10` (只有在开启 nonebot 的 debug 模式才会显示 debug 日志) - -#### apscheduler_config - -- **类型**: `dict` -- **默认值**: `{ "apscheduler.timezone": "Asia/Shanghai" }` - -`apscheduler` 的相关配置。参考[配置调度器](https://apscheduler.readthedocs.io/en/latest/userguide.html#scheduler-config), [配置参数](https://apscheduler.readthedocs.io/en/latest/modules/schedulers/base.html#apscheduler.schedulers.base.BaseScheduler) - -配置需要包含 `apscheduler.` 作为前缀,例如 `apscheduler.timezone`。 diff --git a/website/versioned_docs/version-2.3.2/best-practice/testing/README.mdx b/website/versioned_docs/version-2.3.2/best-practice/testing/README.mdx deleted file mode 100644 index 12853d960030..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/testing/README.mdx +++ /dev/null @@ -1,240 +0,0 @@ ---- -sidebar_position: 1 -description: 使用 NoneBug 进行单元测试 - -slug: /best-practice/testing/ ---- - -# 配置与测试事件响应器 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -> 在计算机编程中,单元测试(Unit Testing)又称为模块测试,是针对程序模块(软件设计的最小单位)来进行正确性检验的测试工作。 - -为了保证代码的正确运行,我们不仅需要对错误进行跟踪,还需要对代码进行正确性检验,也就是测试。NoneBot 提供了一个测试工具——NoneBug,它是一个 [pytest](https://docs.pytest.org/en/stable/) 插件,可以帮助我们便捷地进行单元测试。 - -:::tip 提示 -建议在阅读本文档前先阅读 [pytest 官方文档](https://docs.pytest.org/en/stable/)来了解 pytest 的相关术语和基本用法。 -::: - -## 安装 NoneBug - -在**项目目录**下激活虚拟环境后运行以下命令安装 NoneBug: - - - - -```bash -poetry add nonebug -G test -``` - - - - -```bash -pdm add nonebug -dG test -``` - - - - -```bash -pip install nonebug -``` - - - - -要运行 NoneBug 测试,还需要额外安装 pytest 异步插件 `pytest-asyncio` 或 `anyio` 以支持异步测试。文档中,我们以 `pytest-asyncio` 为例: - - - - -```bash -poetry add pytest-asyncio -G test -``` - - - - -```bash -pdm add pytest-asyncio -dG test -``` - - - - -```bash -pip install pytest-asyncio -``` - - - - -## 配置测试 - -在开始测试之前,我们需要对测试进行一些配置,以正确启动我们的机器人。 - -首先我们需要配置 pytest-asyncio,在 `pyproject.toml` 的 pytest 配置部分添加: - -```toml -[tool.pytest.ini_options] -asyncio_mode = "auto" -asyncio_default_fixture_loop_scope = "session" -``` - -然后,我们在 `tests` 目录下新建 `conftest.py` 文件,添加以下内容: - -```python title=tests/conftest.py -import pytest -import nonebot -from pytest_asyncio import is_async_test -# 导入适配器 -from nonebot.adapters.console import Adapter as ConsoleAdapter - -def pytest_collection_modifyitems(items: list[pytest.Item]): - pytest_asyncio_tests = (item for item in items if is_async_test(item)) - session_scope_marker = pytest.mark.asyncio(loop_scope="session") - for async_test in pytest_asyncio_tests: - async_test.add_marker(session_scope_marker, append=False) - -@pytest.fixture(scope="session", autouse=True) -async def after_nonebot_init(after_nonebot_init: None): - # 加载适配器 - driver = nonebot.get_driver() - driver.register_adapter(ConsoleAdapter) - - # 加载插件 - nonebot.load_from_toml("pyproject.toml") -``` - -这样,我们就可以在测试中使用机器人的插件了。通常,我们不需要自行初始化 NoneBot,NoneBug 已经为我们运行了 `nonebot.init()`。如果需要自定义 NoneBot 初始化的参数,我们可以在 `conftest.py` 中添加 `pytest_configure` 钩子函数。例如,我们可以修改 NoneBot 配置环境为 `test` 并从环境变量中输入配置: - -```python {4,6,8-10} title=tests/conftest.py -import os - -import pytest -from nonebug import NONEBOT_INIT_KWARGS - -os.environ["ENVIRONMENT"] = "test" - -def pytest_configure(config: pytest.Config): - config.stash[NONEBOT_INIT_KWARGS] = {"secret": os.getenv("INPUT_SECRET")} -``` - -NoneBug 默认也会为我们管理 lifespan 的 startup 与 shutdown。如果不希望 NoneBug 管理 lifespan,你可以在 `pytest_configure` 里添加以下配置: - -```python -import pytest -from nonebug import NONEBOT_START_LIFESPAN - -def pytest_configure(config: pytest.Config): - config.stash[NONEBOT_START_LIFESPAN] = False -``` - -## 编写插件测试 - -在配置完成插件加载后,我们就可以在测试中使用插件了。NoneBug 通过 pytest fixture `app` 提供各种测试方法,我们可以在测试中使用它来测试插件。现在,我们创建一个测试脚本来测试[深入指南](../../appendices/session-control.mdx)中编写的天气插件。首先,我们先要导入我们需要的模块: - -
- 插件示例 - -```python title=weather/__init__.py -from nonebot import on_command -from nonebot.rule import to_me -from nonebot.matcher import Matcher -from nonebot.adapters import Message -from nonebot.params import CommandArg, ArgPlainText - -weather = on_command("天气", rule=to_me(), aliases={"weather", "天气预报"}) - -@weather.handle() -async def handle_function(matcher: Matcher, args: Message = CommandArg()): - if args.extract_plain_text(): - matcher.set_arg("location", args) - -@weather.got("location", prompt="请输入地名") -async def got_location(location: str = ArgPlainText()): - if location not in ["北京", "上海", "广州", "深圳"]: - await weather.reject(f"你想查询的城市 {location} 暂不支持,请重新输入!") - await weather.finish(f"今天{location}的天气是...") -``` - -
- -```python {4,5,9,11-16} title=tests/test_weather.py -from datetime import datetime - -import pytest -from nonebug import App -from nonebot.adapters.console import User, Message, MessageEvent - -@pytest.mark.asyncio -async def test_weather(app: App): - from awesome_bot.plugins.weather import weather - - event = MessageEvent( - time=datetime.now(), - self_id="test", - message=Message("/天气 北京"), - user=User(id="user"), - ) -``` - -在上面的代码中,我们引入了 NoneBug 的测试 `App` 对象,以及必要的适配器消息与事件定义等。在测试函数 `test_weather` 中,我们导入了要进行测试的事件响应器 `weather`。请注意,由于需要等待 NoneBot 初始化并加载插件完毕,插件内容必须在**测试函数内部**进行导入。然后,我们创建了一个 `MessageEvent` 事件对象,它模拟了一个用户发送了 `/天气 北京` 的消息。接下来,我们使用 `app.test_matcher` 方法来测试 `weather` 事件响应器: - -```python {11-15} title=tests/test_weather.py -@pytest.mark.asyncio -async def test_weather(app: App): - from awesome_bot.plugins.weather import weather - - event = MessageEvent( - time=datetime.now(), - self_id="test", - message=Message("/天气 北京"), - user=User(id="user"), - ) - async with app.test_matcher(weather) as ctx: - bot = ctx.create_bot() - ctx.receive_event(bot, event) - ctx.should_call_send(event, "今天北京的天气是...", result=None) - ctx.should_finished(weather) -``` - -这里我们使用 `async with` 语句并通过参数指定要测试的事件响应器 `weather` 来进入测试上下文。在测试上下文中,我们可以使用 `ctx.create_bot` 方法创建一个虚拟的机器人实例,并使用 `ctx.receive_event` 方法来模拟机器人接收到消息事件。然后,我们就可以定义预期行为来测试机器人是否正确运行。在上面的代码中,我们使用 `ctx.should_call_send` 方法来断言机器人应该发送 `今天北京的天气是...` 这条消息,并且将发送函数的调用结果作为第三个参数返回给事件处理函数。如果断言失败,测试将会不通过。我们也可以使用 `ctx.should_finished` 方法来断言机器人应该结束会话。 - -为了测试更复杂的情况,我们可以为添加更多的测试用例。例如,我们可以测试用户输入了一个不支持的地名时机器人的反应: - -```python {17-21,23-26} title=tests/test_weather.py -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_weather(app: App): - from awesome_bot.plugins.weather import weather - - async with app.test_matcher(weather) as ctx: - ... # 省略前面的测试用例 - - async with app.test_matcher(weather) as ctx: - bot = ctx.create_bot() - event = make_event("/天气 南京") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "你想查询的城市 南京 暂不支持,请重新输入!", result=None) - ctx.should_rejected(weather) - - event = make_event("北京") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "今天北京的天气是...", result=None) - ctx.should_finished(weather) -``` - -在上面的代码中,我们使用 `ctx.should_rejected` 来断言机器人应该请求用户重新输入。然后,我们再次使用 `ctx.receive_event` 方法来模拟用户回复了 `北京`,并使用 `ctx.should_finished` 来断言机器人应该结束会话。 - -更多的 NoneBug 用法将在后续章节中介绍。 diff --git a/website/versioned_docs/version-2.3.2/best-practice/testing/_category_.json b/website/versioned_docs/version-2.3.2/best-practice/testing/_category_.json deleted file mode 100644 index d315ef117497..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/testing/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "单元测试", - "position": 5 -} diff --git a/website/versioned_docs/version-2.3.2/best-practice/testing/behavior.mdx b/website/versioned_docs/version-2.3.2/best-practice/testing/behavior.mdx deleted file mode 100644 index f54eeb669efb..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/testing/behavior.mdx +++ /dev/null @@ -1,292 +0,0 @@ ---- -sidebar_position: 2 -description: 测试事件响应、平台接口调用和会话控制 ---- - -# 测试事件响应与会话操作 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -在 NoneBot 接收到事件时,事件响应器根据优先级依次通过权限、响应规则来判断当前事件是否应该触发。事件响应流程中,机器人可能会通过 `send` 发送消息或者调用平台接口来执行预期的操作。因此,我们需要对这两种操作进行单元测试。 - -在上一节中,我们对单个事件响应器进行了简单测试。但是在实际场景中,机器人可能定义了多个事件响应器,由于优先级和响应规则的存在,预期的事件响应器可能并不会被触发。NoneBug 支持同时测试多个事件响应器,以此来测试机器人的整体行为。 - -## 测试事件响应 - -NoneBug 提供了六种定义 `Rule` 和 `Permission` 预期行为的方法: - -- `should_pass_rule` -- `should_not_pass_rule` -- `should_ignore_rule` -- `should_pass_permission` -- `should_not_pass_permission` -- `should_ignore_permission` - -:::tip 提示 -事件响应器类型的检查属于 `Permission` 的一部分,因此可以通过 `should_pass_permission` 和 `should_not_pass_permission` 方法来断言事件响应器类型的检查。 -::: - -下面我们根据插件示例来测试事件响应行为,我们首先定义两个事件响应器作为测试的对象: - -```python title=example.py -from nonebot import on_command - -def never_pass(): - return False - -foo = on_command("foo") -bar = on_command("bar", permission=never_pass) -``` - -在这两个事件响应器中,`foo` 当收到 `/foo` 消息时会执行,而 `bar` 则不会执行。我们使用 NoneBug 来测试它们: - - - - -```python {21,22,28,29} title=tests/test_example.py -from datetime import datetime - -import pytest -from nonebug import App -from nonebot.adapters.console import User, Message, MessageEvent - -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_example(app: App): - from awesome_bot.plugins.example import foo, bar - - async with app.test_matcher(foo) as ctx: - bot = ctx.create_bot() - event = make_event("/foo") - ctx.receive_event(bot, event) - ctx.should_pass_rule() - ctx.should_pass_permission() - - async with app.test_matcher(bar) as ctx: - bot = ctx.create_bot() - event = make_event("/foo") - ctx.receive_event(bot, event) - ctx.should_not_pass_rule() - ctx.should_not_pass_permission() -``` - -在上面的代码中,我们分别对 `foo` 和 `bar` 事件响应器进行响应测试。我们使用 `ctx.should_pass_rule` 和 `ctx.should_pass_permission` 断言 `foo` 事件响应器应该被触发,使用 `ctx.should_not_pass_rule` 和 `ctx.should_not_pass_permission` 断言 `bar` 事件响应器应该被忽略。 - - - - -```python title=tests/test_example.py -from datetime import datetime - -import pytest -from nonebug import App -from nonebot.adapters.console import User, Message, MessageEvent - -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_example(app: App): - from awesome_bot.plugins.example import foo, bar - - async with app.test_matcher() as ctx: - bot = ctx.create_bot() - event = make_event("/foo") - ctx.receive_event(bot, event) - ctx.should_pass_rule(foo) - ctx.should_pass_permission(foo) - ctx.should_not_pass_rule(bar) - ctx.should_not_pass_permission(bar) -``` - -在上面的代码中,我们对 `foo` 和 `bar` 事件响应器一起进行响应测试。我们使用 `ctx.should_pass_rule` 和 `ctx.should_pass_permission` 断言 `foo` 事件响应器应该被触发,使用 `ctx.should_not_pass_rule` 和 `ctx.should_not_pass_permission` 断言 `bar` 事件响应器应该被忽略。通过参数,我们可以指定断言的事件响应器。 - - - - -当然,如果需要忽略某个事件响应器的响应规则和权限检查,强行进入响应流程,我们可以使用 `should_ignore_rule` 和 `should_ignore_permission` 方法: - -```python {21,22} title=tests/test_example.py -from datetime import datetime - -import pytest -from nonebug import App -from nonebot.adapters.console import User, Message, MessageEvent - -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_example(app: App): - from awesome_bot.plugins.example import foo, bar - - async with app.test_matcher(bar) as ctx: - bot = ctx.create_bot() - event = make_event("/foo") - ctx.receive_event(bot, event) - ctx.should_ignore_rule(bar) - ctx.should_ignore_permission(bar) -``` - -在忽略了响应规则和权限检查之后,就会进入 `bar` 事件响应器的响应流程。 - -## 测试平台接口使用 - -上一节的示例插件测试中,我们已经尝试了测试插件对事件的消息回复。通常情况下,事件处理流程中对平台接口的使用会通过事件响应器操作或者调用平台 API 两种途径进行。针对这两种途径,NoneBug 分别提供了 `ctx.should_call_send` 和 `ctx.should_call_api` 方法来测试平台接口的使用情况。 - -1. `should_call_send` - - 定义事件响应器预期发送的消息,即通过[事件响应器操作 send](../../appendices/session-control.mdx#send)进行的操作。`should_call_send` 有四个参数: - - - `event`:回复的目标事件。 - - `message`:预期的消息对象,可以是 `str`、`Message` 或 `MessageSegment`。 - - `result`:send 的返回值,将会返回给插件。 - - `bot`(可选):发送消息的 bot 对象。 - - `**kwargs`:send 方法的额外参数。 - -2. `should_call_api` - 定义事件响应器预期调用的平台 API 接口,即通过[调用平台 API](../../appendices/api-calling.mdx#调用平台-API)进行的操作。`should_call_api` 有四个参数: - - - `api`:API 名称。 - - `data`:预期的请求数据。 - - `result`:call_api 的返回值,将会返回给插件。 - - `adapter`(可选):调用 API 的平台适配器对象。 - - `**kwargs`:call_api 方法的额外参数。 - -下面是一个使用 `should_call_send` 和 `should_call_api` 方法的示例: - -我们先定义一个测试插件,在响应流程中向用户发送一条消息并调用 `Console` 适配器的 `bell` API。 - -```python {8,9} title=example.py -from nonebot import on_command -from nonebot.adapters.console import Bot - -foo = on_command("foo") - -@foo.handle() -async def _(bot: Bot): - await foo.send("message") - await bot.bell() -``` - -然后我们对该插件进行测试: - -```python title=tests/test_example.py -from datetime import datetime - -import pytest -import nonebot -from nonebug import App -from nonebot.adapters.console import Bot, User, Adapter, Message, MessageEvent - -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_example(app: App): - from awesome_bot.plugins.example import foo - - async with app.test_matcher(foo) as ctx: - # highlight-start - adapter = nonebot.get_adapter(Adapter) - bot = ctx.create_bot(base=Bot, adapter=adapter) - # highlight-end - event = make_event("/foo") - ctx.receive_event(bot, event) - # highlight-start - ctx.should_call_send(event, "message", result=None, bot=bot) - ctx.should_call_api("bell", {}, result=None, adapter=adapter) - # highlight-end -``` - -请注意,对于在依赖注入中使用了非基类对象的情况,我们需要在 `create_bot` 方法中指定 `base` 和 `adapter` 参数,确保不会因为重载功能而出现非预期情况。 - -## 测试会话控制 - -在[会话控制](../../appendices/session-control.mdx)一节中,我们介绍了如何使用事件响应器操作来实现对用户的交互式会话。在上一节的示例插件测试中,我们其实已经使用了 `ctx.should_finished` 来断言会话结束。NoneBug 针对各种流程控制操作分别提供了相应的方法来定义预期的会话处理行为。它们分别是: - -- `should_finished`:断言会话结束,对应 `matcher.finish` 操作。 -- `should_rejected`:断言会话等待用户输入并重新执行当前事件处理函数,对应 `matcher.reject` 系列操作。 -- `should_paused`: 断言会话等待用户输入并执行下一个事件处理函数,对应 `matcher.pause` 操作。 - -我们仅需在测试用例中的正确位置调用这些方法,就可以断言会话的预期行为。例如: - -```python title=example.py -from nonebot import on_command -from nonebot.typing import T_State - -foo = on_command("foo") - -@foo.got("key", prompt="请输入密码") -async def _(state: T_State, key: str = ArgPlainText()): - if key != "some password": - try_count = state.get("try_count", 1) - if try_count >= 3: - await foo.finish("密码错误次数过多") - else: - state["try_count"] = try_count + 1 - await foo.reject("密码错误,请重新输入") - await foo.finish("密码正确") -``` - -```python title=tests/test_example.py -from datetime import datetime - -import pytest -from nonebug import App -from nonebot.adapters.console import User, Message, MessageEvent - -def make_event(message: str = "") -> MessageEvent: - return MessageEvent( - time=datetime.now(), - self_id="test", - message=Message(message), - user=User(id="user"), - ) - -@pytest.mark.asyncio -async def test_example(app: App): - from awesome_bot.plugins.example import foo - - async with app.test_matcher(foo) as ctx: - bot = ctx.create_bot() - event = make_event("/foo") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "请输入密码", result=None) - ctx.should_rejected(foo) - event = make_event("wrong password") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "密码错误,请重新输入", result=None) - ctx.should_rejected(foo) - event = make_event("wrong password") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "密码错误,请重新输入", result=None) - ctx.should_rejected(foo) - event = make_event("wrong password") - ctx.receive_event(bot, event) - ctx.should_call_send(event, "密码错误次数过多", result=None) - ctx.should_finished(foo) -``` diff --git a/website/versioned_docs/version-2.3.2/best-practice/testing/mock-network.md b/website/versioned_docs/version-2.3.2/best-practice/testing/mock-network.md deleted file mode 100644 index 8ed56b5c1a8d..000000000000 --- a/website/versioned_docs/version-2.3.2/best-practice/testing/mock-network.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -sidebar_position: 3 -description: 模拟网络通信以进行测试 ---- - -# 模拟网络通信 - -NoneBot 驱动器提供了多种方法来帮助适配器进行网络通信,主要包括客户端和服务端两种类型。模拟网络通信可以帮助我们更加接近实际机器人应用场景,进行更加真实的集成测试。同时,通过这种途径,我们还可以完成对适配器的测试。 - -NoneBot 中的网络通信主要包括以下几种: - -- HTTP 服务端(WebHook) -- WebSocket 服务端 -- HTTP 客户端 -- WebSocket 客户端 - -下面我们将分别介绍如何使用 NoneBug 来模拟这几种通信方式。 - -## 测试 HTTP 服务端 - -当 NoneBot 作为 ASGI 服务端应用时,我们可以定义一系列的路由来处理 HTTP 请求,适配器同样也可以通过定义路由来响应机器人相关的网络通信。下面假设我们使用了一个适配器 `fake` ,它定义了一个路由 `/fake/http` ,用于接收平台 WebHook 并处理。实际应用测试时,应将该路由地址替换为**真实适配器注册的路由地址**。 - -我们首先需要获取测试用模拟客户端: - -```python {5,6} title=tests/test_http_server.py -from nonebug import App - -@pytest.mark.asyncio -async def test_http_server(app: App): - async with app.test_server() as ctx: - client = ctx.get_client() -``` - -默认情况下,`app.test_server()` 会通过 `nonebot.get_asgi` 获取测试对象,我们也可以通过参数指定 ASGI 应用: - -```python -async with app.test_server(asgi=asgi_app) as ctx: - ... -``` - -获取到模拟客户端后,即可像 `requests`、`httpx` 等库类似的方法进行使用: - -```python {3,11-14,16} title=tests/test_http_server.py -import nonebot -from nonebug import App -from nonebot.adapters.fake import Adapter - -@pytest.mark.asyncio -async def test_http_server(app: App): - adapter = nonebot.get_adapter(Adapter) - - async with app.test_server() as ctx: - client = ctx.get_client() - response = await client.post("/fake/http", json={"bot_id": "fake"}) - assert response.status_code == 200 - assert response.json() == {"status": "success"} - assert "fake" in nonebot.get_bots() - - adapter.bot_disconnect(nonebot.get_bot("fake")) -``` - -在上面的测试中,我们向 `/fake/http` 发送了一个模拟 POST 请求,适配器将会对该请求进行处理,我们可以通过检查请求返回是否正确、Bot 对象是否创建等途径来验证机器人是否正确运行。在完成测试后,我们通常需要对 Bot 对象进行清理,以避免对其他测试产生影响。 - -## 测试 WebSocket 服务端 - -当 NoneBot 作为 ASGI 服务端应用时,我们还可以定义一系列的路由来处理 WebSocket 通信。下面假设我们使用了一个适配器 `fake` ,它定义了一个路由 `/fake/ws` ,用于处理平台 WebSocket 连接信息。实际应用测试时,应将该路由地址替换为**真实适配器注册的路由地址**。 - -我们同样需要通过 `app.test_server()` 获取测试用模拟客户端,这里就不再赘述。在获取到模拟客户端后,我们可以通过 `client.websocket_connect` 方法来模拟 WebSocket 连接: - -```python {3,11-15} title=tests/test_ws_server.py -import nonebot -from nonebug import App -from nonebot.adapters.fake import Adapter - -@pytest.mark.asyncio -async def test_ws_server(app: App): - adapter = nonebot.get_adapter(Adapter) - - async with app.test_server() as ctx: - client = ctx.get_client() - async with client.websocket_connect("/fake/ws") as ws: - await ws.send_json({"bot_id": "fake"}) - response = await ws.receive_json() - assert response == {"status": "success"} - assert "fake" in nonebot.get_bots() -``` - -在上面的测试中,我们向 `/fake/ws` 进行了 WebSocket 模拟通信,通过发送消息与机器人进行交互,然后检查机器人发送的信息是否正确。 - -## 测试 HTTP 客户端 - -~~暂不支持~~ - -## 测试 WebSocket 客户端 - -~~暂不支持~~ diff --git a/website/versioned_docs/version-2.3.2/community/contact.md b/website/versioned_docs/version-2.3.2/community/contact.md deleted file mode 100644 index c38fa19a4980..000000000000 --- a/website/versioned_docs/version-2.3.2/community/contact.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -sidebar-position: 0 -description: 遇到问题如何获取帮助 ---- - -# 参与讨论 - -如果在安装或者开发 NoneBot 过程中遇到了任何问题,或者有新奇的点子,欢迎参与我们的社区讨论: - -1. 点击下方链接前往 GitHub,前往 Issues 页面,在 `New Issue` Template 中选择 `Question` - - NoneBot:[![NoneBot project link](https://img.shields.io/github/stars/nonebot/nonebot2?style=social)](https://github.com/nonebot/nonebot2) - -2. 通过 QQ 群(点击下方链接直达) - - [![QQ Chat Group](https://img.shields.io/badge/QQ%E7%BE%A4-768887710-orange?style=social)](https://jq.qq.com/?_wv=1027&k=5OFifDh) - -3. 通过 QQ 频道 - - [![QQ Channel](https://img.shields.io/badge/QQ%E9%A2%91%E9%81%93-NoneBot-orange?style=social)](https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&appChannel=share&inviteCode=7b4a3&appChannel=share&businessType=9&from=246610&biz=ka) - -4. 通过 Discord 服务器(点击下方链接直达) - - [![Discord Server](https://discordapp.com/api/guilds/847819937858584596/widget.png?style=shield)](https://discord.gg/VKtE6Gdc4h) diff --git a/website/versioned_docs/version-2.3.2/community/contributing.md b/website/versioned_docs/version-2.3.2/community/contributing.md deleted file mode 100644 index ff452818a833..000000000000 --- a/website/versioned_docs/version-2.3.2/community/contributing.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -sidebar-position: 1 -description: 如何为 NoneBot 贡献代码 ---- - -# 贡献指南 - -## Code of Conduct - -请参阅 [Code of Conduct](https://github.com/nonebot/nonebot2/blob/master/CODE_OF_CONDUCT.md)。 - -## 参与开发 - -请参阅 [Contributing](https://github.com/nonebot/nonebot2/blob/master/CONTRIBUTING.md)。 - -## 鸣谢 - -感谢以下开发者对 NoneBot2 作出的贡献: - - - - diff --git a/website/versioned_docs/version-2.3.2/developer/adapter-writing.md b/website/versioned_docs/version-2.3.2/developer/adapter-writing.md deleted file mode 100644 index 33cd2b7a2d23..000000000000 --- a/website/versioned_docs/version-2.3.2/developer/adapter-writing.md +++ /dev/null @@ -1,608 +0,0 @@ ---- -sidebar_position: 1 -description: 编写适配器对接新的平台 ---- - -# 编写适配器 - -在编写适配器之前,我们需要先了解[适配器的功能与组成](../advanced/adapter#适配器功能与组成),适配器通常由 `Adapter`、`Bot`、`Event` 和 `Message` 四个部分组成,在编写适配器时,我们需要继承 NoneBot 中的基类,并根据实际平台来编写每个部分功能。 - -## 组织结构 - -NoneBot 适配器项目通常以 `nonebot-adapter-{adapter-name}` 作为项目名,并以**命名空间包**的形式编写,即在 `nonebot/adapters/{adapter-name}` 目录中编写实际代码,例如: - -```tree -📦 nonebot-adapter-{adapter-name} -├── 📂 nonebot -│ ├── 📂 adapters -│ │ ├── 📂 {adapter-name} -│ │ │ ├── 📜 __init__.py -│ │ │ ├── 📜 adapter.py -│ │ │ ├── 📜 bot.py -│ │ │ ├── 📜 config.py -│ │ │ ├── 📜 event.py -│ │ │ └── 📜 message.py -├── 📜 pyproject.toml -└── 📜 README.md -``` - -:::tip 提示 - -上述的项目结构仅作推荐,不做强制要求,保证实际可用性即可。 - -::: - -### 使用 NB-CLI 创建项目 - -我们可以使用脚手架快速创建项目: - -```shell -nb adapter create -``` - -按照指引,输入适配器名称以及存储位置,即可创建一个带有基本结构的适配器项目。 - -## 组成部分 - -:::tip 提示 - -本章节的代码中提到的 `Adapter`、`Bot`、`Event` 和 `Message` 等,均为下文中适配器所编写的类,而非 NoneBot 中的基类。 - -::: - -### Log - -适配器在处理时通常需要打印日志,但直接使用 NoneBot 的默认 `logger` 不方便区分适配器输出和其它日志。因此我们可以使用 NoneBot 提供的 `logger_wrapper` 方法,自定义一个 `log` 函数用于快捷打印适配器日志: - -```python {3} title=log.py -from nonebot.utils import logger_wrapper - -log = logger_wrapper("your_adapter_name") -``` - -这个 `log` 函数会在默认 `logger` 中添加适配器名称前缀,它接收三个参数:日志等级、日志内容以及可选的异常,具体用法如下: - -```python -from .log import log - -log("DEBUG", "A DEBUG log.") -log("INFO", "A INFO log.") - -try: - ... -except Exception as e: - log("ERROR", "something error.", e) -``` - -### Config - -通常适配器需要一些配置项,例如平台连接密钥等。适配器的配置方法与[插件配置](../appendices/config#%E6%8F%92%E4%BB%B6%E9%85%8D%E7%BD%AE)类似,例如: - -```python title=config.py -from pydantic import BaseModel - -class Config(BaseModel): - xxx_id: str - xxx_token: str -``` - -配置项的读取将在下方 [Adapter](#adapter) 中介绍。 - -### Adapter - -Adapter 负责转换事件、调用接口,以及正确创建 Bot 对象并注册到 NoneBot 中。在编写平台相关内容之前,我们需要继承基类,并实现适配器的基本信息: - -```python {9,11,14,18} title=adapter.py -from typing import Any -from typing_extensions import override - -from nonebot.drivers import Driver -from nonebot import get_plugin_config -from nonebot.adapters import Adapter as BaseAdapter - -from .config import Config - -class Adapter(BaseAdapter): - @override - def __init__(self, driver: Driver, **kwargs: Any): - super().__init__(driver, **kwargs) - # 读取适配器所需的配置项 - self.adapter_config: Config = get_plugin_config(Config) - - @classmethod - @override - def get_name(cls) -> str: - """适配器名称""" - return "your_adapter_name" -``` - -#### 与平台交互 - -NoneBot 提供了多种 [Driver](../advanced/driver) 来帮助适配器进行网络通信,主要分为客户端和服务端两种类型。我们需要**根据平台文档和特性**选择合适的通信方式,并编写相关方法用于初始化适配器,与平台建立连接和进行交互: - -##### 客户端通信方式 - -```python {12,23,24} title=adapter.py -import asyncio -from typing_extensions import override - -from nonebot import get_plugin_config -from nonebot.exception import WebSocketClosed -from nonebot.drivers import Request, WebSocketClientMixin - -class Adapter(BaseAdapter): - @override - def __init__(self, driver: Driver, **kwargs: Any): - super().__init__(driver, **kwargs) - self.adapter_config: Config = get_plugin_config(Config) - self.task: Optional[asyncio.Task] = None # 存储 ws 任务 - self.setup() - - def setup(self) -> None: - if not isinstance(self.driver, WebSocketClientMixin): - # 判断用户配置的Driver类型是否符合适配器要求,不符合时应抛出异常 - raise RuntimeError( - f"Current driver {self.config.driver} doesn't support websocket client connections!" - f"{self.get_name()} Adapter need a WebSocket Client Driver to work." - ) - # 在 NoneBot 启动和关闭时进行相关操作 - self.driver.on_startup(self.startup) - self.driver.on_shutdown(self.shutdown) - - async def startup(self) -> None: - """定义启动时的操作,例如和平台建立连接""" - self.task = asyncio.create_task(self._forward_ws()) # 建立 ws 连接 - - async def _forward_ws(self): - request = Request( - method="GET", - url="your_platform_websocket_url", - headers={"token": "..."}, # 鉴权请求头 - ) - while True: - try: - async with self.websocket(request) as ws: - try: - # 处理 websocket - ... - except WebSocketClosed as e: - log( - "ERROR", - "WebSocket Closed", - e, - ) - except Exception as e: - log( - "ERROR", - "Error while process data from " - "websocket platform_websocket_url. " - "Trying to reconnect...", - e, - ) - finally: - # 这里要断开 Bot 连接 - except Exception as e: - # 尝试重连 - log( - "ERROR", - "Error while setup websocket to " - "platform_websocket_url. Trying to reconnect...", - e, - ) - await asyncio.sleep(3) # 重连间隔 - - async def shutdown(self) -> None: - """定义关闭时的操作,例如停止任务、断开连接""" - - # 断开 ws 连接 - if self.task is not None and not self.task.done(): - self.task.cancel() -``` - -##### 服务端通信方式 - -```python {30,38} title=adapter.py -from nonebot import get_plugin_config -from nonebot.drivers import ( - Request, - ASGIMixin, - WebSocket, - HTTPServerSetup, - WebSocketServerSetup -) - -class Adapter(BaseAdapter): - @override - def __init__(self, driver: Driver, **kwargs: Any): - super().__init__(driver, **kwargs) - self.adapter_config: Config = get_plugin_config(Config) - self.setup() - - def setup(self) -> None: - if not isinstance(self.driver, ASGIMixin): - raise RuntimeError( - f"Current driver {self.config.driver} doesn't support asgi server!" - f"{self.get_name()} Adapter need a asgi server driver to work." - ) - # 建立服务端路由 - # HTTP Webhook 路由 - http_setup = HTTPServerSetup( - URL("your_webhook_url"), # 路由地址 - "POST", # 接收的方法 - "WEBHOOK name", # 路由名称 - self._handle_http, # 处理函数 - ) - self.setup_http_server(http_setup) - - # 反向 Websocket 路由 - ws_setup = WebSocketServerSetup( - URL("your_websocket_url"), # 路由地址 - "WebSocket name", # 路由名称 - self._handle_ws, # 处理函数 - ) - self.setup_websocket_server(ws_setup) - - - async def _handle_http(self, request: Request) -> Response: - """HTTP 路由处理函数,只有一个类型为 Request 的参数,且返回值类型为 Response""" - ... - return Response( - status_code=200, # 状态码 - headers={"something": "something"}, # 响应头 - content="xxx", # 响应内容 - ) - - async def _handle_ws(self, websocket: WebSocket) -> Any: - """WebSocket 路由处理函数,只有一个类型为 WebSocket 的参数""" - ... -``` - -更多通信交互方式可以参考以下适配器: - -- [OneBot](https://github.com/nonebot/adapter-onebot/blob/master/nonebot/adapters/onebot/v11/adapter.py) - `WebSocket 客户端`、`WebSocket 服务端`、`HTTP WEBHOOK`、`HTTP POST` -- [QQGuild](https://github.com/nonebot/adapter-qqguild/blob/master/nonebot/adapters/qqguild/adapter.py) - `WebSocket 服务端` -- [Telegram](https://github.com/nonebot/adapter-telegram/blob/beta/nonebot/adapters/telegram/adapter.py) - `HTTP WEBHOOK` - -#### 建立 Bot 连接 - -在与平台建立连接后,我们需要将 [Bot](#bot) 实例化,并调用适配器提供的的 `bot_connect` 方法告知 NoneBot 建立了 Bot 连接。在与平台断开连接或出现某些异常进行重连时,我们需要调用 `bot_disconnect` 方法告知 NoneBot 断开了 Bot 连接。 - -```python {7,8,11} title=adapter.py -from .bot import Bot - -class Adapter(BaseAdapter): - - def _handle_connect(self): - bot_id = ... # 通过配置或者平台 API 等方式,获取到 Bot 的 ID - bot = Bot(self, self_id=bot_id) # 实例化 Bot - self.bot_connect(bot) # 建立 Bot 连接 - - def _handle_disconnect(self): - self.bot_disconnect(bot) # 断开 Bot 连接 -``` - -#### 转换 Event 事件 - -在接收到来自平台的事件数据后,我们需要将其转为适配器的 [Event](#event),并调用 Bot 的 `handle_event` 方法来让 Bot 对事件进行处理: - -```python title=adapter.py -import asyncio -from typing import Any, Dict - -from nonebot.compat import type_validate_python - -from .bot import Bot -from .event import Event -from .log import log - -class Adapter(BaseAdapter): - - @classmethod - def payload_to_event(cls, payload: Dict[str, Any]) -> Event: - """根据平台事件的特性,转换平台 payload 为具体 Event - - Event 模型继承自 pydantic.BaseModel,具体请参考 pydantic 文档 - """ - - # 做一层异常处理,以应对平台事件数据的变更 - try: - return type_validate_python(your_event_class, payload) - except Exception as e: - # 无法正常解析为具体 Event 时,给出日志提示 - log( - "WARNING", - f"Parse event error: {str(payload)}", - ) - # 也可以尝试转为基础 Event 进行处理 - return type_validate_python(Event, payload) - - - async def _forward(self, bot: Bot): - - payload: Dict[str, Any] # 接收到的事件数据 - event = self.payload_to_event(payload) - # 让 bot 对事件进行处理 - asyncio.create_task(bot.handle_event(event)) -``` - -#### 调用平台 API - -我们需要实现 `Adapter` 的 `_call_api` 方法,使开发者能够调用平台提供的 API。如果通过 WebSocket 通信可以通过 `send` 方法来发送数据,如果采用 HTTP 请求,则需要通过 NoneBot 提供的 `Request` 对象,调用 `driver` 的 `request` 方法来发送请求。 - -```python {11} title=adapter.py -from typing import Any -from typing_extensions import override - -from nonebot.drivers import Request, WebSocket - -from .bot import Bot - -class Adapter(BaseAdapter): - - @override - async def _call_api(self, bot: Bot, api: str, **data: Any) -> Any: - log("DEBUG", f"Calling API {api}") # 给予日志提示 - platform_data = your_handle_data_method(data) # 自行将数据转为平台所需要的格式 - - # 采用 HTTP 请求的方式,需要构造一个 Request 对象 - request = Request( - method="GET", # 请求方法 - url=api, # 接口地址 - headers=..., # 请求头,通常需要包含鉴权信息 - params=platform_data, # 自行处理数据的传输形式 - # json=platform_data, - # data=platform_data, - ) - # 发送请求,返回结果 - return await self.driver.request(request) - - - # 采用 WebSocket 通信的方式,可以直接调用 send 方法发送数据 - # 通过某种方式获取到 bot 对应的 websocket 对象 - ws: WebSocket = your_get_websocket_method(bot.self_id) - - await ws.send_text(platform_data) # 发送 str 类型的数据 - await ws.send_bytes(platform_data) # 发送 bytes 类型的数据 - await ws.send(platform_data) # 是以上两种方式的合体 - - # 接收并返回结果,同样的,也有 str 和 bytes 的区别 - return await ws.receive_text() - return await ws.receive_bytes() - return await ws.receive() -``` - -`调用平台 API` 实现方式具体可以参考以下适配器: - -Websocket: - -- [OneBot V11](https://github.com/nonebot/adapter-onebot/blob/master/nonebot/adapters/onebot/v11/adapter.py#L127) -- [OneBot V12](https://github.com/nonebot/adapter-onebot/blob/master/nonebot/adapters/onebot/v12/adapter.py#L162) - -HTTP: - -- [QQ 频道](https://github.com/nonebot/adapter-qqguild/blob/master/nonebot/adapters/qqguild/adapter.py#L354) -- [Telegram](https://github.com/nonebot/adapter-telegram/blob/beta/nonebot/adapters/telegram/adapter.py#L145) -- [飞书](https://github.com/nonebot/adapter-feishu/blob/master/nonebot/adapters/feishu/adapter.py#L158) - -### Bot - -Bot 是机器人开发者能够直接获取并使用的核心对象,负责存储平台机器人相关信息,并提供回复事件、调用 API 的上层方法。我们需要继承基类 `Bot`,并实现相关方法: - -```python {20,25,34} title=bot.py -from typing import TYPE_CHECKING, Any, Union -from typing_extensions import override - -from nonebot.message import handle_event -from nonebot.adapters import Bot as BaseBot - -from .event import Event -from .message import Message, MessageSegment - -if TYPE_CHECKING: - from .adapter import Adapter - - -class Bot(BaseBot): - """ - your_adapter_name 协议 Bot 适配。 - """ - - @override - def __init__(self, adapter: Adapter, self_id: str, **kwargs: Any): - super().__init__(adapter, self_id) - self.adapter: Adapter = adapter - # 一些有关 Bot 的信息也可以在此定义和存储 - - async def handle_event(self, event: Event): - # 根据需要,对事件进行某些预处理,例如: - # 检查事件是否和机器人有关操作,去除事件消息首尾的 @bot - # 检查事件是否有回复消息,调用平台 API 获取原始消息的消息内容 - ... - # 调用 handle_event 让 NoneBot 对事件进行处理 - await handle_event(self, event) - - @override - async def send( - self, - event: Event, - message: Union[str, Message, MessageSegment], - **kwargs: Any, - ) -> Any: - # 根据平台实现 Bot 回复事件的方法 - - # 将消息处理为平台所需的格式后,调用发送消息接口进行发送,例如: - data = message_to_platform_data(message) - await self.send_message( - data=data, - ... - ) -``` - -### Event - -Event 是 NoneBot 中的事件主体对象,所有平台消息在进入处理流程前需要转换为 NoneBot 事件。我们需要继承基类 `Event`,并实现相关方法: - -```python {5,8,13,18,23,28,33} title=event.py -from typing_extensions import override - -from nonebot.compat import model_dump -from nonebot.adapters import Event as BaseEvent - -class Event(BaseEvent): - - @override - def get_event_name(self) -> str: - # 返回事件的名称,用于日志打印 - return "event name" - - @override - def get_event_description(self) -> str: - # 返回事件的描述,用于日志打印,请注意转义 loguru tag - return escape_tag(repr(model_dump(self))) - - @override - def get_message(self): - # 获取事件消息的方法,根据事件具体实现,如果事件非消息类型事件,则抛出异常 - raise ValueError("Event has no message!") - - @override - def get_user_id(self) -> str: - # 获取用户 ID 的方法,根据事件具体实现,如果事件没有用户 ID,则抛出异常 - raise ValueError("Event has no context!") - - @override - def get_session_id(self) -> str: - # 获取事件会话 ID 的方法,根据事件具体实现,如果事件没有相关 ID,则抛出异常 - raise ValueError("Event has no context!") - - @override - def is_tome(self) -> bool: - # 判断事件是否和机器人有关 - return False -``` - -然后根据平台消息的类型,编写各种不同的事件,并且注意要根据事件类型实现 `get_type` 方法,具体请参考[事件类型](../advanced/adapter#事件类型)。消息类型事件还应重写 `get_message` 和 `get_user_id` 等方法,例如: - -```python {7,16,20,25,34,42} title=event.py -from .message import Message - -class HeartbeatEvent(Event): - """心跳时间,通常为元事件""" - - @override - def get_type(self) -> str: - return "meta_event" - -class MessageEvent(Event): - """消息事件""" - message_id: str - user_id: str - - @override - def get_type(self) -> str: - return "message" - - @override - def get_message(self) -> Message: - # 返回事件消息对应的 NoneBot Message 对象 - return self.message - - @override - def get_user_id(self) -> str: - return self.user_id - -class JoinRoomEvent(Event): - """加入房间事件,通常为通知事件""" - user_id: str - room_id: str - - @override - def get_type(self) -> str: - return "notice" - -class ApplyAddFriendEvent(Event): - """申请添加好友事件,通常为请求事件""" - user_id: str - - @override - def get_type(self) -> str: - return "request" -``` - -### Message - -Message 负责正确序列化消息,以便机器人插件处理。我们需要继承 `MessageSegment` 和 `Message` 两个类,并实现相关方法: - -```python {9,12,17,22,27,30,36} title=message.py -from typing import Type, Iterable -from typing_extensions import override - -from nonebot.utils import escape_tag - -from nonebot.adapters import Message as BaseMessage -from nonebot.adapters import MessageSegment as BaseMessageSegment - -class MessageSegment(BaseMessageSegment["Message"]): - @classmethod - @override - def get_message_class(cls) -> Type["Message"]: - # 返回适配器的 Message 类型本身 - return Message - - @override - def __str__(self) -> str: - # 返回该消息段的纯文本表现形式,通常在日志中展示 - return "text of MessageSegment" - - @override - def is_text(self) -> bool: - # 判断该消息段是否为纯文本 - return self.type == "text" - - -class Message(BaseMessage[MessageSegment]): - @classmethod - @override - def get_segment_class(cls) -> Type[MessageSegment]: - # 返回适配器的 MessageSegment 类型本身 - return MessageSegment - - @staticmethod - @override - def _construct(msg: str) -> Iterable[MessageSegment]: - # 实现从字符串中构造消息数组,如无字符串嵌入格式可直接返回文本类型 MessageSegment - ... -``` - -然后根据平台具体的消息类型,来实现各种 `MessageSegment` 消息段,具体可以参考以下适配器: - -- [OneBot](https://github.com/nonebot/adapter-onebot/blob/master/nonebot/adapters/onebot/v11/message.py#L77-L261) -- [QQGuild](https://github.com/nonebot/adapter-qqguild/blob/master/nonebot/adapters/qqguild/message.py#L22-L150) -- [Telegram](https://github.com/nonebot/adapter-telegram/blob/beta/nonebot/adapters/telegram/message.py#L43-L250) - -## 适配器测试 - -关于适配器测试相关内容在这里不再展开,开发者可以根据需要进行合适的测试。这里为开发者提供几个常见问题的解决方法: - -1. 在测试中无法导入 editable 模式安装的适配器代码。在 pytest 的 `conftest.py` 内添加如下代码: - - ```python title=tests/conftest.py - from pathlib import Path - import nonebot.adapters - nonebot.adapters.__path__.append( # type: ignore - str((Path(__file__).parent.parent / "nonebot" / "adapters").resolve()) - ) - ``` - -2. 需要计算适配器测试覆盖率,请在 `pyproject.toml` 中添加 pytest 配置: - - ```toml title=pyproject.toml - [tool.pytest.ini_options] - addopts = "--cov nonebot/adapters/{adapter-name} --cov-report term-missing" - ``` - -## 后续工作 - -在完成适配器代码的编写后,如果想要将适配器发布到 NoneBot 商店,我们需要将适配器发布到 PyPI 中,然后前往[商店](/store/adapters)页面,切换到适配器页签,点击**发布适配器**按钮,填写适配器相关信息并提交。 - -另外建议编写适配器文档或者一些插件开发示例,以便其他开发者使用我们的适配器。 diff --git a/website/versioned_docs/version-2.3.2/developer/plugin-publishing.mdx b/website/versioned_docs/version-2.3.2/developer/plugin-publishing.mdx deleted file mode 100644 index d1bf68114cbf..000000000000 --- a/website/versioned_docs/version-2.3.2/developer/plugin-publishing.mdx +++ /dev/null @@ -1,202 +0,0 @@ ---- -sidebar_position: 0 -description: 在商店发布自己的插件 ---- - -# 发布插件 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -NoneBot 为开发者提供了分享插件给大家使用的方式——商店。本章节将会介绍如何将我们写好的插件发布到商店。 - -:::tip 提示 -本章节仅包含插件发布流程指导,插件开发请查阅前述章节。 -::: - -## 准备工作 - -### 插件命名规范 - -NoneBot 插件使用下述命名规范: - -- 对于**项目名**,建议统一以 `nonebot-plugin-` 开头,之后为拟定的插件名字,词间用横杠 `-` 分隔; - - **项目名**用于代码仓库名称、PyPI 包的发布名称等; - - 本文使用 `nonebot-plugin-{your-plugin-name}` 为例。 -- 对于**模块名**,建议与**项目名**一致,但词间用下划线 `_` 分隔,即统一以 `nonebot_plugin_` 开头,之后为拟定的插件名字; - - **模块名**用于程序导入使用,应为插件文件(夹)的名称; - - 本文使用 `nonebot_plugin_{your_plugin_name}` 为例。 - -### 项目结构 - -:::tip 提示 -本段所述的项目结构仅作推荐,不做强制要求,保证实际可用性即可。 -::: - -插件程序本身结构可参考[插件结构](../tutorial/create-plugin.md#插件结构)一节,唯一区别在于,插件包可以直接处于项目顶层。 - -插件项目的一种组织结构如下: - -```tree -📦 nonebot-plugin-{your-plugin-name} -├── 📂 nonebot_plugin_{your_plugin_name} -│ ├── 📜 __init__.py -│ └── 📜 config.py -├── 📜 pyproject.toml -└── 📜 README.md -``` - -#### 第三方项目模板 - -一些社区用户可能会分享自己制作的项目模板方便大家使用,如:[A-kirami/nonebot-plugin-template](https://github.com/A-kirami/nonebot-plugin-template) 等。 - -:::tip 提示 -本文档**不保证**第三方模板的适用性。 - -根据项目模板提供的使用指导补全/修改相应内容后上传到 GitHub 即可。 -::: - -### 插件依赖 - -本段指导填写插件依赖,避免不正确的依赖信息导致插件无法正常工作。 - -依赖填写的基本原则:程序直接导入了什么第三方库,就添加什么第三方包依赖;能用哪些第三方库的特性,就根据使用的特性锁定第三方包版本。 - -:::caution 注意 - -1. 插件需要添加 `nonebot2` 为依赖以避免“幽灵依赖”; -2. 插件需要将使用的适配器加入依赖列表,如:使用 OneBot 适配器的插件应添加 `nonebot-adapter-onebot` 依赖; -3. 由于 `nonebot` 是指 `nonebot1` **而非** `nonebot2`,因此要注意**不要**将 `nonebot` 添加为插件的依赖,以免造成冲突; -4. 尽可能避免使用 `==` 锁定单一版本,增强与其它插件的兼容性。 - -::: - -### 填写插件元数据 - -请注意,插件发布要求**必须**填写元数据才能通过审核。 - -下面是一个示例: - -```python title=nonebot_plugin_{your_plugin_name}/__init__.py -from nonebot.plugin import PluginMetadata - -from .config import Config - -__plugin_meta__ = PluginMetadata( - name="{插件名称}", - description="{插件介绍}", - usage="{插件用法}", - - type="{插件分类}", - # 发布必填,当前有效类型有:`library`(为其他插件编写提供功能),`application`(向机器人用户提供功能)。 - - homepage="{项目主页}", - # 发布必填。 - - config=Config, - # 插件配置项类,如无需配置可不填写。 - - supported_adapters={"~onebot.v11", "~telegram"}, - # 支持的适配器集合,其中 `~` 在此处代表前缀 `nonebot.adapters.`,其余适配器亦按此格式填写。 - # 若插件可以保证兼容所有适配器(即仅使用基本适配器功能)可不填写,否则应该列出插件支持的适配器。 -) -``` - -:::caution 注意 -`__plugin_meta__` 变量**必须**处于插件最外层(如 `__init__.py` 中),否则无法正常识别。 - -一般做法是在 `__init__.py` 中定义 `__plugin_meta__`。 -::: - -:::tip 提示 -带花括号 `{}` 的内容需要自行替换,注意**一定要把原有的花括号去掉**。 -::: - -### 准备项目主页 - -通常可以使用 GitHub 项目页面作为项目主页,在 `README.md` 文件中编写插件介绍等内容。 - -内容大致包括: - -- 插件功能介绍 -- 安装方法(建议至少有 `nb-cli` 方式安装,**不要**使用旧式的 `bot.py` 配置) -- 插件配置项(若无可跳过) -- 插件设置的触发规则(若无可跳过) -- 插件的其它用法(按需编写) - -:::tip 提示 -可以参考[第三方项目模板](#第三方项目模板)。 -::: - -### 发布至 [PyPI](https://pypi.org) - -根据选用的构建系统,在项目的 `pyproject.toml` 中填入必要信息后进行构建与发布。 - -:::tip 提示 -不同构建工具的使用可能存在差别。本文仅以 [`pdm`](https://pdm.fming.dev/latest/), -[`poetry`](https://python-poetry.org/docs/), [`setuptools`](https://setuptools.pypa.io/en/latest/) -构建系统**本地构建与发布**为示例讲解,其余构建/管理工具等和自动化构建的用法请读者自行探索。 -::: - - - - -```bash -poetry publish --build # 构建并发布 - -# 等效于以下两个命令 -poetry build # 只构建 -poetry publish # 只发布先前的构建 -``` - - - - - -```bash -pdm publish # 构建并发布 - -# 等效于以下两个命令 -pdm build # 只构建 -pdm publish --no-build # 只发布先前的构建 -``` - - - - - -```bash -pip install build twine # 安装通用构建与发布工具 - -python -m build --sdist --wheel . # 只构建 -twine upload dist/* # 只发布先前的构建 -``` - - - - -:::tip 提示 -发布前建议自行测试构建包是否可用,避免遗漏代码文件或资源文件等问题。 -::: - -## 商店审核 - -### 提交申请 - -完成在 PyPI 的插件发布流程后,前往[商店](/store/plugins)页面,切换到插件页签,点击 **发布插件** 按钮。 - -在弹出的插件信息提交表单内,填入您所要发布的相应插件信息。请注意,如果插件需要必要配置项才能正常导入,请在“插件配置项”中填写必要的内容(请勿填写密钥等敏感信息)。 - -完成填写后,点击 **发布** 按钮,这将自动跳转 NoneBot 仓库内的“发布插件”页面。确认信息无误后点击页面下方的 `Submit new issue` 按钮进行最终提交即可。 - -### 等待插件审核 - -插件发布 Issue 创建后,将会经过 **NoneFlow Bot** 的自动前置检查,以确保插件信息正确无误、插件能被正确加载。 - -:::tip 提示 -若插件检查未通过或信息有误,**不必**关闭当前 Issue。只需更新插件并上传到 PyPI/修改信息后勾选插件测试勾选框即可重新触发插件检查。 -::: - -之后,NoneBot 的维护者和一些插件开发者会初步检查插件代码,帮助减少该插件的问题。 - -完成这些步骤后,您的插件将会被自动合并到[商店](/store/plugins),而您也将成为 [**NoneBot 贡献者**](https://github.com/nonebot/nonebot2/graphs/contributors)的一员。 diff --git a/website/versioned_docs/version-2.3.2/editor-support.md b/website/versioned_docs/version-2.3.2/editor-support.md deleted file mode 100644 index 0d2f96d680db..000000000000 --- a/website/versioned_docs/version-2.3.2/editor-support.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_position: 2 -description: 配置编辑器以获得最佳体验 ---- - -# 编辑器支持 - -框架基于 [PEP484](https://www.python.org/dev/peps/pep-0484/)、[PEP 561](https://www.python.org/dev/peps/pep-0561/)、[PEP8](https://www.python.org/dev/peps/pep-0008/) 等规范进行开发并且**拥有完整类型注解**。框架使用 Pyright(Pylance)工具进行类型检查,确保代码可以被编辑器正确解析。 - -## 编辑器推荐配置 - -### Visual Studio Code - -在 Visual Studio Code 中,可以使用 Pylance Language Server 并启用 `Type Checking` 配置以达到最佳开发体验。 - -1. 在 VSCode 插件视图搜索并安装 `Python (ms-python.python)` 和 `Pylance (ms-python.vscode-pylance)` 插件。 -2. 修改 VSCode 配置 - 在 VSCode 设置视图搜索配置项 `Python: Language Server` 并将其值设置为 `Pylance`,搜索配置项 `Python > Analysis: Type Checking Mode` 并将其值设置为 `basic`。 - - 或者向项目 `.vscode` 文件夹中配置文件添加以下内容: - - ```json title=settings.json - { - "python.languageServer": "Pylance", - "python.analysis.typeCheckingMode": "basic" - } - ``` - -### 其他 - -欢迎提交 Pull Request 添加其他编辑器配置推荐。点击左下角 `Edit this page` 前往编辑。 diff --git a/website/versioned_docs/version-2.3.2/ospp/2021.md b/website/versioned_docs/version-2.3.2/ospp/2021.md deleted file mode 100644 index 19464a1a5ebd..000000000000 --- a/website/versioned_docs/version-2.3.2/ospp/2021.md +++ /dev/null @@ -1,191 +0,0 @@ ---- -sidebar_position: 0 -description: 开源软件供应链点亮计划 - 暑期 2021 ---- - -# 暑期 2021 - -**开源软件供应链点亮计划 - 暑期 2021** 是**中国科学院软件研究所**与 **openEuler 社区**共同举办的一项面向高校学生的暑期活动,旨在鼓励在校学生积极参与开源软件的开发维护,促进优秀开源软件社区的蓬勃发展。关于具体的活动规划、报名方式,请查看该活动的 [官网](https://summer.iscas.ac.cn/) 和 [帮助文档](https://summer.iscas.ac.cn/help/)。 - -NoneBot 社区有幸作为开源社区参与了本次活动,下面列出了目前我们已经发布的项目,欢迎感兴趣的同学在上面给出的活动官网报名,或通过 [contact@nonebot.dev](mailto:contact@nonebot.dev) 联系我们。 - -## NoneBot v1 - -### 更新 NoneBot v1 文档中的“指南”部分 - -由于 NoneBot v1 和 aiocqhttp 最初基于的 QQ 机器人平台不再提供服务,CQHTTP 接口也转型且改名为 OneBot 标准,目前 NoneBot v1 文档的“指南”部分和 aiocqhttp 文档有部分过时内容需要更新。我们希望将其中与旧的机器人平台相关的内容改为基于 go-cqhttp 或通用的 OneBot 表述,同时对 NoneBot v1 的 awesome-bot 示例做一次全面检查,修改其中可能已经不可用的部分。 - -**难度**:低 - -**导师**:[@cleoold](https://github.com/cleoold) - -**产出要求** - -- 修改“指南”文档和 aiocqhttp 文档中与旧的 QQ 机器人平台相关的部分 -- 检查 awesome-bot 示例是否有已经过时/不可用的地方,并更新/修复 -- 修改“图灵机器人”案例,使用其它 AI 聊天 API 提供商(需先做简单调研) - -**技术要求** - -- 熟悉 Python 编程语言及 asyncio 机制 -- 了解 Git 基本用法 -- 了解聊天机器人基本开发过程 -- 了解 VuePress 更佳 - -### NoneBot v1 API 文档自动生成 - -目前 NoneBot v1 的文档中“API”部分是手动编写的,在更新代码接口的同时需要手动更新文档,可能造成文档与代码不匹配,形成额外的维护成本。我们希望将 API 文档改为直接编写在 Python docstring 中,通过工具自动生成 API 文档。 - -**难度**:中 - -**导师**:[@cleoold](https://github.com/cleoold) - -**产出要求** - -- 调研市面上常见的 Python API 文档生成工具 -- 在代码中补充 API 文档 -- 编写或应用开源工具自动生成 API 文档 -- 配置 GitHub Actions 或其它 CI 自动化构建和部署 API 文档 - -**技术要求** - -- 熟悉 Python 编程语言及 asyncio 和 Type Hints -- 了解 Git 基本用法 -- 了解 Sphinx 等文档生成工具更佳 -- 了解 GitHub Actions 等 CI 工具更佳 - -## NoneBot v2 - -### NoneBot v2 自动化测试框架“NoneBug” - -在聊天机器人的开发过程中,一套自动化的测试机制是非常重要的,特别是对于 NoneBot 2 这类为大型机器人开发而设计的项目来说,需要手动测试每一个边际条件是非常痛苦的。我们希望能够开发一款基于 NoneBot 2 插件机制的自动化测试框架,为 NoneBot 2 用户提供一套易用便捷、高度灵活的自动化测试框架。 - -**难度**:高 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 调研现有的 Python 和其它语言集成测试框架 -- 设计 NoneBug 的用户 API 和实现方式 -- 实现 NoneBug 自动化测试框架 -- 编写详细的使用文档 - -**技术要求** - -- 熟悉 Python 编程语言及 asyncio 和 Type Hints -- 了解 Git 基本用法 -- 了解 NoneBot v2 的基本原理和使用方式 -- 了解主流的 Python 自动化测试框架 - -### NoneBot v2 Telegram 适配器 - -目前 NoneBot v2 已支持 OneBot、Mirai HTTP API、钉钉协议,社区反馈有更多的平台需求,希望能在 NoneBot v2 获得更多的跨平台支持,提高机器人的便携性。同时,我们也希望随着新平台加入,提升现有 NoneBot v2 核心代码的平台通用性。Telegram 是一款较为广泛使用的安全即时聊天软件,同时其官方提供了丰富的聊天机器人 API,因此我们希望为 NoneBot v2 编写一个 Telegram 适配器来支持 Telegram 机器人的开发。 - -**难度**:中 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 调研 Telegram Bot API 以及 WebHook 等官方接口 -- 编写 Telegram 适配器并能够使用 -- 代码遵守项目 Contributing 规范 - -**技术要求** - -- 熟悉 Python 编程语言及 asyncio 和 Type Hints -- 了解 Git 基本用法 -- 了解 Web 开发相关知识 -- 了解 Sphinx 等文档生成工具更佳 - -### NoneBot v2 飞书适配器 - -目前 NoneBot v2 已支持 OneBot、Mirai HTTP API、钉钉协议,社区反馈有更多的平台需求,希望能在 NoneBot v2 获得更多的跨平台支持,提高机器人的便携性。同时,我们也希望随着新平台加入,提升现有 NoneBot v2 核心代码的平台通用性。飞书是目前企业用户广泛使用的即时聊天和协作软件,其官方提供了丰富的聊天机器人 API,因此我们希望为 NoneBot v2 编写一个飞书适配器来支持飞书机器人的开发。 - -**难度**:中 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 调研飞书机器人 API 以及 WebHook 等官方接口 -- 编写飞书适配器并能够使用 -- 代码遵守项目 Contributing 规范 - -**技术要求** - -- 熟悉 Python 编程语言及 asyncio 和 Type Hints -- 了解 Git 基本用法 -- 了解 Web 开发相关知识 -- 了解 Sphinx 等文档生成工具更佳 - -## OneBot - -### 设计 OneBot v12 接口标准 - -目前的 OneBot 标准的 v11 版本仍然与 QQ 平台有较多耦合,我们希望在 v12 去掉与 QQ 耦合的历史包袱,形成一个通用的、可扩展的、易于使用的同时易于实现的聊天机器人接口标准。 - -**难度**:中 - -**导师**:[@richardchien](https://github.com/richardchien) - -**产出要求** - -- 调研各聊天机器人平台的官方/非官方接口特点 -- 通用化 OneBot 核心 API,分离 QQ 特定的 API,去掉无用 API -- 优化现有的通信、消息表示机制 -- 补充 QQ 特定的缺失 API -- 文档需符合风格指南 - -**技术要求** - -- 熟悉至少两个聊天平台的聊天机器人开发 -- 了解 Git 基本用法 -- 了解使用不同语言编写聊天机器人时的常用实践 -- 对文档的优雅性与美观性有追求更佳 - -### 实现 Rust 版 libonebot - -目前最常用的 OneBot 实现包括 go-cqhttp、onebot-kotlin、node-onebot 等,这些实现都各自重复实现了 Web 通信、消息解析、配置读写等功能,当社区中的开发者想针对一个新的聊天平台实现 OneBot 时,他们往往同样需要再次实现类似逻辑。我们希望使用 Rust 编写一个 libonebot 模块,该模块实现所有 OneBot 实现所共享的功能,从而方便其他开发者们使用 Rust 快速编写具体的 OneBot 实现。同时,我们希望借此项目在聊天机器人社区中推广 Rust 编程语言。 - -> 注:这里的逻辑是 libonebot + 针对某聊天平台的对接代码 = 某聊天平台的 OneBot 实现,libonebot 要做的是让 OneBot 实现的开发者只需编写针对特定聊天平台的对接代码,而无需关心 OneBot 标准定义的通信方式、消息格式等。 - -**难度**:高 - -**导师**:[@richardchien](https://github.com/richardchien) - -**产出要求** - -- 实现所有 OneBot 实现所共享的功能,包括 Web 通信、消息解析、配置读写等 -- 充分考虑同时兼容 OneBot v11 和 v12 接口 -- 能够根据用户(OneBot 实现的开发者)所实现的接口自动实现类似 get_available_apis 等接口 -- 编写详细的使用文档 -- 如果可能,与 v12 设计项目联动,实现第一手 v12 支持 - -**技术要求** - -- 熟悉聊天机器人开发 -- 熟悉 Rust Web 开发 - -### 实现自选语言版 libonebot - -目前最常用的 OneBot 实现包括 go-cqhttp、onebot-kotlin、node-onebot 等,这些实现都各自重复实现了 Web 通信、消息解析、配置读写等功能,当社区中的开发者想针对一个新的聊天平台实现 OneBot 时,他们往往同样需要再次实现类似逻辑。我们希望使用 Python、Go、Kotlin、Node、PHP、C#.NET 等主流语言(任选一个)编写 libonebot 模块,该模块实现所有 OneBot 实现所共享的功能,从而方便其他开发者们使用对应语言快速编写具体的 OneBot 实现。 - -> 注:这里的逻辑是 libonebot + 针对某聊天平台的对接代码 = 某聊天平台的 OneBot 实现,libonebot 要做的是让 OneBot 实现的开发者只需编写针对特定聊天平台的对接代码,而无需关心 OneBot 标准定义的通信方式、消息格式等。 - -**难度**:中 - -**导师**:[@richardchien](https://github.com/richardchien) - -**产出要求** - -- 实现所有 OneBot 实现所共享的功能,包括 Web 通信、消息解析、配置读写等 -- 充分考虑同时兼容 OneBot v11 和 v12 接口 -- 编写详细的使用文档 -- 如果可能,实现更多附加特性,如根据用户(OneBot 实现的开发者)所实现的接口自动实现类似 get_available_apis 等接口、实现第一手 v12 支持等 - -**技术要求** - -- 熟悉聊天机器人开发 -- 熟悉所选语言的 Web 开发 diff --git a/website/versioned_docs/version-2.3.2/ospp/2022.md b/website/versioned_docs/version-2.3.2/ospp/2022.md deleted file mode 100644 index e23c274c79b9..000000000000 --- a/website/versioned_docs/version-2.3.2/ospp/2022.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -sidebar_position: 1 -description: 开源之夏 - 暑期 2022 -mdx: - format: md ---- - -# 暑期 2022 - -**开源之夏 - 暑期 2022** 是由**开源软件供应链点亮计划**发起、由**中国科学院软件研究所**与 **openEuler 社区**主办的一项面向高校学生的暑期活动,类似 Google Summer of Code(GSoC),旨在鼓励在校学生积极参与开源软件的开发维护,促进优秀开源软件社区的蓬勃发展。关于具体的活动规划、报名方式,请查看该活动的 [官网](https://summer-ospp.ac.cn/) 和 [帮助文档](https://summer-ospp.ac.cn/help/)。 - -NoneBot 社区有幸作为开源社区 [参与](https://summer-ospp.ac.cn/#/org/orgdetail/e1fb5b8d-125a-4138-b756-25bd32c0a31a/) 了本次活动,下面列出了目前我们已经发布的项目,欢迎感兴趣的同学加入 QQ 群 [737131827](https://jq.qq.com/?_wv=1027&k=PEgyGeEu) 或通过 [contact@nonebot.dev](mailto:contact@nonebot.dev) 联系我们。 - -## NoneBot2 命令行 CLI 交互体验升级 - -NoneBot2 为用户提供了命令行脚手架 ──`nb-cli`,辅助用户更好地上手项目以及进行开发。nb-cli 主要包括:创建项目、运行项目、安装与卸载插件、部署项目等功能。随着 NoneBot2 Beta 版本的发布,脚手架功能存在一定的定位不明确、功能体验不佳。本项目旨在重新设计 nb-cli 功能框架,完善功能,优化用户体验。 - -**难度**:进阶 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 设计 nb-cli 功能框架 - - 明确各功能模块 - - 设计用户交互模式 -- 完成 nb-cli 主要功能代码 - - 项目管理 - - 插件管理 - - 其它 -- 同步更新使用文档 - -**技术要求** - -- 熟悉 Python 命令行交互代码编写 -- 熟悉 NoneBot2 框架功能 -- 熟悉 NoneBot2 项目组织方式 - -**成果仓库** - -- -- - -## NoneBot2 命令行即时交互通信设计与实现 - -NoneBot2 在早期提供了基于网页的 nonebot-plugin-test 插件,无需平台适配接入即可对机器人进行测试,方便了开发者直观的感受机器人文本交互功能。我们希望提供一款基于命令行的适配器/驱动器,用于无平台适配接入、可以运行机器人的场景进行功能体验或测试。 - -**难度**:进阶 - -**导师**:[@mnixry](https://github.com/mnixry) - -**产出要求** - -- 设计命令行与 NoneBot2 通信模式 - - 直接调用/HTTP/WebSocket -- 设计命令行交互界面 -- 实现相应适配器/驱动器 -- 同步更新使用说明文档 - -**技术要求** - -- 熟悉 Python 命令行交互代码编写 -- 熟悉 NoneBot2 框架功能 -- 熟悉 NoneBot2 项目组织方式 - -**成果仓库** - -- - -## NoneBot2 用户上手与深入教程设计 - -NoneBot2 为用户提供了详细的文档介绍,辅助用户更好的上手项目以及进行开发。文档分为基础与进阶两个部分。基础部分帮助新用户快速上手开发,主要包括:安装 NoneBot2、使用脚手架、创建配置项目、使用适配器、加载插件、定义消息事件、处理消息事件、调用平台 API 等。进阶部分向已经熟悉开发流程的用户介绍更多高级技巧,主要包括:NoneBot2 工作原理、定时任务、权限控制、钩子函数、跨插件访问、单元测试、发布插件等。目前文档对于用户而言过于费解,导致用户难以理解 NoneBot2 开发。本项目旨在优化文档内容,使其更加通俗易懂,不让文档成为用户上手的阻碍,同时完善进阶内容,让有更复杂需求的用户,同样能从文档中受益。 - -相关 issue: - -- -- - -**难度**:进阶 - -**导师**:[@SK-415](https://github.com/SK-415) - -**产出要求** - -- 文档通俗易懂 - - 附有适当的图片指引(如 asciinema) -- 内容完整,由浅入深 -- 适当的界面美化,合理分配布局 - -**技术要求** - -- 熟悉文档结构组织与语言表达 -- 熟悉 NoneBot2 框架功能 -- 熟悉 NoneBot2 项目组织方式 - -**成果仓库** - -- diff --git a/website/versioned_docs/version-2.3.2/ospp/2023.md b/website/versioned_docs/version-2.3.2/ospp/2023.md deleted file mode 100644 index 3209537331b8..000000000000 --- a/website/versioned_docs/version-2.3.2/ospp/2023.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -sidebar_position: 2 -description: 开源之夏 - 暑期 2023 -mdx: - format: md ---- - -# 暑期 2023 - -**开源之夏 - 暑期 2023** 是由**开源软件供应链点亮计划**发起、由**中国科学院软件研究所**与 **openEuler 社区**主办的一项面向高校学生的暑期活动,类似 Google Summer of Code(GSoC),旨在鼓励在校学生积极参与开源软件的开发维护,促进优秀开源软件社区的蓬勃发展。关于具体的活动规划、报名方式,请查看该活动的 [官网](https://summer-ospp.ac.cn/) 和 [帮助文档](https://summer-ospp.ac.cn/help/)。 - -NoneBot 社区有幸作为开源社区 [参与](https://summer-ospp.ac.cn/org/orgdetail/e1fb5b8d-125a-4138-b756-25bd32c0a31a?lang=zh) 了本次活动,下面列出了目前我们已经发布的项目,欢迎感兴趣的同学通过 [contact@nonebot.dev](mailto:contact@nonebot.dev) 联系我们。 - -## NoneBot 项目管理图形化面板 - -NoneBot 目前提供了开箱即用的命令行脚手架来帮助初次使用的用户更快的上手编写应用。但是,对于未有一定开发经验的用户,命令行的使用仍具有一定的困难。此外,其他项目如 koishi、vue 等,均可通过图形化界面的形式为用户提供更便捷的项目开发。因此,我们希望借助现有命令行脚手架的可扩展特性,提供一个项目管理面板服务,以网页的形式帮助用户开发 NoneBot 应用。 - -**难度**:进阶 - -**导师**:[@mnixry](https://github.com/mnixry) - -**产出要求** - -- 设计并实现项目管理面板相关功能 - - 创建与管理项目 - - 配置与运行项目 - - NoneBot 插件管理 -- 实现相应 nb-cli 插件提供面板服务 -- 代码符合 NoneBot Contributing 规范 - -**技术要求** - -- 熟悉 nb-cli 相关功能 -- 熟悉 NoneBot 框架功能 -- 熟悉前后端相关实现方式 - -**成果仓库** - -- - -## NoneBot Discord 适配器 - -NoneBot 作为一个跨平台聊天机器人框架,目前已有 OneBot、飞书、Telegram、QQ 频道等诸多平台的适配支持。作为众多用户期待的平台适配之一,我们希望借此机会接入 Discord 聊天机器人。 - -**难度**:进阶 - -**导师**:[@iyume](https://github.com/iyume) - -**产出要求** - -- 调研 Discord Bot 相关功能与接口 -- 设计与编写 NoneBot Discord 适配器 -- 代码符合 NoneBot Contributing 规范 - -**技术要求** - -- 熟悉 NoneBot 框架功能 -- 熟悉 NoneBot 各模块职责与适配器编写 - -**成果仓库** - -- - -## NoneBot 数据库支持插件 - -NoneBot 的插件系统为用户实现应用提供了极高的便捷性,但因此也增加了插件统一管理的难度。目前,我们发现许多用户发布的插件中存在文件存储结构化数据、数据存放散乱等现象,同时插件间也可能产生冲突。因此,我们希望提供一个统一的数据存储与管理方式,便于用户读写应用数据。 - -**难度**:进阶 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 设计并实现 ORM 插件 - - 提供关系模型定义功能 - - 提供模型迁移与管理功能 - - 能较好的支持 Python 类型检查与推导 -- 编写相应的用户使用文档 -- 代码符合 NoneBot Contributing 规范 - -**技术要求** - -- 熟悉 NoneBot 框架功能与插件编写 -- 熟悉 SQLAlchemy 等 ORM 框架 - - 熟悉 SQLAlchemy ORM - - 熟悉 alembic 等迁移工具 -- 熟悉 nb-cli 插件编写 - -**成果仓库** - -- diff --git a/website/versioned_docs/version-2.3.2/ospp/2024.md b/website/versioned_docs/version-2.3.2/ospp/2024.md deleted file mode 100644 index dec90b48a446..000000000000 --- a/website/versioned_docs/version-2.3.2/ospp/2024.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -sidebar_position: 3 -description: 开源之夏 - 暑期 2024 -mdx: - format: md ---- - -# 暑期 2024 - -**开源之夏 - 暑期 2024** 是**中国科学院软件研究所**发起的**开源软件供应链点亮计划**系列暑期活动,旨在鼓励高校学生积极参与开源软件的开发维护,促进优秀开源软件社区的蓬勃发展。活动联合各大开源社区,针对重要开源软件的开发与维护提供项目开发任务,并向全球高校学生开放报名。关于具体的活动规划、报名方式,请查看该活动的 [官网](https://summer-ospp.ac.cn/) 和 [帮助文档](https://summer-ospp.ac.cn/help/)。 - -NoneBot 社区有幸作为开源社区 [参与](https://summer-ospp.ac.cn/org/orgdetail/e1fb5b8d-125a-4138-b756-25bd32c0a31a?lang=zh) 了本次活动,下面列出了目前我们已经发布的项目,欢迎感兴趣的同学通过 [contact@nonebot.dev](mailto:contact@nonebot.dev) 联系我们。 - -## NonePress 官网组件库更新与优化 - -NoneBot 官网目前采用基于 TailwindCSS 自研的 NonePress 组件库及 Docusaurus 框架进行构建。由于相关依赖版本迭代迅速,目前官网组件库已产生了较大的版本落后。本项目希望在跟进框架新版本的基础上,对文档整体视觉体验进行重新设计,提升页面的无障碍访问性,基于 React Hydrate 特性实现完整的静态网站生成(SSG)以提升搜索引擎优化(SEO)水平。在解决以上问题的基础上,可对网页的开发以及生产构建性能做相应的优化提升,例如在生产构建使用自有的 webpack loader、替换现有的热重载逻辑以减少开发环境启动耗时等。 - -**难度**:进阶 - -**导师**:[@yanyongyu](https://github.com/yanyongyu) - -**产出要求** - -- 基于 Docusaurus v3 重构 NonePress 组件库及相关插件 - - 升级相关依赖并重新打造 Docusaurus theme(布局与组件) - - 根据需求实现/修改 Docusaurus 插件使得官网内容构建正常 - - 能够提升页面渲染性能与 MDX 相关能力 -- 升级官网采用新版组件库 - - Algolia 索引与 SEO 正常 - - 桌面端与移动端显示正常 - - 优化官网开发与生产构建体验 -- (可选)优化官网部分页面 - - 优化官网过长的 changelog - - 优化官网插件商店的展示细节 - -**技术要求** - -- 熟练掌握 TS、PostCSS、TSX、MDX等相关技术 -- 掌握 React、Docusaurus、tailwind css 等框架 -- 熟悉静态网站生成 SSG、SEO 优化与 Algolia 索引原理等 - -**成果仓库** - -- - -## NoneFlow 社区自动化工作流管理优化 - -NoneFlow 在 NoneBot 社区中承担着重要的角色,它由 NoneBot 框架基于 GitHub APP 编写而成,能够自动化的完成许多复杂流程的处理,如:用户请求提交插件到商店时进行自动化检测,并在人工审核通过后自动存储至 registry;定时自动更新 registry 内插件信息,跟进插件新版本情况等。但是,在长期的使用中发现了一些问题和不足的地方,例如:项目本身结构复杂耦合,添加新自动化流程与维护现有流程困难;目前采用了 GitHub 用户名作为插件作者名,但已有不少插件作者改名;插件存储至 registry 并定时更新,缺少统计相关信息以帮助商店更好的展示当前插件状态;插件作者想要修改插件信息时无法便捷的找到操作方式等。本项目希望针对以上问题与不足的地方进行修复与优化,提升用户体验。 - -**难度**:进阶 - -**导师**:[@uy/sun](https://github.com/he0119) - -**产出要求** - -- 重构现有工作流处理结构 - - 整合现有 Issue、Pull Request、Git 相关操作 - - 提供用户修改信息的处理方式 - - 正确处理 PR 的 Open、Close、Draft 状态 -- 修复流程中存在的问题 - - 插件作者名正确展示 - - registry 定时更新中需要插件测试环境隔离 -- 在 registry 定时更新的同时提供统计数据 - -**技术要求** - -- 掌握 GitHub APP 开发 - - 熟悉 GitHub REST API、GraphQL 等 - - 熟悉 GitHub APP 权限限制 -- 熟悉 NoneBot 框架与 Python 相关技术 -- 熟悉 Git、GitHub Action、GitHub 工作流 - -**成果仓库** - -- - -## NoneBlockly 低代码框架开发 - -经过深入分析社区反馈,我们发现部分新手因不熟悉编程概念或框架本身而遇到问题。为了解决初学者在使用面向开发者的聊天机器人框架 NoneBot 时遇到的挑战,我们计划引入 Blockly 提供低代码编程支持。通过减少常见的编码错误和降低入门门槛,使框架对初学者更加友好,从而提升用户体验并有助于 NoneBot 生态的成长。本项目将基于 Blockly 实现 NoneBot 插件的低代码编写,使得用户能够快速搭建聊天机器人。 - -**难度**:进阶 - -**导师**:[@mnixry](https://github.com/mnixry) - -**产出要求** - -- 实现 NoneBlockly 低代码开发框架 - - 能够基于 Alconna 编写跨平台插件 - - 确保插件对 Python 和 NoneBot 版本的兼容性 - - 支持对多种类型 NoneBot 事件的响应 - - 支持对 NoneBot 消息对象的便捷操作 - - 集成 localstore 文件存储、apscheduler 定时任务、网络请求等常用功能 -- 对接 NB-CLI 脚手架,通过脚手架扩展使用低代码框架 - -**技术要求** - -- 掌握 Python 与 NoneBot 框架的使用 - - 熟悉 NoneBot 插件的开发,包括事件响应与消息处理等 - - 熟悉 NoneBot 生态组件(Alconna、localstore、apscheduler等)的使用 - - 了解 NB-CLI 脚手架的扩展开发 -- 熟悉 Blockly 低代码框架的使用和开发 - -**成果仓库** - -- diff --git a/website/versioned_docs/version-2.3.2/quick-start.mdx b/website/versioned_docs/version-2.3.2/quick-start.mdx deleted file mode 100644 index 95dfcfebe8c3..000000000000 --- a/website/versioned_docs/version-2.3.2/quick-start.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -sidebar_position: 1 -description: 尝试使用 NoneBot - -options: - menu: - - category: tutorial - weight: 10 ---- - -import Asciinema from "@site/src/components/Asciinema"; -import Messenger from "@site/src/components/Messenger"; - -# 快速上手 - -:::caution 前提条件 - -- 请确保你的 Python 版本 >= 3.9 -- **我们强烈建议使用虚拟环境进行开发**,如果没有使用虚拟环境,请确保已经卸载可能存在的 NoneBot v1!!! - ```bash - pip uninstall nonebot - ``` - -::: - -在本章节中,我们将介绍如何使用脚手架来创建一个 NoneBot 简易项目。项目将基于 nb-cli 脚手架运行,并允许我们从商店安装插件。 - - - -## 安装脚手架 - -确保你已经安装了 Python 3.9 及以上版本,然后在命令行中执行以下命令: - -1. 安装 [pipx](https://pypa.github.io/pipx/) - - ```bash - python -m pip install --user pipx - python -m pipx ensurepath - ``` - - 如果在此步骤的输出中出现了“open a new terminal”或者“re-login”字样,那么请关闭当前终端并重新打开一个新的终端。 - -2. 安装脚手架 - - ```bash - pipx install nb-cli - ``` - -安装完成后,你可以在命令行使用 `nb` 命令来使用脚手架。如果出现无法找到命令的情况(例如出现“Command not found”字样),请参考 [pipx 文档](https://pypa.github.io/pipx/) 检查你的环境变量。 - -## 创建项目 - -使用脚手架来创建一个项目: - -```bash -nb create -``` - -这一指令将会执行创建项目的流程,你将会看到一些询问: - -1. 项目模板 - - ```bash - [?] 选择一个要使用的模板: bootstrap (初学者或用户) - ``` - - 这里我们选择 `bootstrap` 模板,它是一个简单的项目模板,能够安装商店插件。如果你需要**自行编写插件**,这里请选择 `simple` 模板。 - -2. 项目名称 - - ```bash - [?] 项目名称: awesome-bot - ``` - - 这里我们以 `awesome-bot` 为例,作为项目名称。你可以根据自己的需要来命名。 - -3. 其他选项 - 请注意,多选项使用**空格**选中或取消,**回车**确认。 - - ```bash - [?] 要使用哪些驱动器? FastAPI (FastAPI 驱动器) - [?] 要使用哪些适配器? Console (基于终端的交互式适配器) - [?] 立即安装依赖? (Y/n) Yes - [?] 创建虚拟环境? (Y/n) Yes - ``` - - 这里我们选择了创建虚拟环境,nb-cli 在之后的操作中将会自动使用这个虚拟环境。如果你不需要自动创建虚拟环境或者已经创建了其他虚拟环境,nb-cli 将会安装依赖至当前激活的 Python 虚拟环境。 - -4. 选择内置插件 - - ```bash - [?] 要使用哪些内置插件? echo - ``` - - 这里我们选择 `echo` 插件作为示例。这是一个简单的复读回显插件,可以用于测试你的机器人是否正常运行。 - -## 运行项目 - -在项目创建完成后,你可以在**项目目录**中使用以下命令来运行项目: - -```bash -nb run -``` - -你现在应该已经运行起来了你的第一个 NoneBot 项目了!请注意,生成的项目中使用了 `FastAPI` 驱动器和 `Console` 适配器,你之后可以自行修改配置或安装其他适配器。 - -## 尝试使用 - -在项目运行起来后,`Console` 适配器会在你的终端启动交互模式,你可以直接在输入框中输入 `/echo hello world` 来测试你的机器人是否正常运行。 - - diff --git a/website/versioned_docs/version-2.3.2/tutorial/application.md b/website/versioned_docs/version-2.3.2/tutorial/application.md deleted file mode 100644 index 2faa8b1a356c..000000000000 --- a/website/versioned_docs/version-2.3.2/tutorial/application.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -sidebar_position: 0 -description: 创建一个 NoneBot 项目 - -options: - menu: - - category: tutorial - weight: 20 ---- - -# 手动创建项目 - -在[快速上手](../quick-start.mdx)中,我们已经介绍了如何安装和使用 `nb-cli` 创建一个项目。在本章节中,我们将简要介绍如何在不使用 `nb-cli` 的方式创建一个机器人项目的**最小实例**并启动。如果你想要了解 NoneBot 的启动流程,也可以阅读本章节。 - -:::caution 警告 -我们十分不推荐直接创建机器人项目,请优先考虑使用 nb-cli 进行项目创建。 -::: - -一个机器人项目的**最小实例**中**至少**需要包含以下内容: - -- 入口文件:初始化并运行机器人的 Python 文件 -- 配置文件:存储机器人启动所需的配置 -- 插件:为机器人提供具体的功能 - -下面我们创建一个项目文件夹,来存放项目所需文件,以下步骤均在该文件夹中进行。 - -## 安装依赖 - -在创建项目前,我们首先需要将项目所需依赖安装至环境中。 - -1. (可选)创建虚拟环境,以 venv 为例 - - ```bash - python -m venv .venv --prompt nonebot2 - # windows - .venv\Scripts\activate - # linux/macOS - source .venv/bin/activate - ``` - -2. 安装 nonebot2 以及驱动器 - - ```bash - pip install 'nonebot2[fastapi]' - ``` - - 驱动器包名可以在 [驱动器商店](/store/drivers) 中找到。 - -3. 安装适配器 - - ```bash - pip install nonebot-adapter-console - ``` - - 适配器包名可以在 [适配器商店](/store/adapters) 中找到。 - -## 创建配置文件 - -配置文件用于存放 NoneBot 运行所需要的配置项,使用 [`pydantic`](https://docs.pydantic.dev/) 以及 [`python-dotenv`](https://saurabh-kumar.com/python-dotenv/) 来读取配置。配置项需符合 dotenv 格式,复杂类型数据需使用 JSON 格式填写。具体可选配置方式以及配置项详情参考[配置](../appendices/config.mdx)。 - -在**项目文件夹**中创建一个 `.env` 文本文件,并写入以下内容: - -```bash title=.env -HOST=0.0.0.0 # 配置 NoneBot 监听的 IP / 主机名 -PORT=8080 # 配置 NoneBot 监听的端口 -COMMAND_START=["/"] # 配置命令起始字符 -COMMAND_SEP=["."] # 配置命令分割字符 -``` - -## 创建入口文件 - -入口文件( Entrypoint )顾名思义,是用来初始化并运行机器人的 Python 文件。入口文件需要完成框架的初始化、注册适配器、加载插件等工作。 - -:::tip 提示 -如果你使用 `nb-cli` 创建项目,入口文件不会被创建,该文件功能会被 `nb run` 命令代替。 -::: - -在**项目文件夹**中创建一个 `bot.py` 文件,并写入以下内容: - -```python title=bot.py -import nonebot -from nonebot.adapters.console import Adapter as ConsoleAdapter # 避免重复命名 - -# 初始化 NoneBot -nonebot.init() - -# 注册适配器 -driver = nonebot.get_driver() -driver.register_adapter(ConsoleAdapter) - -# 在这里加载插件 -nonebot.load_builtin_plugins("echo") # 内置插件 -# nonebot.load_plugin("thirdparty_plugin") # 第三方插件 -# nonebot.load_plugins("awesome_bot/plugins") # 本地插件 - -if __name__ == "__main__": - nonebot.run() -``` - -我们暂时不需要了解其中内容的含义,这些将会在稍后的章节中逐一介绍。在创建完成以上文件并确认已安装所需适配器和插件后,即可运行机器人。 - -## 运行机器人 - -在**项目文件夹**中,使用配置好环境的 Python 解释器运行入口文件(如果使用虚拟环境,请先激活虚拟环境): - -```bash -python bot.py -``` - -如果你后续使用了 `nb-cli` ,你仍可以使用 `nb run` 命令来运行机器人,`nb-cli` 会自动检测入口文件 `bot.py` 是否存在并运行。 diff --git a/website/versioned_docs/version-2.3.2/tutorial/create-plugin.md b/website/versioned_docs/version-2.3.2/tutorial/create-plugin.md deleted file mode 100644 index 9ce4ed4dd797..000000000000 --- a/website/versioned_docs/version-2.3.2/tutorial/create-plugin.md +++ /dev/null @@ -1,226 +0,0 @@ ---- -sidebar_position: 3 -description: 创建并加载自定义插件 - -options: - menu: - - category: tutorial - weight: 50 ---- - -# 插件编写准备 - -在正式编写插件之前,我们需要先了解一下插件的概念。 - -## 插件结构 - -在 NoneBot 中,插件即是 Python 的一个[模块(module)](https://docs.python.org/zh-cn/3/glossary.html#term-module)。NoneBot 会在导入时对这些模块做一些特殊的处理使得他们成为一个插件。插件间应尽量减少耦合,可以进行有限制的相互调用,NoneBot 能够正确解析插件间的依赖关系。 - -### 单文件插件 - -一个普通的 `.py` 文件即可以作为一个插件,例如创建一个 `foo.py` 文件: - -```tree title=Project -📂 plugins -└── 📜 foo.py -``` - -这个时候模块 `foo` 已经可以被称为一个插件了,尽管它还什么都没做。 - -### 包插件 - -一个包含 `__init__.py` 的文件夹即是一个常规 Python [包 `package`](https://docs.python.org/zh-cn/3/glossary.html#term-regular-package),例如创建一个 `foo` 文件夹: - -```tree title=Project -📂 plugins -└── 📂 foo - └── 📜 __init__.py -``` - -这个时候包 `foo` 同样是一个合法的插件,插件内容可以在 `__init__.py` 文件中编写。 - -## 创建插件 - -:::caution 注意 -如果在之前的[快速上手](../quick-start.mdx)章节中已经使用 `bootstrap` 模板创建了项目,那么你需要做出如下修改: - -1. 在项目目录中创建一个两层文件夹 `awesome_bot/plugins` - - ```tree title=Project - 📦 awesome-bot - ├── 📂 awesome_bot - │ └── 📂 plugins - ├── 📜 pyproject.toml - └── 📜 README.md - ``` - -2. 修改 `pyproject.toml` 文件中的 `nonebot` 配置项,在 `plugin_dirs` 中添加 `awesome_bot/plugins` - - ```toml title=pyproject.toml - [tool.nonebot] - plugin_dirs = ["awesome_bot/plugins"] - ``` - -::: - -:::caution 注意 -如果在之前的[创建项目](./application.md)章节中手动创建了相关文件,那么你需要做出如下修改: - -1. 在项目目录中创建一个两层文件夹 `awesome_bot/plugins` - - ```tree title=Project - 📦 awesome-bot - ├── 📂 awesome_bot - │ └── 📂 plugins - └── 📜 bot.py - ``` - -2. 修改 `bot.py` 文件中的加载插件部分,取消注释或者添加如下代码 - - ```python title=bot.py - # 在这里加载插件 - nonebot.load_builtin_plugins("echo") # 内置插件 - nonebot.load_plugins("awesome_bot/plugins") # 本地插件 - ``` - -::: - -创建插件可以通过 `nb-cli` 命令从完整模板创建,也可以手动新建空白文件。通过以下命令创建一个名为 `weather` 的插件: - -```bash -$ nb plugin create -[?] 插件名称: weather -[?] 使用嵌套插件? (y/N) N -[?] 输出目录: awesome_bot/plugins -``` - -`nb-cli` 会在 `awesome_bot/plugins` 目录下创建一个名为 `weather` 的文件夹,其中包含的文件将在稍后章节中用到。 - -```tree title=Project -📦 awesome-bot -├── 📂 awesome_bot -│ └── 📂 plugins -| └── 📂 foo -| ├── 📜 __init__.py -| └── 📜 config.py -├── 📜 pyproject.toml -└── 📜 README.md -``` - -## 加载插件 - -:::danger 警告 -请勿在插件被加载前 `import` 插件模块,这会导致 NoneBot 无法将其转换为插件而出现意料之外的情况。 -::: - -加载插件是在机器人入口文件中完成的,需要在框架初始化之后,运行之前进行。 - -请注意,加载的插件模块名称(插件文件名或文件夹名)**不能相同**,且每一个插件**只能被加载一次**,重复加载将会导致异常。 - -如果你使用 `nb-cli` 管理插件,那么你可以跳过这一节,`nb-cli` 将会自动处理加载。 - -如果你**使用自定义的入口文件** `bot.py`,那么你需要在 `bot.py` 中加载插件。 - -```python {5} title=bot.py -import nonebot - -nonebot.init() - -# 加载插件 - -nonebot.run() -``` - -加载插件的方式有多种,但在底层的加载逻辑是一致的。以下是为加载插件提供的几种方式: - -### `load_plugin` - -通过点分割模块名称或使用 [`pathlib`](https://docs.python.org/zh-cn/3/library/pathlib.html) 的 `Path` 对象来加载插件。通常用于加载第三方插件或者项目插件。例如: - -```python -from pathlib import Path - -nonebot.load_plugin("path.to.your.plugin") # 加载第三方插件 -nonebot.load_plugin(Path("./path/to/your/plugin.py")) # 加载项目插件 -``` - -:::caution 注意 -请注意,本地插件的路径应该为相对机器人 **入口文件(通常为 bot.py)** 可导入的,例如在项目 `plugins` 目录下。 -::: - -### `load_plugins` - -加载传入插件目录中的所有插件,通常用于加载一系列本地编写的项目插件。例如: - -```python -nonebot.load_plugins("src/plugins", "path/to/your/plugins") -``` - -:::caution 注意 -请注意,插件目录应该为相对机器人 **入口文件(通常为 bot.py)** 可导入的,例如在项目 `plugins` 目录下。 -::: - -### `load_all_plugins` - -这种加载方式是以上两种方式的混合,加载所有传入的插件模块名称,以及所有给定目录下的插件。例如: - -```python -nonebot.load_all_plugins(["path.to.your.plugin"], ["path/to/your/plugins"]) -``` - -### `load_from_json` - -通过 JSON 文件加载插件,是 [`load_all_plugins`](#load_all_plugins) 的 JSON 变种。通过读取 JSON 文件中的 `plugins` 字段和 `plugin_dirs` 字段进行加载。例如: - -```json title=plugin_config.json -{ - "plugins": ["path.to.your.plugin"], - "plugin_dirs": ["path/to/your/plugins"] -} -``` - -```python -nonebot.load_from_json("plugin_config.json", encoding="utf-8") -``` - -:::tip 提示 -如果 JSON 配置文件中的字段无法满足你的需求,可以使用 [`load_all_plugins`](#load_all_plugins) 方法自行读取配置来加载插件。 -::: - -### `load_from_toml` - -通过 TOML 文件加载插件,是 [`load_all_plugins`](#load_all_plugins) 的 TOML 变种。通过读取 TOML 文件中的 `[tool.nonebot]` Table 中的 `plugins` 和 `plugin_dirs` Array 进行加载。例如: - -```toml title=plugin_config.toml -[tool.nonebot] -plugins = ["path.to.your.plugin"] -plugin_dirs = ["path/to/your/plugins"] -``` - -```python -nonebot.load_from_toml("plugin_config.toml", encoding="utf-8") -``` - -:::tip 提示 -如果 TOML 配置文件中的字段无法满足你的需求,可以使用 [`load_all_plugins`](#load_all_plugins) 方法自行读取配置来加载插件。 -::: - -### `load_builtin_plugin` - -加载一个内置插件,传入的插件名必须为 NoneBot 内置插件。该方法是 [`load_plugin`](#load_plugin) 的封装。例如: - -```python -nonebot.load_builtin_plugin("echo") -``` - -### `load_builtin_plugins` - -加载传入插件列表中的所有内置插件。例如: - -```python -nonebot.load_builtin_plugins("echo", "single_session") -``` - -### 其他加载方式 - -有关其他插件加载的方式,可参考[跨插件访问](../advanced/requiring.md)和[嵌套插件](../advanced/plugin-nesting.md)。 diff --git a/website/versioned_docs/version-2.3.2/tutorial/event-data.mdx b/website/versioned_docs/version-2.3.2/tutorial/event-data.mdx deleted file mode 100644 index 5f8ccb543bdc..000000000000 --- a/website/versioned_docs/version-2.3.2/tutorial/event-data.mdx +++ /dev/null @@ -1,65 +0,0 @@ ---- -sidebar_position: 6 -description: 通过依赖注入获取所需事件信息 - -options: - menu: - - category: tutorial - weight: 80 ---- - -# 获取事件信息 - -import Messenger from "@site/src/components/Messenger"; - -在 NoneBot 事件处理流程中,获取事件信息并做出对应的操作是非常常见的场景。本章节中我们将介绍如何通过**依赖注入**获取事件信息。 - -## 认识依赖注入 - -在事件处理流程中,事件响应器具有自己独立的上下文,例如:当前响应的事件、收到事件的机器人或者其他处理流程中新增的信息等。这些数据可以根据我们的需求,通过依赖注入的方式,在执行事件处理流程中注入到事件处理函数中。 - -相对于传统的信息获取方法,通过依赖注入获取信息的最大特色在于**按需获取**。如果该事件处理函数不需要任何额外信息即可运行,那么可以不进行依赖注入。如果事件处理函数需要额外的数据,可以通过依赖注入的方式灵活的标注出需要的依赖,在函数运行时便会被按需注入。 - -## 使用依赖注入 - -使用依赖注入获取上下文信息的方法十分简单,我们仅需要在函数的参数中声明所需的依赖,并正确的将函数添加为事件处理依赖即可。在 NoneBot 中,我们可以直接使用 `nonebot.params` 模块中定义的参数类型来声明依赖。 - -例如,我们可以继续改进上一章节中的 `weather` 插件,使其可以获取到 `天气` 命令的地名参数,并根据地名返回天气信息。 - -```python {9,11} title=weather/__init__.py -from nonebot import on_command -from nonebot.rule import to_me -from nonebot.adapters import Message -from nonebot.params import CommandArg - -weather = on_command("天气", rule=to_me(), aliases={"weather", "查天气"}, priority=10, block=True) - -@weather.handle() -async def handle_function(args: Message = CommandArg()): - # 提取参数纯文本作为地名,并判断是否有效 - if location := args.extract_plain_text(): - await weather.finish(f"今天{location}的天气是...") - else: - await weather.finish("请输入地名") -``` - -如上方示例所示,我们使用了 `args` 作为注入参数名,注入的内容为 `CommandArg()`,也就是**消息命令后跟随的内容**。在这个示例中,我们获得的参数会被检查是否有效,对无效参数则会结束事件。 - -:::tip 提示 -命令与参数之间可以不需要空格,`CommandArg()` 获取的信息为命令后跟随的内容并去除了头部空白符。例如:`/天气 上海` 消息的参数为 `上海`。 -::: - -:::tip 提示 -`:=` 是 Python 3.8 引入的新语法 [Assignment Expressions](https://docs.python.org/zh-cn/3/reference/expressions.html#assignment-expressions),也称为海象表达式,可以在表达式中直接赋值。 -::: - - - -NoneBot 提供了多种依赖注入类型,可以获取不同的信息,具体内容可参考[依赖注入](../advanced/dependency.mdx)。 diff --git a/website/versioned_docs/version-2.3.2/tutorial/fundamentals.md b/website/versioned_docs/version-2.3.2/tutorial/fundamentals.md deleted file mode 100644 index bb5eea0b656e..000000000000 --- a/website/versioned_docs/version-2.3.2/tutorial/fundamentals.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -sidebar_position: 1 -description: NoneBot 机器人构成及基本使用 - -options: - menu: - - category: tutorial - weight: 30 ---- - -# 机器人的构成 - -了解机器人的基本构成有助于你更好地使用 NoneBot,本章节将介绍 NoneBot 中的基本组成部分,稍后的文档中将会使用到这些概念。 - -使用 NoneBot 框架搭建的机器人具有以下几个基本组成部分: - -1. NoneBot 机器人框架主体:负责连接各个组成部分,提供基本的机器人功能 -2. 驱动器 `Driver`:客户端/服务端的功能实现,负责接收和发送消息(通常为 HTTP 通信) -3. 适配器 `Adapter`:驱动器的上层,负责将**平台消息**与 NoneBot 事件/操作系统的消息格式相互转换 -4. 插件 `Plugin`:机器人的功能实现,通常为负责处理事件并进行一系列的操作 - -除 NoneBot 机器人框架主体外,其他部分均可按需选择、互相搭配,但由于平台的兼容性问题,部分插件可能仅在某些特定平台上可用(这由插件编写者决定)。 - -在接下来的章节中,我们将重点介绍机器人功能实现,即插件 `Plugin` 部分。 diff --git a/website/versioned_docs/version-2.3.2/tutorial/handler.mdx b/website/versioned_docs/version-2.3.2/tutorial/handler.mdx deleted file mode 100644 index 466b15b380e2..000000000000 --- a/website/versioned_docs/version-2.3.2/tutorial/handler.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -sidebar_position: 5 -description: 处理接收到的特定事件 - -options: - menu: - - category: tutorial - weight: 70 ---- - -# 事件处理 - -import Messenger from "@site/src/components/Messenger"; - -在我们收到事件,并被某个事件响应器正确响应后,便正式开启了对于这个事件的**处理流程**。 - -## 认识事件处理流程 - -就像我们在解决问题时需要遵循流程一样,处理一个事件也需要一套流程。在事件响应器对一个事件进行响应之后,会依次执行一系列的**事件处理依赖**(通常是函数)。简单来说,事件处理流程并不是一个函数、一个对象或一个方法,而是一整套由开发者设计的流程。 - -在这个流程中,我们**目前**只需要了解两个概念:函数形式的“事件处理依赖”(下称“事件处理函数”)和“事件响应器操作”。 - -## 事件处理函数 - -在事件响应器中,事件处理流程可以由一个或多个“事件处理函数”组成,这些事件处理函数将会按照顺序依次对事件进行处理,直到全部执行完成或被中断。我们可以采用事件响应器的“事件处理函数装饰器”来添加这些“事件处理函数”。 - -顾名思义,“事件处理函数装饰器”是一个[装饰器(decorator)](https://docs.python.org/zh-cn/3/glossary.html#term-decorator),那么它的使用方法也同[函数定义](https://docs.python.org/zh-cn/3/reference/compound_stmts.html#function-definitions)中所展示的包装用法相同。例如: - -```python {6-8} title=weather/__init__.py -from nonebot.rule import to_me -from nonebot.plugin import on_command - -weather = on_command("天气", rule=to_me(), aliases={"weather", "查天气"}, priority=10, block=True) - -@weather.handle() -async def handle_function(): - pass # do something here -``` - -如上方示例所示,我们使用 `weather` 响应器的 `handle` 装饰器装饰了一个函数 `handle_function`。`handle_function` 函数会被添加到 `weather` 的事件处理流程中。在 `weather` 响应器被触发之后,将会依次调用 `weather` 响应器的事件处理函数,即 `handle_function` 来对事件进行处理。 - -## 事件响应器操作 - -在事件处理流程中,我们可以使用事件响应器操作来进行一些交互或改变事件处理流程,例如向机器人用户发送消息或提前结束事件处理流程等。 - -事件响应器操作与事件处理函数装饰器类似,通常作为事件响应器 `Matcher` 的[类方法](https://docs.python.org/zh-cn/3/library/functions.html#classmethod)存在,因此事件响应器操作的调用方法也是 `Matcher.func()` 的形式。不过不同的是,事件响应器操作并不是装饰器,因此并不需要@进行标注。 - -```python {8,9} title=weather/__init__.py -from nonebot.rule import to_me -from nonebot.plugin import on_command - -weather = on_command("天气", rule=to_me(), aliases={"weather", "查天气"}, priority=10, block=True) - -@weather.handle() -async def handle_function(): - # await weather.send("天气是...") - await weather.finish("天气是...") -``` - -如上方示例所示,我们使用 `weather` 响应器的 `finish` 操作方法向机器人用户回复了 `天气是...` 并结束了事件处理流程。效果如下: - - - -值得注意的是,在执行 `finish` 方法时,NoneBot 会在向机器人用户发送消息内容后抛出 `FinishedException` 异常来结束事件响应流程。也就是说,在 `finish` 被执行后,后续的程序是不会被执行的。如果你需要回复机器人用户消息但不想事件处理流程结束,可以使用注释的部分中展示的 `send` 方法。 - -:::danger 警告 -由于 `finish` 是通过抛出 `FinishedException` 异常来结束事件的,因此异常可能会被未加限制的 `try-except` 捕获,影响事件处理流程正确处理,导致无法正常结束此事件。请务必在异常捕获中指定错误类型或排除所有 [MatcherException](../api/exception.md#MatcherException) 类型的异常(如下所示),或将 `finish` 移出捕获范围进行使用。 - -```python -from nonebot.exception import MatcherException - -try: - await weather.finish("天气是...") -except MatcherException: - raise -except Exception as e: - pass # do something here -``` - -::: - -目前 NoneBot 提供了多种事件响应器操作,其中包括用于机器人用户交互与流程控制两大类,进阶使用方法可以查看[会话控制](../appendices/session-control.mdx)。 diff --git a/website/versioned_docs/version-2.3.2/tutorial/matcher.md b/website/versioned_docs/version-2.3.2/tutorial/matcher.md deleted file mode 100644 index 72ca52b8faf5..000000000000 --- a/website/versioned_docs/version-2.3.2/tutorial/matcher.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -sidebar_position: 4 -description: 响应接收到的特定事件 - -options: - menu: - - category: tutorial - weight: 60 ---- - -# 事件响应器 - -事件响应器(Matcher)是对接收到的事件进行响应的基本单元,所有的事件响应器都继承自 `Matcher` 基类。 - -在 NoneBot 中,事件响应器可以通过一系列特定的规则**筛选**出**具有某种特征的事件**,并按照**特定的流程**交由**预定义的事件处理依赖**进行处理。例如,在[快速上手](../quick-start.mdx)中,我们使用了内置插件 `echo` ,它定义的事件响应器能响应机器人用户发送的“/echo hello world”消息,提取“hello world”信息并作为回复消息发送。 - -## 事件响应器辅助函数 - -NoneBot 中所有事件响应器均继承自 `Matcher` 基类,但直接使用 `Matcher.new()` 方法创建事件响应器过于繁琐且不能记录插件信息。因此,NoneBot 中提供了一系列“事件响应器辅助函数”(下称“辅助函数”)来辅助我们用**最简的方式**创建**带有不同规则预设**的事件响应器,提高代码可读性和书写效率。通常情况下,我们只需要使用辅助函数即可完成事件响应器的创建。 - -在 NoneBot 中,辅助函数以 `on()` 或 `on_()` 形式出现(例如 `on_command()`),调用后根据不同的参数返回一个 `Type[Matcher]` 类型的新事件响应器。 - -目前 NoneBot 提供了多种功能各异的辅助函数、具有共同命令名称前缀的命令组以及具有共同参数的响应器组,均可以从 `nonebot` 模块直接导入使用,具体内容参考[事件响应器进阶](../advanced/matcher.md)。 - -## 创建事件响应器 - -在上一节[创建插件](./create-plugin.md#创建插件)中,我们创建了一个 `weather` 插件,现在我们来实现他的功能。 - -我们直接使用 `on_command()` 辅助函数来创建一个事件响应器: - -```python {3} title=weather/__init__.py -from nonebot import on_command - -weather = on_command("天气") -``` - -这样,我们就获得一个名为 `weather` 的事件响应器了,这个事件响应器会对 `/天气` 开头的消息进行响应。 - -:::tip 提示 -如果一条消息中包含“@机器人”或以“机器人的昵称”开始,例如 `@bot /天气` 时,协议适配器会将 `event.is_tome()` 判断为 `True` ,同时也会自动去除 `@bot`,即事件响应器收到的信息内容为 `/天气`,方便进行命令匹配。 -::: - -### 为事件响应器添加参数 - -在辅助函数中,我们可以添加一些参数来对事件响应器进行更加精细的调整,例如事件响应器的优先级、匹配规则等。例如: - -```python {4} title=weather/__init__.py -from nonebot import on_command -from nonebot.rule import to_me - -weather = on_command("天气", rule=to_me(), aliases={"weather", "查天气"}, priority=10, block=True) -``` - -这样,我们就获得了一个可以响应 `天气`、`weather`、`查天气` 三个命令,需要私聊或 `@bot` 时才会响应,优先级为 10 ,阻断事件传播的事件响应器了。这些内容的意义和使用方法将会在后续的章节中一一介绍。 - -:::tip 提示 -需要注意的是,不同的辅助函数有不同的可选参数,在使用之前可以参考[事件响应器进阶](../advanced/matcher.md)或编辑器的提示。 -::: diff --git a/website/versioned_docs/version-2.3.2/tutorial/message.md b/website/versioned_docs/version-2.3.2/tutorial/message.md deleted file mode 100644 index 86989c493ff7..000000000000 --- a/website/versioned_docs/version-2.3.2/tutorial/message.md +++ /dev/null @@ -1,349 +0,0 @@ ---- -sidebar_position: 7 -description: 处理消息序列与消息段 - -options: - menu: - - category: tutorial - weight: 90 ---- - -# 处理消息 - -在不同平台中,一条消息可能会有承载有各种不同的表现形式,它可能是一段纯文本、一张图片、一段语音、一篇富文本文章,也有可能是多种类型的组合等等。 - -在 NoneBot 中,为确保消息的正常处理与跨平台兼容性,采用了扁平化的消息序列形式,即 `Message` 对象。消息序列是 NoneBot 中的消息载体,无论是接收还是发送的消息,都采用消息序列的形式进行处理。 - -## 认识消息类型 - -### 消息序列 `Message` - -在 NoneBot 中,消息序列 `Message` 的主要作用是用于表达“一串消息”。由于消息序列继承自 `List[MessageSegment]`,所以 `Message` 的本质是由若干消息段所组成的序列。因此,消息序列的使用方法与 `List` 有很多相似之处,例如切片、索引、拼接等。 - -在上一节的[使用依赖注入](./event-data.mdx#使用依赖注入)中,我们已经通过依赖注入 `CommandArg()` 获取了命令的参数,它的类型即是消息序列。我们使用了消息序列的 `extract_plain_text()` 方法来获取消息序列中的纯文本内容。 - -### 消息段 `MessageSegment` - -顾名思义,消息段 `MessageSegment` 是一段消息。由于消息序列的本质是由若干消息段所组成的序列,消息段可以被认为是构成消息序列的最小单位。简单来说,消息序列类似于一个自然段,而消息段则是组成自然段的一句话。同时,作为特殊消息载体的存在,绝大多数的平台都有着**独特的消息类型**,这些独特的内容均需要由对应的**协议适配器**所提供,以适应不同平台中的消息模式。**这也意味着,你需要导入对应的协议适配器中的消息序列和消息段后才能使用其特殊的工厂方法。** - -:::caution 注意 -消息段的类型是由协议适配器提供的,因此你需要参考协议适配器的文档并导入对应的消息段后才能使用其特殊的消息类型。 - -在上一节的[使用依赖注入](./event-data.mdx#使用依赖注入)中,我们导入的为 `nonebot.adapters.Message` 抽象基类,因此我们无法使用平台特有的消息类型。仅能使用 `str` 作为纯文本消息回复。 -::: - -## 使用消息序列 - -:::caution 注意 -在以下的示例中,为了更好的理解多种类型的消息组成方式,我们将使用 `Console` 协议适配器来演示消息序列的使用方法。在实际使用中,你需要确保你使用的**消息序列类型**与你所要发送的**平台类型**一致。 -::: - -通常情况下,适配器在接收到消息时,会将消息转换为消息序列,可以通过依赖注入 [`EventMessage`](../advanced/dependency.mdx#eventmessage),或者使用 `event.get_message()` 获取。 - -由于消息序列是 `List[MessageSegment]` 的子类,所以你总是可以用和操作 `List` 类似的方式来处理消息序列。例如: - -```python ->>> from nonebot.adapters.console import Message, MessageSegment ->>> message = Message([ - MessageSegment(type="text", data={"text":"hello"}), - MessageSegment(type="markdown", data={"markup":"**world**"}), -]) ->>> for segment in message: -... print(segment.type, segment.data) -... -text {'text': 'hello'} -markdown {'markup': '**world**'} ->>> len(message) -2 -``` - -### 构造消息序列 - -在使用事件响应器操作发送消息时,既可以使用 `str` 作为消息,也可以使用 `Message`、`MessageSegment` 或者 `MessageTemplate`。那么,我们就需要先构造一个消息序列。消息序列可以通过多种方式构造: - -#### 直接构造 - -`Message` 类可以直接实例化,支持 `str`、`MessageSegment`、`Iterable[MessageSegment]` 或适配器自定义类型的参数。 - -```python -from nonebot.adapters.console import Message, MessageSegment - -# str -Message("Hello, world!") -# MessageSegment -Message(MessageSegment.text("Hello, world!")) -# List[MessageSegment] -Message([MessageSegment.text("Hello, world!")]) -``` - -#### 运算构造 - -`Message` 对象可以通过 `str`、`MessageSegment` 相加构造,详情请参考[拼接消息](#拼接消息)。 - -#### 从字典数组构造 - -`Message` 对象支持 Pydantic 自定义类型构造,可以使用 Pydantic 的 `TypeAdapter` 方法进行构造。 - -```python -from pydantic import TypeAdapter -from nonebot.adapters.console import Message, MessageSegment - -# 由字典构造消息段 -TypeAdapter(MessageSegment).validate_python( - {"type": "text", "data": {"text": "text"}} -) == MessageSegment.text("text") - -# 由字典数组构造消息序列 -TypeAdapter(Message).validate_python( - [MessageSegment.text("text"), {"type": "text", "data": {"text": "text"}}], -) == Message([MessageSegment.text("text"), MessageSegment.text("text")]) -``` - -### 获取消息纯文本 - -由于消息中存在各种类型的消息段,因此 `str(message)` 通常**不能得到消息的纯文本**,而是一个消息序列的字符串表示。 - -NoneBot 为消息段定义了一个方法 `is_text()` ,可以用于判断消息段是否为纯文本;也可以使用 `message.extract_plain_text()` 方法获取消息纯文本。 - -```python -from nonebot.adapters.console import Message, MessageSegment - -# 判断消息段是否为纯文本 -MessageSegment.text("text").is_text() == True - -# 提取消息纯文本字符串 -Message( - [MessageSegment.text("text"), MessageSegment.markdown("**markup**")] -).extract_plain_text() == "text" -``` - -### 遍历 - -消息序列继承自 `List[MessageSegment]` ,因此可以使用 `for` 循环遍历消息段。 - -```python -for segment in message: - ... -``` - -### 比较 - -消息和消息段都可以使用 `==` 或 `!=` 运算符比较是否相同。 - -```python -MessageSegment.text("text") != MessageSegment.text("foo") - -some_message == Message([MessageSegment.text("text")]) -``` - -### 检查消息段 - -我们可以通过 `in` 运算符或消息序列的 `has` 方法来: - -```python -# 是否存在消息段 -MessageSegment.text("text") in message -# 是否存在指定类型的消息段 -"text" in message -``` - -我们还可以使用消息序列的 `only` 方法来检查消息中是否仅包含指定的消息段。 - -```python -# 是否都为指定消息段 -message.only(MessageSegment.text("test")) -# 是否仅包含指定类型的消息段 -message.only("text") -``` - -### 过滤、索引与切片 - -消息序列对列表的索引与切片进行了增强,在原有列表 `int` 索引与 `slice` 切片的基础上,支持 `type` 过滤索引与切片。 - -```python -from nonebot.adapters.console import Message, MessageSegment - -message = Message( - [ - MessageSegment.text("test"), - MessageSegment.markdown("test2"), - MessageSegment.markdown("test3"), - MessageSegment.text("test4"), - ] -) -# 索引 -message[0] == MessageSegment.text("test") -# 切片 -message[0:2] == Message( - [MessageSegment.text("test"), MessageSegment.markdown("test2")] -) -# 类型过滤 -message["markdown"] == Message( - [MessageSegment.markdown("test2"), MessageSegment.markdown("test3")] -) -# 类型索引 -message["markdown", 0] == MessageSegment.markdown("test2") -# 类型切片 -message["markdown", 0:2] == Message( - [MessageSegment.markdown("test2"), MessageSegment.markdown("test3")] -) -``` - -我们也可以通过消息序列的 `include`、`exclude` 方法进行类型过滤。 - -```python -message.include("text", "markdown") -message.exclude("text") -``` - -同样的,消息序列对列表的 `index`、`count` 方法也进行了增强,可以用于索引指定类型的消息段。 - -```python -# 指定类型首个消息段索引 -message.index("markdown") == 1 -# 指定类型消息段数量 -message.count("markdown") == 2 -``` - -此外,消息序列添加了一个 `get` 方法,可以用于获取指定类型指定个数的消息段。 - -```python -# 获取指定类型指定个数的消息段 -message.get("markdown", 1) == Message([MessageSegment.markdown("test2")]) -``` - -### 拼接消息 - -`str`、`Message`、`MessageSegment` 对象之间可以直接相加,相加均会返回一个新的 `Message` 对象。 - -```python -# 消息序列与消息段相加 -Message([MessageSegment.text("text")]) + MessageSegment.text("text") -# 消息序列与字符串相加 -Message([MessageSegment.text("text")]) + "text" -# 消息序列与消息序列相加 -Message([MessageSegment.text("text")]) + Message([MessageSegment.text("text")]) -# 字符串与消息序列相加 -"text" + Message([MessageSegment.text("text")]) -# 消息段与消息段相加 -MessageSegment.text("text") + MessageSegment.text("text") -# 消息段与字符串相加 -MessageSegment.text("text") + "text" -# 消息段与消息序列相加 -MessageSegment.text("text") + Message([MessageSegment.text("text")]) -# 字符串与消息段相加 -"text" + MessageSegment.text("text") -``` - -如果需要在当前消息序列后直接拼接新的消息段,可以使用 `Message.append`、`Message.extend` 方法,或者使用自加。 - -```python -msg = Message([MessageSegment.text("text")]) -# 自加 -msg += "text" -msg += MessageSegment.text("text") -msg += Message([MessageSegment.text("text")]) -# 附加 -msg.append("text") -msg.append(MessageSegment.text("text")) -# 扩展 -msg.extend([MessageSegment.text("text")]) -``` - -我们也可以通过消息段或消息序列的 `join` 方法来拼接一串消息: - -```python -seg = MessageSegment.text("text") -msg = seg.join( - [ - MessageSegment.text("first"), - Message( - [ - MessageSegment.text("second"), - MessageSegment.text("third"), - ] - ) - ] -) -msg == Message( - [ - MessageSegment.text("first"), - MessageSegment.text("text"), - MessageSegment.text("second"), - MessageSegment.text("third"), - ] -) -``` - -### 使用消息模板 - -为了提供安全可靠的跨平台模板字符,我们提供了一个消息模板功能来构建消息序列 - -它在以下常见场景中尤其有用: - -- 多行富文本编排(包含图片,文字以及表情等) -- 客制化(由 Bot 最终用户提供消息模板时) - -在事实上,它的用法和 `str.format` 极为相近,所以你在使用的时候,总是可以参考[Python 文档](https://docs.python.org/zh-cn/3/library/stdtypes.html#str.format)来达到你想要的效果,这里给出几个简单的例子。 - -默认情况下,消息模板采用 `str` 纯文本形式的格式化: - -```python title=基础格式化用法 ->>> from nonebot.adapters import MessageTemplate ->>> MessageTemplate("{} {}").format("hello", "world") -'hello world' -``` - -如果 `Message.template` 构建消息模板,那么消息模板将采用消息序列形式的格式化,此时的消息将会是平台特定的: - -:::caution 注意 -使用 `Message.template` 构建消息模板时,应注意消息序列为平台适配器提供的类型,不能使用 `nonebot.adapters.Message` 基类作为模板构建。使用基类构建模板与使用 `str` 构建模板的效果是一样的,因此请使用上述的 `MessageTemplate` 类直接构建模板。: -::: - -```python title=平台格式化用法 ->>> from nonebot.adapters.console import Message, MessageSegment ->>> Message.template("{} {}").format("hello", "world") -Message( - MessageSegment.text("hello"), - MessageSegment.text(" "), - MessageSegment.text("world") -) -``` - -消息模板支持使用消息段进行格式化: - -```python title=对消息段进行安全的拼接 ->>> from nonebot.adapters.console import Message, MessageSegment ->>> Message.template("{}{}").format(MessageSegment.markdown("**markup**"), "world") -Message( - MessageSegment(type='markdown', data={'markup': '**markup**'}), - MessageSegment(type='text', data={'text': 'world'}) -) -``` - -消息模板同样支持使用消息序列作为模板: - -```python title=以消息对象作为模板 ->>> from nonebot.adapters.console import Message, MessageSegment ->>> Message.template( -... MessageSegment.text("{user_id}") + MessageSegment.emoji("tada") + -... MessageSegment.text("{message}") -... ).format_map({"user_id": 123456, "message": "hello world"}) -Message( - MessageSegment(type='text', data={'text': '123456'}), - MessageSegment(type='emoji', data={'emoji': 'tada'}), - MessageSegment(type='text', data={'text': 'hello world'}) -) -``` - -:::caution 注意 -只有消息序列中的文本类型消息段才能被格式化,其他类型的消息段将会原样添加。 -::: - -消息模板支持使用拓展控制符来控制消息段类型: - -```python title=使用消息段的拓展控制符 ->>> from nonebot.adapters.console import Message, MessageSegment ->>> Message.template("{name:emoji}").format(name='tada') -Message(MessageSegment(type='emoji', data={'name': 'tada'})) -``` diff --git a/website/versioned_docs/version-2.3.2/tutorial/store.mdx b/website/versioned_docs/version-2.3.2/tutorial/store.mdx deleted file mode 100644 index 9332ac8ea8b5..000000000000 --- a/website/versioned_docs/version-2.3.2/tutorial/store.mdx +++ /dev/null @@ -1,267 +0,0 @@ ---- -sidebar_position: 2 -description: 从商店安装适配器和插件 - -options: - menu: - - category: tutorial - weight: 40 ---- - -# 获取商店内容 - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; -import Asciinema from "@site/src/components/Asciinema"; - -:::tip 提示 - -如果你暂时没有获取商店内容的需求,可以跳过本章节。 - -::: - -NoneBot 提供了一个[商店](/store/plugins),商店内容均由社区开发者贡献。你可以在商店中查找你需要的适配器和插件等,进行安装或者参考其文档等。 - -商店中每个内容的卡片都包含了其名称和简介等信息,点击**卡片右上角**链接图标即可跳转到其主页。 - -## 安装插件 - - - -在商店插件页面中,点击你需要安装的插件下方的 `点击复制安装命令` 按钮,即可复制 `nb-cli` 命令。 - -请在你的**项目目录**下执行该命令。`nb-cli` 会自动安装插件并将其添加到加载列表中。 - - - - -```bash -nb plugin install <插件名称> -``` - - - - -```bash -$ nb plugin install -[?] 想要安装的插件名称: <插件名称> -``` - - - - -```bash -pip install <插件包名> -``` - -插件包名可以在商店插件卡片中找到,或者使用 `nb-cli` 搜索插件显示的详情中找到。安装完成后,需要参考[加载插件章节](./create-plugin.md#加载插件)自行加载。 - - - - -如果想要查看插件列表,可以使用以下命令 - -```bash -# 列出商店所有插件 -nb plugin list -# 搜索商店插件 -nb plugin search [可选关键词] -``` - -升级和卸载插件可以使用以下命令 - - - - -```bash -nb plugin update <插件名称> -nb plugin uninstall <插件名称> -``` - - - - -```bash -$ nb plugin update -[?] 想要安装的插件名称: <插件名称> -$ nb plugin uninstall -[?] 想要卸载的插件名称: <插件名称> -``` - - - - -```bash -pip install --upgrade <插件包名> -pip uninstall <插件包名> -``` - -插件包名可以在商店插件卡片中找到,或者使用 `nb-cli` 搜索插件显示的详情中找到。卸载完成后,需要自行移除插件加载。 - - - - -## 安装适配器 - - - -安装适配器与安装插件类似,只是将命令换为 `nb adapter`,这里就不再赘述。 - -请在你的**项目目录**下执行该命令。`nb-cli` 会自动安装适配器并将其添加到注册列表中。 - - - - -```bash -nb adapter install <适配器名称> -``` - - - - -```bash -$ nb adapter install -[?] 想要安装的适配器名称: <适配器名称> -``` - - - - -```bash -pip install <适配器包名> -``` - -适配器包名可以在商店适配器卡片中找到,或者使用 `nb-cli` 搜索适配器显示的详情中找到。安装完成后,需要参考[注册适配器章节](../advanced/adapter.md#注册适配器)自行注册。 - - - - -如果想要查看适配器列表,可以使用以下命令 - -```bash -# 列出商店所有适配器 -nb adapter list -# 搜索商店适配器 -nb adapter search [可选关键词] -``` - -升级和卸载适配器可以使用以下命令 - - - - -```bash -nb adapter update <适配器名称> -nb adapter uninstall <适配器名称> -``` - - - - -```bash -$ nb adapter update -[?] 想要安装的适配器名称: <适配器名称> -$ nb adapter uninstall -[?] 想要卸载的适配器名称: <适配器名称> -``` - - - - -```bash -pip install --upgrade <适配器包名> -pip uninstall <适配器包名> -``` - -适配器包名可以在商店适配器卡片中找到,或者使用 `nb-cli` 搜索适配器显示的详情中找到。卸载完成后,需要自行移除适配器加载。 - - - - -## 安装驱动器 - - - -安装驱动器与安装插件同样类似,只是将命令换为 `nb driver`,这里就不再赘述。 - -如果你使用了虚拟环境,请在你的**项目目录**下执行该命令,`nb-cli` 会自动安装驱动器到虚拟环境中。 - -请注意 `nb-cli` 并不会在安装驱动器后修改项目所使用的驱动器,请自行参考[配置方法](../appendices/config.mdx)章节以及 [`DRIVER` 配置项](../appendices/config.mdx#driver)修改驱动器。 - - - - -```bash -nb driver install <驱动器名称> -``` - - - - -```bash -$ nb driver install -[?] 想要安装的驱动器名称: <驱动器名称> -``` - - - - -```bash -pip install <驱动器包名> -``` - -驱动器包名可以在商店驱动器卡片中找到,或者使用 `nb-cli` 搜索驱动器显示的详情中找到。 - - - - -如果想要查看驱动器列表,可以使用以下命令 - -```bash -# 列出商店所有驱动器 -nb driver list -# 搜索商店驱动器 -nb driver search [可选关键词] -``` - -升级和卸载驱动器可以使用以下命令 - - - - -```bash -nb driver update <驱动器名称> -nb driver uninstall <驱动器名称> -``` - - - - -```bash -$ nb driver update -[?] 想要安装的驱动器名称: <驱动器名称> -$ nb driver uninstall -[?] 想要卸载的驱动器名称: <驱动器名称> -``` - - - - -```bash -pip install --upgrade <驱动器包名> -pip uninstall <驱动器包名> -``` - -驱动器包名可以在商店驱动器卡片中找到,或者使用 `nb-cli` 搜索驱动器显示的详情中找到。卸载完成后,需要自行移除适配器加载。 - - - diff --git a/website/versioned_sidebars/version-2.3.1-sidebars.json b/website/versioned_sidebars/version-2.3.1-sidebars.json deleted file mode 100644 index fe15467eb569..000000000000 --- a/website/versioned_sidebars/version-2.3.1-sidebars.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "tutorial": [ - { - "type": "category", - "label": "开始", - "collapsible": false, - "items": ["index", "quick-start", "editor-support"] - }, - { - "type": "category", - "label": "指南", - "items": [ - { - "type": "autogenerated", - "dirName": "tutorial" - } - ] - }, - { - "type": "category", - "label": "深入", - "items": [ - { - "type": "autogenerated", - "dirName": "appendices" - } - ] - }, - { - "type": "category", - "label": "进阶", - "items": [ - { - "type": "autogenerated", - "dirName": "advanced" - } - ] - }, - { - "type": "category", - "label": "最佳实践", - "items": [ - { - "type": "autogenerated", - "dirName": "best-practice" - } - ] - }, - { - "type": "category", - "label": "开发者", - "items": [ - { - "type": "autogenerated", - "dirName": "developer" - } - ] - } - ], - "api": [ - { - "type": "autogenerated", - "dirName": "api" - } - ], - "ecosystem": [ - { - "type": "category", - "label": "关于我们", - "collapsible": false, - "items": [ - { - "type": "autogenerated", - "dirName": "community" - } - ] - }, - { - "type": "category", - "label": "开源之夏", - "collapsible": true, - "items": [ - { - "type": "autogenerated", - "dirName": "ospp" - } - ] - }, - { - "type": "category", - "label": "社区资源", - "collapsible": false, - "items": [ - { - "type": "link", - "label": "插件商店", - "href": "/store/plugins" - }, - { - "type": "link", - "label": "适配器商店", - "href": "/store/adapters" - }, - { - "type": "link", - "label": "驱动器商店", - "href": "/store/drivers" - }, - { - "type": "link", - "label": "机器人商店", - "href": "/store/bots" - }, - { - "type": "link", - "label": "Awesome NoneBot", - "href": "https://awesome.nonebot.dev" - }, - { - "type": "link", - "label": "论坛", - "href": "https://discussions.nonebot.dev" - } - ] - } - ] -} diff --git a/website/versioned_sidebars/version-2.3.2-sidebars.json b/website/versioned_sidebars/version-2.3.2-sidebars.json deleted file mode 100644 index fe15467eb569..000000000000 --- a/website/versioned_sidebars/version-2.3.2-sidebars.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "tutorial": [ - { - "type": "category", - "label": "开始", - "collapsible": false, - "items": ["index", "quick-start", "editor-support"] - }, - { - "type": "category", - "label": "指南", - "items": [ - { - "type": "autogenerated", - "dirName": "tutorial" - } - ] - }, - { - "type": "category", - "label": "深入", - "items": [ - { - "type": "autogenerated", - "dirName": "appendices" - } - ] - }, - { - "type": "category", - "label": "进阶", - "items": [ - { - "type": "autogenerated", - "dirName": "advanced" - } - ] - }, - { - "type": "category", - "label": "最佳实践", - "items": [ - { - "type": "autogenerated", - "dirName": "best-practice" - } - ] - }, - { - "type": "category", - "label": "开发者", - "items": [ - { - "type": "autogenerated", - "dirName": "developer" - } - ] - } - ], - "api": [ - { - "type": "autogenerated", - "dirName": "api" - } - ], - "ecosystem": [ - { - "type": "category", - "label": "关于我们", - "collapsible": false, - "items": [ - { - "type": "autogenerated", - "dirName": "community" - } - ] - }, - { - "type": "category", - "label": "开源之夏", - "collapsible": true, - "items": [ - { - "type": "autogenerated", - "dirName": "ospp" - } - ] - }, - { - "type": "category", - "label": "社区资源", - "collapsible": false, - "items": [ - { - "type": "link", - "label": "插件商店", - "href": "/store/plugins" - }, - { - "type": "link", - "label": "适配器商店", - "href": "/store/adapters" - }, - { - "type": "link", - "label": "驱动器商店", - "href": "/store/drivers" - }, - { - "type": "link", - "label": "机器人商店", - "href": "/store/bots" - }, - { - "type": "link", - "label": "Awesome NoneBot", - "href": "https://awesome.nonebot.dev" - }, - { - "type": "link", - "label": "论坛", - "href": "https://discussions.nonebot.dev" - } - ] - } - ] -} diff --git a/website/versions.json b/website/versions.json index dab927d3afd2..81b699656234 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1 +1 @@ -["2.4.0", "2.3.3", "2.3.2", "2.3.1"] +["2.4.0", "2.3.3"]