apexdevkit 1.15.4__tar.gz → 1.15.5__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.
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/PKG-INFO +1 -1
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/server.py +6 -2
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/pyproject.toml +1 -1
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/LICENSE +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/README.md +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/__init__.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/annotation/__init__.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/annotation/deprecate.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/environment.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/error.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/fastapi/__init__.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/fastapi/builder.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/fastapi/dependable.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/fastapi/docs.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/fastapi/resource.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/fastapi/response.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/fastapi/router.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/fastapi/schema.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/fastapi/service.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/fluent.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/formatter.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/http/__init__.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/http/fake.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/http/fluent.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/http/httpx.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/http/json.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/http/url.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/key_fn.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/py.typed +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/repository/__init__.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/repository/base.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/repository/connector.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/repository/database.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/repository/decorator.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/repository/in_memory.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/repository/interface.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/repository/mongo.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/repository/sqlite.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/synchronization.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/testing/__init__.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/testing/database.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/testing/fake.py +0 -0
- {apexdevkit-1.15.4 → apexdevkit-1.15.5}/apexdevkit/testing/rest.py +0 -0
|
@@ -24,7 +24,7 @@ class UvicornServer:
|
|
|
24
24
|
port: int = 8000
|
|
25
25
|
path: str = ""
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
startup_handlers: list[Callable[[], None]] = field(default_factory=list)
|
|
28
28
|
|
|
29
29
|
@classmethod
|
|
30
30
|
def from_env(cls, path: str = ".env") -> UvicornServer:
|
|
@@ -49,7 +49,7 @@ class UvicornServer:
|
|
|
49
49
|
return self
|
|
50
50
|
|
|
51
51
|
def before_run(self, execute: Callable[[], None]) -> UvicornServer:
|
|
52
|
-
self.
|
|
52
|
+
self.startup_handlers.append(execute)
|
|
53
53
|
|
|
54
54
|
return self
|
|
55
55
|
|
|
@@ -64,6 +64,10 @@ class UvicornServer:
|
|
|
64
64
|
log_config=self.logging_config,
|
|
65
65
|
)
|
|
66
66
|
|
|
67
|
+
def on_startup(self) -> None:
|
|
68
|
+
for handler in self.startup_handlers:
|
|
69
|
+
handler()
|
|
70
|
+
|
|
67
71
|
|
|
68
72
|
@dataclass
|
|
69
73
|
class Sentry:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|