spakky-fastapi 0.7.8__tar.gz → 0.7.10__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.
- {spakky_fastapi-0.7.8 → spakky_fastapi-0.7.10}/PKG-INFO +2 -2
- {spakky_fastapi-0.7.8 → spakky_fastapi-0.7.10}/pyproject.toml +2 -2
- {spakky_fastapi-0.7.8 → spakky_fastapi-0.7.10}/spakky_fastapi/jwt_auth.py +3 -1
- {spakky_fastapi-0.7.8 → spakky_fastapi-0.7.10}/spakky_fastapi/post_processor.py +2 -2
- {spakky_fastapi-0.7.8 → spakky_fastapi-0.7.10}/README.md +0 -0
- {spakky_fastapi-0.7.8 → spakky_fastapi-0.7.10}/spakky_fastapi/__init__.py +0 -0
- {spakky_fastapi-0.7.8 → spakky_fastapi-0.7.10}/spakky_fastapi/error.py +0 -0
- {spakky_fastapi-0.7.8 → spakky_fastapi-0.7.10}/spakky_fastapi/py.typed +0 -0
- {spakky_fastapi-0.7.8 → spakky_fastapi-0.7.10}/spakky_fastapi/routing.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: spakky-fastapi
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.10
|
4
4
|
Summary: Highly abstracted Framework core to use DDD & DI/IoC & AOP & Etc...
|
5
5
|
Author: Spakky
|
6
6
|
Author-email: sejong418@icloud.com
|
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.11
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
12
12
|
Requires-Dist: fastapi (>=0.109.2,<0.110.0)
|
13
|
-
Requires-Dist: spakky-core (>=0.7.
|
13
|
+
Requires-Dist: spakky-core (>=0.7.10)
|
14
14
|
Requires-Dist: websockets (>=12.0,<13.0)
|
15
15
|
Description-Content-Type: text/markdown
|
16
16
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "spakky-fastapi"
|
3
|
-
version = "0.7.
|
3
|
+
version = "0.7.10"
|
4
4
|
description = "Highly abstracted Framework core to use DDD & DI/IoC & AOP & Etc..."
|
5
5
|
authors = ["Spakky <sejong418@icloud.com>"]
|
6
6
|
readme = "README.md"
|
@@ -12,7 +12,7 @@ build-backend = "poetry.core.masonry.api"
|
|
12
12
|
[tool.poetry.dependencies]
|
13
13
|
python = ">=3.10"
|
14
14
|
fastapi = "^0.109.2"
|
15
|
-
spakky-core = ">=0.7.
|
15
|
+
spakky-core = ">=0.7.10"
|
16
16
|
websockets = "^12.0"
|
17
17
|
|
18
18
|
[tool.poetry.group.dev.dependencies]
|
@@ -8,6 +8,7 @@ from fastapi.security import OAuth2PasswordBearer
|
|
8
8
|
from spakky.aop.advice import Around
|
9
9
|
from spakky.aop.advisor import IAsyncAdvisor
|
10
10
|
from spakky.aop.aspect import AsyncAspect
|
11
|
+
from spakky.aop.order import Order
|
11
12
|
from spakky.bean.autowired import autowired
|
12
13
|
from spakky.core.annotation import FunctionAnnotation
|
13
14
|
from spakky.core.types import AsyncFunc, P
|
@@ -49,11 +50,12 @@ class JWTAuth(FunctionAnnotation):
|
|
49
50
|
if obj.__defaults__ is not None:
|
50
51
|
extra = obj.__defaults__
|
51
52
|
else:
|
52
|
-
extra = tuple(Body() for x in parameters[1:] if x.name != "token")
|
53
|
+
extra = tuple([Body() for x in parameters[1:] if x.name != "token"])
|
53
54
|
obj.__defaults__ = (Depends(self.authenticator),) + extra
|
54
55
|
return super().__call__(obj)
|
55
56
|
|
56
57
|
|
58
|
+
@Order(1)
|
57
59
|
@AsyncAspect()
|
58
60
|
class AsyncJWTAuthAdvisor(IAsyncAdvisor):
|
59
61
|
__logger: Logger
|
@@ -25,7 +25,7 @@ class FastAPIBeanPostProcessor(IBeanPostProcessor):
|
|
25
25
|
if not Controller.contains(bean):
|
26
26
|
return bean
|
27
27
|
controller = Controller.single(bean)
|
28
|
-
router: APIRouter = APIRouter(prefix=controller.prefix)
|
28
|
+
router: APIRouter = APIRouter(prefix=controller.prefix, tags=[controller.prefix])
|
29
29
|
for name, method in getmembers(bean):
|
30
30
|
route: Route | None = Route.single_or_none(method)
|
31
31
|
websocket_route: WebSocketRoute | None = WebSocketRoute.single_or_none(method)
|
@@ -33,7 +33,7 @@ class FastAPIBeanPostProcessor(IBeanPostProcessor):
|
|
33
33
|
continue
|
34
34
|
if route is not None:
|
35
35
|
self.__logger.info(
|
36
|
-
f"[{type(self).__name__}] {route.methods} {controller.prefix}{route.path} -> {method.__qualname__}"
|
36
|
+
f"[{type(self).__name__}] {route.methods!r} {controller.prefix}{route.path} -> {method.__qualname__}"
|
37
37
|
)
|
38
38
|
if route.name is None:
|
39
39
|
route.name = " ".join([x.capitalize() for x in name.split("_")])
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|