From 183dee4086e0e05d7189745b92f27644d821ce7f Mon Sep 17 00:00:00 2001 From: Flosckow <66554425+Flosckow@users.noreply.github.com> Date: Sat, 14 Sep 2024 02:16:01 +0700 Subject: [PATCH 01/12] Fix: this commit resolve #1765 (#1789) * Fix: this commit resolve #1765 * tests: refactor test --------- Co-authored-by: Daniil Dumchenko Co-authored-by: Nikita Pastukhov --- faststream/utils/path.py | 2 +- tests/brokers/nats/test_router.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/faststream/utils/path.py b/faststream/utils/path.py index 639a54ee06..c3c059bf71 100644 --- a/faststream/utils/path.py +++ b/faststream/utils/path.py @@ -11,7 +11,7 @@ def compile_path( replace_symbol: str, patch_regex: Callable[[str], str] = lambda x: x, ) -> Tuple[Optional[Pattern[str]], str]: - path_regex = "^.*" + path_regex = "^.*?" original_path = "" idx = 0 diff --git a/tests/brokers/nats/test_router.py b/tests/brokers/nats/test_router.py index d882fd881f..24b3fd772e 100644 --- a/tests/brokers/nats/test_router.py +++ b/tests/brokers/nats/test_router.py @@ -42,6 +42,30 @@ async def h( assert event.is_set() mock.assert_called_once_with(name="john", id=2) + async def test_path_as_first_with_prefix( + self, + event, + mock, + router: NatsRouter, + pub_broker, + ): + router.prefix = "root." + + @router.subscriber("{name}.nested") + async def h(name: str = Path()): + event.set() + mock(name=name) + + pub_broker._is_apply_types = True + pub_broker.include_router(router) + + await pub_broker.start() + + await pub_broker.publish("", "root.john.nested", rpc=True) + + assert event.is_set() + mock.assert_called_once_with(name="john") + async def test_router_path_with_prefix( self, event, From 0d90ebad26b06376a6d8ddbdb558839165ce092b Mon Sep 17 00:00:00 2001 From: Vladimir Kibisov Date: Fri, 13 Sep 2024 21:17:23 +0300 Subject: [PATCH 02/12] Refactor AsyncAPI 2.6.0 generation / handling + fix wrong message title --- faststream/specification/asyncapi/utils.py | 4 ++++ .../specification/asyncapi/v2_6_0/generate.py | 17 +++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/faststream/specification/asyncapi/utils.py b/faststream/specification/asyncapi/utils.py index 516adb15c2..56c545168d 100644 --- a/faststream/specification/asyncapi/utils.py +++ b/faststream/specification/asyncapi/utils.py @@ -45,3 +45,7 @@ def resolve_payloads( payload = {} return payload + + +def clear_json_key(key: str) -> str: + return key.replace("/", ".") diff --git a/faststream/specification/asyncapi/v2_6_0/generate.py b/faststream/specification/asyncapi/v2_6_0/generate.py index 886aa715f4..00b84aeb23 100644 --- a/faststream/specification/asyncapi/v2_6_0/generate.py +++ b/faststream/specification/asyncapi/v2_6_0/generate.py @@ -3,6 +3,7 @@ from faststream._internal._compat import DEF_KEY from faststream._internal.basic_types import AnyDict from faststream._internal.constants import ContentTypes +from faststream.specification.asyncapi.utils import clear_json_key from faststream.specification.asyncapi.v2_6_0.schema import ( Channel, Components, @@ -142,13 +143,13 @@ def get_broker_channels( for h in broker._subscribers.values(): schema = h.schema() channels.update( - {key: channel_from_spec(channel) for key, channel in schema.items()} + {clear_json_key(key): channel_from_spec(channel) for key, channel in schema.items()} ) for p in broker._publishers.values(): schema = p.schema() channels.update( - {key: channel_from_spec(channel) for key, channel in schema.items()} + {clear_json_key(key): channel_from_spec(channel) for key, channel in schema.items()} ) return channels @@ -173,7 +174,7 @@ def _resolve_msg_payloads( one_of = m.payload.get("oneOf") if isinstance(one_of, dict): for p_title, p in one_of.items(): - p_title = p_title.replace("/", ".") + p_title = clear_json_key(p_title) payloads.update(p.pop(DEF_KEY, {})) if p_title not in payloads: payloads[p_title] = p @@ -184,7 +185,7 @@ def _resolve_msg_payloads( for p in one_of: p_value = next(iter(p.values())) p_title = p_value.split("/")[-1] - p_title = p_title.replace("/", ".") + p_title = clear_json_key(p_title) if p_title not in payloads: payloads[p_title] = p one_of_list.append(Reference(**{"$ref": f"#/components/schemas/{p_title}"})) @@ -192,7 +193,7 @@ def _resolve_msg_payloads( if not one_of_list: payloads.update(m.payload.pop(DEF_KEY, {})) p_title = m.payload.get("title", f"{channel_name}Payload") - p_title = p_title.replace("/", ".") + p_title = clear_json_key(p_title) if p_title not in payloads: payloads[p_title] = m.payload m.payload = {"$ref": f"#/components/schemas/{p_title}"} @@ -201,9 +202,9 @@ def _resolve_msg_payloads( m.payload["oneOf"] = one_of_list assert m.title # nosec B101 - m.title = m.title.replace("/", ".") - messages[m.title] = m - return Reference(**{"$ref": f"#/components/messages/{m.title}"}) + message_title = clear_json_key(m.title) + messages[message_title] = m + return Reference(**{"$ref": f"#/components/messages/{message_title}"}) def move_pydantic_refs( From 1999eb8eddc7d6b35e8fff38fa109dd67a2c08ae Mon Sep 17 00:00:00 2001 From: Vladimir Kibisov Date: Sat, 14 Sep 2024 11:37:56 +0300 Subject: [PATCH 03/12] AsyncAPI 3.0.0 generation / char in titles support --- faststream/specification/asyncapi/utils.py | 2 +- .../specification/asyncapi/v2_6_0/generate.py | 14 +++++++------- .../specification/asyncapi/v3_0_0/generate.py | 19 ++++++++++++++----- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/faststream/specification/asyncapi/utils.py b/faststream/specification/asyncapi/utils.py index 56c545168d..1ffffec138 100644 --- a/faststream/specification/asyncapi/utils.py +++ b/faststream/specification/asyncapi/utils.py @@ -47,5 +47,5 @@ def resolve_payloads( return payload -def clear_json_key(key: str) -> str: +def clear_key(key: str) -> str: return key.replace("/", ".") diff --git a/faststream/specification/asyncapi/v2_6_0/generate.py b/faststream/specification/asyncapi/v2_6_0/generate.py index 00b84aeb23..405efba399 100644 --- a/faststream/specification/asyncapi/v2_6_0/generate.py +++ b/faststream/specification/asyncapi/v2_6_0/generate.py @@ -3,7 +3,7 @@ from faststream._internal._compat import DEF_KEY from faststream._internal.basic_types import AnyDict from faststream._internal.constants import ContentTypes -from faststream.specification.asyncapi.utils import clear_json_key +from faststream.specification.asyncapi.utils import clear_key from faststream.specification.asyncapi.v2_6_0.schema import ( Channel, Components, @@ -143,13 +143,13 @@ def get_broker_channels( for h in broker._subscribers.values(): schema = h.schema() channels.update( - {clear_json_key(key): channel_from_spec(channel) for key, channel in schema.items()} + {clear_key(key): channel_from_spec(channel) for key, channel in schema.items()} ) for p in broker._publishers.values(): schema = p.schema() channels.update( - {clear_json_key(key): channel_from_spec(channel) for key, channel in schema.items()} + {clear_key(key): channel_from_spec(channel) for key, channel in schema.items()} ) return channels @@ -174,7 +174,7 @@ def _resolve_msg_payloads( one_of = m.payload.get("oneOf") if isinstance(one_of, dict): for p_title, p in one_of.items(): - p_title = clear_json_key(p_title) + p_title = clear_key(p_title) payloads.update(p.pop(DEF_KEY, {})) if p_title not in payloads: payloads[p_title] = p @@ -185,7 +185,7 @@ def _resolve_msg_payloads( for p in one_of: p_value = next(iter(p.values())) p_title = p_value.split("/")[-1] - p_title = clear_json_key(p_title) + p_title = clear_key(p_title) if p_title not in payloads: payloads[p_title] = p one_of_list.append(Reference(**{"$ref": f"#/components/schemas/{p_title}"})) @@ -193,7 +193,7 @@ def _resolve_msg_payloads( if not one_of_list: payloads.update(m.payload.pop(DEF_KEY, {})) p_title = m.payload.get("title", f"{channel_name}Payload") - p_title = clear_json_key(p_title) + p_title = clear_key(p_title) if p_title not in payloads: payloads[p_title] = m.payload m.payload = {"$ref": f"#/components/schemas/{p_title}"} @@ -202,7 +202,7 @@ def _resolve_msg_payloads( m.payload["oneOf"] = one_of_list assert m.title # nosec B101 - message_title = clear_json_key(m.title) + message_title = clear_key(m.title) messages[message_title] = m return Reference(**{"$ref": f"#/components/messages/{message_title}"}) diff --git a/faststream/specification/asyncapi/v3_0_0/generate.py b/faststream/specification/asyncapi/v3_0_0/generate.py index c4fac01933..97ca91c561 100644 --- a/faststream/specification/asyncapi/v3_0_0/generate.py +++ b/faststream/specification/asyncapi/v3_0_0/generate.py @@ -4,6 +4,7 @@ from faststream._internal._compat import DEF_KEY from faststream._internal.basic_types import AnyDict from faststream._internal.constants import ContentTypes +from faststream.specification.asyncapi.utils import clear_key from faststream.specification.asyncapi.v2_6_0.generate import move_pydantic_refs from faststream.specification.asyncapi.v2_6_0.schema import ( Reference, @@ -143,6 +144,8 @@ def get_broker_operations( for h in broker._subscribers.values(): for channel_name, specs_channel in h.schema().items(): + channel_name = clear_key(channel_name) + if specs_channel.subscribe is not None: operations[f"{channel_name}Subscribe"] = operation_from_spec( specs_channel.subscribe, Action.RECEIVE, channel_name @@ -150,6 +153,8 @@ def get_broker_operations( for p in broker._publishers.values(): for channel_name, specs_channel in p.schema().items(): + channel_name = clear_key(channel_name) + if specs_channel.publish is not None: operations[f"{channel_name}"] = operation_from_spec( specs_channel.publish, Action.SEND, channel_name @@ -174,7 +179,7 @@ def get_broker_channels( *left, right = message.title.split(":") message.title = ":".join(left) + f":Subscribe{right}" - channels_schema_v3_0[channel_name] = channel_from_spec( + channels_schema_v3_0[clear_key(channel_name)] = channel_from_spec( specs_channel, message, channel_name, @@ -187,7 +192,7 @@ def get_broker_channels( channels_schema_v3_0 = {} for channel_name, specs_channel in pub.schema().items(): if specs_channel.publish: - channels_schema_v3_0[channel_name] = channel_from_spec( + channels_schema_v3_0[clear_key(channel_name)] = channel_from_spec( specs_channel, specs_channel.publish.message, channel_name, @@ -210,6 +215,9 @@ def _resolve_msg_payloads( m.payload = move_pydantic_refs(m.payload, DEF_KEY) + message_name = clear_key(message_name) + channel_name = clear_key(channel_name) + if DEF_KEY in m.payload: payloads.update(m.payload.pop(DEF_KEY)) @@ -218,13 +226,13 @@ def _resolve_msg_payloads( one_of_list = [] processed_payloads: Dict[str, AnyDict] = {} for name, payload in one_of.items(): - processed_payloads[name] = payload + processed_payloads[clear_key(name)] = payload one_of_list.append(Reference(**{"$ref": f"#/components/schemas/{name}"})) payloads.update(processed_payloads) m.payload["oneOf"] = one_of_list assert m.title - messages[m.title] = m + messages[clear_key(m.title)] = m return Reference( **{"$ref": f"#/components/messages/{channel_name}:{message_name}"} ) @@ -232,10 +240,11 @@ def _resolve_msg_payloads( else: payloads.update(m.payload.pop(DEF_KEY, {})) payload_name = m.payload.get("title", f"{channel_name}:{message_name}:Payload") + payload_name = clear_key(payload_name) payloads[payload_name] = m.payload m.payload = {"$ref": f"#/components/schemas/{payload_name}"} assert m.title - messages[m.title] = m + messages[clear_key(m.title)] = m return Reference( **{"$ref": f"#/components/messages/{channel_name}:{message_name}"} ) From 92f7f746cb5724a8239ec6f46f8b229d99738a30 Mon Sep 17 00:00:00 2001 From: Vladimir Kibisov Date: Sat, 14 Sep 2024 12:05:38 +0300 Subject: [PATCH 04/12] AsyncAPI generation / handling tests --- tests/asyncapi/base/v2_6_0/arguments.py | 14 ++++++++++++++ tests/asyncapi/base/v3_0_0/arguments.py | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/tests/asyncapi/base/v2_6_0/arguments.py b/tests/asyncapi/base/v2_6_0/arguments.py index 2b62e99907..5096b3e693 100644 --- a/tests/asyncapi/base/v2_6_0/arguments.py +++ b/tests/asyncapi/base/v2_6_0/arguments.py @@ -35,6 +35,20 @@ async def handle(msg): ... assert key == "custom_name" assert schema["channels"][key]["description"] == "test description" + def test_slash_in_title(self): + broker = self.broker_class() + + @broker.subscriber("test", title="/") + async def handle(msg): ... + + schema = get_app_schema(self.build_app(broker), version="2.6.0").to_jsonable() + + assert tuple(schema["channels"].keys())[0] == "." + assert tuple(schema["components"]["messages"].keys())[0] == ".:Message" + assert schema["components"]["messages"][".:Message"]["title"] == "/:Message" + assert tuple(schema["components"]["schemas"].keys())[0] == ".:Message:Payload" + assert schema["components"]["schemas"][".:Message:Payload"]["title"] == "/:Message:Payload" + def test_docstring_description(self): broker = self.broker_class() diff --git a/tests/asyncapi/base/v3_0_0/arguments.py b/tests/asyncapi/base/v3_0_0/arguments.py index 57ff9b4ce1..0842223318 100644 --- a/tests/asyncapi/base/v3_0_0/arguments.py +++ b/tests/asyncapi/base/v3_0_0/arguments.py @@ -36,6 +36,24 @@ async def handle(msg): ... assert key == "custom_name" assert schema["channels"][key]["description"] == "test description" + def test_slash_in_title(self): + broker = self.broker_factory() + + @broker.subscriber("test", title="/") + async def handle(msg): ... + + schema = get_app_schema(self.build_app(broker), version="3.0.0").to_jsonable() + + assert tuple(schema["channels"].keys())[0] == "." + assert schema["channels"]["."]["address"] == "/" + + assert tuple(schema["operations"].keys())[0] == ".Subscribe" + + assert tuple(schema["components"]["messages"].keys())[0] == ".:SubscribeMessage" + assert schema["components"]["messages"][".:SubscribeMessage"]["title"] == "/:SubscribeMessage" + assert tuple(schema["components"]["schemas"].keys())[0] == ".:Message:Payload" + assert schema["components"]["schemas"][".:Message:Payload"]["title"] == "/:Message:Payload" + def test_docstring_description(self): broker = self.broker_factory() From c6e5bad56df5359d3686e83796814a1183afeab8 Mon Sep 17 00:00:00 2001 From: Vladimir Kibisov Date: Sat, 14 Sep 2024 12:08:54 +0300 Subject: [PATCH 05/12] New tests refactoring --- tests/asyncapi/base/v2_6_0/arguments.py | 8 +++++--- tests/asyncapi/base/v3_0_0/arguments.py | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/asyncapi/base/v2_6_0/arguments.py b/tests/asyncapi/base/v2_6_0/arguments.py index 5096b3e693..74c81466f9 100644 --- a/tests/asyncapi/base/v2_6_0/arguments.py +++ b/tests/asyncapi/base/v2_6_0/arguments.py @@ -43,10 +43,12 @@ async def handle(msg): ... schema = get_app_schema(self.build_app(broker), version="2.6.0").to_jsonable() - assert tuple(schema["channels"].keys())[0] == "." - assert tuple(schema["components"]["messages"].keys())[0] == ".:Message" + assert next(iter(schema["channels"].keys())) == "." + + assert next(iter(schema["components"]["messages"].keys())) == ".:Message" assert schema["components"]["messages"][".:Message"]["title"] == "/:Message" - assert tuple(schema["components"]["schemas"].keys())[0] == ".:Message:Payload" + + assert next(iter(schema["components"]["schemas"].keys())) == ".:Message:Payload" assert schema["components"]["schemas"][".:Message:Payload"]["title"] == "/:Message:Payload" def test_docstring_description(self): diff --git a/tests/asyncapi/base/v3_0_0/arguments.py b/tests/asyncapi/base/v3_0_0/arguments.py index 0842223318..1a9fbd24c3 100644 --- a/tests/asyncapi/base/v3_0_0/arguments.py +++ b/tests/asyncapi/base/v3_0_0/arguments.py @@ -44,14 +44,15 @@ async def handle(msg): ... schema = get_app_schema(self.build_app(broker), version="3.0.0").to_jsonable() - assert tuple(schema["channels"].keys())[0] == "." + assert next(iter(schema["channels"].keys())) == "." assert schema["channels"]["."]["address"] == "/" - assert tuple(schema["operations"].keys())[0] == ".Subscribe" + assert next(iter(schema["operations"].keys())) == ".Subscribe" - assert tuple(schema["components"]["messages"].keys())[0] == ".:SubscribeMessage" + assert next(iter(schema["components"]["messages"].keys())) == ".:SubscribeMessage" assert schema["components"]["messages"][".:SubscribeMessage"]["title"] == "/:SubscribeMessage" - assert tuple(schema["components"]["schemas"].keys())[0] == ".:Message:Payload" + + assert next(iter(schema["components"]["schemas"].keys())) == ".:Message:Payload" assert schema["components"]["schemas"][".:Message:Payload"]["title"] == "/:Message:Payload" def test_docstring_description(self): From d7c6a758c8637a1d33fa962703bbbebd528b68e7 Mon Sep 17 00:00:00 2001 From: KrySeyt Date: Sat, 14 Sep 2024 09:17:48 +0000 Subject: [PATCH 06/12] docs: generate API References --- docs/docs/SUMMARY.md | 236 ++++-------------- .../acknowledgement_watcher/CounterWatcher.md | 11 - .../acknowledgement_watcher/EndlessWatcher.md | 11 - .../acknowledgement_watcher/OneTryWatcher.md | 11 - .../acknowledgement_watcher/WatcherContext.md | 11 - .../acknowledgement_watcher/get_watcher.md | 11 - .../get_dependant/get_fastapi_dependant.md | 11 - .../get_fastapi_native_dependant.md | 11 - .../broker/fastapi/route/StreamMessage.md | 11 - .../build_faststream_to_fastapi_parser.md | 11 - .../fastapi/route/make_fastapi_execution.md | 11 - .../wrap_callable_to_fastapi_compatible.md | 11 - .../broker/fastapi/router/StreamRouter.md | 11 - .../broker/message/decode_message.md | 11 - .../broker/message/encode_message.md | 11 - .../broker/middlewares/BaseMiddleware.md | 11 - .../broker/middlewares/base/BaseMiddleware.md | 11 - .../exception/BaseExceptionMiddleware.md | 11 - .../exception/ExceptionMiddleware.md | 11 - .../middlewares/exception/ignore_handler.md | 11 - .../logging/CriticalLogMiddleware.md | 11 - .../broker/publisher/fake/FakePublisher.md | 11 - .../publisher/proto/BasePublisherProto.md | 11 - .../broker/publisher/proto/ProducerProto.md | 11 - .../broker/publisher/proto/PublisherProto.md | 11 - .../publisher/usecase/PublisherUsecase.md | 11 - .../broker/response/ensure_response.md | 11 - .../faststream/broker/router/ArgsContainer.md | 11 - .../faststream/broker/router/BrokerRouter.md | 11 - .../broker/router/SubscriberRoute.md | 11 - .../faststream/broker/schemas/NameRequired.md | 11 - .../subscriber/call_item/HandlerItem.md | 11 - .../subscriber/proto/SubscriberProto.md | 11 - .../subscriber/usecase/SubscriberUsecase.md | 11 - .../broker/types/PublisherMiddleware.md | 11 - .../faststream/broker/utils/default_filter.md | 11 - .../broker/utils/get_watcher_context.md | 11 - .../faststream/broker/utils/process_msg.md | 11 - .../broker/utils/resolve_custom_func.md | 11 - .../broker/wrapper/call/HandlerCallWrapper.md | 11 - .../broker/wrapper/proto/WrapperProto.md | 11 - .../faststream/cli/main/publish_message.md | 11 - .../faststream/cli/main/version_callback.md | 11 - .../cli/supervisors/basereload/BaseReload.md | 11 - .../supervisors/multiprocess/Multiprocess.md | 11 - .../cli/supervisors/utils/get_subprocess.md | 11 - .../cli/supervisors/utils/set_exit.md | 11 - .../supervisors/utils/subprocess_started.md | 11 - .../supervisors/watchfiles/ExtendedFilter.md | 11 - .../supervisors/watchfiles/WatchReloader.md | 11 - .../cli/utils/imports/get_app_path.md | 11 - .../cli/utils/imports/import_from_string.md | 11 - .../cli/utils/imports/import_object.md | 11 - .../cli/utils/imports/try_import_app.md | 11 - .../faststream/cli/utils/logs/LogLevels.md | 11 - .../cli/utils/logs/get_log_level.md | 11 - .../cli/utils/logs/set_log_level.md | 11 - .../cli/utils/parser/parse_cli_args.md | 11 - .../cli/utils/parser/remove_prefix.md | 11 - .../en/api/faststream/confluent/TestApp.md | 2 +- .../faststream/confluent/fastapi/Context.md | 2 +- .../api/faststream/constants/ContentTypes.md | 11 - .../serve.md => exceptions/ContextError.md} | 2 +- docs/docs/en/api/faststream/kafka/TestApp.md | 2 +- .../api/faststream/kafka/fastapi/Context.md | 2 +- .../log/formatter/ColourizedFormatter.md | 11 - .../log/formatter/expand_log_field.md | 11 - .../faststream/log/logging/ExtendedFilter.md | 11 - .../log/logging/get_broker_logger.md | 11 - .../faststream/log/logging/set_logger_fmt.md | 11 - .../main/main.md => message/AckStatus.md} | 2 +- .../app/gen.md => message/StreamMessage.md} | 2 +- .../decode_message.md} | 2 +- .../encode_message.md} | 2 +- .../main/publish.md => message/gen_cor_id.md} | 2 +- .../message/AckStatus.md} | 2 +- .../message/StreamMessage.md | 2 +- .../utils/decode_message.md} | 2 +- .../utils/encode_message.md} | 2 +- .../utils/gen_cor_id.md} | 2 +- .../BaseMiddleware.md} | 2 +- .../middlewares/ExceptionMiddleware.md | 11 + .../middlewares/base/BaseMiddleware.md | 11 + .../exception/BaseExceptionMiddleware.md} | 2 +- .../exception}/ExceptionMiddleware.md | 2 +- .../exception/ignore_handler.md} | 2 +- .../logging/CriticalLogMiddleware.md | 11 + docs/docs/en/api/faststream/nats/TestApp.md | 2 +- .../en/api/faststream/nats/fastapi/Context.md | 2 +- .../faststream/{utils => params}/Context.md | 2 +- .../faststream/{utils => params}/Depends.md | 0 .../faststream/{utils => params}/Header.md | 2 +- .../api/faststream/{utils => params}/Path.md | 2 +- .../no_cast/NoCastField.md} | 2 +- .../context => params/params}/Context.md | 2 +- .../context => params/params}/Header.md | 2 +- .../{utils/context => params/params}/Path.md | 2 +- .../en/api/faststream/rabbit/ReplyConfig.md | 11 - docs/docs/en/api/faststream/rabbit/TestApp.md | 2 +- .../api/faststream/rabbit/fastapi/Context.md | 2 +- .../faststream/rabbit/schemas/ReplyConfig.md | 11 - .../rabbit/schemas/reply/ReplyConfig.md | 11 - docs/docs/en/api/faststream/redis/TestApp.md | 2 +- .../api/faststream/redis/fastapi/Context.md | 2 +- .../{cli/main/run.md => response/Response.md} | 2 +- .../ensure_response.md} | 2 +- .../faststream/response/response/Response.md | 11 + .../utils/ensure_response.md} | 2 +- .../asyncapi/utils/clear_key.md} | 2 +- .../docs/en/api/faststream/testing/TestApp.md | 11 - .../en/api/faststream/testing/app/TestApp.md | 11 - .../faststream/testing/broker/TestBroker.md | 11 - .../testing/broker/patch_broker_calls.md | 11 - .../en/api/faststream/types/LoggerProto.md | 11 - .../api/faststream/types/StandardDataclass.md | 11 - .../en/api/faststream/utils/ContextRepo.md | 11 - docs/docs/en/api/faststream/utils/NoCast.md | 11 - .../en/api/faststream/utils/apply_types.md | 11 - .../api/faststream/utils/ast/find_ast_node.md | 11 - .../faststream/utils/ast/find_withitems.md | 11 - .../utils/ast/get_withitem_calls.md | 11 - .../utils/ast/is_contains_context_name.md | 11 - .../api/faststream/utils/classes/Singleton.md | 11 - .../faststream/utils/context/ContextRepo.md | 11 - .../utils/context/builders/Context.md | 11 - .../utils/context/builders/Header.md | 11 - .../faststream/utils/context/builders/Path.md | 11 - .../utils/context/repository/ContextRepo.md | 11 - .../faststream/utils/context/types/Context.md | 11 - .../context/types/resolve_context_by_name.md | 11 - .../faststream/utils/data/filter_by_dict.md | 11 - .../utils/functions/call_or_await.md | 11 - .../utils/functions/drop_response_type.md | 11 - .../utils/functions/fake_context.md | 11 - .../utils/functions/return_input.md | 11 - .../utils/functions/sync_fake_context.md | 11 - .../utils/functions/timeout_scope.md | 11 - .../faststream/utils/functions/to_async.md | 11 - .../en/api/faststream/utils/no_cast/NoCast.md | 11 - .../docs/en/api/faststream/utils/nuid/NUID.md | 11 - .../api/faststream/utils/path/compile_path.md | 11 - 141 files changed, 123 insertions(+), 1318 deletions(-) delete mode 100644 docs/docs/en/api/faststream/broker/acknowledgement_watcher/CounterWatcher.md delete mode 100644 docs/docs/en/api/faststream/broker/acknowledgement_watcher/EndlessWatcher.md delete mode 100644 docs/docs/en/api/faststream/broker/acknowledgement_watcher/OneTryWatcher.md delete mode 100644 docs/docs/en/api/faststream/broker/acknowledgement_watcher/WatcherContext.md delete mode 100644 docs/docs/en/api/faststream/broker/acknowledgement_watcher/get_watcher.md delete mode 100644 docs/docs/en/api/faststream/broker/fastapi/get_dependant/get_fastapi_dependant.md delete mode 100644 docs/docs/en/api/faststream/broker/fastapi/get_dependant/get_fastapi_native_dependant.md delete mode 100644 docs/docs/en/api/faststream/broker/fastapi/route/StreamMessage.md delete mode 100644 docs/docs/en/api/faststream/broker/fastapi/route/build_faststream_to_fastapi_parser.md delete mode 100644 docs/docs/en/api/faststream/broker/fastapi/route/make_fastapi_execution.md delete mode 100644 docs/docs/en/api/faststream/broker/fastapi/route/wrap_callable_to_fastapi_compatible.md delete mode 100644 docs/docs/en/api/faststream/broker/fastapi/router/StreamRouter.md delete mode 100644 docs/docs/en/api/faststream/broker/message/decode_message.md delete mode 100644 docs/docs/en/api/faststream/broker/message/encode_message.md delete mode 100644 docs/docs/en/api/faststream/broker/middlewares/BaseMiddleware.md delete mode 100644 docs/docs/en/api/faststream/broker/middlewares/base/BaseMiddleware.md delete mode 100644 docs/docs/en/api/faststream/broker/middlewares/exception/BaseExceptionMiddleware.md delete mode 100644 docs/docs/en/api/faststream/broker/middlewares/exception/ExceptionMiddleware.md delete mode 100644 docs/docs/en/api/faststream/broker/middlewares/exception/ignore_handler.md delete mode 100644 docs/docs/en/api/faststream/broker/middlewares/logging/CriticalLogMiddleware.md delete mode 100644 docs/docs/en/api/faststream/broker/publisher/fake/FakePublisher.md delete mode 100644 docs/docs/en/api/faststream/broker/publisher/proto/BasePublisherProto.md delete mode 100644 docs/docs/en/api/faststream/broker/publisher/proto/ProducerProto.md delete mode 100644 docs/docs/en/api/faststream/broker/publisher/proto/PublisherProto.md delete mode 100644 docs/docs/en/api/faststream/broker/publisher/usecase/PublisherUsecase.md delete mode 100644 docs/docs/en/api/faststream/broker/response/ensure_response.md delete mode 100644 docs/docs/en/api/faststream/broker/router/ArgsContainer.md delete mode 100644 docs/docs/en/api/faststream/broker/router/BrokerRouter.md delete mode 100644 docs/docs/en/api/faststream/broker/router/SubscriberRoute.md delete mode 100644 docs/docs/en/api/faststream/broker/schemas/NameRequired.md delete mode 100644 docs/docs/en/api/faststream/broker/subscriber/call_item/HandlerItem.md delete mode 100644 docs/docs/en/api/faststream/broker/subscriber/proto/SubscriberProto.md delete mode 100644 docs/docs/en/api/faststream/broker/subscriber/usecase/SubscriberUsecase.md delete mode 100644 docs/docs/en/api/faststream/broker/types/PublisherMiddleware.md delete mode 100644 docs/docs/en/api/faststream/broker/utils/default_filter.md delete mode 100644 docs/docs/en/api/faststream/broker/utils/get_watcher_context.md delete mode 100644 docs/docs/en/api/faststream/broker/utils/process_msg.md delete mode 100644 docs/docs/en/api/faststream/broker/utils/resolve_custom_func.md delete mode 100644 docs/docs/en/api/faststream/broker/wrapper/call/HandlerCallWrapper.md delete mode 100644 docs/docs/en/api/faststream/broker/wrapper/proto/WrapperProto.md delete mode 100644 docs/docs/en/api/faststream/cli/main/publish_message.md delete mode 100644 docs/docs/en/api/faststream/cli/main/version_callback.md delete mode 100644 docs/docs/en/api/faststream/cli/supervisors/basereload/BaseReload.md delete mode 100644 docs/docs/en/api/faststream/cli/supervisors/multiprocess/Multiprocess.md delete mode 100644 docs/docs/en/api/faststream/cli/supervisors/utils/get_subprocess.md delete mode 100644 docs/docs/en/api/faststream/cli/supervisors/utils/set_exit.md delete mode 100644 docs/docs/en/api/faststream/cli/supervisors/utils/subprocess_started.md delete mode 100644 docs/docs/en/api/faststream/cli/supervisors/watchfiles/ExtendedFilter.md delete mode 100644 docs/docs/en/api/faststream/cli/supervisors/watchfiles/WatchReloader.md delete mode 100644 docs/docs/en/api/faststream/cli/utils/imports/get_app_path.md delete mode 100644 docs/docs/en/api/faststream/cli/utils/imports/import_from_string.md delete mode 100644 docs/docs/en/api/faststream/cli/utils/imports/import_object.md delete mode 100644 docs/docs/en/api/faststream/cli/utils/imports/try_import_app.md delete mode 100644 docs/docs/en/api/faststream/cli/utils/logs/LogLevels.md delete mode 100644 docs/docs/en/api/faststream/cli/utils/logs/get_log_level.md delete mode 100644 docs/docs/en/api/faststream/cli/utils/logs/set_log_level.md delete mode 100644 docs/docs/en/api/faststream/cli/utils/parser/parse_cli_args.md delete mode 100644 docs/docs/en/api/faststream/cli/utils/parser/remove_prefix.md delete mode 100644 docs/docs/en/api/faststream/constants/ContentTypes.md rename docs/docs/en/api/faststream/{cli/docs/app/serve.md => exceptions/ContextError.md} (73%) delete mode 100644 docs/docs/en/api/faststream/log/formatter/ColourizedFormatter.md delete mode 100644 docs/docs/en/api/faststream/log/formatter/expand_log_field.md delete mode 100644 docs/docs/en/api/faststream/log/logging/ExtendedFilter.md delete mode 100644 docs/docs/en/api/faststream/log/logging/get_broker_logger.md delete mode 100644 docs/docs/en/api/faststream/log/logging/set_logger_fmt.md rename docs/docs/en/api/faststream/{cli/main/main.md => message/AckStatus.md} (76%) rename docs/docs/en/api/faststream/{cli/docs/app/gen.md => message/StreamMessage.md} (74%) rename docs/docs/en/api/faststream/{broker/proto/SetupAble.md => message/decode_message.md} (74%) rename docs/docs/en/api/faststream/{broker/utils/MultiLock.md => message/encode_message.md} (74%) rename docs/docs/en/api/faststream/{cli/main/publish.md => message/gen_cor_id.md} (76%) rename docs/docs/en/api/faststream/{broker/message/gen_cor_id.md => message/message/AckStatus.md} (72%) rename docs/docs/en/api/faststream/{broker => message}/message/StreamMessage.md (70%) rename docs/docs/en/api/faststream/{broker/fastapi/StreamRouter.md => message/utils/decode_message.md} (71%) rename docs/docs/en/api/faststream/{broker/fastapi/StreamMessage.md => message/utils/encode_message.md} (71%) rename docs/docs/en/api/faststream/{broker/response/Response.md => message/utils/gen_cor_id.md} (73%) rename docs/docs/en/api/faststream/{broker/proto/EndpointProto.md => middlewares/BaseMiddleware.md} (72%) create mode 100644 docs/docs/en/api/faststream/middlewares/ExceptionMiddleware.md create mode 100644 docs/docs/en/api/faststream/middlewares/base/BaseMiddleware.md rename docs/docs/en/api/faststream/{broker/acknowledgement_watcher/BaseWatcher.md => middlewares/exception/BaseExceptionMiddleware.md} (64%) rename docs/docs/en/api/faststream/{broker/middlewares => middlewares/exception}/ExceptionMiddleware.md (65%) rename docs/docs/en/api/faststream/{broker/core/usecase/BrokerUsecase.md => middlewares/exception/ignore_handler.md} (67%) create mode 100644 docs/docs/en/api/faststream/middlewares/logging/CriticalLogMiddleware.md rename docs/docs/en/api/faststream/{utils => params}/Context.md (78%) rename docs/docs/en/api/faststream/{utils => params}/Depends.md (100%) rename docs/docs/en/api/faststream/{utils => params}/Header.md (79%) rename docs/docs/en/api/faststream/{utils => params}/Path.md (80%) rename docs/docs/en/api/faststream/{broker/core/abc/ABCBroker.md => params/no_cast/NoCastField.md} (72%) rename docs/docs/en/api/faststream/{utils/context => params/params}/Context.md (74%) rename docs/docs/en/api/faststream/{utils/context => params/params}/Header.md (75%) rename docs/docs/en/api/faststream/{utils/context => params/params}/Path.md (76%) delete mode 100644 docs/docs/en/api/faststream/rabbit/ReplyConfig.md delete mode 100644 docs/docs/en/api/faststream/rabbit/schemas/ReplyConfig.md delete mode 100644 docs/docs/en/api/faststream/rabbit/schemas/reply/ReplyConfig.md rename docs/docs/en/api/faststream/{cli/main/run.md => response/Response.md} (76%) rename docs/docs/en/api/faststream/{broker/message/AckStatus.md => response/ensure_response.md} (73%) create mode 100644 docs/docs/en/api/faststream/response/response/Response.md rename docs/docs/en/api/faststream/{broker/fastapi/context/Context.md => response/utils/ensure_response.md} (70%) rename docs/docs/en/api/faststream/{broker/core/logging/LoggingBroker.md => specification/asyncapi/utils/clear_key.md} (67%) delete mode 100644 docs/docs/en/api/faststream/testing/TestApp.md delete mode 100644 docs/docs/en/api/faststream/testing/app/TestApp.md delete mode 100644 docs/docs/en/api/faststream/testing/broker/TestBroker.md delete mode 100644 docs/docs/en/api/faststream/testing/broker/patch_broker_calls.md delete mode 100644 docs/docs/en/api/faststream/types/LoggerProto.md delete mode 100644 docs/docs/en/api/faststream/types/StandardDataclass.md delete mode 100644 docs/docs/en/api/faststream/utils/ContextRepo.md delete mode 100644 docs/docs/en/api/faststream/utils/NoCast.md delete mode 100644 docs/docs/en/api/faststream/utils/apply_types.md delete mode 100644 docs/docs/en/api/faststream/utils/ast/find_ast_node.md delete mode 100644 docs/docs/en/api/faststream/utils/ast/find_withitems.md delete mode 100644 docs/docs/en/api/faststream/utils/ast/get_withitem_calls.md delete mode 100644 docs/docs/en/api/faststream/utils/ast/is_contains_context_name.md delete mode 100644 docs/docs/en/api/faststream/utils/classes/Singleton.md delete mode 100644 docs/docs/en/api/faststream/utils/context/ContextRepo.md delete mode 100644 docs/docs/en/api/faststream/utils/context/builders/Context.md delete mode 100644 docs/docs/en/api/faststream/utils/context/builders/Header.md delete mode 100644 docs/docs/en/api/faststream/utils/context/builders/Path.md delete mode 100644 docs/docs/en/api/faststream/utils/context/repository/ContextRepo.md delete mode 100644 docs/docs/en/api/faststream/utils/context/types/Context.md delete mode 100644 docs/docs/en/api/faststream/utils/context/types/resolve_context_by_name.md delete mode 100644 docs/docs/en/api/faststream/utils/data/filter_by_dict.md delete mode 100644 docs/docs/en/api/faststream/utils/functions/call_or_await.md delete mode 100644 docs/docs/en/api/faststream/utils/functions/drop_response_type.md delete mode 100644 docs/docs/en/api/faststream/utils/functions/fake_context.md delete mode 100644 docs/docs/en/api/faststream/utils/functions/return_input.md delete mode 100644 docs/docs/en/api/faststream/utils/functions/sync_fake_context.md delete mode 100644 docs/docs/en/api/faststream/utils/functions/timeout_scope.md delete mode 100644 docs/docs/en/api/faststream/utils/functions/to_async.md delete mode 100644 docs/docs/en/api/faststream/utils/no_cast/NoCast.md delete mode 100644 docs/docs/en/api/faststream/utils/nuid/NUID.md delete mode 100644 docs/docs/en/api/faststream/utils/path/compile_path.md diff --git a/docs/docs/SUMMARY.md b/docs/docs/SUMMARY.md index d4808275d0..5739aad3e6 100644 --- a/docs/docs/SUMMARY.md +++ b/docs/docs/SUMMARY.md @@ -186,7 +186,6 @@ search: - [RabbitResponse](public_api/faststream/rabbit/RabbitResponse.md) - [RabbitRoute](public_api/faststream/rabbit/RabbitRoute.md) - [RabbitRouter](public_api/faststream/rabbit/RabbitRouter.md) - - [ReplyConfig](public_api/faststream/rabbit/ReplyConfig.md) - [TestApp](public_api/faststream/rabbit/TestApp.md) - [TestRabbitBroker](public_api/faststream/rabbit/TestRabbitBroker.md) - redis @@ -232,130 +231,6 @@ search: - [AsgiResponse](api/faststream/asgi/response/AsgiResponse.md) - websocket - [WebSocketClose](api/faststream/asgi/websocket/WebSocketClose.md) - - broker - - acknowledgement_watcher - - [BaseWatcher](api/faststream/broker/acknowledgement_watcher/BaseWatcher.md) - - [CounterWatcher](api/faststream/broker/acknowledgement_watcher/CounterWatcher.md) - - [EndlessWatcher](api/faststream/broker/acknowledgement_watcher/EndlessWatcher.md) - - [OneTryWatcher](api/faststream/broker/acknowledgement_watcher/OneTryWatcher.md) - - [WatcherContext](api/faststream/broker/acknowledgement_watcher/WatcherContext.md) - - [get_watcher](api/faststream/broker/acknowledgement_watcher/get_watcher.md) - - core - - abc - - [ABCBroker](api/faststream/broker/core/abc/ABCBroker.md) - - logging - - [LoggingBroker](api/faststream/broker/core/logging/LoggingBroker.md) - - usecase - - [BrokerUsecase](api/faststream/broker/core/usecase/BrokerUsecase.md) - - fastapi - - [StreamMessage](api/faststream/broker/fastapi/StreamMessage.md) - - [StreamRouter](api/faststream/broker/fastapi/StreamRouter.md) - - context - - [Context](api/faststream/broker/fastapi/context/Context.md) - - get_dependant - - [get_fastapi_dependant](api/faststream/broker/fastapi/get_dependant/get_fastapi_dependant.md) - - [get_fastapi_native_dependant](api/faststream/broker/fastapi/get_dependant/get_fastapi_native_dependant.md) - - route - - [StreamMessage](api/faststream/broker/fastapi/route/StreamMessage.md) - - [build_faststream_to_fastapi_parser](api/faststream/broker/fastapi/route/build_faststream_to_fastapi_parser.md) - - [make_fastapi_execution](api/faststream/broker/fastapi/route/make_fastapi_execution.md) - - [wrap_callable_to_fastapi_compatible](api/faststream/broker/fastapi/route/wrap_callable_to_fastapi_compatible.md) - - router - - [StreamRouter](api/faststream/broker/fastapi/router/StreamRouter.md) - - message - - [AckStatus](api/faststream/broker/message/AckStatus.md) - - [StreamMessage](api/faststream/broker/message/StreamMessage.md) - - [decode_message](api/faststream/broker/message/decode_message.md) - - [encode_message](api/faststream/broker/message/encode_message.md) - - [gen_cor_id](api/faststream/broker/message/gen_cor_id.md) - - middlewares - - [BaseMiddleware](api/faststream/broker/middlewares/BaseMiddleware.md) - - [ExceptionMiddleware](api/faststream/broker/middlewares/ExceptionMiddleware.md) - - base - - [BaseMiddleware](api/faststream/broker/middlewares/base/BaseMiddleware.md) - - exception - - [BaseExceptionMiddleware](api/faststream/broker/middlewares/exception/BaseExceptionMiddleware.md) - - [ExceptionMiddleware](api/faststream/broker/middlewares/exception/ExceptionMiddleware.md) - - [ignore_handler](api/faststream/broker/middlewares/exception/ignore_handler.md) - - logging - - [CriticalLogMiddleware](api/faststream/broker/middlewares/logging/CriticalLogMiddleware.md) - - proto - - [EndpointProto](api/faststream/broker/proto/EndpointProto.md) - - [SetupAble](api/faststream/broker/proto/SetupAble.md) - - publisher - - fake - - [FakePublisher](api/faststream/broker/publisher/fake/FakePublisher.md) - - proto - - [BasePublisherProto](api/faststream/broker/publisher/proto/BasePublisherProto.md) - - [ProducerProto](api/faststream/broker/publisher/proto/ProducerProto.md) - - [PublisherProto](api/faststream/broker/publisher/proto/PublisherProto.md) - - usecase - - [PublisherUsecase](api/faststream/broker/publisher/usecase/PublisherUsecase.md) - - response - - [Response](api/faststream/broker/response/Response.md) - - [ensure_response](api/faststream/broker/response/ensure_response.md) - - router - - [ArgsContainer](api/faststream/broker/router/ArgsContainer.md) - - [BrokerRouter](api/faststream/broker/router/BrokerRouter.md) - - [SubscriberRoute](api/faststream/broker/router/SubscriberRoute.md) - - schemas - - [NameRequired](api/faststream/broker/schemas/NameRequired.md) - - subscriber - - call_item - - [HandlerItem](api/faststream/broker/subscriber/call_item/HandlerItem.md) - - proto - - [SubscriberProto](api/faststream/broker/subscriber/proto/SubscriberProto.md) - - usecase - - [SubscriberUsecase](api/faststream/broker/subscriber/usecase/SubscriberUsecase.md) - - types - - [PublisherMiddleware](api/faststream/broker/types/PublisherMiddleware.md) - - utils - - [MultiLock](api/faststream/broker/utils/MultiLock.md) - - [default_filter](api/faststream/broker/utils/default_filter.md) - - [get_watcher_context](api/faststream/broker/utils/get_watcher_context.md) - - [process_msg](api/faststream/broker/utils/process_msg.md) - - [resolve_custom_func](api/faststream/broker/utils/resolve_custom_func.md) - - wrapper - - call - - [HandlerCallWrapper](api/faststream/broker/wrapper/call/HandlerCallWrapper.md) - - proto - - [WrapperProto](api/faststream/broker/wrapper/proto/WrapperProto.md) - - cli - - docs - - app - - [gen](api/faststream/cli/docs/app/gen.md) - - [serve](api/faststream/cli/docs/app/serve.md) - - main - - [main](api/faststream/cli/main/main.md) - - [publish](api/faststream/cli/main/publish.md) - - [publish_message](api/faststream/cli/main/publish_message.md) - - [run](api/faststream/cli/main/run.md) - - [version_callback](api/faststream/cli/main/version_callback.md) - - supervisors - - basereload - - [BaseReload](api/faststream/cli/supervisors/basereload/BaseReload.md) - - multiprocess - - [Multiprocess](api/faststream/cli/supervisors/multiprocess/Multiprocess.md) - - utils - - [get_subprocess](api/faststream/cli/supervisors/utils/get_subprocess.md) - - [set_exit](api/faststream/cli/supervisors/utils/set_exit.md) - - [subprocess_started](api/faststream/cli/supervisors/utils/subprocess_started.md) - - watchfiles - - [ExtendedFilter](api/faststream/cli/supervisors/watchfiles/ExtendedFilter.md) - - [WatchReloader](api/faststream/cli/supervisors/watchfiles/WatchReloader.md) - - utils - - imports - - [get_app_path](api/faststream/cli/utils/imports/get_app_path.md) - - [import_from_string](api/faststream/cli/utils/imports/import_from_string.md) - - [import_object](api/faststream/cli/utils/imports/import_object.md) - - [try_import_app](api/faststream/cli/utils/imports/try_import_app.md) - - logs - - [LogLevels](api/faststream/cli/utils/logs/LogLevels.md) - - [get_log_level](api/faststream/cli/utils/logs/get_log_level.md) - - [set_log_level](api/faststream/cli/utils/logs/set_log_level.md) - - parser - - [parse_cli_args](api/faststream/cli/utils/parser/parse_cli_args.md) - - [remove_prefix](api/faststream/cli/utils/parser/remove_prefix.md) - confluent - [KafkaBroker](api/faststream/confluent/KafkaBroker.md) - [KafkaPublisher](api/faststream/confluent/KafkaPublisher.md) @@ -454,10 +329,9 @@ search: - [MockConfluentMessage](api/faststream/confluent/testing/MockConfluentMessage.md) - [TestKafkaBroker](api/faststream/confluent/testing/TestKafkaBroker.md) - [build_message](api/faststream/confluent/testing/build_message.md) - - constants - - [ContentTypes](api/faststream/constants/ContentTypes.md) - exceptions - [AckMessage](api/faststream/exceptions/AckMessage.md) + - [ContextError](api/faststream/exceptions/ContextError.md) - [FastStreamException](api/faststream/exceptions/FastStreamException.md) - [HandlerException](api/faststream/exceptions/HandlerException.md) - [IgnoredException](api/faststream/exceptions/IgnoredException.md) @@ -546,14 +420,30 @@ search: - [FakeProducer](api/faststream/kafka/testing/FakeProducer.md) - [TestKafkaBroker](api/faststream/kafka/testing/TestKafkaBroker.md) - [build_message](api/faststream/kafka/testing/build_message.md) - - log - - formatter - - [ColourizedFormatter](api/faststream/log/formatter/ColourizedFormatter.md) - - [expand_log_field](api/faststream/log/formatter/expand_log_field.md) + - message + - [AckStatus](api/faststream/message/AckStatus.md) + - [StreamMessage](api/faststream/message/StreamMessage.md) + - [decode_message](api/faststream/message/decode_message.md) + - [encode_message](api/faststream/message/encode_message.md) + - [gen_cor_id](api/faststream/message/gen_cor_id.md) + - message + - [AckStatus](api/faststream/message/message/AckStatus.md) + - [StreamMessage](api/faststream/message/message/StreamMessage.md) + - utils + - [decode_message](api/faststream/message/utils/decode_message.md) + - [encode_message](api/faststream/message/utils/encode_message.md) + - [gen_cor_id](api/faststream/message/utils/gen_cor_id.md) + - middlewares + - [BaseMiddleware](api/faststream/middlewares/BaseMiddleware.md) + - [ExceptionMiddleware](api/faststream/middlewares/ExceptionMiddleware.md) + - base + - [BaseMiddleware](api/faststream/middlewares/base/BaseMiddleware.md) + - exception + - [BaseExceptionMiddleware](api/faststream/middlewares/exception/BaseExceptionMiddleware.md) + - [ExceptionMiddleware](api/faststream/middlewares/exception/ExceptionMiddleware.md) + - [ignore_handler](api/faststream/middlewares/exception/ignore_handler.md) - logging - - [ExtendedFilter](api/faststream/log/logging/ExtendedFilter.md) - - [get_broker_logger](api/faststream/log/logging/get_broker_logger.md) - - [set_logger_fmt](api/faststream/log/logging/set_logger_fmt.md) + - [CriticalLogMiddleware](api/faststream/middlewares/logging/CriticalLogMiddleware.md) - nats - [AckPolicy](api/faststream/nats/AckPolicy.md) - [ConsumerConfig](api/faststream/nats/ConsumerConfig.md) @@ -700,6 +590,17 @@ search: - [TelemetryMiddleware](api/faststream/opentelemetry/middleware/TelemetryMiddleware.md) - provider - [TelemetrySettingsProvider](api/faststream/opentelemetry/provider/TelemetrySettingsProvider.md) + - params + - [Context](api/faststream/params/Context.md) + - [Depends](api/faststream/params/Depends.md) + - [Header](api/faststream/params/Header.md) + - [Path](api/faststream/params/Path.md) + - no_cast + - [NoCastField](api/faststream/params/no_cast/NoCastField.md) + - params + - [Context](api/faststream/params/params/Context.md) + - [Header](api/faststream/params/params/Header.md) + - [Path](api/faststream/params/params/Path.md) - rabbit - [ExchangeType](api/faststream/rabbit/ExchangeType.md) - [RabbitBroker](api/faststream/rabbit/RabbitBroker.md) @@ -709,7 +610,6 @@ search: - [RabbitResponse](api/faststream/rabbit/RabbitResponse.md) - [RabbitRoute](api/faststream/rabbit/RabbitRoute.md) - [RabbitRouter](api/faststream/rabbit/RabbitRouter.md) - - [ReplyConfig](api/faststream/rabbit/ReplyConfig.md) - [TestApp](api/faststream/rabbit/TestApp.md) - [TestRabbitBroker](api/faststream/rabbit/TestRabbitBroker.md) - broker @@ -758,7 +658,6 @@ search: - [ExchangeType](api/faststream/rabbit/schemas/ExchangeType.md) - [RabbitExchange](api/faststream/rabbit/schemas/RabbitExchange.md) - [RabbitQueue](api/faststream/rabbit/schemas/RabbitQueue.md) - - [ReplyConfig](api/faststream/rabbit/schemas/ReplyConfig.md) - constants - [ExchangeType](api/faststream/rabbit/schemas/constants/ExchangeType.md) - exchange @@ -767,8 +666,6 @@ search: - [BaseRMQInformation](api/faststream/rabbit/schemas/proto/BaseRMQInformation.md) - queue - [RabbitQueue](api/faststream/rabbit/schemas/queue/RabbitQueue.md) - - reply - - [ReplyConfig](api/faststream/rabbit/schemas/reply/ReplyConfig.md) - security - [parse_security](api/faststream/rabbit/security/parse_security.md) - subscriber @@ -900,6 +797,13 @@ search: - [TestRedisBroker](api/faststream/redis/testing/TestRedisBroker.md) - [Visitor](api/faststream/redis/testing/Visitor.md) - [build_message](api/faststream/redis/testing/build_message.md) + - response + - [Response](api/faststream/response/Response.md) + - [ensure_response](api/faststream/response/ensure_response.md) + - response + - [Response](api/faststream/response/response/Response.md) + - utils + - [ensure_response](api/faststream/response/utils/ensure_response.md) - security - [BaseSecurity](api/faststream/security/BaseSecurity.md) - [SASLGSSAPI](api/faststream/security/SASLGSSAPI.md) @@ -929,6 +833,7 @@ search: - [get_asyncapi_html](api/faststream/specification/asyncapi/site/get_asyncapi_html.md) - [serve_app](api/faststream/specification/asyncapi/site/serve_app.md) - utils + - [clear_key](api/faststream/specification/asyncapi/utils/clear_key.md) - [resolve_payloads](api/faststream/specification/asyncapi/utils/resolve_payloads.md) - [to_camelcase](api/faststream/specification/asyncapi/utils/to_camelcase.md) - v2_6_0 @@ -1159,61 +1064,6 @@ search: - tag - [Tag](api/faststream/specification/schema/tag/Tag.md) - [TagDict](api/faststream/specification/schema/tag/TagDict.md) - - testing - - [TestApp](api/faststream/testing/TestApp.md) - - app - - [TestApp](api/faststream/testing/app/TestApp.md) - - broker - - [TestBroker](api/faststream/testing/broker/TestBroker.md) - - [patch_broker_calls](api/faststream/testing/broker/patch_broker_calls.md) - - types - - [LoggerProto](api/faststream/types/LoggerProto.md) - - [StandardDataclass](api/faststream/types/StandardDataclass.md) - - utils - - [Context](api/faststream/utils/Context.md) - - [ContextRepo](api/faststream/utils/ContextRepo.md) - - [Depends](api/faststream/utils/Depends.md) - - [Header](api/faststream/utils/Header.md) - - [NoCast](api/faststream/utils/NoCast.md) - - [Path](api/faststream/utils/Path.md) - - [apply_types](api/faststream/utils/apply_types.md) - - ast - - [find_ast_node](api/faststream/utils/ast/find_ast_node.md) - - [find_withitems](api/faststream/utils/ast/find_withitems.md) - - [get_withitem_calls](api/faststream/utils/ast/get_withitem_calls.md) - - [is_contains_context_name](api/faststream/utils/ast/is_contains_context_name.md) - - classes - - [Singleton](api/faststream/utils/classes/Singleton.md) - - context - - [Context](api/faststream/utils/context/Context.md) - - [ContextRepo](api/faststream/utils/context/ContextRepo.md) - - [Header](api/faststream/utils/context/Header.md) - - [Path](api/faststream/utils/context/Path.md) - - builders - - [Context](api/faststream/utils/context/builders/Context.md) - - [Header](api/faststream/utils/context/builders/Header.md) - - [Path](api/faststream/utils/context/builders/Path.md) - - repository - - [ContextRepo](api/faststream/utils/context/repository/ContextRepo.md) - - types - - [Context](api/faststream/utils/context/types/Context.md) - - [resolve_context_by_name](api/faststream/utils/context/types/resolve_context_by_name.md) - - data - - [filter_by_dict](api/faststream/utils/data/filter_by_dict.md) - - functions - - [call_or_await](api/faststream/utils/functions/call_or_await.md) - - [drop_response_type](api/faststream/utils/functions/drop_response_type.md) - - [fake_context](api/faststream/utils/functions/fake_context.md) - - [return_input](api/faststream/utils/functions/return_input.md) - - [sync_fake_context](api/faststream/utils/functions/sync_fake_context.md) - - [timeout_scope](api/faststream/utils/functions/timeout_scope.md) - - [to_async](api/faststream/utils/functions/to_async.md) - - no_cast - - [NoCast](api/faststream/utils/no_cast/NoCast.md) - - nuid - - [NUID](api/faststream/utils/nuid/NUID.md) - - path - - [compile_path](api/faststream/utils/path/compile_path.md) - Contributing - [Development](getting-started/contributing/CONTRIBUTING.md) - [Documentation](getting-started/contributing/docs.md) diff --git a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/CounterWatcher.md b/docs/docs/en/api/faststream/broker/acknowledgement_watcher/CounterWatcher.md deleted file mode 100644 index e299f4c442..0000000000 --- a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/CounterWatcher.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.acknowledgement_watcher.CounterWatcher diff --git a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/EndlessWatcher.md b/docs/docs/en/api/faststream/broker/acknowledgement_watcher/EndlessWatcher.md deleted file mode 100644 index b3aac70921..0000000000 --- a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/EndlessWatcher.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.acknowledgement_watcher.EndlessWatcher diff --git a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/OneTryWatcher.md b/docs/docs/en/api/faststream/broker/acknowledgement_watcher/OneTryWatcher.md deleted file mode 100644 index 4baa0bdd9c..0000000000 --- a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/OneTryWatcher.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.acknowledgement_watcher.OneTryWatcher diff --git a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/WatcherContext.md b/docs/docs/en/api/faststream/broker/acknowledgement_watcher/WatcherContext.md deleted file mode 100644 index ee1ef8643b..0000000000 --- a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/WatcherContext.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.acknowledgement_watcher.WatcherContext diff --git a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/get_watcher.md b/docs/docs/en/api/faststream/broker/acknowledgement_watcher/get_watcher.md deleted file mode 100644 index 9f6869bcf5..0000000000 --- a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/get_watcher.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.acknowledgement_watcher.get_watcher diff --git a/docs/docs/en/api/faststream/broker/fastapi/get_dependant/get_fastapi_dependant.md b/docs/docs/en/api/faststream/broker/fastapi/get_dependant/get_fastapi_dependant.md deleted file mode 100644 index 1f5d3d1e77..0000000000 --- a/docs/docs/en/api/faststream/broker/fastapi/get_dependant/get_fastapi_dependant.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.fastapi.get_dependant.get_fastapi_dependant diff --git a/docs/docs/en/api/faststream/broker/fastapi/get_dependant/get_fastapi_native_dependant.md b/docs/docs/en/api/faststream/broker/fastapi/get_dependant/get_fastapi_native_dependant.md deleted file mode 100644 index f3d6a05e39..0000000000 --- a/docs/docs/en/api/faststream/broker/fastapi/get_dependant/get_fastapi_native_dependant.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.fastapi.get_dependant.get_fastapi_native_dependant diff --git a/docs/docs/en/api/faststream/broker/fastapi/route/StreamMessage.md b/docs/docs/en/api/faststream/broker/fastapi/route/StreamMessage.md deleted file mode 100644 index 0fbed89be9..0000000000 --- a/docs/docs/en/api/faststream/broker/fastapi/route/StreamMessage.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.fastapi.route.StreamMessage diff --git a/docs/docs/en/api/faststream/broker/fastapi/route/build_faststream_to_fastapi_parser.md b/docs/docs/en/api/faststream/broker/fastapi/route/build_faststream_to_fastapi_parser.md deleted file mode 100644 index dc05bb190e..0000000000 --- a/docs/docs/en/api/faststream/broker/fastapi/route/build_faststream_to_fastapi_parser.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.fastapi.route.build_faststream_to_fastapi_parser diff --git a/docs/docs/en/api/faststream/broker/fastapi/route/make_fastapi_execution.md b/docs/docs/en/api/faststream/broker/fastapi/route/make_fastapi_execution.md deleted file mode 100644 index f9a0fdd712..0000000000 --- a/docs/docs/en/api/faststream/broker/fastapi/route/make_fastapi_execution.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.fastapi.route.make_fastapi_execution diff --git a/docs/docs/en/api/faststream/broker/fastapi/route/wrap_callable_to_fastapi_compatible.md b/docs/docs/en/api/faststream/broker/fastapi/route/wrap_callable_to_fastapi_compatible.md deleted file mode 100644 index ab7081c711..0000000000 --- a/docs/docs/en/api/faststream/broker/fastapi/route/wrap_callable_to_fastapi_compatible.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.fastapi.route.wrap_callable_to_fastapi_compatible diff --git a/docs/docs/en/api/faststream/broker/fastapi/router/StreamRouter.md b/docs/docs/en/api/faststream/broker/fastapi/router/StreamRouter.md deleted file mode 100644 index d1f017acc6..0000000000 --- a/docs/docs/en/api/faststream/broker/fastapi/router/StreamRouter.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.fastapi.router.StreamRouter diff --git a/docs/docs/en/api/faststream/broker/message/decode_message.md b/docs/docs/en/api/faststream/broker/message/decode_message.md deleted file mode 100644 index a5904b1458..0000000000 --- a/docs/docs/en/api/faststream/broker/message/decode_message.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.message.decode_message diff --git a/docs/docs/en/api/faststream/broker/message/encode_message.md b/docs/docs/en/api/faststream/broker/message/encode_message.md deleted file mode 100644 index ed34f0ceb1..0000000000 --- a/docs/docs/en/api/faststream/broker/message/encode_message.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.message.encode_message diff --git a/docs/docs/en/api/faststream/broker/middlewares/BaseMiddleware.md b/docs/docs/en/api/faststream/broker/middlewares/BaseMiddleware.md deleted file mode 100644 index d81c2fbf20..0000000000 --- a/docs/docs/en/api/faststream/broker/middlewares/BaseMiddleware.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.middlewares.BaseMiddleware diff --git a/docs/docs/en/api/faststream/broker/middlewares/base/BaseMiddleware.md b/docs/docs/en/api/faststream/broker/middlewares/base/BaseMiddleware.md deleted file mode 100644 index 8502288249..0000000000 --- a/docs/docs/en/api/faststream/broker/middlewares/base/BaseMiddleware.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.middlewares.base.BaseMiddleware diff --git a/docs/docs/en/api/faststream/broker/middlewares/exception/BaseExceptionMiddleware.md b/docs/docs/en/api/faststream/broker/middlewares/exception/BaseExceptionMiddleware.md deleted file mode 100644 index 7ab0a414d0..0000000000 --- a/docs/docs/en/api/faststream/broker/middlewares/exception/BaseExceptionMiddleware.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.middlewares.exception.BaseExceptionMiddleware diff --git a/docs/docs/en/api/faststream/broker/middlewares/exception/ExceptionMiddleware.md b/docs/docs/en/api/faststream/broker/middlewares/exception/ExceptionMiddleware.md deleted file mode 100644 index 0abf119ab3..0000000000 --- a/docs/docs/en/api/faststream/broker/middlewares/exception/ExceptionMiddleware.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.middlewares.exception.ExceptionMiddleware diff --git a/docs/docs/en/api/faststream/broker/middlewares/exception/ignore_handler.md b/docs/docs/en/api/faststream/broker/middlewares/exception/ignore_handler.md deleted file mode 100644 index 425561dcba..0000000000 --- a/docs/docs/en/api/faststream/broker/middlewares/exception/ignore_handler.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.middlewares.exception.ignore_handler diff --git a/docs/docs/en/api/faststream/broker/middlewares/logging/CriticalLogMiddleware.md b/docs/docs/en/api/faststream/broker/middlewares/logging/CriticalLogMiddleware.md deleted file mode 100644 index 829368d699..0000000000 --- a/docs/docs/en/api/faststream/broker/middlewares/logging/CriticalLogMiddleware.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.middlewares.logging.CriticalLogMiddleware diff --git a/docs/docs/en/api/faststream/broker/publisher/fake/FakePublisher.md b/docs/docs/en/api/faststream/broker/publisher/fake/FakePublisher.md deleted file mode 100644 index 67b2c04f5c..0000000000 --- a/docs/docs/en/api/faststream/broker/publisher/fake/FakePublisher.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.publisher.fake.FakePublisher diff --git a/docs/docs/en/api/faststream/broker/publisher/proto/BasePublisherProto.md b/docs/docs/en/api/faststream/broker/publisher/proto/BasePublisherProto.md deleted file mode 100644 index ed0944fa14..0000000000 --- a/docs/docs/en/api/faststream/broker/publisher/proto/BasePublisherProto.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.publisher.proto.BasePublisherProto diff --git a/docs/docs/en/api/faststream/broker/publisher/proto/ProducerProto.md b/docs/docs/en/api/faststream/broker/publisher/proto/ProducerProto.md deleted file mode 100644 index 8cf65d4e00..0000000000 --- a/docs/docs/en/api/faststream/broker/publisher/proto/ProducerProto.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.publisher.proto.ProducerProto diff --git a/docs/docs/en/api/faststream/broker/publisher/proto/PublisherProto.md b/docs/docs/en/api/faststream/broker/publisher/proto/PublisherProto.md deleted file mode 100644 index f86760bba6..0000000000 --- a/docs/docs/en/api/faststream/broker/publisher/proto/PublisherProto.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.publisher.proto.PublisherProto diff --git a/docs/docs/en/api/faststream/broker/publisher/usecase/PublisherUsecase.md b/docs/docs/en/api/faststream/broker/publisher/usecase/PublisherUsecase.md deleted file mode 100644 index f1de9539fe..0000000000 --- a/docs/docs/en/api/faststream/broker/publisher/usecase/PublisherUsecase.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.publisher.usecase.PublisherUsecase diff --git a/docs/docs/en/api/faststream/broker/response/ensure_response.md b/docs/docs/en/api/faststream/broker/response/ensure_response.md deleted file mode 100644 index b4a98bd4a4..0000000000 --- a/docs/docs/en/api/faststream/broker/response/ensure_response.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.response.ensure_response diff --git a/docs/docs/en/api/faststream/broker/router/ArgsContainer.md b/docs/docs/en/api/faststream/broker/router/ArgsContainer.md deleted file mode 100644 index bd82308c79..0000000000 --- a/docs/docs/en/api/faststream/broker/router/ArgsContainer.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.router.ArgsContainer diff --git a/docs/docs/en/api/faststream/broker/router/BrokerRouter.md b/docs/docs/en/api/faststream/broker/router/BrokerRouter.md deleted file mode 100644 index d6bb82fdd2..0000000000 --- a/docs/docs/en/api/faststream/broker/router/BrokerRouter.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.router.BrokerRouter diff --git a/docs/docs/en/api/faststream/broker/router/SubscriberRoute.md b/docs/docs/en/api/faststream/broker/router/SubscriberRoute.md deleted file mode 100644 index 18c3a547ec..0000000000 --- a/docs/docs/en/api/faststream/broker/router/SubscriberRoute.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.router.SubscriberRoute diff --git a/docs/docs/en/api/faststream/broker/schemas/NameRequired.md b/docs/docs/en/api/faststream/broker/schemas/NameRequired.md deleted file mode 100644 index 398f70b421..0000000000 --- a/docs/docs/en/api/faststream/broker/schemas/NameRequired.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.schemas.NameRequired diff --git a/docs/docs/en/api/faststream/broker/subscriber/call_item/HandlerItem.md b/docs/docs/en/api/faststream/broker/subscriber/call_item/HandlerItem.md deleted file mode 100644 index e2f635512c..0000000000 --- a/docs/docs/en/api/faststream/broker/subscriber/call_item/HandlerItem.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.subscriber.call_item.HandlerItem diff --git a/docs/docs/en/api/faststream/broker/subscriber/proto/SubscriberProto.md b/docs/docs/en/api/faststream/broker/subscriber/proto/SubscriberProto.md deleted file mode 100644 index fd887d41b9..0000000000 --- a/docs/docs/en/api/faststream/broker/subscriber/proto/SubscriberProto.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.subscriber.proto.SubscriberProto diff --git a/docs/docs/en/api/faststream/broker/subscriber/usecase/SubscriberUsecase.md b/docs/docs/en/api/faststream/broker/subscriber/usecase/SubscriberUsecase.md deleted file mode 100644 index f7e9448277..0000000000 --- a/docs/docs/en/api/faststream/broker/subscriber/usecase/SubscriberUsecase.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.subscriber.usecase.SubscriberUsecase diff --git a/docs/docs/en/api/faststream/broker/types/PublisherMiddleware.md b/docs/docs/en/api/faststream/broker/types/PublisherMiddleware.md deleted file mode 100644 index 2c43d2efcb..0000000000 --- a/docs/docs/en/api/faststream/broker/types/PublisherMiddleware.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.types.PublisherMiddleware diff --git a/docs/docs/en/api/faststream/broker/utils/default_filter.md b/docs/docs/en/api/faststream/broker/utils/default_filter.md deleted file mode 100644 index 3fe25fa14a..0000000000 --- a/docs/docs/en/api/faststream/broker/utils/default_filter.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.utils.default_filter diff --git a/docs/docs/en/api/faststream/broker/utils/get_watcher_context.md b/docs/docs/en/api/faststream/broker/utils/get_watcher_context.md deleted file mode 100644 index 883599c043..0000000000 --- a/docs/docs/en/api/faststream/broker/utils/get_watcher_context.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.utils.get_watcher_context diff --git a/docs/docs/en/api/faststream/broker/utils/process_msg.md b/docs/docs/en/api/faststream/broker/utils/process_msg.md deleted file mode 100644 index e7ce8aaf99..0000000000 --- a/docs/docs/en/api/faststream/broker/utils/process_msg.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.utils.process_msg diff --git a/docs/docs/en/api/faststream/broker/utils/resolve_custom_func.md b/docs/docs/en/api/faststream/broker/utils/resolve_custom_func.md deleted file mode 100644 index f72ed3c059..0000000000 --- a/docs/docs/en/api/faststream/broker/utils/resolve_custom_func.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.utils.resolve_custom_func diff --git a/docs/docs/en/api/faststream/broker/wrapper/call/HandlerCallWrapper.md b/docs/docs/en/api/faststream/broker/wrapper/call/HandlerCallWrapper.md deleted file mode 100644 index 4c25733797..0000000000 --- a/docs/docs/en/api/faststream/broker/wrapper/call/HandlerCallWrapper.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.wrapper.call.HandlerCallWrapper diff --git a/docs/docs/en/api/faststream/broker/wrapper/proto/WrapperProto.md b/docs/docs/en/api/faststream/broker/wrapper/proto/WrapperProto.md deleted file mode 100644 index 87ffdf815b..0000000000 --- a/docs/docs/en/api/faststream/broker/wrapper/proto/WrapperProto.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.broker.wrapper.proto.WrapperProto diff --git a/docs/docs/en/api/faststream/cli/main/publish_message.md b/docs/docs/en/api/faststream/cli/main/publish_message.md deleted file mode 100644 index a8bb7b8efa..0000000000 --- a/docs/docs/en/api/faststream/cli/main/publish_message.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.main.publish_message diff --git a/docs/docs/en/api/faststream/cli/main/version_callback.md b/docs/docs/en/api/faststream/cli/main/version_callback.md deleted file mode 100644 index a5467ffeb7..0000000000 --- a/docs/docs/en/api/faststream/cli/main/version_callback.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.main.version_callback diff --git a/docs/docs/en/api/faststream/cli/supervisors/basereload/BaseReload.md b/docs/docs/en/api/faststream/cli/supervisors/basereload/BaseReload.md deleted file mode 100644 index b378b2922a..0000000000 --- a/docs/docs/en/api/faststream/cli/supervisors/basereload/BaseReload.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.supervisors.basereload.BaseReload diff --git a/docs/docs/en/api/faststream/cli/supervisors/multiprocess/Multiprocess.md b/docs/docs/en/api/faststream/cli/supervisors/multiprocess/Multiprocess.md deleted file mode 100644 index 4cdd6d30e3..0000000000 --- a/docs/docs/en/api/faststream/cli/supervisors/multiprocess/Multiprocess.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.supervisors.multiprocess.Multiprocess diff --git a/docs/docs/en/api/faststream/cli/supervisors/utils/get_subprocess.md b/docs/docs/en/api/faststream/cli/supervisors/utils/get_subprocess.md deleted file mode 100644 index 1488078e45..0000000000 --- a/docs/docs/en/api/faststream/cli/supervisors/utils/get_subprocess.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.supervisors.utils.get_subprocess diff --git a/docs/docs/en/api/faststream/cli/supervisors/utils/set_exit.md b/docs/docs/en/api/faststream/cli/supervisors/utils/set_exit.md deleted file mode 100644 index e739d79409..0000000000 --- a/docs/docs/en/api/faststream/cli/supervisors/utils/set_exit.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.supervisors.utils.set_exit diff --git a/docs/docs/en/api/faststream/cli/supervisors/utils/subprocess_started.md b/docs/docs/en/api/faststream/cli/supervisors/utils/subprocess_started.md deleted file mode 100644 index 8840390ca8..0000000000 --- a/docs/docs/en/api/faststream/cli/supervisors/utils/subprocess_started.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.supervisors.utils.subprocess_started diff --git a/docs/docs/en/api/faststream/cli/supervisors/watchfiles/ExtendedFilter.md b/docs/docs/en/api/faststream/cli/supervisors/watchfiles/ExtendedFilter.md deleted file mode 100644 index 095c3cc2f0..0000000000 --- a/docs/docs/en/api/faststream/cli/supervisors/watchfiles/ExtendedFilter.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.supervisors.watchfiles.ExtendedFilter diff --git a/docs/docs/en/api/faststream/cli/supervisors/watchfiles/WatchReloader.md b/docs/docs/en/api/faststream/cli/supervisors/watchfiles/WatchReloader.md deleted file mode 100644 index b86533f1e8..0000000000 --- a/docs/docs/en/api/faststream/cli/supervisors/watchfiles/WatchReloader.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.supervisors.watchfiles.WatchReloader diff --git a/docs/docs/en/api/faststream/cli/utils/imports/get_app_path.md b/docs/docs/en/api/faststream/cli/utils/imports/get_app_path.md deleted file mode 100644 index be8fcfef0c..0000000000 --- a/docs/docs/en/api/faststream/cli/utils/imports/get_app_path.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.utils.imports.get_app_path diff --git a/docs/docs/en/api/faststream/cli/utils/imports/import_from_string.md b/docs/docs/en/api/faststream/cli/utils/imports/import_from_string.md deleted file mode 100644 index 731203ac54..0000000000 --- a/docs/docs/en/api/faststream/cli/utils/imports/import_from_string.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.utils.imports.import_from_string diff --git a/docs/docs/en/api/faststream/cli/utils/imports/import_object.md b/docs/docs/en/api/faststream/cli/utils/imports/import_object.md deleted file mode 100644 index e26a3e280c..0000000000 --- a/docs/docs/en/api/faststream/cli/utils/imports/import_object.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.utils.imports.import_object diff --git a/docs/docs/en/api/faststream/cli/utils/imports/try_import_app.md b/docs/docs/en/api/faststream/cli/utils/imports/try_import_app.md deleted file mode 100644 index 0c6df90c86..0000000000 --- a/docs/docs/en/api/faststream/cli/utils/imports/try_import_app.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.utils.imports.try_import_app diff --git a/docs/docs/en/api/faststream/cli/utils/logs/LogLevels.md b/docs/docs/en/api/faststream/cli/utils/logs/LogLevels.md deleted file mode 100644 index f82e3bbb6f..0000000000 --- a/docs/docs/en/api/faststream/cli/utils/logs/LogLevels.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.utils.logs.LogLevels diff --git a/docs/docs/en/api/faststream/cli/utils/logs/get_log_level.md b/docs/docs/en/api/faststream/cli/utils/logs/get_log_level.md deleted file mode 100644 index f5e4fcaea0..0000000000 --- a/docs/docs/en/api/faststream/cli/utils/logs/get_log_level.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.utils.logs.get_log_level diff --git a/docs/docs/en/api/faststream/cli/utils/logs/set_log_level.md b/docs/docs/en/api/faststream/cli/utils/logs/set_log_level.md deleted file mode 100644 index 6db13adbb9..0000000000 --- a/docs/docs/en/api/faststream/cli/utils/logs/set_log_level.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.utils.logs.set_log_level diff --git a/docs/docs/en/api/faststream/cli/utils/parser/parse_cli_args.md b/docs/docs/en/api/faststream/cli/utils/parser/parse_cli_args.md deleted file mode 100644 index 9c6f03d066..0000000000 --- a/docs/docs/en/api/faststream/cli/utils/parser/parse_cli_args.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.utils.parser.parse_cli_args diff --git a/docs/docs/en/api/faststream/cli/utils/parser/remove_prefix.md b/docs/docs/en/api/faststream/cli/utils/parser/remove_prefix.md deleted file mode 100644 index 587db3677f..0000000000 --- a/docs/docs/en/api/faststream/cli/utils/parser/remove_prefix.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.cli.utils.parser.remove_prefix diff --git a/docs/docs/en/api/faststream/confluent/TestApp.md b/docs/docs/en/api/faststream/confluent/TestApp.md index 2468f3755c..ad101303af 100644 --- a/docs/docs/en/api/faststream/confluent/TestApp.md +++ b/docs/docs/en/api/faststream/confluent/TestApp.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.testing.app.TestApp +::: faststream._internal.testing.app.TestApp diff --git a/docs/docs/en/api/faststream/confluent/fastapi/Context.md b/docs/docs/en/api/faststream/confluent/fastapi/Context.md index f4240bb0da..99bf141f5c 100644 --- a/docs/docs/en/api/faststream/confluent/fastapi/Context.md +++ b/docs/docs/en/api/faststream/confluent/fastapi/Context.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.fastapi.context.Context +::: faststream._internal.fastapi.context.Context diff --git a/docs/docs/en/api/faststream/constants/ContentTypes.md b/docs/docs/en/api/faststream/constants/ContentTypes.md deleted file mode 100644 index 28d62bdcd7..0000000000 --- a/docs/docs/en/api/faststream/constants/ContentTypes.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.constants.ContentTypes diff --git a/docs/docs/en/api/faststream/cli/docs/app/serve.md b/docs/docs/en/api/faststream/exceptions/ContextError.md similarity index 73% rename from docs/docs/en/api/faststream/cli/docs/app/serve.md rename to docs/docs/en/api/faststream/exceptions/ContextError.md index 3d9ec139d9..73b4fcdd21 100644 --- a/docs/docs/en/api/faststream/cli/docs/app/serve.md +++ b/docs/docs/en/api/faststream/exceptions/ContextError.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.cli.docs.app.serve +::: faststream.exceptions.ContextError diff --git a/docs/docs/en/api/faststream/kafka/TestApp.md b/docs/docs/en/api/faststream/kafka/TestApp.md index 2468f3755c..ad101303af 100644 --- a/docs/docs/en/api/faststream/kafka/TestApp.md +++ b/docs/docs/en/api/faststream/kafka/TestApp.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.testing.app.TestApp +::: faststream._internal.testing.app.TestApp diff --git a/docs/docs/en/api/faststream/kafka/fastapi/Context.md b/docs/docs/en/api/faststream/kafka/fastapi/Context.md index f4240bb0da..99bf141f5c 100644 --- a/docs/docs/en/api/faststream/kafka/fastapi/Context.md +++ b/docs/docs/en/api/faststream/kafka/fastapi/Context.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.fastapi.context.Context +::: faststream._internal.fastapi.context.Context diff --git a/docs/docs/en/api/faststream/log/formatter/ColourizedFormatter.md b/docs/docs/en/api/faststream/log/formatter/ColourizedFormatter.md deleted file mode 100644 index 6e1aec157c..0000000000 --- a/docs/docs/en/api/faststream/log/formatter/ColourizedFormatter.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.log.formatter.ColourizedFormatter diff --git a/docs/docs/en/api/faststream/log/formatter/expand_log_field.md b/docs/docs/en/api/faststream/log/formatter/expand_log_field.md deleted file mode 100644 index ce943209af..0000000000 --- a/docs/docs/en/api/faststream/log/formatter/expand_log_field.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.log.formatter.expand_log_field diff --git a/docs/docs/en/api/faststream/log/logging/ExtendedFilter.md b/docs/docs/en/api/faststream/log/logging/ExtendedFilter.md deleted file mode 100644 index bd8f017947..0000000000 --- a/docs/docs/en/api/faststream/log/logging/ExtendedFilter.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.log.logging.ExtendedFilter diff --git a/docs/docs/en/api/faststream/log/logging/get_broker_logger.md b/docs/docs/en/api/faststream/log/logging/get_broker_logger.md deleted file mode 100644 index e3433fc8dd..0000000000 --- a/docs/docs/en/api/faststream/log/logging/get_broker_logger.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.log.logging.get_broker_logger diff --git a/docs/docs/en/api/faststream/log/logging/set_logger_fmt.md b/docs/docs/en/api/faststream/log/logging/set_logger_fmt.md deleted file mode 100644 index a4af3d137f..0000000000 --- a/docs/docs/en/api/faststream/log/logging/set_logger_fmt.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.log.logging.set_logger_fmt diff --git a/docs/docs/en/api/faststream/cli/main/main.md b/docs/docs/en/api/faststream/message/AckStatus.md similarity index 76% rename from docs/docs/en/api/faststream/cli/main/main.md rename to docs/docs/en/api/faststream/message/AckStatus.md index c15cba484c..b8d3d6c6c8 100644 --- a/docs/docs/en/api/faststream/cli/main/main.md +++ b/docs/docs/en/api/faststream/message/AckStatus.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.cli.main.main +::: faststream.message.AckStatus diff --git a/docs/docs/en/api/faststream/cli/docs/app/gen.md b/docs/docs/en/api/faststream/message/StreamMessage.md similarity index 74% rename from docs/docs/en/api/faststream/cli/docs/app/gen.md rename to docs/docs/en/api/faststream/message/StreamMessage.md index 72af7d6688..5f072b2410 100644 --- a/docs/docs/en/api/faststream/cli/docs/app/gen.md +++ b/docs/docs/en/api/faststream/message/StreamMessage.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.cli.docs.app.gen +::: faststream.message.StreamMessage diff --git a/docs/docs/en/api/faststream/broker/proto/SetupAble.md b/docs/docs/en/api/faststream/message/decode_message.md similarity index 74% rename from docs/docs/en/api/faststream/broker/proto/SetupAble.md rename to docs/docs/en/api/faststream/message/decode_message.md index a4b487318e..c0dce11670 100644 --- a/docs/docs/en/api/faststream/broker/proto/SetupAble.md +++ b/docs/docs/en/api/faststream/message/decode_message.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.proto.SetupAble +::: faststream.message.decode_message diff --git a/docs/docs/en/api/faststream/broker/utils/MultiLock.md b/docs/docs/en/api/faststream/message/encode_message.md similarity index 74% rename from docs/docs/en/api/faststream/broker/utils/MultiLock.md rename to docs/docs/en/api/faststream/message/encode_message.md index 5f4bc6d5cb..7d33d8d904 100644 --- a/docs/docs/en/api/faststream/broker/utils/MultiLock.md +++ b/docs/docs/en/api/faststream/message/encode_message.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.utils.MultiLock +::: faststream.message.encode_message diff --git a/docs/docs/en/api/faststream/cli/main/publish.md b/docs/docs/en/api/faststream/message/gen_cor_id.md similarity index 76% rename from docs/docs/en/api/faststream/cli/main/publish.md rename to docs/docs/en/api/faststream/message/gen_cor_id.md index 84b490cde8..0abdf298b9 100644 --- a/docs/docs/en/api/faststream/cli/main/publish.md +++ b/docs/docs/en/api/faststream/message/gen_cor_id.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.cli.main.publish +::: faststream.message.gen_cor_id diff --git a/docs/docs/en/api/faststream/broker/message/gen_cor_id.md b/docs/docs/en/api/faststream/message/message/AckStatus.md similarity index 72% rename from docs/docs/en/api/faststream/broker/message/gen_cor_id.md rename to docs/docs/en/api/faststream/message/message/AckStatus.md index 5e4c2a4622..80940a8ba7 100644 --- a/docs/docs/en/api/faststream/broker/message/gen_cor_id.md +++ b/docs/docs/en/api/faststream/message/message/AckStatus.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.message.gen_cor_id +::: faststream.message.message.AckStatus diff --git a/docs/docs/en/api/faststream/broker/message/StreamMessage.md b/docs/docs/en/api/faststream/message/message/StreamMessage.md similarity index 70% rename from docs/docs/en/api/faststream/broker/message/StreamMessage.md rename to docs/docs/en/api/faststream/message/message/StreamMessage.md index 800059b91d..a41232b74c 100644 --- a/docs/docs/en/api/faststream/broker/message/StreamMessage.md +++ b/docs/docs/en/api/faststream/message/message/StreamMessage.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.message.StreamMessage +::: faststream.message.message.StreamMessage diff --git a/docs/docs/en/api/faststream/broker/fastapi/StreamRouter.md b/docs/docs/en/api/faststream/message/utils/decode_message.md similarity index 71% rename from docs/docs/en/api/faststream/broker/fastapi/StreamRouter.md rename to docs/docs/en/api/faststream/message/utils/decode_message.md index 32a8e8743d..b2ec48dac0 100644 --- a/docs/docs/en/api/faststream/broker/fastapi/StreamRouter.md +++ b/docs/docs/en/api/faststream/message/utils/decode_message.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.fastapi.StreamRouter +::: faststream.message.utils.decode_message diff --git a/docs/docs/en/api/faststream/broker/fastapi/StreamMessage.md b/docs/docs/en/api/faststream/message/utils/encode_message.md similarity index 71% rename from docs/docs/en/api/faststream/broker/fastapi/StreamMessage.md rename to docs/docs/en/api/faststream/message/utils/encode_message.md index 2124b279ea..7401e07da5 100644 --- a/docs/docs/en/api/faststream/broker/fastapi/StreamMessage.md +++ b/docs/docs/en/api/faststream/message/utils/encode_message.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.fastapi.StreamMessage +::: faststream.message.utils.encode_message diff --git a/docs/docs/en/api/faststream/broker/response/Response.md b/docs/docs/en/api/faststream/message/utils/gen_cor_id.md similarity index 73% rename from docs/docs/en/api/faststream/broker/response/Response.md rename to docs/docs/en/api/faststream/message/utils/gen_cor_id.md index 1163381d7b..74b49c30d2 100644 --- a/docs/docs/en/api/faststream/broker/response/Response.md +++ b/docs/docs/en/api/faststream/message/utils/gen_cor_id.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.response.Response +::: faststream.message.utils.gen_cor_id diff --git a/docs/docs/en/api/faststream/broker/proto/EndpointProto.md b/docs/docs/en/api/faststream/middlewares/BaseMiddleware.md similarity index 72% rename from docs/docs/en/api/faststream/broker/proto/EndpointProto.md rename to docs/docs/en/api/faststream/middlewares/BaseMiddleware.md index 5a3b095952..30f98187a1 100644 --- a/docs/docs/en/api/faststream/broker/proto/EndpointProto.md +++ b/docs/docs/en/api/faststream/middlewares/BaseMiddleware.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.proto.EndpointProto +::: faststream.middlewares.BaseMiddleware diff --git a/docs/docs/en/api/faststream/middlewares/ExceptionMiddleware.md b/docs/docs/en/api/faststream/middlewares/ExceptionMiddleware.md new file mode 100644 index 0000000000..c1d21850c8 --- /dev/null +++ b/docs/docs/en/api/faststream/middlewares/ExceptionMiddleware.md @@ -0,0 +1,11 @@ +--- +# 0.5 - API +# 2 - Release +# 3 - Contributing +# 5 - Template Page +# 10 - Default +search: + boost: 0.5 +--- + +::: faststream.middlewares.ExceptionMiddleware diff --git a/docs/docs/en/api/faststream/middlewares/base/BaseMiddleware.md b/docs/docs/en/api/faststream/middlewares/base/BaseMiddleware.md new file mode 100644 index 0000000000..d3319e7441 --- /dev/null +++ b/docs/docs/en/api/faststream/middlewares/base/BaseMiddleware.md @@ -0,0 +1,11 @@ +--- +# 0.5 - API +# 2 - Release +# 3 - Contributing +# 5 - Template Page +# 10 - Default +search: + boost: 0.5 +--- + +::: faststream.middlewares.base.BaseMiddleware diff --git a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/BaseWatcher.md b/docs/docs/en/api/faststream/middlewares/exception/BaseExceptionMiddleware.md similarity index 64% rename from docs/docs/en/api/faststream/broker/acknowledgement_watcher/BaseWatcher.md rename to docs/docs/en/api/faststream/middlewares/exception/BaseExceptionMiddleware.md index d0c27d17d9..54f8031f0a 100644 --- a/docs/docs/en/api/faststream/broker/acknowledgement_watcher/BaseWatcher.md +++ b/docs/docs/en/api/faststream/middlewares/exception/BaseExceptionMiddleware.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.acknowledgement_watcher.BaseWatcher +::: faststream.middlewares.exception.BaseExceptionMiddleware diff --git a/docs/docs/en/api/faststream/broker/middlewares/ExceptionMiddleware.md b/docs/docs/en/api/faststream/middlewares/exception/ExceptionMiddleware.md similarity index 65% rename from docs/docs/en/api/faststream/broker/middlewares/ExceptionMiddleware.md rename to docs/docs/en/api/faststream/middlewares/exception/ExceptionMiddleware.md index 1fa11b80fc..da1693a722 100644 --- a/docs/docs/en/api/faststream/broker/middlewares/ExceptionMiddleware.md +++ b/docs/docs/en/api/faststream/middlewares/exception/ExceptionMiddleware.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.middlewares.ExceptionMiddleware +::: faststream.middlewares.exception.ExceptionMiddleware diff --git a/docs/docs/en/api/faststream/broker/core/usecase/BrokerUsecase.md b/docs/docs/en/api/faststream/middlewares/exception/ignore_handler.md similarity index 67% rename from docs/docs/en/api/faststream/broker/core/usecase/BrokerUsecase.md rename to docs/docs/en/api/faststream/middlewares/exception/ignore_handler.md index 0e791c5c38..1eea49ddbe 100644 --- a/docs/docs/en/api/faststream/broker/core/usecase/BrokerUsecase.md +++ b/docs/docs/en/api/faststream/middlewares/exception/ignore_handler.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.core.usecase.BrokerUsecase +::: faststream.middlewares.exception.ignore_handler diff --git a/docs/docs/en/api/faststream/middlewares/logging/CriticalLogMiddleware.md b/docs/docs/en/api/faststream/middlewares/logging/CriticalLogMiddleware.md new file mode 100644 index 0000000000..58be3830e6 --- /dev/null +++ b/docs/docs/en/api/faststream/middlewares/logging/CriticalLogMiddleware.md @@ -0,0 +1,11 @@ +--- +# 0.5 - API +# 2 - Release +# 3 - Contributing +# 5 - Template Page +# 10 - Default +search: + boost: 0.5 +--- + +::: faststream.middlewares.logging.CriticalLogMiddleware diff --git a/docs/docs/en/api/faststream/nats/TestApp.md b/docs/docs/en/api/faststream/nats/TestApp.md index 2468f3755c..ad101303af 100644 --- a/docs/docs/en/api/faststream/nats/TestApp.md +++ b/docs/docs/en/api/faststream/nats/TestApp.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.testing.app.TestApp +::: faststream._internal.testing.app.TestApp diff --git a/docs/docs/en/api/faststream/nats/fastapi/Context.md b/docs/docs/en/api/faststream/nats/fastapi/Context.md index f4240bb0da..99bf141f5c 100644 --- a/docs/docs/en/api/faststream/nats/fastapi/Context.md +++ b/docs/docs/en/api/faststream/nats/fastapi/Context.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.fastapi.context.Context +::: faststream._internal.fastapi.context.Context diff --git a/docs/docs/en/api/faststream/utils/Context.md b/docs/docs/en/api/faststream/params/Context.md similarity index 78% rename from docs/docs/en/api/faststream/utils/Context.md rename to docs/docs/en/api/faststream/params/Context.md index 3e4f9f17c5..8eb7fc249a 100644 --- a/docs/docs/en/api/faststream/utils/Context.md +++ b/docs/docs/en/api/faststream/params/Context.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.utils.Context +::: faststream.params.Context diff --git a/docs/docs/en/api/faststream/utils/Depends.md b/docs/docs/en/api/faststream/params/Depends.md similarity index 100% rename from docs/docs/en/api/faststream/utils/Depends.md rename to docs/docs/en/api/faststream/params/Depends.md diff --git a/docs/docs/en/api/faststream/utils/Header.md b/docs/docs/en/api/faststream/params/Header.md similarity index 79% rename from docs/docs/en/api/faststream/utils/Header.md rename to docs/docs/en/api/faststream/params/Header.md index 10e6ccaec7..f3dd71365c 100644 --- a/docs/docs/en/api/faststream/utils/Header.md +++ b/docs/docs/en/api/faststream/params/Header.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.utils.Header +::: faststream.params.Header diff --git a/docs/docs/en/api/faststream/utils/Path.md b/docs/docs/en/api/faststream/params/Path.md similarity index 80% rename from docs/docs/en/api/faststream/utils/Path.md rename to docs/docs/en/api/faststream/params/Path.md index b311930841..ad04fdff6e 100644 --- a/docs/docs/en/api/faststream/utils/Path.md +++ b/docs/docs/en/api/faststream/params/Path.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.utils.Path +::: faststream.params.Path diff --git a/docs/docs/en/api/faststream/broker/core/abc/ABCBroker.md b/docs/docs/en/api/faststream/params/no_cast/NoCastField.md similarity index 72% rename from docs/docs/en/api/faststream/broker/core/abc/ABCBroker.md rename to docs/docs/en/api/faststream/params/no_cast/NoCastField.md index 88b39efd40..56821cae8a 100644 --- a/docs/docs/en/api/faststream/broker/core/abc/ABCBroker.md +++ b/docs/docs/en/api/faststream/params/no_cast/NoCastField.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.core.abc.ABCBroker +::: faststream.params.no_cast.NoCastField diff --git a/docs/docs/en/api/faststream/utils/context/Context.md b/docs/docs/en/api/faststream/params/params/Context.md similarity index 74% rename from docs/docs/en/api/faststream/utils/context/Context.md rename to docs/docs/en/api/faststream/params/params/Context.md index 5669863fee..4c3ec6b4dd 100644 --- a/docs/docs/en/api/faststream/utils/context/Context.md +++ b/docs/docs/en/api/faststream/params/params/Context.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.utils.context.Context +::: faststream.params.params.Context diff --git a/docs/docs/en/api/faststream/utils/context/Header.md b/docs/docs/en/api/faststream/params/params/Header.md similarity index 75% rename from docs/docs/en/api/faststream/utils/context/Header.md rename to docs/docs/en/api/faststream/params/params/Header.md index 7e10284ec1..6b15bd1ec1 100644 --- a/docs/docs/en/api/faststream/utils/context/Header.md +++ b/docs/docs/en/api/faststream/params/params/Header.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.utils.context.Header +::: faststream.params.params.Header diff --git a/docs/docs/en/api/faststream/utils/context/Path.md b/docs/docs/en/api/faststream/params/params/Path.md similarity index 76% rename from docs/docs/en/api/faststream/utils/context/Path.md rename to docs/docs/en/api/faststream/params/params/Path.md index 92c2ef36fe..0903f40023 100644 --- a/docs/docs/en/api/faststream/utils/context/Path.md +++ b/docs/docs/en/api/faststream/params/params/Path.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.utils.context.Path +::: faststream.params.params.Path diff --git a/docs/docs/en/api/faststream/rabbit/ReplyConfig.md b/docs/docs/en/api/faststream/rabbit/ReplyConfig.md deleted file mode 100644 index 013bd2f986..0000000000 --- a/docs/docs/en/api/faststream/rabbit/ReplyConfig.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.rabbit.ReplyConfig diff --git a/docs/docs/en/api/faststream/rabbit/TestApp.md b/docs/docs/en/api/faststream/rabbit/TestApp.md index 2468f3755c..ad101303af 100644 --- a/docs/docs/en/api/faststream/rabbit/TestApp.md +++ b/docs/docs/en/api/faststream/rabbit/TestApp.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.testing.app.TestApp +::: faststream._internal.testing.app.TestApp diff --git a/docs/docs/en/api/faststream/rabbit/fastapi/Context.md b/docs/docs/en/api/faststream/rabbit/fastapi/Context.md index f4240bb0da..99bf141f5c 100644 --- a/docs/docs/en/api/faststream/rabbit/fastapi/Context.md +++ b/docs/docs/en/api/faststream/rabbit/fastapi/Context.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.fastapi.context.Context +::: faststream._internal.fastapi.context.Context diff --git a/docs/docs/en/api/faststream/rabbit/schemas/ReplyConfig.md b/docs/docs/en/api/faststream/rabbit/schemas/ReplyConfig.md deleted file mode 100644 index 239c4f9d6e..0000000000 --- a/docs/docs/en/api/faststream/rabbit/schemas/ReplyConfig.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.rabbit.schemas.ReplyConfig diff --git a/docs/docs/en/api/faststream/rabbit/schemas/reply/ReplyConfig.md b/docs/docs/en/api/faststream/rabbit/schemas/reply/ReplyConfig.md deleted file mode 100644 index 1aeb941ff5..0000000000 --- a/docs/docs/en/api/faststream/rabbit/schemas/reply/ReplyConfig.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.rabbit.schemas.reply.ReplyConfig diff --git a/docs/docs/en/api/faststream/redis/TestApp.md b/docs/docs/en/api/faststream/redis/TestApp.md index 2468f3755c..ad101303af 100644 --- a/docs/docs/en/api/faststream/redis/TestApp.md +++ b/docs/docs/en/api/faststream/redis/TestApp.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.testing.app.TestApp +::: faststream._internal.testing.app.TestApp diff --git a/docs/docs/en/api/faststream/redis/fastapi/Context.md b/docs/docs/en/api/faststream/redis/fastapi/Context.md index f4240bb0da..99bf141f5c 100644 --- a/docs/docs/en/api/faststream/redis/fastapi/Context.md +++ b/docs/docs/en/api/faststream/redis/fastapi/Context.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.fastapi.context.Context +::: faststream._internal.fastapi.context.Context diff --git a/docs/docs/en/api/faststream/cli/main/run.md b/docs/docs/en/api/faststream/response/Response.md similarity index 76% rename from docs/docs/en/api/faststream/cli/main/run.md rename to docs/docs/en/api/faststream/response/Response.md index 6a01af3d26..e96fe35896 100644 --- a/docs/docs/en/api/faststream/cli/main/run.md +++ b/docs/docs/en/api/faststream/response/Response.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.cli.main.run +::: faststream.response.Response diff --git a/docs/docs/en/api/faststream/broker/message/AckStatus.md b/docs/docs/en/api/faststream/response/ensure_response.md similarity index 73% rename from docs/docs/en/api/faststream/broker/message/AckStatus.md rename to docs/docs/en/api/faststream/response/ensure_response.md index 412a61de84..e55d638acf 100644 --- a/docs/docs/en/api/faststream/broker/message/AckStatus.md +++ b/docs/docs/en/api/faststream/response/ensure_response.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.message.AckStatus +::: faststream.response.ensure_response diff --git a/docs/docs/en/api/faststream/response/response/Response.md b/docs/docs/en/api/faststream/response/response/Response.md new file mode 100644 index 0000000000..01a68bb486 --- /dev/null +++ b/docs/docs/en/api/faststream/response/response/Response.md @@ -0,0 +1,11 @@ +--- +# 0.5 - API +# 2 - Release +# 3 - Contributing +# 5 - Template Page +# 10 - Default +search: + boost: 0.5 +--- + +::: faststream.response.response.Response diff --git a/docs/docs/en/api/faststream/broker/fastapi/context/Context.md b/docs/docs/en/api/faststream/response/utils/ensure_response.md similarity index 70% rename from docs/docs/en/api/faststream/broker/fastapi/context/Context.md rename to docs/docs/en/api/faststream/response/utils/ensure_response.md index f4240bb0da..327b9ce951 100644 --- a/docs/docs/en/api/faststream/broker/fastapi/context/Context.md +++ b/docs/docs/en/api/faststream/response/utils/ensure_response.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.fastapi.context.Context +::: faststream.response.utils.ensure_response diff --git a/docs/docs/en/api/faststream/broker/core/logging/LoggingBroker.md b/docs/docs/en/api/faststream/specification/asyncapi/utils/clear_key.md similarity index 67% rename from docs/docs/en/api/faststream/broker/core/logging/LoggingBroker.md rename to docs/docs/en/api/faststream/specification/asyncapi/utils/clear_key.md index b10dd8bc3f..cf6103d19a 100644 --- a/docs/docs/en/api/faststream/broker/core/logging/LoggingBroker.md +++ b/docs/docs/en/api/faststream/specification/asyncapi/utils/clear_key.md @@ -8,4 +8,4 @@ search: boost: 0.5 --- -::: faststream.broker.core.logging.LoggingBroker +::: faststream.specification.asyncapi.utils.clear_key diff --git a/docs/docs/en/api/faststream/testing/TestApp.md b/docs/docs/en/api/faststream/testing/TestApp.md deleted file mode 100644 index 3d8f650f0f..0000000000 --- a/docs/docs/en/api/faststream/testing/TestApp.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.testing.TestApp diff --git a/docs/docs/en/api/faststream/testing/app/TestApp.md b/docs/docs/en/api/faststream/testing/app/TestApp.md deleted file mode 100644 index 2468f3755c..0000000000 --- a/docs/docs/en/api/faststream/testing/app/TestApp.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.testing.app.TestApp diff --git a/docs/docs/en/api/faststream/testing/broker/TestBroker.md b/docs/docs/en/api/faststream/testing/broker/TestBroker.md deleted file mode 100644 index 48e34a6ca3..0000000000 --- a/docs/docs/en/api/faststream/testing/broker/TestBroker.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.testing.broker.TestBroker diff --git a/docs/docs/en/api/faststream/testing/broker/patch_broker_calls.md b/docs/docs/en/api/faststream/testing/broker/patch_broker_calls.md deleted file mode 100644 index 12a6431765..0000000000 --- a/docs/docs/en/api/faststream/testing/broker/patch_broker_calls.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.testing.broker.patch_broker_calls diff --git a/docs/docs/en/api/faststream/types/LoggerProto.md b/docs/docs/en/api/faststream/types/LoggerProto.md deleted file mode 100644 index 064320bf42..0000000000 --- a/docs/docs/en/api/faststream/types/LoggerProto.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.types.LoggerProto diff --git a/docs/docs/en/api/faststream/types/StandardDataclass.md b/docs/docs/en/api/faststream/types/StandardDataclass.md deleted file mode 100644 index 5140818794..0000000000 --- a/docs/docs/en/api/faststream/types/StandardDataclass.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.types.StandardDataclass diff --git a/docs/docs/en/api/faststream/utils/ContextRepo.md b/docs/docs/en/api/faststream/utils/ContextRepo.md deleted file mode 100644 index dd18ad81e4..0000000000 --- a/docs/docs/en/api/faststream/utils/ContextRepo.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.ContextRepo diff --git a/docs/docs/en/api/faststream/utils/NoCast.md b/docs/docs/en/api/faststream/utils/NoCast.md deleted file mode 100644 index 606a31e563..0000000000 --- a/docs/docs/en/api/faststream/utils/NoCast.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.NoCast diff --git a/docs/docs/en/api/faststream/utils/apply_types.md b/docs/docs/en/api/faststream/utils/apply_types.md deleted file mode 100644 index 9dc4603bd2..0000000000 --- a/docs/docs/en/api/faststream/utils/apply_types.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: fast_depends.use.inject diff --git a/docs/docs/en/api/faststream/utils/ast/find_ast_node.md b/docs/docs/en/api/faststream/utils/ast/find_ast_node.md deleted file mode 100644 index 228e6f058c..0000000000 --- a/docs/docs/en/api/faststream/utils/ast/find_ast_node.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.ast.find_ast_node diff --git a/docs/docs/en/api/faststream/utils/ast/find_withitems.md b/docs/docs/en/api/faststream/utils/ast/find_withitems.md deleted file mode 100644 index 123acd71e4..0000000000 --- a/docs/docs/en/api/faststream/utils/ast/find_withitems.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.ast.find_withitems diff --git a/docs/docs/en/api/faststream/utils/ast/get_withitem_calls.md b/docs/docs/en/api/faststream/utils/ast/get_withitem_calls.md deleted file mode 100644 index c9d68c1ed2..0000000000 --- a/docs/docs/en/api/faststream/utils/ast/get_withitem_calls.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.ast.get_withitem_calls diff --git a/docs/docs/en/api/faststream/utils/ast/is_contains_context_name.md b/docs/docs/en/api/faststream/utils/ast/is_contains_context_name.md deleted file mode 100644 index 61cf140ea6..0000000000 --- a/docs/docs/en/api/faststream/utils/ast/is_contains_context_name.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.ast.is_contains_context_name diff --git a/docs/docs/en/api/faststream/utils/classes/Singleton.md b/docs/docs/en/api/faststream/utils/classes/Singleton.md deleted file mode 100644 index c9751ee2bd..0000000000 --- a/docs/docs/en/api/faststream/utils/classes/Singleton.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.classes.Singleton diff --git a/docs/docs/en/api/faststream/utils/context/ContextRepo.md b/docs/docs/en/api/faststream/utils/context/ContextRepo.md deleted file mode 100644 index 50a7133aeb..0000000000 --- a/docs/docs/en/api/faststream/utils/context/ContextRepo.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.context.ContextRepo diff --git a/docs/docs/en/api/faststream/utils/context/builders/Context.md b/docs/docs/en/api/faststream/utils/context/builders/Context.md deleted file mode 100644 index 6cdf6f36fe..0000000000 --- a/docs/docs/en/api/faststream/utils/context/builders/Context.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.context.builders.Context diff --git a/docs/docs/en/api/faststream/utils/context/builders/Header.md b/docs/docs/en/api/faststream/utils/context/builders/Header.md deleted file mode 100644 index e3f6e41ba6..0000000000 --- a/docs/docs/en/api/faststream/utils/context/builders/Header.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.context.builders.Header diff --git a/docs/docs/en/api/faststream/utils/context/builders/Path.md b/docs/docs/en/api/faststream/utils/context/builders/Path.md deleted file mode 100644 index 5203903c45..0000000000 --- a/docs/docs/en/api/faststream/utils/context/builders/Path.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.context.builders.Path diff --git a/docs/docs/en/api/faststream/utils/context/repository/ContextRepo.md b/docs/docs/en/api/faststream/utils/context/repository/ContextRepo.md deleted file mode 100644 index ad968d8954..0000000000 --- a/docs/docs/en/api/faststream/utils/context/repository/ContextRepo.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.context.repository.ContextRepo diff --git a/docs/docs/en/api/faststream/utils/context/types/Context.md b/docs/docs/en/api/faststream/utils/context/types/Context.md deleted file mode 100644 index 3ac9c51fad..0000000000 --- a/docs/docs/en/api/faststream/utils/context/types/Context.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.context.types.Context diff --git a/docs/docs/en/api/faststream/utils/context/types/resolve_context_by_name.md b/docs/docs/en/api/faststream/utils/context/types/resolve_context_by_name.md deleted file mode 100644 index 60ab9fc23c..0000000000 --- a/docs/docs/en/api/faststream/utils/context/types/resolve_context_by_name.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.context.types.resolve_context_by_name diff --git a/docs/docs/en/api/faststream/utils/data/filter_by_dict.md b/docs/docs/en/api/faststream/utils/data/filter_by_dict.md deleted file mode 100644 index 87d03b5288..0000000000 --- a/docs/docs/en/api/faststream/utils/data/filter_by_dict.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.data.filter_by_dict diff --git a/docs/docs/en/api/faststream/utils/functions/call_or_await.md b/docs/docs/en/api/faststream/utils/functions/call_or_await.md deleted file mode 100644 index 9bb63aa18c..0000000000 --- a/docs/docs/en/api/faststream/utils/functions/call_or_await.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: fast_depends.utils.run_async diff --git a/docs/docs/en/api/faststream/utils/functions/drop_response_type.md b/docs/docs/en/api/faststream/utils/functions/drop_response_type.md deleted file mode 100644 index a39e8a2699..0000000000 --- a/docs/docs/en/api/faststream/utils/functions/drop_response_type.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.functions.drop_response_type diff --git a/docs/docs/en/api/faststream/utils/functions/fake_context.md b/docs/docs/en/api/faststream/utils/functions/fake_context.md deleted file mode 100644 index 3943186ba4..0000000000 --- a/docs/docs/en/api/faststream/utils/functions/fake_context.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.functions.fake_context diff --git a/docs/docs/en/api/faststream/utils/functions/return_input.md b/docs/docs/en/api/faststream/utils/functions/return_input.md deleted file mode 100644 index d5514e013f..0000000000 --- a/docs/docs/en/api/faststream/utils/functions/return_input.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.functions.return_input diff --git a/docs/docs/en/api/faststream/utils/functions/sync_fake_context.md b/docs/docs/en/api/faststream/utils/functions/sync_fake_context.md deleted file mode 100644 index 0860846843..0000000000 --- a/docs/docs/en/api/faststream/utils/functions/sync_fake_context.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.functions.sync_fake_context diff --git a/docs/docs/en/api/faststream/utils/functions/timeout_scope.md b/docs/docs/en/api/faststream/utils/functions/timeout_scope.md deleted file mode 100644 index 1577a7593a..0000000000 --- a/docs/docs/en/api/faststream/utils/functions/timeout_scope.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.functions.timeout_scope diff --git a/docs/docs/en/api/faststream/utils/functions/to_async.md b/docs/docs/en/api/faststream/utils/functions/to_async.md deleted file mode 100644 index 715b43d3ac..0000000000 --- a/docs/docs/en/api/faststream/utils/functions/to_async.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.functions.to_async diff --git a/docs/docs/en/api/faststream/utils/no_cast/NoCast.md b/docs/docs/en/api/faststream/utils/no_cast/NoCast.md deleted file mode 100644 index 4fcc6054ba..0000000000 --- a/docs/docs/en/api/faststream/utils/no_cast/NoCast.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.no_cast.NoCast diff --git a/docs/docs/en/api/faststream/utils/nuid/NUID.md b/docs/docs/en/api/faststream/utils/nuid/NUID.md deleted file mode 100644 index 4e43844efe..0000000000 --- a/docs/docs/en/api/faststream/utils/nuid/NUID.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.nuid.NUID diff --git a/docs/docs/en/api/faststream/utils/path/compile_path.md b/docs/docs/en/api/faststream/utils/path/compile_path.md deleted file mode 100644 index 136d5ab1b9..0000000000 --- a/docs/docs/en/api/faststream/utils/path/compile_path.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: faststream.utils.path.compile_path From 640bfba9b91a9e99cb699ab70af40bca62dc9e8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:39:44 +0000 Subject: [PATCH 07/12] chore(deps): bump the pip group with 6 updates (#1794) Bumps the pip group with 6 updates: | Package | From | To | | --- | --- | --- | | [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin) | `1.2.8` | `1.2.9` | | [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin) | `1.0.5` | `1.2.0` | | [ruff](https://github.com/astral-sh/ruff) | `0.6.4` | `0.6.5` | | [semgrep](https://github.com/returntocorp/semgrep) | `1.86.0` | `1.87.0` | | [pytest](https://github.com/pytest-dev/pytest) | `8.3.2` | `8.3.3` | | [fastapi](https://github.com/fastapi/fastapi) | `0.114.0` | `0.114.2` | Updates `mkdocs-git-revision-date-localized-plugin` from 1.2.8 to 1.2.9 - [Release notes](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/releases) - [Commits](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/compare/v1.2.8...v1.2.9) Updates `mkdocs-macros-plugin` from 1.0.5 to 1.2.0 - [Release notes](https://github.com/fralau/mkdocs_macros_plugin/releases) - [Changelog](https://github.com/fralau/mkdocs-macros-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/fralau/mkdocs_macros_plugin/compare/v1.0.5...v1.2.0) Updates `ruff` from 0.6.4 to 0.6.5 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.4...0.6.5) Updates `semgrep` from 1.86.0 to 1.87.0 - [Release notes](https://github.com/returntocorp/semgrep/releases) - [Changelog](https://github.com/semgrep/semgrep/blob/develop/CHANGELOG.md) - [Commits](https://github.com/returntocorp/semgrep/compare/v1.86.0...v1.87.0) Updates `pytest` from 8.3.2 to 8.3.3 - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.2...8.3.3) Updates `fastapi` from 0.114.0 to 0.114.2 - [Release notes](https://github.com/fastapi/fastapi/releases) - [Commits](https://github.com/fastapi/fastapi/compare/0.114.0...0.114.2) --- updated-dependencies: - dependency-name: mkdocs-git-revision-date-localized-plugin dependency-type: direct:production update-type: version-update:semver-patch dependency-group: pip - dependency-name: mkdocs-macros-plugin dependency-type: direct:production update-type: version-update:semver-minor dependency-group: pip - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch dependency-group: pip - dependency-name: semgrep dependency-type: direct:production update-type: version-update:semver-minor dependency-group: pip - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch dependency-group: pip - dependency-name: fastapi dependency-type: direct:production update-type: version-update:semver-patch dependency-group: pip ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pyproject.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e92057e7c9..7d19592247 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,10 +88,10 @@ devdocs = [ "mdx-include==1.4.2", "mkdocstrings[python]==0.26.1", "mkdocs-literate-nav==0.6.1", - "mkdocs-git-revision-date-localized-plugin==1.2.8", + "mkdocs-git-revision-date-localized-plugin==1.2.9", "mike==2.1.3", # versioning "mkdocs-minify-plugin==0.8.0", - "mkdocs-macros-plugin==1.0.5", # includes with variables + "mkdocs-macros-plugin==1.2.0", # includes with variables "mkdocs-glightbox==0.4.0", # img zoom "pillow", # required for mkdocs-glightbo "cairosvg", # required for mkdocs-glightbo @@ -114,15 +114,15 @@ types = [ lint = [ "faststream[types]", - "ruff==0.6.4", + "ruff==0.6.5", "bandit==1.7.9", - "semgrep==1.86.0", + "semgrep==1.87.0", "codespell==2.3.0", ] test-core = [ "coverage[toml]==7.6.1", - "pytest==8.3.2", + "pytest==8.3.3", "pytest-asyncio==0.24.0", "dirty-equals==0.8.0", "typing-extensions>=4.8.0,<4.12.1; python_version < '3.9'", # to fix dirty-equals @@ -130,7 +130,7 @@ test-core = [ testing = [ "faststream[test-core]", - "fastapi==0.114.0", + "fastapi==0.114.2", "pydantic-settings>=2.0.0,<3.0.0", "httpx==0.27.2", "PyYAML==6.0.2", From d44da7516ef72d9ce9e0e214facabe13b901681e Mon Sep 17 00:00:00 2001 From: Pastukhov Nikita Date: Mon, 16 Sep 2024 19:26:44 +0300 Subject: [PATCH 08/12] fix (#1792): make RMQ publisher.publish reply_to optional (#1795) * fix (#1792): make RMQ publisher.publish reply_to optional * lint: fix mypy --- faststream/rabbit/publisher/usecase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/faststream/rabbit/publisher/usecase.py b/faststream/rabbit/publisher/usecase.py index c3306c78d2..f03b3b4a72 100644 --- a/faststream/rabbit/publisher/usecase.py +++ b/faststream/rabbit/publisher/usecase.py @@ -97,7 +97,7 @@ class RequestPublishKwargs(TypedDict, total=False): ] -class PublishKwargs(RequestPublishKwargs): +class PublishKwargs(RequestPublishKwargs, total=False): """Typed dict to annotate RabbitMQ publishers.""" reply_to: Annotated[ @@ -181,7 +181,7 @@ def __hash__(self) -> int: ) @override - async def publish( # type: ignore[override] + async def publish( self, message: "AioPikaSendableMessage", queue: Annotated[ From c361a16053995abe2fbd692c36c18b3364da1c75 Mon Sep 17 00:00:00 2001 From: Pastukhov Nikita Date: Mon, 16 Sep 2024 19:48:51 +0300 Subject: [PATCH 09/12] fix (#1793): FastStream Response support in FastAPI integration (#1796) --- faststream/broker/fastapi/route.py | 17 ++++++++++------- faststream/nats/response.py | 4 ++-- faststream/nats/testing.py | 4 ++-- tests/brokers/base/fastapi.py | 26 +++++++++++++++++++++++++- 4 files changed, 39 insertions(+), 12 deletions(-) diff --git a/faststream/broker/fastapi/route.py b/faststream/broker/fastapi/route.py index d8e39f96b2..03c983cae2 100644 --- a/faststream/broker/fastapi/route.py +++ b/faststream/broker/fastapi/route.py @@ -18,6 +18,7 @@ from starlette.requests import Request from faststream.broker.fastapi.get_dependant import get_fastapi_native_dependant +from faststream.broker.response import Response, ensure_response from faststream.broker.types import P_HandlerParams, T_HandlerReturn from ._compat import ( @@ -186,7 +187,7 @@ def make_fastapi_execution( response_model_exclude_none: bool, ) -> Callable[ ["StreamMessage", "NativeMessage[Any]"], - Awaitable[Any], + Awaitable[Response], ]: """Creates a FastAPI application.""" is_coroutine = asyncio.iscoroutinefunction(dependent.call) @@ -194,7 +195,7 @@ def make_fastapi_execution( async def app( request: "StreamMessage", raw_message: "NativeMessage[Any]", # to support BackgroundTasks by middleware - ) -> Any: + ) -> Response: """Consume StreamMessage and return user function result.""" async with AsyncExitStack() as stack: if FASTAPI_V106: @@ -215,14 +216,16 @@ async def app( if solved_result.errors: raise_fastapi_validation_error(solved_result.errors, request._body) # type: ignore[arg-type] - raw_reponse = await run_endpoint_function( + function_result = await run_endpoint_function( dependant=dependent, values=solved_result.values, is_coroutine=is_coroutine, ) - content = await serialize_response( - response_content=raw_reponse, + response = ensure_response(function_result) + + response.body = await serialize_response( + response_content=response.body, field=response_field, include=response_model_include, exclude=response_model_exclude, @@ -233,8 +236,8 @@ async def app( is_coroutine=is_coroutine, ) - return content + return response - return None + raise AssertionError("unreachable") return app diff --git a/faststream/nats/response.py b/faststream/nats/response.py index b15bc97277..b3813131ff 100644 --- a/faststream/nats/response.py +++ b/faststream/nats/response.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Optional +from typing import TYPE_CHECKING, Dict, Optional from typing_extensions import override @@ -13,7 +13,7 @@ def __init__( self, body: "SendableMessage", *, - headers: Optional["AnyDict"] = None, + headers: Optional[Dict[str, str]] = None, correlation_id: Optional[str] = None, stream: Optional[str] = None, ) -> None: diff --git a/faststream/nats/testing.py b/faststream/nats/testing.py index 08d43ed30f..6d34547d04 100644 --- a/faststream/nats/testing.py +++ b/faststream/nats/testing.py @@ -18,7 +18,7 @@ if TYPE_CHECKING: from faststream.nats.publisher.asyncapi import AsyncAPIPublisher from faststream.nats.subscriber.usecase import LogicSubscriber - from faststream.types import AnyDict, SendableMessage + from faststream.types import SendableMessage __all__ = ("TestNatsBroker",) @@ -187,7 +187,7 @@ def build_message( *, reply_to: str = "", correlation_id: Optional[str] = None, - headers: Optional["AnyDict"] = None, + headers: Optional[Dict[str, str]] = None, ) -> "PatchedMessage": msg, content_type = encode_message(message) return PatchedMessage( diff --git a/tests/brokers/base/fastapi.py b/tests/brokers/base/fastapi.py index f20dd61866..6c18b7e9d5 100644 --- a/tests/brokers/base/fastapi.py +++ b/tests/brokers/base/fastapi.py @@ -8,7 +8,7 @@ from fastapi.exceptions import RequestValidationError from fastapi.testclient import TestClient -from faststream import context +from faststream import Response, context from faststream.broker.core.usecase import BrokerUsecase from faststream.broker.fastapi.context import Context from faststream.broker.fastapi.router import StreamRouter @@ -226,6 +226,30 @@ async def hello(): ) assert r == "hi", r + async def test_request(self, queue: str): + """Local test due request exists in all TestClients.""" + router = self.router_class(setup_state=False) + + app = FastAPI() + + args, kwargs = self.get_subscriber_params(queue) + + @router.subscriber(*args, **kwargs) + async def hello(): + return Response("Hi!", headers={"x-header": "test"}) + + async with self.broker_test(router.broker): + with TestClient(app) as client: + assert not client.app_state.get("broker") + + r = await router.broker.request( + "hi", + queue, + timeout=0.5, + ) + assert await r.decode() == "Hi!" + assert r.headers["x-header"] == "test" + async def test_base_without_state(self, queue: str): router = self.router_class(setup_state=False) From 07fb94390e0f7ccfa1f3960129b790d9b61f8697 Mon Sep 17 00:00:00 2001 From: Nikita Pastukhov Date: Mon, 16 Sep 2024 21:53:50 +0300 Subject: [PATCH 10/12] fix: correct AsyncAPI 2.6.0 channel names --- faststream/specification/asyncapi/generate.py | 3 ++- .../specification/asyncapi/v2_6_0/generate.py | 4 ++-- tests/asyncapi/base/v2_6_0/arguments.py | 7 +++++-- tests/asyncapi/base/v3_0_0/arguments.py | 16 ++++++++++++---- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/faststream/specification/asyncapi/generate.py b/faststream/specification/asyncapi/generate.py index 9bf186604c..ae93722d99 100644 --- a/faststream/specification/asyncapi/generate.py +++ b/faststream/specification/asyncapi/generate.py @@ -13,7 +13,8 @@ def get_app_schema( - app: "Application", version: Union[Literal["3.0.0", "2.6.0"], str] = "3.0.0" + app: "Application", + version: Union[Literal["3.0.0", "2.6.0"], str] = "3.0.0", ) -> BaseSchema: if version.startswith("3.0."): return get_app_schema_v3(app) diff --git a/faststream/specification/asyncapi/v2_6_0/generate.py b/faststream/specification/asyncapi/v2_6_0/generate.py index 405efba399..0be5b73f1c 100644 --- a/faststream/specification/asyncapi/v2_6_0/generate.py +++ b/faststream/specification/asyncapi/v2_6_0/generate.py @@ -143,13 +143,13 @@ def get_broker_channels( for h in broker._subscribers.values(): schema = h.schema() channels.update( - {clear_key(key): channel_from_spec(channel) for key, channel in schema.items()} + {key: channel_from_spec(channel) for key, channel in schema.items()} ) for p in broker._publishers.values(): schema = p.schema() channels.update( - {clear_key(key): channel_from_spec(channel) for key, channel in schema.items()} + {key: channel_from_spec(channel) for key, channel in schema.items()} ) return channels diff --git a/tests/asyncapi/base/v2_6_0/arguments.py b/tests/asyncapi/base/v2_6_0/arguments.py index 74c81466f9..6a64f834e5 100644 --- a/tests/asyncapi/base/v2_6_0/arguments.py +++ b/tests/asyncapi/base/v2_6_0/arguments.py @@ -43,13 +43,16 @@ async def handle(msg): ... schema = get_app_schema(self.build_app(broker), version="2.6.0").to_jsonable() - assert next(iter(schema["channels"].keys())) == "." + assert next(iter(schema["channels"].keys())) == "/" assert next(iter(schema["components"]["messages"].keys())) == ".:Message" assert schema["components"]["messages"][".:Message"]["title"] == "/:Message" assert next(iter(schema["components"]["schemas"].keys())) == ".:Message:Payload" - assert schema["components"]["schemas"][".:Message:Payload"]["title"] == "/:Message:Payload" + assert ( + schema["components"]["schemas"][".:Message:Payload"]["title"] + == "/:Message:Payload" + ) def test_docstring_description(self): broker = self.broker_class() diff --git a/tests/asyncapi/base/v3_0_0/arguments.py b/tests/asyncapi/base/v3_0_0/arguments.py index 1a9fbd24c3..7e694b7a1c 100644 --- a/tests/asyncapi/base/v3_0_0/arguments.py +++ b/tests/asyncapi/base/v3_0_0/arguments.py @@ -49,11 +49,19 @@ async def handle(msg): ... assert next(iter(schema["operations"].keys())) == ".Subscribe" - assert next(iter(schema["components"]["messages"].keys())) == ".:SubscribeMessage" - assert schema["components"]["messages"][".:SubscribeMessage"]["title"] == "/:SubscribeMessage" - + assert ( + next(iter(schema["components"]["messages"].keys())) == ".:SubscribeMessage" + ) + assert ( + schema["components"]["messages"][".:SubscribeMessage"]["title"] + == "/:SubscribeMessage" + ) + assert next(iter(schema["components"]["schemas"].keys())) == ".:Message:Payload" - assert schema["components"]["schemas"][".:Message:Payload"]["title"] == "/:Message:Payload" + assert ( + schema["components"]["schemas"][".:Message:Payload"]["title"] + == "/:Message:Payload" + ) def test_docstring_description(self): broker = self.broker_factory() From 5d4cac1f217d598ab99d488f6a718d699bb88a67 Mon Sep 17 00:00:00 2001 From: Nikita Pastukhov Date: Mon, 16 Sep 2024 23:25:59 +0300 Subject: [PATCH 11/12] refactor: remove global broker from context --- faststream/_internal/broker/broker.py | 10 ++-- tests/asyncapi/base/v2_6_0/arguments.py | 67 ++++++++++++------------- 2 files changed, 37 insertions(+), 40 deletions(-) diff --git a/faststream/_internal/broker/broker.py b/faststream/_internal/broker/broker.py index 54aa0acd22..50c235e0c3 100644 --- a/faststream/_internal/broker/broker.py +++ b/faststream/_internal/broker/broker.py @@ -19,7 +19,6 @@ from typing_extensions import Annotated, Doc, Self from faststream._internal._compat import is_test_env -from faststream._internal.context.repository import context from faststream._internal.log.logging import set_logger_fmt from faststream._internal.proto import SetupAble from faststream._internal.subscriber.proto import SubscriberProto @@ -185,10 +184,6 @@ def __init__( *self._middlewares, ) - # TODO: move this context to Handlers' extra_context to support multiple brokers - context.set_global("logger", self.logger) - context.set_global("broker", self) - # FastDepends args self._is_apply_types = apply_types self._is_validate = validate @@ -269,7 +264,10 @@ def _subscriber_setup_extra(self) -> "AnyDict": "logger": self.logger, "producer": self._producer, "graceful_timeout": self.graceful_timeout, - "extra_context": {}, + "extra_context": { + "broker": self, + "logger": self.logger, + }, # broker options "broker_parser": self._parser, "broker_decoder": self._decoder, diff --git a/tests/asyncapi/base/v2_6_0/arguments.py b/tests/asyncapi/base/v2_6_0/arguments.py index 6a64f834e5..90b2b417f2 100644 --- a/tests/asyncapi/base/v2_6_0/arguments.py +++ b/tests/asyncapi/base/v2_6_0/arguments.py @@ -566,6 +566,39 @@ async def handle(user: Model): ... }, }, schema["components"] + def test_with_filter(self): + class User(pydantic.BaseModel): + name: str = "" + id: int + + broker = self.broker_class() + + sub = broker.subscriber("test") + + @sub( + filter=lambda m: m.content_type == "application/json", + ) + async def handle(id: int): ... + + @sub + async def handle_default(msg): ... + + schema = get_app_schema(self.build_app(broker), version="2.6.0").to_jsonable() + + assert ( + len( + next(iter(schema["components"]["messages"].values()))["payload"][ + "oneOf" + ] + ) + == 2 + ) + + payload = schema["components"]["schemas"] + + assert "Handle:Message:Payload" in list(payload.keys()) + assert "HandleDefault:Message:Payload" in list(payload.keys()) + class ArgumentsTestcase(FastAPICompatible): dependency_builder = staticmethod(Depends) @@ -635,37 +668,3 @@ async def handle(id: int, user: Optional[str] = None, message=Context()): ... "type": "object", } ) - - def test_with_filter(self): - # TODO: move it to FastAPICompatible with FastAPI refactore - class User(pydantic.BaseModel): - name: str = "" - id: int - - broker = self.broker_class() - - sub = broker.subscriber("test") - - @sub( - filter=lambda m: m.content_type == "application/json", - ) - async def handle(id: int): ... - - @sub - async def handle_default(msg): ... - - schema = get_app_schema(self.build_app(broker), version="2.6.0").to_jsonable() - - assert ( - len( - next(iter(schema["components"]["messages"].values()))["payload"][ - "oneOf" - ] - ) - == 2 - ) - - payload = schema["components"]["schemas"] - - assert "Handle:Message:Payload" in list(payload.keys()) - assert "HandleDefault:Message:Payload" in list(payload.keys()) From cc55a61a20456d03e42ce9bb22d7bf861c23c762 Mon Sep 17 00:00:00 2001 From: Nikita Pastukhov Date: Tue, 17 Sep 2024 19:19:10 +0300 Subject: [PATCH 12/12] tests: fix all tests --- examples/e04_msg_filter.py | 6 +- faststream/_internal/broker/broker.py | 8 +-- faststream/_internal/cli/main.py | 37 ++++++---- faststream/_internal/constants.py | 3 + faststream/_internal/proto.py | 2 +- faststream/_internal/publisher/proto.py | 2 +- faststream/_internal/publisher/usecase.py | 2 +- faststream/_internal/subscriber/call_item.py | 2 +- faststream/_internal/subscriber/proto.py | 2 +- faststream/_internal/subscriber/usecase.py | 4 +- faststream/_internal/testing/broker.py | 2 +- faststream/confluent/subscriber/usecase.py | 4 +- faststream/kafka/subscriber/usecase.py | 4 +- faststream/message/message.py | 20 ++++++ faststream/message/utils.py | 15 ++--- faststream/nats/subscriber/usecase.py | 4 +- faststream/rabbit/publisher/usecase.py | 4 +- faststream/rabbit/subscriber/usecase.py | 4 +- faststream/redis/subscriber/usecase.py | 4 +- .../specification/asyncapi/v2_6_0/generate.py | 2 +- .../specification/asyncapi/v3_0_0/generate.py | 2 +- tests/a_docs/redis/test_security.py | 2 +- tests/brokers/base/requests.py | 2 +- tests/cli/test_publish.py | 67 +++++++++++++------ 24 files changed, 133 insertions(+), 71 deletions(-) diff --git a/examples/e04_msg_filter.py b/examples/e04_msg_filter.py index cacdae63de..852c9442ed 100644 --- a/examples/e04_msg_filter.py +++ b/examples/e04_msg_filter.py @@ -5,13 +5,15 @@ broker = RabbitBroker("amqp://guest:guest@localhost:5672/") app = FastStream(broker) +subscriber = broker.subscriber("test-queue") -@broker.subscriber("test-queue", filter=lambda m: m.content_type == "application/json") + +@subscriber(filter=lambda m: m.content_type == "application/json") async def handle_json(msg, logger: Logger): logger.info(f"JSON message: {msg}") -@broker.subscriber("test-queue") +@subscriber async def handle_other_messages(msg, logger: Logger): logger.info(f"Default message: {msg}") diff --git a/faststream/_internal/broker/broker.py b/faststream/_internal/broker/broker.py index 50c235e0c3..20d6424246 100644 --- a/faststream/_internal/broker/broker.py +++ b/faststream/_internal/broker/broker.py @@ -222,7 +222,7 @@ async def connect(self, **kwargs: Any) -> ConnectionType: connection_kwargs = self._connection_kwargs.copy() connection_kwargs.update(kwargs) self._connection = await self._connect(**connection_kwargs) - self.setup() + self._setup() return self._connection @abstractmethod @@ -230,7 +230,7 @@ async def _connect(self) -> ConnectionType: """Connect to a resource.""" raise NotImplementedError() - def setup(self) -> None: + def _setup(self) -> None: """Prepare all Broker entities to startup.""" for h in self._subscribers.values(): self.setup_subscriber(h) @@ -246,7 +246,7 @@ def setup_subscriber( """Setup the Subscriber to prepare it to starting.""" data = self._subscriber_setup_extra.copy() data.update(kwargs) - subscriber.setup(**data) + subscriber._setup(**data) def setup_publisher( self, @@ -256,7 +256,7 @@ def setup_publisher( """Setup the Publisher to prepare it to starting.""" data = self._publisher_setup_extra.copy() data.update(kwargs) - publisher.setup(**data) + publisher._setup(**data) @property def _subscriber_setup_extra(self) -> "AnyDict": diff --git a/faststream/_internal/cli/main.py b/faststream/_internal/cli/main.py index 5920055485..3abb63a398 100644 --- a/faststream/_internal/cli/main.py +++ b/faststream/_internal/cli/main.py @@ -210,9 +210,19 @@ def _run( ) def publish( ctx: typer.Context, - app: str = typer.Argument(..., help="FastStream app instance, e.g., main:app."), - message: str = typer.Argument(..., help="Message to be published."), - rpc: bool = typer.Option(False, help="Enable RPC mode and system output."), + app: str = typer.Argument( + ..., + help="FastStream app instance, e.g., main:app.", + ), + message: str = typer.Argument( + ..., + help="Message to be published.", + ), + rpc: bool = typer.Option( + False, + is_flag=True, + help="Enable RPC mode and system output.", + ), is_factory: bool = typer.Option( False, "--factory", @@ -227,15 +237,12 @@ def publish( These are parsed and passed to the broker's publish method. """ app, extra = parse_cli_args(app, *ctx.args) + extra["message"] = message - extra["rpc"] = rpc + if "timeout" in extra: + extra["timeout"] = float(extra["timeout"]) try: - if not app: - raise ValueError("App parameter is required.") - if not message: - raise ValueError("Message parameter is required.") - _, app_obj = import_from_string(app) if callable(app_obj) and is_factory: app_obj = app_obj() @@ -243,7 +250,7 @@ def publish( if not app_obj.broker: raise ValueError("Broker instance not found in the app.") - result = anyio.run(publish_message, app_obj.broker, extra) + result = anyio.run(publish_message, app_obj.broker, rpc, extra) if rpc: typer.echo(result) @@ -253,10 +260,16 @@ def publish( sys.exit(1) -async def publish_message(broker: "BrokerUsecase[Any, Any]", extra: "AnyDict") -> Any: +async def publish_message( + broker: "BrokerUsecase[Any, Any]", rpc: bool, extra: "AnyDict" +) -> Any: try: async with broker: - return await broker.publish(**extra) + if rpc: + msg = await broker.request(**extra) + return msg + else: + return await broker.publish(**extra) except Exception as e: typer.echo(f"Error when broker was publishing: {e}") sys.exit(1) diff --git a/faststream/_internal/constants.py b/faststream/_internal/constants.py index 16c6a90415..c3d2f73b4a 100644 --- a/faststream/_internal/constants.py +++ b/faststream/_internal/constants.py @@ -15,6 +15,9 @@ class _EmptyPlaceholder: def __repr__(self) -> str: return "EMPTY" + def __bool__(self) -> bool: + return False + def __eq__(self, other: object) -> bool: if not isinstance(other, _EmptyPlaceholder): return NotImplemented diff --git a/faststream/_internal/proto.py b/faststream/_internal/proto.py index 54d988a763..cc6811167b 100644 --- a/faststream/_internal/proto.py +++ b/faststream/_internal/proto.py @@ -4,7 +4,7 @@ class SetupAble(Protocol): @abstractmethod - def setup(self) -> None: ... + def _setup(self) -> None: ... class Endpoint(SetupAble, Protocol): diff --git a/faststream/_internal/publisher/proto.py b/faststream/_internal/publisher/proto.py index 86addc8b35..9707fd6c12 100644 --- a/faststream/_internal/publisher/proto.py +++ b/faststream/_internal/publisher/proto.py @@ -94,7 +94,7 @@ def create() -> "PublisherProto[MsgType]": @override @abstractmethod - def setup( # type: ignore[override] + def _setup( # type: ignore[override] self, *, producer: Optional["ProducerProto"], diff --git a/faststream/_internal/publisher/usecase.py b/faststream/_internal/publisher/usecase.py index 71333dfbd9..584d6b6ff4 100644 --- a/faststream/_internal/publisher/usecase.py +++ b/faststream/_internal/publisher/usecase.py @@ -91,7 +91,7 @@ def add_middleware(self, middleware: "BrokerMiddleware[MsgType]") -> None: self._broker_middlewares = (*self._broker_middlewares, middleware) @override - def setup( # type: ignore[override] + def _setup( # type: ignore[override] self, *, producer: Optional["ProducerProto"], diff --git a/faststream/_internal/subscriber/call_item.py b/faststream/_internal/subscriber/call_item.py index 6ffa691fdc..6b550747d1 100644 --- a/faststream/_internal/subscriber/call_item.py +++ b/faststream/_internal/subscriber/call_item.py @@ -71,7 +71,7 @@ def __repr__(self) -> str: return f"<'{self.call_name}': filter='{filter_name}'>" @override - def setup( # type: ignore[override] + def _setup( # type: ignore[override] self, *, parser: "AsyncCallable", diff --git a/faststream/_internal/subscriber/proto.py b/faststream/_internal/subscriber/proto.py index 60ab953863..1fefc25817 100644 --- a/faststream/_internal/subscriber/proto.py +++ b/faststream/_internal/subscriber/proto.py @@ -51,7 +51,7 @@ def get_log_context( @override @abstractmethod - def setup( # type: ignore[override] + def _setup( # type: ignore[override] self, *, logger: Optional["LoggerProto"], diff --git a/faststream/_internal/subscriber/usecase.py b/faststream/_internal/subscriber/usecase.py index eefcd18c0c..6bc39cb158 100644 --- a/faststream/_internal/subscriber/usecase.py +++ b/faststream/_internal/subscriber/usecase.py @@ -143,7 +143,7 @@ def add_middleware(self, middleware: "BrokerMiddleware[MsgType]") -> None: self._broker_middlewares = (*self._broker_middlewares, middleware) @override - def setup( # type: ignore[override] + def _setup( # type: ignore[override] self, *, logger: Optional["LoggerProto"], @@ -181,7 +181,7 @@ def setup( # type: ignore[override] self._parser = async_parser self._decoder = async_decoder - call.setup( + call._setup( parser=async_parser, decoder=async_decoder, apply_types=apply_types, diff --git a/faststream/_internal/testing/broker.py b/faststream/_internal/testing/broker.py index fbe040b6ae..2be6ab8f81 100644 --- a/faststream/_internal/testing/broker.py +++ b/faststream/_internal/testing/broker.py @@ -120,7 +120,7 @@ def _patch_broker(self, broker: Broker) -> Generator[None, None, None]: yield def _fake_start(self, broker: Broker, *args: Any, **kwargs: Any) -> None: - broker.setup() + broker._setup() patch_broker_calls(broker) diff --git a/faststream/confluent/subscriber/usecase.py b/faststream/confluent/subscriber/usecase.py index 84480c3018..3bc8e25cdd 100644 --- a/faststream/confluent/subscriber/usecase.py +++ b/faststream/confluent/subscriber/usecase.py @@ -102,7 +102,7 @@ def __init__( self.builder = None @override - def setup( # type: ignore[override] + def _setup( # type: ignore[override] self, *, client_id: Optional[str], @@ -124,7 +124,7 @@ def setup( # type: ignore[override] self.client_id = client_id self.builder = builder - super().setup( + super()._setup( logger=logger, producer=producer, graceful_timeout=graceful_timeout, diff --git a/faststream/kafka/subscriber/usecase.py b/faststream/kafka/subscriber/usecase.py index d8d4a47134..cabc505d29 100644 --- a/faststream/kafka/subscriber/usecase.py +++ b/faststream/kafka/subscriber/usecase.py @@ -107,7 +107,7 @@ def __init__( self.task = None @override - def setup( # type: ignore[override] + def _setup( # type: ignore[override] self, *, client_id: Optional[str], @@ -129,7 +129,7 @@ def setup( # type: ignore[override] self.client_id = client_id self.builder = builder - super().setup( + super()._setup( logger=logger, producer=producer, graceful_timeout=graceful_timeout, diff --git a/faststream/message/message.py b/faststream/message/message.py index 592f51308e..2400d00127 100644 --- a/faststream/message/message.py +++ b/faststream/message/message.py @@ -55,6 +55,26 @@ def __init__( self.committed: Optional[AckStatus] = None self.processed = False + def __repr__(self) -> str: + inner = ", ".join( + filter( + bool, + ( + f"body={self.body}", + f"content_type={self.content_type}", + f"message_id={self.message_id}", + f"correlation_id={self.correlation_id}", + f"reply_to={self.reply_to}" if self.reply_to else "", + f"headers={self.headers}", + f"path={self.path}", + f"committed={self.committed}", + f"raw_message={self.raw_message}", + ), + ) + ) + + return f"{self.__class__.__name__}({inner})" + async def decode(self) -> Optional["DecodedMessage"]: """Serialize the message by lazy decoder.""" # TODO: make it lazy after `decoded_body` removed diff --git a/faststream/message/utils.py b/faststream/message/utils.py index 771ceac18b..490493a125 100644 --- a/faststream/message/utils.py +++ b/faststream/message/utils.py @@ -12,7 +12,7 @@ from uuid import uuid4 from faststream._internal._compat import dump_json, json_loads -from faststream._internal.constants import EMPTY, ContentTypes +from faststream._internal.constants import ContentTypes if TYPE_CHECKING: from faststream._internal.basic_types import DecodedMessage, SendableMessage @@ -30,20 +30,17 @@ def decode_message(message: "StreamMessage[Any]") -> "DecodedMessage": body: Any = getattr(message, "body", message) m: DecodedMessage = body - if (content_type := getattr(message, "content_type", EMPTY)) is not EMPTY: - content_type = cast(Optional[str], content_type) + if content_type := getattr(message, "content_type", False): + content_type = ContentTypes(cast(str, content_type)) - if not content_type: - with suppress(json.JSONDecodeError, UnicodeDecodeError): - m = json_loads(body) - - elif ContentTypes.text.value in content_type: + if content_type is ContentTypes.text: m = body.decode() - elif ContentTypes.json.value in content_type: + elif content_type is ContentTypes.json: m = json_loads(body) else: + # content-type not set with suppress(json.JSONDecodeError, UnicodeDecodeError): m = json_loads(body) diff --git a/faststream/nats/subscriber/usecase.py b/faststream/nats/subscriber/usecase.py index fc91ef8b88..de1e5e8137 100644 --- a/faststream/nats/subscriber/usecase.py +++ b/faststream/nats/subscriber/usecase.py @@ -126,7 +126,7 @@ def __init__( self.producer = None @override - def setup( # type: ignore[override] + def _setup( # type: ignore[override] self, *, connection: ConnectionType, @@ -146,7 +146,7 @@ def setup( # type: ignore[override] ) -> None: self._connection = connection - super().setup( + super()._setup( logger=logger, producer=producer, graceful_timeout=graceful_timeout, diff --git a/faststream/rabbit/publisher/usecase.py b/faststream/rabbit/publisher/usecase.py index d5c06d3dd1..c9bd51dd02 100644 --- a/faststream/rabbit/publisher/usecase.py +++ b/faststream/rabbit/publisher/usecase.py @@ -160,7 +160,7 @@ def __init__( self.virtual_host = "" @override - def setup( # type: ignore[override] + def _setup( # type: ignore[override] self, *, producer: Optional["AioPikaFastProducer"], @@ -169,7 +169,7 @@ def setup( # type: ignore[override] ) -> None: self.app_id = app_id self.virtual_host = virtual_host - super().setup(producer=producer) + super()._setup(producer=producer) @property def routing(self) -> str: diff --git a/faststream/rabbit/subscriber/usecase.py b/faststream/rabbit/subscriber/usecase.py index 0fb1c1cfbb..6a8c346db3 100644 --- a/faststream/rabbit/subscriber/usecase.py +++ b/faststream/rabbit/subscriber/usecase.py @@ -96,7 +96,7 @@ def __init__( self.declarer = None @override - def setup( # type: ignore[override] + def _setup( # type: ignore[override] self, *, app_id: Optional[str], @@ -120,7 +120,7 @@ def setup( # type: ignore[override] self.virtual_host = virtual_host self.declarer = declarer - super().setup( + super()._setup( logger=logger, producer=producer, graceful_timeout=graceful_timeout, diff --git a/faststream/redis/subscriber/usecase.py b/faststream/redis/subscriber/usecase.py index 6ef23b05f8..f576c47217 100644 --- a/faststream/redis/subscriber/usecase.py +++ b/faststream/redis/subscriber/usecase.py @@ -102,7 +102,7 @@ def __init__( self.task: Optional[asyncio.Task[None]] = None @override - def setup( # type: ignore[override] + def _setup( # type: ignore[override] self, *, connection: Optional["Redis[bytes]"], @@ -122,7 +122,7 @@ def setup( # type: ignore[override] ) -> None: self._client = connection - super().setup( + super()._setup( logger=logger, producer=producer, graceful_timeout=graceful_timeout, diff --git a/faststream/specification/asyncapi/v2_6_0/generate.py b/faststream/specification/asyncapi/v2_6_0/generate.py index 0be5b73f1c..c8d8dc823f 100644 --- a/faststream/specification/asyncapi/v2_6_0/generate.py +++ b/faststream/specification/asyncapi/v2_6_0/generate.py @@ -32,7 +32,7 @@ def get_app_schema(app: Application) -> Schema: if broker is None: # pragma: no cover raise RuntimeError() - broker.setup() + broker._setup() servers = get_broker_server(broker) channels = get_broker_channels(broker) diff --git a/faststream/specification/asyncapi/v3_0_0/generate.py b/faststream/specification/asyncapi/v3_0_0/generate.py index 97ca91c561..2bfcdc3eb5 100644 --- a/faststream/specification/asyncapi/v3_0_0/generate.py +++ b/faststream/specification/asyncapi/v3_0_0/generate.py @@ -40,7 +40,7 @@ def get_app_schema(app: Application) -> Schema: broker = app.broker if broker is None: # pragma: no cover raise RuntimeError() - broker.setup() + broker._setup() servers = get_broker_server(broker) channels = get_broker_channels(broker) diff --git a/tests/a_docs/redis/test_security.py b/tests/a_docs/redis/test_security.py index 9e3cc6fdc3..11b1217a16 100644 --- a/tests/a_docs/redis/test_security.py +++ b/tests/a_docs/redis/test_security.py @@ -35,7 +35,7 @@ async def test_base_security(): from docs.docs_src.redis.security.basic import broker async with broker: - await broker.ping(3.0) + await broker.ping(0.01) assert connection.call_args.kwargs["ssl"] diff --git a/tests/brokers/base/requests.py b/tests/brokers/base/requests.py index 78dcdcb58b..ae3f6eefe5 100644 --- a/tests/brokers/base/requests.py +++ b/tests/brokers/base/requests.py @@ -24,7 +24,7 @@ async def test_request_timeout(self, queue: str): @broker.subscriber(*args, **kwargs) async def handler(msg): - await anyio.sleep(1.0) + await anyio.sleep(0.01) return "Response" async with self.patch_broker(broker): diff --git a/tests/cli/test_publish.py b/tests/cli/test_publish.py index 06f58308f3..a718d6e693 100644 --- a/tests/cli/test_publish.py +++ b/tests/cli/test_publish.py @@ -1,6 +1,7 @@ from unittest.mock import AsyncMock, patch from dirty_equals import IsPartialDict +from typer.testing import CliRunner from faststream import FastStream from faststream._internal.cli.main import cli as faststream_app @@ -18,6 +19,8 @@ def get_mock_app(broker_type, producer_type) -> FastStream: broker.connect = AsyncMock() mock_producer = AsyncMock(spec=producer_type) mock_producer.publish = AsyncMock() + mock_producer._parser = AsyncMock() + mock_producer._decoder = AsyncMock() broker._producer = mock_producer return FastStream(broker) @@ -40,13 +43,13 @@ def test_publish_command_with_redis_options(runner): "fastream:app", "hello world", "--channel", - "test channel", + "channelname", "--reply_to", "tester", "--list", - "0.1", + "listname", "--stream", - "stream url", + "streamname", "--correlation_id", "someId", ], @@ -56,12 +59,11 @@ def test_publish_command_with_redis_options(runner): assert mock_app.broker._producer.publish.call_args.args[0] == "hello world" assert mock_app.broker._producer.publish.call_args.kwargs == IsPartialDict( - channel="test channel", reply_to="tester", - list="0.1", - stream="stream url", + stream="streamname", + list="listname", + channel="channelname", correlation_id="someId", - rpc=False, ) @@ -83,7 +85,7 @@ def test_publish_command_with_confluent_options(runner): "fastream:app", "hello world", "--topic", - "confluent topic", + "topicname", "--correlation_id", "someId", ], @@ -92,9 +94,8 @@ def test_publish_command_with_confluent_options(runner): assert result.exit_code == 0 assert mock_app.broker._producer.publish.call_args.args[0] == "hello world" assert mock_app.broker._producer.publish.call_args.kwargs == IsPartialDict( - topic="confluent topic", + topic="topicname", correlation_id="someId", - rpc=False, ) @@ -116,7 +117,7 @@ def test_publish_command_with_kafka_options(runner): "fastream:app", "hello world", "--topic", - "kafka topic", + "topicname", "--correlation_id", "someId", ], @@ -125,9 +126,8 @@ def test_publish_command_with_kafka_options(runner): assert result.exit_code == 0 assert mock_app.broker._producer.publish.call_args.args[0] == "hello world" assert mock_app.broker._producer.publish.call_args.kwargs == IsPartialDict( - topic="kafka topic", + topic="topicname", correlation_id="someId", - rpc=False, ) @@ -149,7 +149,7 @@ def test_publish_command_with_nats_options(runner): "fastream:app", "hello world", "--subject", - "nats subject", + "subjectname", "--reply_to", "tester", "--correlation_id", @@ -161,10 +161,9 @@ def test_publish_command_with_nats_options(runner): assert mock_app.broker._producer.publish.call_args.args[0] == "hello world" assert mock_app.broker._producer.publish.call_args.kwargs == IsPartialDict( - subject="nats subject", + subject="subjectname", reply_to="tester", correlation_id="someId", - rpc=False, ) @@ -187,8 +186,6 @@ def test_publish_command_with_rabbit_options(runner): "hello world", "--correlation_id", "someId", - "--raise_timeout", - "True", ], ) @@ -198,7 +195,37 @@ def test_publish_command_with_rabbit_options(runner): assert mock_app.broker._producer.publish.call_args.kwargs == IsPartialDict( { "correlation_id": "someId", - "raise_timeout": "True", - "rpc": False, } ) + + +@require_nats +def test_publish_nats_request_command(runner: CliRunner): + from faststream.nats import NatsBroker + from faststream.nats.publisher.producer import NatsFastProducer + + mock_app = get_mock_app(NatsBroker, NatsFastProducer) + + with patch( + "faststream._internal.cli.main.import_from_string", + return_value=(None, mock_app), + ): + runner.invoke( + faststream_app, + [ + "publish", + "fastream:app", + "hello world", + "--subject", + "subjectname", + "--rpc", + "--timeout", + "1.0", + ], + ) + + assert mock_app.broker._producer.request.call_args.args[0] == "hello world" + assert mock_app.broker._producer.request.call_args.kwargs == IsPartialDict( + subject="subjectname", + timeout=1.0, + )