faststream 0.7.7__tar.gz → 0.7.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {faststream-0.7.7 → faststream-0.7.8}/PKG-INFO +2 -2
- {faststream-0.7.7 → faststream-0.7.8}/faststream/__init__.py +2 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/_compat.py +1 -1
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/application.py +22 -6
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/broker/broker.py +18 -2
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/configs/__init__.py +9 -1
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/configs/broker.py +61 -2
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/call_wrapper.py +7 -1
- faststream-0.7.8/faststream/_internal/endpoint/subscriber/hints.py +106 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/subscriber/usecase.py +26 -19
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/usecase.py +6 -2
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/kafka/__init__.py +3 -0
- faststream-0.7.8/faststream/_internal/kafka/calls.py +202 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/middlewares.py +4 -4
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/testing/calls.py +37 -12
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/types.py +1 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/utils/functions.py +2 -45
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/broker/broker.py +7 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/broker/router.py +7 -0
- faststream-0.7.8/faststream/confluent/call_wrapper.py +17 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/configs/broker.py +53 -1
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/message.py +16 -7
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/publisher/usecase.py +19 -2
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/subscriber/usecase.py +65 -3
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/testing.py +13 -5
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/__init__.py +2 -1
- faststream-0.7.8/faststream/kafka/_compat.py +24 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/broker/broker.py +21 -1
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/broker/registrator.py +16 -13
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/broker/router.py +12 -4
- faststream-0.7.8/faststream/kafka/call_wrapper.py +16 -0
- faststream-0.7.8/faststream/kafka/configs/broker.py +111 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/fastapi/fastapi.py +22 -13
- faststream-0.7.8/faststream/kafka/helpers/__init__.py +4 -0
- faststream-0.7.8/faststream/kafka/helpers/admin.py +85 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/helpers/rebalance_listener.py +1 -1
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/message.py +13 -11
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/publisher/factory.py +9 -3
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/publisher/usecase.py +19 -2
- faststream-0.7.8/faststream/kafka/schemas/__init__.py +4 -0
- faststream-0.7.8/faststream/kafka/schemas/partition.py +35 -0
- faststream-0.7.8/faststream/kafka/schemas/topic.py +93 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/subscriber/config.py +3 -3
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/subscriber/factory.py +41 -6
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/subscriber/specification.py +1 -1
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/subscriber/usecase.py +120 -8
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/testing.py +1 -3
- {faststream-0.7.7 → faststream-0.7.8}/faststream/middlewares/acknowledgement/middleware.py +31 -25
- {faststream-0.7.7 → faststream-0.7.8}/faststream/middlewares/exception.py +3 -2
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/__init__.py +14 -1
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/broker/broker.py +21 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/broker/config.py +42 -1
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/broker/router.py +3 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/fastapi/fastapi.py +10 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/subscriber/usecase.py +4 -1
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/broker/broker.py +16 -5
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/broker/router.py +7 -0
- faststream-0.7.8/faststream/nats/configs/broker.py +121 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/publisher/producer.py +38 -24
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/schemas/pull_sub.py +12 -3
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/usecases/stream_pull_subscriber.py +31 -8
- {faststream-0.7.7 → faststream-0.7.8}/faststream/prometheus/middleware.py +1 -1
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/broker/broker.py +32 -2
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/broker/router.py +7 -0
- faststream-0.7.8/faststream/rabbit/configs/broker.py +94 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/broker/broker.py +4 -1
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/broker/registrator.py +106 -20
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/broker/router.py +7 -0
- faststream-0.7.8/faststream/redis/configs/broker.py +121 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/fastapi/fastapi.py +23 -19
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/message.py +99 -17
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/parser/parsers.py +40 -3
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/publisher/producer.py +12 -20
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/publisher/usecase.py +34 -28
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/schemas/types.py +8 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/subscriber/usecases/list_subscriber.py +2 -2
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/subscriber/usecases/stream_subscriber.py +14 -11
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/testing.py +3 -2
- {faststream-0.7.7 → faststream-0.7.8}/pyproject.toml +3 -3
- faststream-0.7.7/faststream/kafka/configs/broker.py +0 -81
- faststream-0.7.7/faststream/kafka/helpers/__init__.py +0 -3
- faststream-0.7.7/faststream/kafka/schemas/__init__.py +0 -3
- faststream-0.7.7/faststream/kafka/schemas/partition.py +0 -24
- faststream-0.7.7/faststream/nats/configs/broker.py +0 -60
- faststream-0.7.7/faststream/rabbit/configs/broker.py +0 -39
- faststream-0.7.7/faststream/redis/configs/broker.py +0 -42
- {faststream-0.7.7 → faststream-0.7.8}/LICENSE +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/README.md +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/__about__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/__main__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/basic_types.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/broker/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/broker/pub_base.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/broker/registrator.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/broker/router.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/docs.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/dto.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/main.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/options.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/supervisors/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/supervisors/asgi_multiprocess.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/supervisors/basereload.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/supervisors/multiprocess.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/supervisors/utils.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/supervisors/watchfiles.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/utils/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/utils/errors.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/utils/imports.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/utils/logs.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/cli/utils/parser.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/configs/endpoint.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/configs/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/constants.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/context/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/context/composition.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/context/context_type.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/context/repository.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/context/resolve.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/di/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/di/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/publisher/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/publisher/fake.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/publisher/proto.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/publisher/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/publisher/usecase.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/subscriber/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/subscriber/call_item.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/subscriber/mixins.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/subscriber/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/subscriber/supervisor.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/subscriber/utils.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/endpoint/utils.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/fastapi/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/fastapi/_compat.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/fastapi/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/fastapi/context.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/fastapi/get_dependant.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/fastapi/route.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/fastapi/router.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/kafka/keys.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/logger/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/logger/formatter.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/logger/logger_proxy.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/logger/logging.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/logger/params_storage.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/logger/state.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/parser.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/producer.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/proto.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/testing/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/testing/app.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/testing/ast.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/testing/broker.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/utils/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/utils/data.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/utils/nuid.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/_internal/utils/path.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/annotations.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/app.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/annotations.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/app.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/factories/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/factories/asyncapi/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/factories/asyncapi/docs.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/factories/asyncapi/route.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/factories/asyncapi/try_it_out.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/factories/ping.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/handlers.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/params.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/request.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/response.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/types.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/asgi/websocket.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/cli.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/annotations.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/broker/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/broker/logging.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/broker/registrator.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/configs/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/fastapi/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/fastapi/fastapi.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/helpers/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/helpers/admin.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/helpers/client.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/helpers/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/opentelemetry/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/opentelemetry/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/opentelemetry/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/parser.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/prometheus/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/prometheus/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/prometheus/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/publisher/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/publisher/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/publisher/factory.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/publisher/fake.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/publisher/producer.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/publisher/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/publisher/state.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/response.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/schemas/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/schemas/partition.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/schemas/topic.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/security.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/subscriber/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/subscriber/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/subscriber/factory.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/subscriber/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/confluent/types.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/context.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/exceptions.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/annotations.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/broker/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/broker/logging.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/configs/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/exceptions.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/fastapi/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/opentelemetry/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/opentelemetry/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/opentelemetry/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/parser.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/prometheus/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/prometheus/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/prometheus/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/publisher/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/publisher/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/publisher/fake.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/publisher/producer.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/publisher/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/publisher/state.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/response.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/schemas/params.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/security.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/subscriber/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/kafka/types.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/message/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/message/message.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/message/source_type.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/message/utils.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/middlewares/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/middlewares/acknowledgement/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/middlewares/acknowledgement/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/middlewares/logging.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/annotations.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/broker/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/broker/logging.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/broker/registrator.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/fastapi/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/message.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/opentelemetry/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/opentelemetry/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/opentelemetry/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/parser.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/path.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/prometheus/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/prometheus/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/prometheus/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/publisher/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/publisher/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/publisher/factory.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/publisher/fake.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/publisher/producer.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/publisher/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/publisher/usecase.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/response.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/security.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/subscriber/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/subscriber/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/subscriber/factory.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/subscriber/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/testing.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/mqtt/utils.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/annotations.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/broker/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/broker/logging.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/broker/registrator.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/broker/state.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/configs/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/fastapi/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/fastapi/fastapi.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/helpers/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/helpers/bucket_declarer.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/helpers/obj_storage_declarer.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/helpers/state.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/helpers/stream_builder.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/message.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/opentelemetry/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/opentelemetry/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/opentelemetry/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/parser.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/prometheus/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/prometheus/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/prometheus/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/publisher/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/publisher/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/publisher/factory.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/publisher/fake.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/publisher/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/publisher/usecase.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/response.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/schemas/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/schemas/js_stream.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/schemas/kv_watch.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/schemas/obj_watch.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/schemas/schedule.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/security.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/adapters.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/factory.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/state.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/usecases/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/usecases/basic.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/usecases/core_subscriber.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/usecases/key_value_subscriber.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/usecases/object_storage_subscriber.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/usecases/stream_basic.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/subscriber/usecases/stream_push_subscriber.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/nats/testing.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/opentelemetry/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/opentelemetry/annotations.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/opentelemetry/baggage.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/opentelemetry/consts.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/opentelemetry/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/opentelemetry/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/params/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/params/no_cast.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/params/params.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/prometheus/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/prometheus/consts.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/prometheus/container.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/prometheus/manager.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/prometheus/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/prometheus/types.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/py.typed +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/annotations.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/broker/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/broker/logging.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/broker/registrator.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/configs/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/configs/base.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/fastapi/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/fastapi/fastapi.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/helpers/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/helpers/channel_manager.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/helpers/declarer.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/helpers/state.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/message.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/opentelemetry/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/opentelemetry/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/opentelemetry/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/parser.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/prometheus/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/prometheus/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/prometheus/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/publisher/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/publisher/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/publisher/factory.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/publisher/fake.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/publisher/options.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/publisher/producer.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/publisher/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/publisher/usecase.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/response.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/schemas/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/schemas/channel.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/schemas/constants.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/schemas/exchange.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/schemas/queue.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/security.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/subscriber/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/subscriber/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/subscriber/factory.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/subscriber/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/subscriber/usecase.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/testing.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/types.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/rabbit/utils.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/_compat.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/annotations.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/broker/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/broker/cluster_broker.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/broker/logging.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/broker/sentinel_broker.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/configs/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/configs/state.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/exceptions.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/fastapi/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/opentelemetry/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/opentelemetry/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/opentelemetry/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/parser/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/parser/binary.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/parser/message.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/prometheus/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/prometheus/middleware.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/prometheus/provider.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/publisher/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/publisher/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/publisher/factory.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/publisher/fake.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/publisher/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/response.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/schemas/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/schemas/list_sub.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/schemas/proto.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/schemas/pub_sub.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/schemas/stream_sub.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/security.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/subscriber/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/subscriber/config.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/subscriber/factory.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/subscriber/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/subscriber/usecases/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/subscriber/usecases/basic.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/redis/subscriber/usecases/channel_subscriber.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/response/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/response/publish_type.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/response/response.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/response/utils.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/security.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/factory.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/message.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/site.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/utils.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/generate.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/amqp/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/amqp/channel.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/amqp/operation.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/http/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/http/operation.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/kafka/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/kafka/channel.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/kafka/operation.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/main/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/main/channel.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/main/operation.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/mqtt/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/mqtt/channel.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/mqtt/operation.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/nats/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/nats/channel.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/nats/operation.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/redis/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/redis/channel.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/redis/operation.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/sqs/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/sqs/channel.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/bindings/sqs/operation.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/channels.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/components.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/contact.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/docs.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/info.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/license.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/message.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/operations.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/schema.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/servers.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/tag.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v2_6_0/schema/utils.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/generate.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/amqp/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/amqp/channel.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/amqp/operation.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/http.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/kafka.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/main/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/main/channel.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/main/operation.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/mqtt.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/nats.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/redis.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/bindings/sqs.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/channels.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/components.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/contact.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/docs.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/info.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/license.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/message.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/operations.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/schema.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/servers.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/tag.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/asyncapi/v3_0_0/schema/utils.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/base/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/base/generator.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/base/info.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/base/schema.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/base/specification.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/bindings/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/bindings/amqp.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/bindings/http.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/bindings/kafka.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/bindings/main.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/bindings/mqtt.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/bindings/nats.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/bindings/redis.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/bindings/sqs.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/broker.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/extra/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/extra/contact.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/extra/external_docs.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/extra/license.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/extra/tag.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/message/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/message/model.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/operation/__init__.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/operation/model.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/publisher.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/specification/schema/subscriber.py +0 -0
- {faststream-0.7.7 → faststream-0.7.8}/faststream/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: faststream
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.8
|
|
4
4
|
Summary: A thin, typed Python client for Kafka, RabbitMQ, NATS, Redis and MQTT — with AsyncAPI docs and in-memory testing.
|
|
5
5
|
Keywords: rabbitmq,kafka,nats,redis,mqtt,asyncapi,framework,message brokers
|
|
6
6
|
Author: AG2AI, Nikita Pastukhov
|
|
@@ -42,7 +42,7 @@ Requires-Dist: watchfiles>=0.15.0,<1.2.0 ; extra == 'cli'
|
|
|
42
42
|
Requires-Dist: confluent-kafka>=2,!=2.8.1,<3 ; python_full_version < '3.13' and extra == 'confluent'
|
|
43
43
|
Requires-Dist: confluent-kafka>=2.6,!=2.8.1,<3 ; python_full_version >= '3.13' and extra == 'confluent'
|
|
44
44
|
Requires-Dist: aiokafka>=0.9,<0.15 ; extra == 'kafka'
|
|
45
|
-
Requires-Dist: zmqtt>=0.2.
|
|
45
|
+
Requires-Dist: zmqtt>=0.2.4,<0.3.0 ; extra == 'mqtt'
|
|
46
46
|
Requires-Dist: nats-py>=2.14.0,<=3.0.0 ; extra == 'nats'
|
|
47
47
|
Requires-Dist: opentelemetry-sdk>=1.24.0,<2.0.0 ; extra == 'otel'
|
|
48
48
|
Requires-Dist: prometheus-client>=0.20.0,<0.30.0 ; extra == 'prometheus'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""A Python framework for building services interacting with Apache Kafka, RabbitMQ, NATS and Redis."""
|
|
2
2
|
|
|
3
|
+
from faststream._internal.configs import UnderlyingDriverAnnotation
|
|
3
4
|
from faststream._internal.testing.app import TestApp
|
|
4
5
|
from faststream._internal.utils import apply_types
|
|
5
6
|
from faststream.annotations import ContextRepo, Logger
|
|
@@ -30,5 +31,6 @@ __all__ = (
|
|
|
30
31
|
"SourceType",
|
|
31
32
|
"StreamMessage",
|
|
32
33
|
"TestApp",
|
|
34
|
+
"UnderlyingDriverAnnotation",
|
|
33
35
|
"apply_types",
|
|
34
36
|
)
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from abc import abstractmethod
|
|
3
3
|
from collections.abc import AsyncGenerator, Callable, Sequence
|
|
4
|
-
from contextlib import asynccontextmanager
|
|
4
|
+
from contextlib import AbstractAsyncContextManager, asynccontextmanager, nullcontext
|
|
5
5
|
from typing import TYPE_CHECKING, Any, Optional, TypeVar
|
|
6
6
|
|
|
7
|
-
from typing_extensions import ParamSpec, deprecated
|
|
7
|
+
from typing_extensions import ParamSpec, Self, deprecated
|
|
8
8
|
|
|
9
9
|
from faststream._internal.di import FastDependsConfig
|
|
10
10
|
from faststream._internal.logger import logger
|
|
11
11
|
from faststream._internal.utils import apply_types
|
|
12
|
-
from faststream._internal.utils.functions import
|
|
12
|
+
from faststream._internal.utils.functions import to_async
|
|
13
13
|
from faststream.exceptions import SetupError
|
|
14
14
|
from faststream.specification import AsyncAPI
|
|
15
15
|
|
|
16
16
|
if TYPE_CHECKING:
|
|
17
|
+
from types import TracebackType
|
|
18
|
+
|
|
17
19
|
from faststream._internal.basic_types import (
|
|
18
20
|
AnyCallable,
|
|
19
21
|
AsyncFunc,
|
|
@@ -26,6 +28,8 @@ if TYPE_CHECKING:
|
|
|
26
28
|
from faststream.specification.base import SpecificationFactory
|
|
27
29
|
|
|
28
30
|
|
|
31
|
+
catch_startup_validation_error: Callable[[], AbstractAsyncContextManager[Any, Any]]
|
|
32
|
+
|
|
29
33
|
try:
|
|
30
34
|
from pydantic import ValidationError as PValidation
|
|
31
35
|
|
|
@@ -50,8 +54,8 @@ try:
|
|
|
50
54
|
invalid_fields=invalid_fields,
|
|
51
55
|
) from e
|
|
52
56
|
|
|
53
|
-
except ImportError:
|
|
54
|
-
catch_startup_validation_error =
|
|
57
|
+
except ImportError: # pragma: no cover
|
|
58
|
+
catch_startup_validation_error = nullcontext
|
|
55
59
|
|
|
56
60
|
|
|
57
61
|
P_HookParams = ParamSpec("P_HookParams")
|
|
@@ -189,7 +193,19 @@ class Application(StartAbleApplication):
|
|
|
189
193
|
context__=self.context,
|
|
190
194
|
)
|
|
191
195
|
else:
|
|
192
|
-
self.lifespan_context =
|
|
196
|
+
self.lifespan_context = lambda *_, **__: nullcontext()
|
|
197
|
+
|
|
198
|
+
async def __aenter__(self) -> Self:
|
|
199
|
+
await self.start()
|
|
200
|
+
return self
|
|
201
|
+
|
|
202
|
+
async def __aexit__(
|
|
203
|
+
self,
|
|
204
|
+
exc_type: type[BaseException] | None = None,
|
|
205
|
+
exc_val: BaseException | None = None,
|
|
206
|
+
exc_tb: Optional["TracebackType"] = None,
|
|
207
|
+
) -> None:
|
|
208
|
+
await self.stop()
|
|
193
209
|
|
|
194
210
|
@abstractmethod
|
|
195
211
|
def exit(self) -> None:
|
|
@@ -2,9 +2,11 @@ from abc import abstractmethod
|
|
|
2
2
|
from collections.abc import Iterable, Sequence
|
|
3
3
|
from typing import TYPE_CHECKING, Any, Generic, Optional
|
|
4
4
|
|
|
5
|
+
import anyio
|
|
5
6
|
from fast_depends import Provider
|
|
6
7
|
from typing_extensions import Self
|
|
7
8
|
|
|
9
|
+
from faststream._internal._compat import ExceptionGroup
|
|
8
10
|
from faststream._internal.configs import BrokerConfigType_co
|
|
9
11
|
from faststream._internal.types import (
|
|
10
12
|
BrokerMiddleware,
|
|
@@ -20,6 +22,7 @@ if TYPE_CHECKING:
|
|
|
20
22
|
|
|
21
23
|
from faststream._internal.context.repository import ContextRepo
|
|
22
24
|
from faststream._internal.di import FastDependsConfig
|
|
25
|
+
from faststream._internal.endpoint.subscriber import SubscriberUsecase
|
|
23
26
|
from faststream._internal.producer import ProducerProto
|
|
24
27
|
from faststream.specification.schema import BrokerSpec
|
|
25
28
|
|
|
@@ -127,11 +130,24 @@ class BrokerUsecase(
|
|
|
127
130
|
exc_tb: Optional["TracebackType"] = None,
|
|
128
131
|
) -> None:
|
|
129
132
|
"""Closes the object."""
|
|
130
|
-
|
|
131
|
-
|
|
133
|
+
errors: list[Exception] = []
|
|
134
|
+
|
|
135
|
+
async def stop_subscriber(sub: "SubscriberUsecase[MsgType]") -> None:
|
|
136
|
+
try:
|
|
137
|
+
await sub.stop()
|
|
138
|
+
except Exception as e:
|
|
139
|
+
errors.append(e)
|
|
140
|
+
|
|
141
|
+
async with anyio.create_task_group() as tg:
|
|
142
|
+
for sub in self.subscribers:
|
|
143
|
+
_ = tg.start_soon(stop_subscriber, sub)
|
|
132
144
|
|
|
133
145
|
self.running = False
|
|
134
146
|
|
|
147
|
+
if errors:
|
|
148
|
+
msg = "Failed to stop subscribers"
|
|
149
|
+
raise ExceptionGroup(msg, errors)
|
|
150
|
+
|
|
135
151
|
@abstractmethod
|
|
136
152
|
async def ping(self, timeout: float | None) -> bool:
|
|
137
153
|
"""Check connection alive."""
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
from .broker import
|
|
1
|
+
from .broker import (
|
|
2
|
+
BrokerConfig,
|
|
3
|
+
BrokerConfigType_co,
|
|
4
|
+
ConfigComposition,
|
|
5
|
+
UnderlyingDriverAnnotation,
|
|
6
|
+
UnderlyingDriverAnnotations,
|
|
7
|
+
)
|
|
2
8
|
from .endpoint import PublisherUsecaseConfig, SubscriberUsecaseConfig
|
|
3
9
|
from .specification import (
|
|
4
10
|
PublisherSpecificationConfig,
|
|
@@ -13,4 +19,6 @@ __all__ = (
|
|
|
13
19
|
"PublisherUsecaseConfig",
|
|
14
20
|
"SubscriberSpecificationConfig",
|
|
15
21
|
"SubscriberUsecaseConfig",
|
|
22
|
+
"UnderlyingDriverAnnotation",
|
|
23
|
+
"UnderlyingDriverAnnotations",
|
|
16
24
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from collections.abc import Sequence
|
|
1
|
+
from collections.abc import Mapping, Sequence
|
|
2
2
|
from dataclasses import dataclass, field
|
|
3
|
-
from typing import TYPE_CHECKING, Any, Generic, Optional, Union
|
|
3
|
+
from typing import TYPE_CHECKING, Any, Generic, Optional, TypeAlias, Union
|
|
4
4
|
|
|
5
5
|
from typing_extensions import TypeVar as TypeVar313
|
|
6
6
|
|
|
@@ -20,6 +20,24 @@ if TYPE_CHECKING:
|
|
|
20
20
|
from faststream.middlewares import AckPolicy
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
@dataclass(kw_only=True, slots=True)
|
|
24
|
+
class UnderlyingDriverAnnotation:
|
|
25
|
+
"""A driver class mapped to the context annotation that injects it.
|
|
26
|
+
|
|
27
|
+
Attributes:
|
|
28
|
+
type_hint: the context annotation to use instead.
|
|
29
|
+
module: where that annotation is importable from.
|
|
30
|
+
name: its name in that module.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
type_hint: Any
|
|
34
|
+
module: str
|
|
35
|
+
name: str
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
UnderlyingDriverAnnotations: TypeAlias = Mapping[Any, UnderlyingDriverAnnotation | Any]
|
|
39
|
+
|
|
40
|
+
|
|
23
41
|
@dataclass(kw_only=True)
|
|
24
42
|
class BrokerConfig:
|
|
25
43
|
prefix: str = ""
|
|
@@ -36,6 +54,10 @@ class BrokerConfig:
|
|
|
36
54
|
id_generator: IdGenerator = gen_cor_id
|
|
37
55
|
|
|
38
56
|
# subscriber options
|
|
57
|
+
underlying_driver_annotations: UnderlyingDriverAnnotations = field(
|
|
58
|
+
default_factory=dict
|
|
59
|
+
)
|
|
60
|
+
default_driver_annotations: UnderlyingDriverAnnotations = field(default_factory=dict)
|
|
39
61
|
broker_dependencies: Sequence["Dependant"] = ()
|
|
40
62
|
graceful_timeout: float | None = 15.0
|
|
41
63
|
ack_policy: "AckPolicy" = field(default_factory=lambda: EMPTY)
|
|
@@ -45,6 +67,16 @@ class BrokerConfig:
|
|
|
45
67
|
# untyped callers still pass a generator: the first subscriber would spend it
|
|
46
68
|
self.broker_dependencies = tuple(self.broker_dependencies)
|
|
47
69
|
|
|
70
|
+
@property
|
|
71
|
+
def resolved_underlying_driver_annotations(
|
|
72
|
+
self,
|
|
73
|
+
) -> UnderlyingDriverAnnotations:
|
|
74
|
+
# A broker's own rows are the defaults; anything the user passed wins.
|
|
75
|
+
return {
|
|
76
|
+
**self.default_driver_annotations,
|
|
77
|
+
**self.underlying_driver_annotations,
|
|
78
|
+
}
|
|
79
|
+
|
|
48
80
|
def __repr__(self) -> str:
|
|
49
81
|
return f"{self.__class__.__name__}(id: {id(self)})"
|
|
50
82
|
|
|
@@ -171,6 +203,33 @@ class ConfigComposition(Generic[BrokerConfigType_co]): # noqa: PLR0904
|
|
|
171
203
|
context |= c.extra_context
|
|
172
204
|
return context
|
|
173
205
|
|
|
206
|
+
@property
|
|
207
|
+
def underlying_driver_annotations(
|
|
208
|
+
self,
|
|
209
|
+
) -> UnderlyingDriverAnnotations:
|
|
210
|
+
annotations: dict[Any, Any] = {}
|
|
211
|
+
for c in self.configs:
|
|
212
|
+
annotations |= c.underlying_driver_annotations
|
|
213
|
+
return annotations
|
|
214
|
+
|
|
215
|
+
@property
|
|
216
|
+
def default_driver_annotations(
|
|
217
|
+
self,
|
|
218
|
+
) -> UnderlyingDriverAnnotations:
|
|
219
|
+
annotations: dict[Any, Any] = {}
|
|
220
|
+
for c in self.configs:
|
|
221
|
+
annotations |= c.default_driver_annotations
|
|
222
|
+
return annotations
|
|
223
|
+
|
|
224
|
+
@property
|
|
225
|
+
def resolved_underlying_driver_annotations(
|
|
226
|
+
self,
|
|
227
|
+
) -> UnderlyingDriverAnnotations:
|
|
228
|
+
return {
|
|
229
|
+
**self.default_driver_annotations,
|
|
230
|
+
**self.underlying_driver_annotations,
|
|
231
|
+
}
|
|
232
|
+
|
|
174
233
|
@property
|
|
175
234
|
def prefix(self) -> str:
|
|
176
235
|
return "".join(c.prefix for c in self.configs)
|
|
@@ -5,6 +5,7 @@ from typing import (
|
|
|
5
5
|
Any,
|
|
6
6
|
Generic,
|
|
7
7
|
Optional,
|
|
8
|
+
cast,
|
|
8
9
|
)
|
|
9
10
|
|
|
10
11
|
import anyio
|
|
@@ -28,11 +29,16 @@ if TYPE_CHECKING:
|
|
|
28
29
|
def ensure_call_wrapper(
|
|
29
30
|
call: Callable[P_HandlerParams, T_HandlerReturn],
|
|
30
31
|
outer_config: BrokerConfig,
|
|
32
|
+
wrapper_class: "type[HandlerCallWrapper[..., Any]]",
|
|
31
33
|
) -> "HandlerCallWrapper[P_HandlerParams, T_HandlerReturn]":
|
|
34
|
+
# An already wrapped handler keeps its class: the first decorator decides it
|
|
32
35
|
if isinstance(call, HandlerCallWrapper):
|
|
33
36
|
return call
|
|
34
37
|
|
|
35
|
-
return
|
|
38
|
+
return cast(
|
|
39
|
+
"HandlerCallWrapper[P_HandlerParams, T_HandlerReturn]",
|
|
40
|
+
wrapper_class(call, outer_config),
|
|
41
|
+
)
|
|
36
42
|
|
|
37
43
|
|
|
38
44
|
class HandlerCallWrapper(CallAssertions, Generic[P_HandlerParams, T_HandlerReturn]):
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
from collections.abc import Iterator
|
|
2
|
+
from types import UnionType
|
|
3
|
+
from typing import TYPE_CHECKING, Annotated, Any, Union, get_args, get_origin
|
|
4
|
+
|
|
5
|
+
from faststream._internal._compat import ExceptionGroup
|
|
6
|
+
from faststream._internal.configs import (
|
|
7
|
+
UnderlyingDriverAnnotation,
|
|
8
|
+
UnderlyingDriverAnnotations,
|
|
9
|
+
)
|
|
10
|
+
from faststream.exceptions import SetupError
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from fast_depends.core import CallModel
|
|
14
|
+
from fast_depends.library.serializer import OptionItem
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def check_context_annotations(
|
|
18
|
+
dependent: "CallModel",
|
|
19
|
+
annotations: UnderlyingDriverAnnotations,
|
|
20
|
+
) -> None:
|
|
21
|
+
"""Reject call model arguments annotated with a broker's own driver class.
|
|
22
|
+
|
|
23
|
+
Context annotations never reach the model's params, so any driver class
|
|
24
|
+
found there would be validated as message data.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
dependent: the handler's call model, dependencies included.
|
|
28
|
+
annotations: driver type hint to the context annotation replacing it. An
|
|
29
|
+
`UnderlyingDriverAnnotation` value also names the import to suggest.
|
|
30
|
+
"""
|
|
31
|
+
messages = [
|
|
32
|
+
_format_hint(option.field_name, hint, annotations[hint], dependency)
|
|
33
|
+
for dependency, option in _options(dependent)
|
|
34
|
+
if (hint := _find_mapped(option.field_type, annotations)) is not None
|
|
35
|
+
]
|
|
36
|
+
# a dependency shared by several arguments is still one mistake
|
|
37
|
+
errors = [SetupError(m) for m in dict.fromkeys(messages)]
|
|
38
|
+
|
|
39
|
+
if len(errors) == 1:
|
|
40
|
+
raise errors[0]
|
|
41
|
+
|
|
42
|
+
if errors:
|
|
43
|
+
msg = f"`{dependent.call_name}` has arguments FastStream cannot inject."
|
|
44
|
+
raise ExceptionGroup(msg, errors)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _options(
|
|
48
|
+
model: "CallModel",
|
|
49
|
+
dependency: str | None = None,
|
|
50
|
+
) -> Iterator[tuple[str | None, "OptionItem"]]:
|
|
51
|
+
for option in model.params:
|
|
52
|
+
yield dependency, option
|
|
53
|
+
|
|
54
|
+
for key in (*model.dependencies.values(), *model.extra_dependencies):
|
|
55
|
+
sub_model = model.dependency_provider.get_dependant(key)
|
|
56
|
+
yield from _options(sub_model, sub_model.call_name)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def _find_mapped(hint: Any, annotations: UnderlyingDriverAnnotations) -> Any:
|
|
60
|
+
origin = get_origin(hint)
|
|
61
|
+
|
|
62
|
+
if origin is Annotated:
|
|
63
|
+
return _find_mapped(get_args(hint)[0], annotations)
|
|
64
|
+
|
|
65
|
+
if origin is Union or origin is UnionType:
|
|
66
|
+
for arg in get_args(hint):
|
|
67
|
+
if (mapped := _find_mapped(arg, annotations)) is not None:
|
|
68
|
+
return mapped
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
if origin is not None and origin in annotations:
|
|
72
|
+
return origin
|
|
73
|
+
|
|
74
|
+
try:
|
|
75
|
+
return hint if hint in annotations else None
|
|
76
|
+
except TypeError:
|
|
77
|
+
# An unhashable hint cannot be a key, so it cannot be mapped.
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def _format_hint(
|
|
82
|
+
field_name: str,
|
|
83
|
+
hint: Any,
|
|
84
|
+
annotation: Any,
|
|
85
|
+
dependency: str | None,
|
|
86
|
+
) -> str:
|
|
87
|
+
owner = f" of dependency `{dependency}`" if dependency else ""
|
|
88
|
+
message = (
|
|
89
|
+
f"`{field_name}`{owner} is annotated with `{_describe(hint)}`, "
|
|
90
|
+
"which FastStream cannot inject.\n"
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
if isinstance(annotation, UnderlyingDriverAnnotation):
|
|
94
|
+
return (
|
|
95
|
+
f"{message}Use the context annotation instead:\n"
|
|
96
|
+
f"\n from {annotation.module} import {annotation.name}\n"
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
return f"{message}Use the corresponding context annotation instead: `{annotation}`"
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def _describe(hint: Any) -> str:
|
|
103
|
+
if isinstance(hint, type):
|
|
104
|
+
return f"{hint.__module__}.{hint.__qualname__}"
|
|
105
|
+
|
|
106
|
+
return str(hint)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from abc import abstractmethod
|
|
2
2
|
from collections.abc import AsyncIterator, Callable, Iterable, Sequence
|
|
3
|
-
from contextlib import AbstractContextManager, AsyncExitStack
|
|
3
|
+
from contextlib import AbstractContextManager, AsyncExitStack, ExitStack, nullcontext
|
|
4
4
|
from itertools import chain
|
|
5
5
|
from types import TracebackType
|
|
6
6
|
from typing import (
|
|
@@ -15,6 +15,9 @@ from typing import (
|
|
|
15
15
|
|
|
16
16
|
from typing_extensions import Self, overload, override
|
|
17
17
|
|
|
18
|
+
from faststream._internal.endpoint.subscriber.hints import (
|
|
19
|
+
check_context_annotations,
|
|
20
|
+
)
|
|
18
21
|
from faststream._internal.endpoint.usecase import Endpoint
|
|
19
22
|
from faststream._internal.endpoint.utils import ParserComposition
|
|
20
23
|
from faststream._internal.parser import BatchCodecProto
|
|
@@ -24,7 +27,7 @@ from faststream._internal.types import (
|
|
|
24
27
|
P_HandlerParams,
|
|
25
28
|
T_HandlerReturn,
|
|
26
29
|
)
|
|
27
|
-
from faststream._internal.utils.functions import
|
|
30
|
+
from faststream._internal.utils.functions import to_async
|
|
28
31
|
from faststream.exceptions import StopConsume, SubscriberNotFound
|
|
29
32
|
from faststream.middlewares import AcknowledgementMiddleware
|
|
30
33
|
from faststream.middlewares.logging import CriticalLogMiddleware
|
|
@@ -77,14 +80,12 @@ class SubscriberUsecase(Endpoint, Generic[MsgType]):
|
|
|
77
80
|
"_parser",
|
|
78
81
|
"ack_policy",
|
|
79
82
|
"calls",
|
|
80
|
-
"extra_watcher_options",
|
|
81
83
|
"lock",
|
|
82
84
|
"running",
|
|
83
85
|
"specification",
|
|
84
86
|
)
|
|
85
87
|
|
|
86
88
|
lock: "AbstractContextManager[Any]"
|
|
87
|
-
extra_watcher_options: dict[str, Any]
|
|
88
89
|
graceful_timeout: float | None
|
|
89
90
|
|
|
90
91
|
def __init__(
|
|
@@ -116,9 +117,7 @@ class SubscriberUsecase(Endpoint, Generic[MsgType]):
|
|
|
116
117
|
self._call_decorators: tuple[Decorator, ...] = ()
|
|
117
118
|
|
|
118
119
|
self.running = False
|
|
119
|
-
self.lock =
|
|
120
|
-
|
|
121
|
-
self.extra_watcher_options = {}
|
|
120
|
+
self.lock = nullcontext()
|
|
122
121
|
|
|
123
122
|
@property
|
|
124
123
|
def _broker_middlewares(self) -> Sequence["BrokerMiddleware[MsgType]"]:
|
|
@@ -211,6 +210,14 @@ class SubscriberUsecase(Endpoint, Generic[MsgType]):
|
|
|
211
210
|
return async_parser, async_decoder
|
|
212
211
|
|
|
213
212
|
def _build_fastdepends_model(self) -> None:
|
|
213
|
+
fd_config = self._outer_config.fd_config
|
|
214
|
+
# nothing is injected without FastDepends, and FastAPI builds its own model
|
|
215
|
+
driver_annotations = (
|
|
216
|
+
self._outer_config.resolved_underlying_driver_annotations
|
|
217
|
+
if fd_config.use_fastdepends and not fd_config.get_dependent
|
|
218
|
+
else {}
|
|
219
|
+
)
|
|
220
|
+
|
|
214
221
|
for call in self.calls:
|
|
215
222
|
async_parser, async_decoder = self._get_parser_and_decoder(
|
|
216
223
|
call.item_parser, call.item_decoder
|
|
@@ -219,11 +226,14 @@ class SubscriberUsecase(Endpoint, Generic[MsgType]):
|
|
|
219
226
|
call._setup(
|
|
220
227
|
parser=async_parser,
|
|
221
228
|
decoder=async_decoder,
|
|
222
|
-
config=
|
|
229
|
+
config=fd_config,
|
|
223
230
|
broker_dependencies=self._outer_config.broker_dependencies,
|
|
224
231
|
_call_decorators=self._call_decorators,
|
|
225
232
|
)
|
|
226
233
|
|
|
234
|
+
if driver_annotations and call.dependant is not None:
|
|
235
|
+
check_context_annotations(call.dependant, driver_annotations)
|
|
236
|
+
|
|
227
237
|
call.handler.refresh(with_mock=False)
|
|
228
238
|
|
|
229
239
|
def _post_start(self) -> None:
|
|
@@ -370,12 +380,16 @@ class SubscriberUsecase(Endpoint, Generic[MsgType]):
|
|
|
370
380
|
),
|
|
371
381
|
)
|
|
372
382
|
|
|
383
|
+
# reserve place for context scope under the middlewares __aexit__
|
|
384
|
+
# because middlewares should be exited before context scope release
|
|
385
|
+
message_scope = stack.enter_context(ExitStack())
|
|
386
|
+
|
|
373
387
|
# enter all middlewares
|
|
374
388
|
middlewares: list[BaseMiddleware] = []
|
|
375
389
|
for base_m in self.__build__middlewares_stack():
|
|
376
390
|
middleware = base_m(msg, context=context)
|
|
377
391
|
middlewares.append(middleware)
|
|
378
|
-
await
|
|
392
|
+
await stack.enter_async_context(middleware)
|
|
379
393
|
|
|
380
394
|
cache: dict[Any, Any] = {}
|
|
381
395
|
parsing_error: Exception | None = None
|
|
@@ -387,7 +401,7 @@ class SubscriberUsecase(Endpoint, Generic[MsgType]):
|
|
|
387
401
|
break
|
|
388
402
|
|
|
389
403
|
if message is not None:
|
|
390
|
-
|
|
404
|
+
message_scope.enter_context(
|
|
391
405
|
context.scopes(
|
|
392
406
|
(
|
|
393
407
|
("log_context", self.get_log_context(message)),
|
|
@@ -396,10 +410,6 @@ class SubscriberUsecase(Endpoint, Generic[MsgType]):
|
|
|
396
410
|
),
|
|
397
411
|
)
|
|
398
412
|
|
|
399
|
-
# Middlewares should be exited before scope release
|
|
400
|
-
for m in middlewares:
|
|
401
|
-
stack.push_async_exit(m.__aexit__)
|
|
402
|
-
|
|
403
413
|
result_msg = ensure_response(
|
|
404
414
|
await h.call(
|
|
405
415
|
message=message,
|
|
@@ -428,10 +438,7 @@ class SubscriberUsecase(Endpoint, Generic[MsgType]):
|
|
|
428
438
|
return result_msg
|
|
429
439
|
|
|
430
440
|
# Suitable handler was not found or
|
|
431
|
-
# parsing/decoding exception occurred
|
|
432
|
-
for m in middlewares:
|
|
433
|
-
stack.push_async_exit(m.__aexit__)
|
|
434
|
-
|
|
441
|
+
# parsing/decoding exception occurred.
|
|
435
442
|
# Reraise it to catch in tests
|
|
436
443
|
if parsing_error:
|
|
437
444
|
raise parsing_error
|
|
@@ -456,7 +463,7 @@ class SubscriberUsecase(Endpoint, Generic[MsgType]):
|
|
|
456
463
|
AcknowledgementMiddleware(
|
|
457
464
|
logger=logger_state,
|
|
458
465
|
ack_policy=self.ack_policy,
|
|
459
|
-
|
|
466
|
+
fallback_parser=self._parser,
|
|
460
467
|
),
|
|
461
468
|
CriticalLogMiddleware(logger_state),
|
|
462
469
|
*self._broker_middlewares,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from collections.abc import Callable
|
|
2
|
-
from typing import TYPE_CHECKING
|
|
2
|
+
from typing import TYPE_CHECKING, Any
|
|
3
3
|
|
|
4
4
|
from faststream._internal.types import P_HandlerParams, T_HandlerReturn
|
|
5
5
|
|
|
@@ -18,6 +18,10 @@ class Endpoint:
|
|
|
18
18
|
# few per application. `Registrator` holds them in a WeakSet, hence `__weakref__`.
|
|
19
19
|
__slots__ = ("__dict__", "__weakref__", "_outer_config")
|
|
20
20
|
|
|
21
|
+
# A broker's subscriber and publisher classes override it with a subclass
|
|
22
|
+
# whose Call assertions take the broker's own fields
|
|
23
|
+
_call_wrapper_class: type[HandlerCallWrapper[..., Any]] = HandlerCallWrapper
|
|
24
|
+
|
|
21
25
|
def __init__(self, config: "BrokerConfig") -> None:
|
|
22
26
|
self._outer_config = config
|
|
23
27
|
|
|
@@ -26,6 +30,6 @@ class Endpoint:
|
|
|
26
30
|
func: Callable[P_HandlerParams, T_HandlerReturn],
|
|
27
31
|
) -> HandlerCallWrapper[P_HandlerParams, T_HandlerReturn]:
|
|
28
32
|
handler: HandlerCallWrapper[P_HandlerParams, T_HandlerReturn] = (
|
|
29
|
-
ensure_call_wrapper(func, self._outer_config)
|
|
33
|
+
ensure_call_wrapper(func, self._outer_config, self._call_wrapper_class)
|
|
30
34
|
)
|
|
31
35
|
return handler
|
|
@@ -5,6 +5,7 @@ independent -- neither imports the other -- so anything both need lives here
|
|
|
5
5
|
rather than in one of them or in a cross-broker module.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
+
from .calls import KafkaCallAssertions, field_reader
|
|
8
9
|
from .keys import (
|
|
9
10
|
extract_per_message_keys_and_bodies,
|
|
10
11
|
key_for_index,
|
|
@@ -12,7 +13,9 @@ from .keys import (
|
|
|
12
13
|
)
|
|
13
14
|
|
|
14
15
|
__all__ = (
|
|
16
|
+
"KafkaCallAssertions",
|
|
15
17
|
"extract_per_message_keys_and_bodies",
|
|
18
|
+
"field_reader",
|
|
16
19
|
"key_for_index",
|
|
17
20
|
"realign_keys",
|
|
18
21
|
)
|