jararaca 0.2.37a12__py3-none-any.whl → 0.4.0a5__py3-none-any.whl
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.
- README.md +121 -0
- jararaca/__init__.py +267 -15
- jararaca/__main__.py +4 -0
- jararaca/broker_backend/__init__.py +106 -0
- jararaca/broker_backend/mapper.py +25 -0
- jararaca/broker_backend/redis_broker_backend.py +168 -0
- jararaca/cli.py +840 -103
- jararaca/common/__init__.py +3 -0
- jararaca/core/__init__.py +3 -0
- jararaca/core/providers.py +4 -0
- jararaca/core/uow.py +55 -16
- jararaca/di.py +4 -0
- jararaca/files/entity.py.mako +4 -0
- jararaca/lifecycle.py +6 -2
- jararaca/messagebus/__init__.py +5 -1
- jararaca/messagebus/bus_message_controller.py +4 -0
- jararaca/messagebus/consumers/__init__.py +3 -0
- jararaca/messagebus/decorators.py +90 -85
- jararaca/messagebus/implicit_headers.py +49 -0
- jararaca/messagebus/interceptors/__init__.py +3 -0
- jararaca/messagebus/interceptors/aiopika_publisher_interceptor.py +95 -37
- jararaca/messagebus/interceptors/publisher_interceptor.py +42 -0
- jararaca/messagebus/message.py +31 -0
- jararaca/messagebus/publisher.py +47 -4
- jararaca/messagebus/worker.py +1615 -135
- jararaca/microservice.py +248 -36
- jararaca/observability/constants.py +7 -0
- jararaca/observability/decorators.py +177 -16
- jararaca/observability/fastapi_exception_handler.py +37 -0
- jararaca/observability/hooks.py +109 -0
- jararaca/observability/interceptor.py +8 -2
- jararaca/observability/providers/__init__.py +3 -0
- jararaca/observability/providers/otel.py +213 -18
- jararaca/persistence/base.py +40 -3
- jararaca/persistence/exports.py +4 -0
- jararaca/persistence/interceptors/__init__.py +3 -0
- jararaca/persistence/interceptors/aiosqa_interceptor.py +187 -23
- jararaca/persistence/interceptors/constants.py +5 -0
- jararaca/persistence/interceptors/decorators.py +50 -0
- jararaca/persistence/session.py +3 -0
- jararaca/persistence/sort_filter.py +4 -0
- jararaca/persistence/utilities.py +74 -32
- jararaca/presentation/__init__.py +3 -0
- jararaca/presentation/decorators.py +170 -82
- jararaca/presentation/exceptions.py +23 -0
- jararaca/presentation/hooks.py +4 -0
- jararaca/presentation/http_microservice.py +4 -0
- jararaca/presentation/server.py +120 -41
- jararaca/presentation/websocket/__init__.py +3 -0
- jararaca/presentation/websocket/base_types.py +4 -0
- jararaca/presentation/websocket/context.py +34 -4
- jararaca/presentation/websocket/decorators.py +8 -41
- jararaca/presentation/websocket/redis.py +280 -53
- jararaca/presentation/websocket/types.py +6 -2
- jararaca/presentation/websocket/websocket_interceptor.py +74 -23
- jararaca/reflect/__init__.py +3 -0
- jararaca/reflect/controller_inspect.py +81 -0
- jararaca/reflect/decorators.py +238 -0
- jararaca/reflect/metadata.py +76 -0
- jararaca/rpc/__init__.py +3 -0
- jararaca/rpc/http/__init__.py +101 -0
- jararaca/rpc/http/backends/__init__.py +14 -0
- jararaca/rpc/http/backends/httpx.py +43 -9
- jararaca/rpc/http/backends/otel.py +4 -0
- jararaca/rpc/http/decorators.py +378 -113
- jararaca/rpc/http/httpx.py +3 -0
- jararaca/scheduler/__init__.py +3 -0
- jararaca/scheduler/beat_worker.py +758 -0
- jararaca/scheduler/decorators.py +89 -28
- jararaca/scheduler/types.py +11 -0
- jararaca/tools/app_config/__init__.py +3 -0
- jararaca/tools/app_config/decorators.py +7 -19
- jararaca/tools/app_config/interceptor.py +10 -4
- jararaca/tools/typescript/__init__.py +3 -0
- jararaca/tools/typescript/decorators.py +120 -0
- jararaca/tools/typescript/interface_parser.py +1126 -189
- jararaca/utils/__init__.py +3 -0
- jararaca/utils/rabbitmq_utils.py +372 -0
- jararaca/utils/retry.py +148 -0
- jararaca-0.4.0a5.dist-info/LICENSE +674 -0
- jararaca-0.4.0a5.dist-info/LICENSES/GPL-3.0-or-later.txt +232 -0
- {jararaca-0.2.37a12.dist-info → jararaca-0.4.0a5.dist-info}/METADATA +14 -7
- jararaca-0.4.0a5.dist-info/RECORD +88 -0
- {jararaca-0.2.37a12.dist-info → jararaca-0.4.0a5.dist-info}/WHEEL +1 -1
- pyproject.toml +131 -0
- jararaca/messagebus/types.py +0 -30
- jararaca/scheduler/scheduler.py +0 -154
- jararaca/tools/metadata.py +0 -47
- jararaca-0.2.37a12.dist-info/RECORD +0 -63
- /jararaca-0.2.37a12.dist-info/LICENSE → /LICENSE +0 -0
- {jararaca-0.2.37a12.dist-info → jararaca-0.4.0a5.dist-info}/entry_points.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<img src="https://raw.githubusercontent.com/LuscasLeo/jararaca/main/docs/assets/_f04774c9-7e05-4da4-8b17-8be23f6a1475.jpeg" alt="Jararaca Logo" width="250" float="right">
|
|
2
|
+
|
|
3
|
+
# Jararaca Microservice Framework
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Jararaca is an async-first microservice framework designed to simplify the development of distributed systems. It provides a comprehensive set of tools for building robust, scalable, and maintainable microservices with a focus on developer experience and type safety.
|
|
8
|
+
|
|
9
|
+
## Key Features
|
|
10
|
+
|
|
11
|
+
### REST API Development
|
|
12
|
+
- Easy-to-use interfaces for building REST APIs
|
|
13
|
+
- Automatic request/response validation
|
|
14
|
+
- Type-safe endpoints with FastAPI integration
|
|
15
|
+
- Automatic OpenAPI documentation generation
|
|
16
|
+
|
|
17
|
+
### Message Bus Integration
|
|
18
|
+
- Topic-based message bus for event-driven architecture
|
|
19
|
+
- Support for both worker and publisher patterns
|
|
20
|
+
- Built-in message serialization and deserialization
|
|
21
|
+
- Easy integration with AIO Pika for RabbitMQ
|
|
22
|
+
|
|
23
|
+
### Distributed WebSocket
|
|
24
|
+
- Room-based WebSocket communication
|
|
25
|
+
- Distributed broadcasting across multiple backend instances
|
|
26
|
+
- Automatic message synchronization between instances
|
|
27
|
+
- Built-in connection management and room handling
|
|
28
|
+
|
|
29
|
+
### Task Scheduling
|
|
30
|
+
- Cron-based task scheduling
|
|
31
|
+
- Support for overlapping and non-overlapping tasks
|
|
32
|
+
- Distributed task execution
|
|
33
|
+
- Easy integration with message bus for task distribution
|
|
34
|
+
|
|
35
|
+
### TypeScript Integration
|
|
36
|
+
- Automatic TypeScript interface generation
|
|
37
|
+
- Command-line tool for generating TypeScript types
|
|
38
|
+
- Support for REST endpoints, WebSocket events, and message bus payloads
|
|
39
|
+
- Type-safe frontend-backend communication
|
|
40
|
+
- **`@ExposeType` decorator** - Explicitly expose types for TypeScript generation without needing them in endpoints
|
|
41
|
+
|
|
42
|
+
### Hexagonal Architecture
|
|
43
|
+
- Clear separation of concerns
|
|
44
|
+
- Business logic isolation from infrastructure
|
|
45
|
+
- Easy testing and maintainability
|
|
46
|
+
- Dependency injection for flexible component management
|
|
47
|
+
|
|
48
|
+
### Observability
|
|
49
|
+
- Built-in OpenTelemetry integration
|
|
50
|
+
- Distributed tracing support
|
|
51
|
+
- Logging and metrics collection
|
|
52
|
+
- Performance monitoring capabilities
|
|
53
|
+
|
|
54
|
+
## Quick Start
|
|
55
|
+
|
|
56
|
+
### Installation
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install jararaca
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Basic Usage
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from jararaca import Microservice, create_http_server
|
|
66
|
+
from jararaca.presentation.http_microservice import HttpMicroservice
|
|
67
|
+
|
|
68
|
+
# Define your microservice
|
|
69
|
+
app = Microservice(
|
|
70
|
+
providers=[
|
|
71
|
+
# Add your providers here
|
|
72
|
+
],
|
|
73
|
+
controllers=[
|
|
74
|
+
# Add your controllers here
|
|
75
|
+
],
|
|
76
|
+
interceptors=[
|
|
77
|
+
# Add your interceptors here
|
|
78
|
+
],
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
# Create HTTP server
|
|
82
|
+
http_app = HttpMicroservice(app)
|
|
83
|
+
web_app = create_http_server(app)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Running the Service
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Run as HTTP server
|
|
90
|
+
jararaca server app:http_app
|
|
91
|
+
|
|
92
|
+
# Run as message bus worker
|
|
93
|
+
jararaca worker app:app
|
|
94
|
+
|
|
95
|
+
# Run as scheduler
|
|
96
|
+
jararaca scheduler app:app
|
|
97
|
+
|
|
98
|
+
# Generate TypeScript interfaces
|
|
99
|
+
jararaca gen-tsi app.main:app app.ts
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Documentation
|
|
103
|
+
|
|
104
|
+
For detailed documentation, please visit our [documentation site](https://luscasleo.github.io/jararaca/).
|
|
105
|
+
|
|
106
|
+
## Examples
|
|
107
|
+
|
|
108
|
+
Check out the [examples directory](examples/) for complete working examples of:
|
|
109
|
+
- REST API implementation
|
|
110
|
+
- WebSocket usage
|
|
111
|
+
- Message bus integration
|
|
112
|
+
- Task scheduling
|
|
113
|
+
- TypeScript interface generation
|
|
114
|
+
|
|
115
|
+
## Contributing
|
|
116
|
+
|
|
117
|
+
Contributions are welcome! Please read our [contributing guidelines](.github/CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
|
|
118
|
+
|
|
119
|
+
## License
|
|
120
|
+
|
|
121
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
jararaca/__init__.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2025 Lucas S
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
4
|
+
|
|
1
5
|
from importlib import import_module
|
|
2
6
|
from typing import TYPE_CHECKING
|
|
3
7
|
|
|
4
8
|
if TYPE_CHECKING:
|
|
9
|
+
from jararaca.broker_backend.redis_broker_backend import RedisMessageBrokerBackend
|
|
5
10
|
from jararaca.messagebus.bus_message_controller import (
|
|
6
11
|
ack,
|
|
7
12
|
nack,
|
|
@@ -10,7 +15,28 @@ if TYPE_CHECKING:
|
|
|
10
15
|
retry_later,
|
|
11
16
|
use_bus_message_controller,
|
|
12
17
|
)
|
|
13
|
-
from jararaca.microservice import
|
|
18
|
+
from jararaca.microservice import (
|
|
19
|
+
AppContext,
|
|
20
|
+
AppInterceptor,
|
|
21
|
+
AppTransactionContext,
|
|
22
|
+
use_app_type,
|
|
23
|
+
)
|
|
24
|
+
from jararaca.observability.decorators import TracedClass, TracedFunc, traced_class
|
|
25
|
+
from jararaca.observability.fastapi_exception_handler import (
|
|
26
|
+
setup_fastapi_exception_handler,
|
|
27
|
+
)
|
|
28
|
+
from jararaca.observability.hooks import (
|
|
29
|
+
add_event,
|
|
30
|
+
add_span_link,
|
|
31
|
+
get_current_span,
|
|
32
|
+
get_current_span_context,
|
|
33
|
+
get_tracing_provider,
|
|
34
|
+
record_exception,
|
|
35
|
+
set_span_attribute,
|
|
36
|
+
set_span_status,
|
|
37
|
+
spawn_trace,
|
|
38
|
+
start_span,
|
|
39
|
+
)
|
|
14
40
|
from jararaca.observability.interceptor import ObservabilityInterceptor
|
|
15
41
|
from jararaca.observability.providers.otel import OtelObservabilityProvider
|
|
16
42
|
from jararaca.persistence.sort_filter import (
|
|
@@ -21,6 +47,7 @@ if TYPE_CHECKING:
|
|
|
21
47
|
SortModel,
|
|
22
48
|
SortRuleApplier,
|
|
23
49
|
)
|
|
50
|
+
from jararaca.presentation.exceptions import PresentationException
|
|
24
51
|
from jararaca.presentation.hooks import (
|
|
25
52
|
raises_200_on,
|
|
26
53
|
raises_400_on,
|
|
@@ -31,27 +58,62 @@ if TYPE_CHECKING:
|
|
|
31
58
|
raises_500_on,
|
|
32
59
|
raises_http_exception_on,
|
|
33
60
|
)
|
|
61
|
+
from jararaca.reflect.controller_inspect import (
|
|
62
|
+
ControllerMemberReflect,
|
|
63
|
+
ControllerReflect,
|
|
64
|
+
)
|
|
65
|
+
from jararaca.reflect.metadata import (
|
|
66
|
+
SetMetadata,
|
|
67
|
+
TransactionMetadata,
|
|
68
|
+
get_all_metadata,
|
|
69
|
+
get_metadata,
|
|
70
|
+
get_metadata_value,
|
|
71
|
+
start_providing_metadata,
|
|
72
|
+
start_transaction_metadata_context,
|
|
73
|
+
)
|
|
34
74
|
from jararaca.rpc.http.backends.httpx import HTTPXHttpRPCAsyncBackend
|
|
35
75
|
from jararaca.rpc.http.backends.otel import TracedRequestMiddleware
|
|
36
|
-
from jararaca.rpc.http.decorators import
|
|
76
|
+
from jararaca.rpc.http.decorators import ( # New request parameter decorators; Configuration decorators; Authentication classes; Middleware classes; Configuration classes; Exception classes
|
|
77
|
+
ApiKeyAuth,
|
|
78
|
+
AuthenticationMiddleware,
|
|
79
|
+
BasicAuth,
|
|
80
|
+
BearerTokenAuth,
|
|
81
|
+
Body,
|
|
82
|
+
CacheMiddleware,
|
|
83
|
+
ContentType,
|
|
84
|
+
)
|
|
37
85
|
from jararaca.rpc.http.decorators import Delete as HttpDelete
|
|
86
|
+
from jararaca.rpc.http.decorators import ( # New request parameter decorators; Configuration decorators; Authentication classes; Middleware classes; Configuration classes; Exception classes
|
|
87
|
+
File,
|
|
88
|
+
FormData,
|
|
89
|
+
)
|
|
38
90
|
from jararaca.rpc.http.decorators import Get as HttpGet
|
|
39
|
-
from jararaca.rpc.http.decorators import (
|
|
91
|
+
from jararaca.rpc.http.decorators import ( # New request parameter decorators; Configuration decorators; Authentication classes; Middleware classes; Configuration classes; Exception classes
|
|
40
92
|
GlobalHttpErrorHandler,
|
|
41
93
|
Header,
|
|
42
94
|
HttpMapping,
|
|
43
95
|
HttpRpcClientBuilder,
|
|
44
96
|
)
|
|
45
97
|
from jararaca.rpc.http.decorators import Patch as HttpPatch
|
|
46
|
-
from jararaca.rpc.http.decorators import
|
|
98
|
+
from jararaca.rpc.http.decorators import ( # New request parameter decorators; Configuration decorators; Authentication classes; Middleware classes; Configuration classes; Exception classes
|
|
99
|
+
PathParam,
|
|
100
|
+
)
|
|
47
101
|
from jararaca.rpc.http.decorators import Post as HttpPost
|
|
48
102
|
from jararaca.rpc.http.decorators import Put as HttpPut
|
|
49
|
-
from jararaca.rpc.http.decorators import (
|
|
103
|
+
from jararaca.rpc.http.decorators import ( # New request parameter decorators; Configuration decorators; Authentication classes; Middleware classes; Configuration classes; Exception classes
|
|
50
104
|
Query,
|
|
51
105
|
RequestAttribute,
|
|
106
|
+
RequestHook,
|
|
107
|
+
ResponseHook,
|
|
108
|
+
ResponseMiddleware,
|
|
52
109
|
RestClient,
|
|
110
|
+
Retry,
|
|
111
|
+
RetryConfig,
|
|
53
112
|
RouteHttpErrorHandler,
|
|
54
113
|
RPCRequestNetworkError,
|
|
114
|
+
RPCUnhandleError,
|
|
115
|
+
Timeout,
|
|
116
|
+
TimeoutException,
|
|
55
117
|
)
|
|
56
118
|
|
|
57
119
|
from .core.providers import ProviderSpec, Token
|
|
@@ -60,17 +122,35 @@ if TYPE_CHECKING:
|
|
|
60
122
|
from .messagebus.interceptors.aiopika_publisher_interceptor import (
|
|
61
123
|
AIOPikaConnectionFactory,
|
|
62
124
|
GenericPoolConfig,
|
|
125
|
+
)
|
|
126
|
+
from .messagebus.interceptors.publisher_interceptor import (
|
|
63
127
|
MessageBusPublisherInterceptor,
|
|
64
128
|
)
|
|
129
|
+
from .messagebus.message import Message, MessageOf
|
|
65
130
|
from .messagebus.publisher import use_publisher
|
|
66
|
-
from .
|
|
67
|
-
|
|
68
|
-
|
|
131
|
+
from .microservice import (
|
|
132
|
+
Microservice,
|
|
133
|
+
is_shutting_down,
|
|
134
|
+
request_shutdown,
|
|
135
|
+
use_app_context,
|
|
136
|
+
use_app_transaction_context,
|
|
137
|
+
use_app_tx_ctx_data,
|
|
138
|
+
use_current_container,
|
|
139
|
+
)
|
|
69
140
|
from .persistence.base import T_BASEMODEL, BaseEntity
|
|
70
141
|
from .persistence.interceptors.aiosqa_interceptor import (
|
|
71
142
|
AIOSQAConfig,
|
|
72
143
|
AIOSqlAlchemySessionInterceptor,
|
|
144
|
+
providing_new_session,
|
|
145
|
+
providing_session,
|
|
146
|
+
providing_transaction,
|
|
73
147
|
use_session,
|
|
148
|
+
use_transaction,
|
|
149
|
+
)
|
|
150
|
+
from .persistence.interceptors.decorators import (
|
|
151
|
+
set_use_persistence_session,
|
|
152
|
+
skip_persistence_session,
|
|
153
|
+
uses_persistence_session,
|
|
74
154
|
)
|
|
75
155
|
from .persistence.utilities import (
|
|
76
156
|
CriteriaBasedAttributeQueryInjector,
|
|
@@ -96,6 +176,7 @@ if TYPE_CHECKING:
|
|
|
96
176
|
RestController,
|
|
97
177
|
UseDependency,
|
|
98
178
|
UseMiddleware,
|
|
179
|
+
compose_route_decorators,
|
|
99
180
|
)
|
|
100
181
|
from .presentation.http_microservice import HttpMicroservice, HttpMiddleware
|
|
101
182
|
from .presentation.server import create_http_server
|
|
@@ -113,8 +194,22 @@ if TYPE_CHECKING:
|
|
|
113
194
|
from .presentation.websocket.websocket_interceptor import WebSocketInterceptor
|
|
114
195
|
from .scheduler.decorators import ScheduledAction
|
|
115
196
|
from .tools.app_config.interceptor import AppConfigurationInterceptor
|
|
197
|
+
from .tools.typescript.decorators import (
|
|
198
|
+
ExposeType,
|
|
199
|
+
MutationEndpoint,
|
|
200
|
+
QueryEndpoint,
|
|
201
|
+
SplitInputOutput,
|
|
202
|
+
)
|
|
116
203
|
|
|
117
204
|
__all__ = [
|
|
205
|
+
"SetMetadata",
|
|
206
|
+
"start_transaction_metadata_context",
|
|
207
|
+
"start_providing_metadata",
|
|
208
|
+
"TransactionMetadata",
|
|
209
|
+
"get_metadata",
|
|
210
|
+
"get_all_metadata",
|
|
211
|
+
"get_metadata_value",
|
|
212
|
+
"RedisMessageBrokerBackend",
|
|
118
213
|
"FilterRuleApplier",
|
|
119
214
|
"SortRuleApplier",
|
|
120
215
|
"use_bus_message_controller",
|
|
@@ -124,6 +219,7 @@ if TYPE_CHECKING:
|
|
|
124
219
|
"retry",
|
|
125
220
|
"retry_later",
|
|
126
221
|
"RPCRequestNetworkError",
|
|
222
|
+
"RPCUnhandleError",
|
|
127
223
|
"FILTER_SORT_ENTITY_ATTR_MAP",
|
|
128
224
|
"FilterModel",
|
|
129
225
|
"SortFilterRunner",
|
|
@@ -131,6 +227,7 @@ if TYPE_CHECKING:
|
|
|
131
227
|
"RegisterWebSocketMessage",
|
|
132
228
|
"TracedRequestMiddleware",
|
|
133
229
|
"raises_http_exception_on",
|
|
230
|
+
"PresentationException",
|
|
134
231
|
"raises_200_on",
|
|
135
232
|
"raises_422_on",
|
|
136
233
|
"raises_404_on",
|
|
@@ -152,9 +249,29 @@ if TYPE_CHECKING:
|
|
|
152
249
|
"HttpPut",
|
|
153
250
|
"HttpDelete",
|
|
154
251
|
"ObservabilityInterceptor",
|
|
252
|
+
"TracedFunc",
|
|
253
|
+
"TracedClass",
|
|
254
|
+
"traced_class",
|
|
255
|
+
"start_span",
|
|
256
|
+
"add_span_link",
|
|
257
|
+
"get_current_span",
|
|
258
|
+
"get_current_span_context",
|
|
259
|
+
"spawn_trace",
|
|
260
|
+
"set_span_attribute",
|
|
261
|
+
"add_event",
|
|
262
|
+
"setup_fastapi_exception_handler",
|
|
263
|
+
"set_span_status",
|
|
264
|
+
"record_exception",
|
|
265
|
+
"get_tracing_provider",
|
|
155
266
|
"QueryInjector",
|
|
156
267
|
"HttpMicroservice",
|
|
157
268
|
"use_current_container",
|
|
269
|
+
"use_app_context",
|
|
270
|
+
"use_app_transaction_context",
|
|
271
|
+
"use_app_tx_ctx_data",
|
|
272
|
+
"is_shutting_down",
|
|
273
|
+
"request_shutdown",
|
|
274
|
+
"Microservice",
|
|
158
275
|
"T_BASEMODEL",
|
|
159
276
|
"DatedEntity",
|
|
160
277
|
"BaseEntity",
|
|
@@ -177,16 +294,22 @@ if TYPE_CHECKING:
|
|
|
177
294
|
"MessageBusController",
|
|
178
295
|
"MessageHandler",
|
|
179
296
|
"ScheduledAction",
|
|
180
|
-
"Microservice",
|
|
181
297
|
"ProviderSpec",
|
|
182
298
|
"Token",
|
|
183
299
|
"AIOSqlAlchemySessionInterceptor",
|
|
184
300
|
"AIOSQAConfig",
|
|
185
301
|
"create_http_server",
|
|
186
|
-
"MessageBusWorker",
|
|
187
302
|
"Container",
|
|
188
303
|
"WebSocketInterceptor",
|
|
189
304
|
"use_session",
|
|
305
|
+
"use_transaction",
|
|
306
|
+
"providing_session",
|
|
307
|
+
"provide_session",
|
|
308
|
+
"uses_persistence_session",
|
|
309
|
+
"skip_persistence_session",
|
|
310
|
+
"set_use_persistence_session",
|
|
311
|
+
"providing_transaction",
|
|
312
|
+
"providing_new_session",
|
|
190
313
|
"Post",
|
|
191
314
|
"Get",
|
|
192
315
|
"Patch",
|
|
@@ -198,8 +321,13 @@ if TYPE_CHECKING:
|
|
|
198
321
|
"MessageBusPublisherInterceptor",
|
|
199
322
|
"RedisWebSocketConnectionBackend",
|
|
200
323
|
"AppConfigurationInterceptor",
|
|
324
|
+
"ExposeType",
|
|
325
|
+
"QueryEndpoint",
|
|
326
|
+
"MutationEndpoint",
|
|
327
|
+
"SplitInputOutput",
|
|
201
328
|
"UseMiddleware",
|
|
202
329
|
"UseDependency",
|
|
330
|
+
"compose_route_decorators",
|
|
203
331
|
"GlobalHttpErrorHandler",
|
|
204
332
|
"RouteHttpErrorHandler",
|
|
205
333
|
"WebSocketMessage",
|
|
@@ -207,8 +335,32 @@ if TYPE_CHECKING:
|
|
|
207
335
|
"provide_ws_manager",
|
|
208
336
|
"HttpRpcClientBuilder",
|
|
209
337
|
"HTTPXHttpRPCAsyncBackend",
|
|
210
|
-
|
|
338
|
+
# New request parameter decorators
|
|
339
|
+
"FormData",
|
|
340
|
+
"File",
|
|
341
|
+
# Configuration decorators
|
|
342
|
+
"Timeout",
|
|
343
|
+
"Retry",
|
|
344
|
+
"ContentType",
|
|
345
|
+
# Authentication classes
|
|
346
|
+
"BearerTokenAuth",
|
|
347
|
+
"BasicAuth",
|
|
348
|
+
"ApiKeyAuth",
|
|
349
|
+
# Middleware classes
|
|
350
|
+
"CacheMiddleware",
|
|
351
|
+
"AuthenticationMiddleware",
|
|
352
|
+
"ResponseMiddleware",
|
|
353
|
+
"RequestHook",
|
|
354
|
+
"ResponseHook",
|
|
355
|
+
# Configuration classes
|
|
356
|
+
"RetryConfig",
|
|
357
|
+
# Exception classes
|
|
358
|
+
"TimeoutException",
|
|
359
|
+
"AppTransactionContext",
|
|
360
|
+
"use_app_type",
|
|
211
361
|
"AppContext",
|
|
362
|
+
"ControllerMemberReflect",
|
|
363
|
+
"ControllerReflect",
|
|
212
364
|
"AppInterceptor",
|
|
213
365
|
"OtelObservabilityProvider",
|
|
214
366
|
]
|
|
@@ -216,6 +368,18 @@ if TYPE_CHECKING:
|
|
|
216
368
|
__SPEC_PARENT__: str = __spec__.parent # type: ignore
|
|
217
369
|
# A mapping of {<member name>: (package, <module name>)} defining dynamic imports
|
|
218
370
|
_dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
371
|
+
"SetMetadata": (__SPEC_PARENT__, "reflect.metadata", None),
|
|
372
|
+
"TransactionMetadata": (__SPEC_PARENT__, "reflect.metadata", None),
|
|
373
|
+
"start_transaction_metadata_context": (__SPEC_PARENT__, "reflect.metadata", None),
|
|
374
|
+
"start_providing_metadata": (__SPEC_PARENT__, "reflect.metadata", None),
|
|
375
|
+
"get_metadata": (__SPEC_PARENT__, "reflect.metadata", None),
|
|
376
|
+
"get_all_metadata": (__SPEC_PARENT__, "reflect.metadata", None),
|
|
377
|
+
"get_metadata_value": (__SPEC_PARENT__, "reflect.metadata", None),
|
|
378
|
+
"RedisMessageBrokerBackend": (
|
|
379
|
+
__SPEC_PARENT__,
|
|
380
|
+
"broker_backend.redis_broker_backend",
|
|
381
|
+
None,
|
|
382
|
+
),
|
|
219
383
|
"FilterRuleApplier": (__SPEC_PARENT__, "persistence.sort_filter", None),
|
|
220
384
|
"SortRuleApplier": (__SPEC_PARENT__, "persistence.sort_filter", None),
|
|
221
385
|
"use_bus_message_controller": (
|
|
@@ -234,6 +398,7 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
234
398
|
"retry": (__SPEC_PARENT__, "messagebus.bus_message_controller", None),
|
|
235
399
|
"retry_later": (__SPEC_PARENT__, "messagebus.bus_message_controller", None),
|
|
236
400
|
"RPCRequestNetworkError": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
401
|
+
"RPCUnhandleError": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
237
402
|
"FILTER_SORT_ENTITY_ATTR_MAP": (__SPEC_PARENT__, "persistence.sort_filter", None),
|
|
238
403
|
"FilterModel": (__SPEC_PARENT__, "persistence.sort_filter", None),
|
|
239
404
|
"SortFilterRunner": (__SPEC_PARENT__, "persistence.sort_filter", None),
|
|
@@ -250,6 +415,7 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
250
415
|
),
|
|
251
416
|
"TracedRequestMiddleware": (__SPEC_PARENT__, "rpc.http.backends.otel", None),
|
|
252
417
|
"raises_http_exception_on": (__SPEC_PARENT__, "presentation.hooks", None),
|
|
418
|
+
"PresentationException": (__SPEC_PARENT__, "presentation.exceptions", None),
|
|
253
419
|
"raises_200_on": (__SPEC_PARENT__, "presentation.hooks", None),
|
|
254
420
|
"raises_400_on": (__SPEC_PARENT__, "presentation.hooks", None),
|
|
255
421
|
"raises_401_on": (__SPEC_PARENT__, "presentation.hooks", None),
|
|
@@ -271,6 +437,24 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
271
437
|
"HttpPut": (__SPEC_PARENT__, "rpc.http.decorators", "Put"),
|
|
272
438
|
"HttpDelete": (__SPEC_PARENT__, "rpc.http.decorators", "Delete"),
|
|
273
439
|
"ObservabilityInterceptor": (__SPEC_PARENT__, "observability.interceptor", None),
|
|
440
|
+
"TracedFunc": (__SPEC_PARENT__, "observability.decorators", None),
|
|
441
|
+
"TracedClass": (__SPEC_PARENT__, "observability.decorators", None),
|
|
442
|
+
"traced_class": (__SPEC_PARENT__, "observability.decorators", None),
|
|
443
|
+
"spawn_trace": (__SPEC_PARENT__, "observability.hooks", None),
|
|
444
|
+
"setup_fastapi_exception_handler": (
|
|
445
|
+
__SPEC_PARENT__,
|
|
446
|
+
"observability.fastapi_exception_handler",
|
|
447
|
+
None,
|
|
448
|
+
),
|
|
449
|
+
"set_span_attribute": (__SPEC_PARENT__, "observability.hooks", None),
|
|
450
|
+
"start_span": (__SPEC_PARENT__, "observability.hooks", None),
|
|
451
|
+
"add_span_link": (__SPEC_PARENT__, "observability.hooks", None),
|
|
452
|
+
"get_current_span": (__SPEC_PARENT__, "observability.hooks", None),
|
|
453
|
+
"get_current_span_context": (__SPEC_PARENT__, "observability.hooks", None),
|
|
454
|
+
"add_event": (__SPEC_PARENT__, "observability.hooks", None),
|
|
455
|
+
"set_span_status": (__SPEC_PARENT__, "observability.hooks", None),
|
|
456
|
+
"record_exception": (__SPEC_PARENT__, "observability.hooks", None),
|
|
457
|
+
"get_tracing_provider": (__SPEC_PARENT__, "observability.hooks", None),
|
|
274
458
|
"QueryInjector": (__SPEC_PARENT__, "persistence.utilities", None),
|
|
275
459
|
"HttpMicroservice": (__SPEC_PARENT__, "presentation.http_microservice", None),
|
|
276
460
|
"use_current_container": (__SPEC_PARENT__, "microservice", None),
|
|
@@ -286,8 +470,8 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
286
470
|
),
|
|
287
471
|
"Identifiable": (__SPEC_PARENT__, "persistence.utilities", None),
|
|
288
472
|
"IdentifiableEntity": (__SPEC_PARENT__, "persistence.utilities", None),
|
|
289
|
-
"MessageOf": (__SPEC_PARENT__, "messagebus.
|
|
290
|
-
"Message": (__SPEC_PARENT__, "messagebus.
|
|
473
|
+
"MessageOf": (__SPEC_PARENT__, "messagebus.message", None),
|
|
474
|
+
"Message": (__SPEC_PARENT__, "messagebus.message", None),
|
|
291
475
|
"StringCriteria": (__SPEC_PARENT__, "persistence.utilities", None),
|
|
292
476
|
"DateCriteria": (__SPEC_PARENT__, "persistence.utilities", None),
|
|
293
477
|
"DateOrderedFilter": (__SPEC_PARENT__, "persistence.utilities", None),
|
|
@@ -314,7 +498,6 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
314
498
|
None,
|
|
315
499
|
),
|
|
316
500
|
"create_http_server": (__SPEC_PARENT__, "presentation.server", None),
|
|
317
|
-
"MessageBusWorker": (__SPEC_PARENT__, "messagebus.worker", None),
|
|
318
501
|
"Container": (__SPEC_PARENT__, "di", None),
|
|
319
502
|
"WebSocketInterceptor": (
|
|
320
503
|
__SPEC_PARENT__,
|
|
@@ -326,6 +509,46 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
326
509
|
"persistence.interceptors.aiosqa_interceptor",
|
|
327
510
|
None,
|
|
328
511
|
),
|
|
512
|
+
"use_transaction": (
|
|
513
|
+
__SPEC_PARENT__,
|
|
514
|
+
"persistence.interceptors.aiosqa_interceptor",
|
|
515
|
+
None,
|
|
516
|
+
),
|
|
517
|
+
"providing_session": (
|
|
518
|
+
__SPEC_PARENT__,
|
|
519
|
+
"persistence.interceptors.aiosqa_interceptor",
|
|
520
|
+
None,
|
|
521
|
+
),
|
|
522
|
+
"provide_session": (
|
|
523
|
+
__SPEC_PARENT__,
|
|
524
|
+
"persistence.interceptors.aiosqa_interceptor",
|
|
525
|
+
None,
|
|
526
|
+
),
|
|
527
|
+
"providing_new_session": (
|
|
528
|
+
__SPEC_PARENT__,
|
|
529
|
+
"persistence.interceptors.aiosqa_interceptor",
|
|
530
|
+
None,
|
|
531
|
+
),
|
|
532
|
+
"providing_transaction": (
|
|
533
|
+
__SPEC_PARENT__,
|
|
534
|
+
"persistence.interceptors.aiosqa_interceptor",
|
|
535
|
+
None,
|
|
536
|
+
),
|
|
537
|
+
"uses_persistence_session": (
|
|
538
|
+
__SPEC_PARENT__,
|
|
539
|
+
"persistence.interceptors.decorators",
|
|
540
|
+
None,
|
|
541
|
+
),
|
|
542
|
+
"skip_persistence_session": (
|
|
543
|
+
__SPEC_PARENT__,
|
|
544
|
+
"persistence.interceptors.decorators",
|
|
545
|
+
None,
|
|
546
|
+
),
|
|
547
|
+
"set_use_persistence_session": (
|
|
548
|
+
__SPEC_PARENT__,
|
|
549
|
+
"persistence.interceptors.decorators",
|
|
550
|
+
None,
|
|
551
|
+
),
|
|
329
552
|
"Post": (__SPEC_PARENT__, "presentation.decorators", None),
|
|
330
553
|
"Get": (__SPEC_PARENT__, "presentation.decorators", None),
|
|
331
554
|
"Patch": (__SPEC_PARENT__, "presentation.decorators", None),
|
|
@@ -339,7 +562,7 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
339
562
|
),
|
|
340
563
|
"MessageBusPublisherInterceptor": (
|
|
341
564
|
__SPEC_PARENT__,
|
|
342
|
-
"messagebus.interceptors.
|
|
565
|
+
"messagebus.interceptors.publisher_interceptor",
|
|
343
566
|
None,
|
|
344
567
|
),
|
|
345
568
|
"RedisWebSocketConnectionBackend": (
|
|
@@ -352,8 +575,13 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
352
575
|
"tools.app_config.interceptor",
|
|
353
576
|
None,
|
|
354
577
|
),
|
|
578
|
+
"ExposeType": (__SPEC_PARENT__, "tools.typescript.decorators", None),
|
|
579
|
+
"QueryEndpoint": (__SPEC_PARENT__, "tools.typescript.decorators", None),
|
|
580
|
+
"MutationEndpoint": (__SPEC_PARENT__, "tools.typescript.decorators", None),
|
|
581
|
+
"SplitInputOutput": (__SPEC_PARENT__, "tools.typescript.decorators", None),
|
|
355
582
|
"UseMiddleware": (__SPEC_PARENT__, "presentation.decorators", None),
|
|
356
583
|
"UseDependency": (__SPEC_PARENT__, "presentation.decorators", None),
|
|
584
|
+
"compose_route_decorators": (__SPEC_PARENT__, "presentation.decorators", None),
|
|
357
585
|
"GlobalHttpErrorHandler": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
358
586
|
"RouteHttpErrorHandler": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
359
587
|
"WebSocketMessage": (__SPEC_PARENT__, "presentation.websocket.types", None),
|
|
@@ -365,9 +593,33 @@ _dynamic_imports: "dict[str, tuple[str, str, str | None]]" = {
|
|
|
365
593
|
"provide_ws_manager": (__SPEC_PARENT__, "presentation.websocket.context", None),
|
|
366
594
|
"HttpRpcClientBuilder": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
367
595
|
"HTTPXHttpRPCAsyncBackend": (__SPEC_PARENT__, "rpc.http.backends.httpx", None),
|
|
596
|
+
# New HTTP RPC classes
|
|
597
|
+
"FormData": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
598
|
+
"File": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
599
|
+
"Timeout": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
600
|
+
"Retry": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
601
|
+
"ContentType": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
602
|
+
"BearerTokenAuth": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
603
|
+
"BasicAuth": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
604
|
+
"ApiKeyAuth": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
605
|
+
"CacheMiddleware": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
606
|
+
"AuthenticationMiddleware": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
607
|
+
"ResponseMiddleware": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
608
|
+
"RequestHook": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
609
|
+
"ResponseHook": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
610
|
+
"RetryConfig": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
611
|
+
"TimeoutException": (__SPEC_PARENT__, "rpc.http.decorators", None),
|
|
368
612
|
"use_app_context": (__SPEC_PARENT__, "microservice", None),
|
|
613
|
+
"use_app_transaction_context": (__SPEC_PARENT__, "microservice", None),
|
|
614
|
+
"use_app_tx_ctx_data": (__SPEC_PARENT__, "microservice", None),
|
|
615
|
+
"is_shutting_down": (__SPEC_PARENT__, "microservice", None),
|
|
616
|
+
"request_shutdown": (__SPEC_PARENT__, "microservice", None),
|
|
369
617
|
"AppContext": (__SPEC_PARENT__, "microservice", None),
|
|
370
618
|
"AppInterceptor": (__SPEC_PARENT__, "microservice", None),
|
|
619
|
+
"AppTransactionContext": (__SPEC_PARENT__, "microservice", None),
|
|
620
|
+
"use_app_type": (__SPEC_PARENT__, "microservice", None),
|
|
621
|
+
"ControllerMemberReflect": (__SPEC_PARENT__, "reflect.controller_inspect", None),
|
|
622
|
+
"ControllerReflect": (__SPEC_PARENT__, "reflect.controller_inspect", None),
|
|
371
623
|
}
|
|
372
624
|
|
|
373
625
|
|