fastabc 0.2.1__tar.gz → 0.2.2__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.
|
@@ -2,10 +2,11 @@ import typing as t
|
|
|
2
2
|
from fastapi import FastAPI, APIRouter
|
|
3
3
|
from .structures import FastAPIConfig
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
class App:
|
|
7
|
-
def __init__(self, **kwargs):
|
|
8
|
-
|
|
6
|
+
def __init__(self, *args, lifespan: t.Optional[t.Callable] = None, **kwargs):
|
|
7
|
+
if lifespan:
|
|
8
|
+
kwargs["lifespan"] = lifespan
|
|
9
|
+
self.app = FastAPI(*args, **kwargs)
|
|
9
10
|
self.extensions = {}
|
|
10
11
|
|
|
11
12
|
def loader(self, create_fn: t.Callable[[FastAPI], FastAPI], **kwargs):
|
|
File without changes
|
|
File without changes
|