aiteamutils 0.2.29__py3-none-any.whl → 0.2.31__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.
aiteamutils/dependencies.py
CHANGED
@@ -52,23 +52,18 @@ class ServiceRegistry:
|
|
52
52
|
service_registry = ServiceRegistry()
|
53
53
|
|
54
54
|
def get_service(name: str):
|
55
|
+
"""등록된 서비스를 가져오는 의존성 함수
|
56
|
+
|
57
|
+
Args:
|
58
|
+
name (str): 서비스 이름
|
59
|
+
|
60
|
+
Returns:
|
61
|
+
Callable: 서비스 인스턴스를 반환하는 의존성 함수
|
62
|
+
"""
|
55
63
|
def _get_service(db: AsyncSession = Depends(get_db)):
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
# 서비스 인스턴스 초기화 보장
|
60
|
-
if not hasattr(service_registry, '_instances'):
|
61
|
-
service_registry._instances = {}
|
62
|
-
|
63
|
-
if name not in service_registry._instances:
|
64
|
-
repository_class, service_class = service_registry.get(name)
|
65
|
-
repository = repository_class(db_service)
|
66
|
-
service_registry._instances[name] = service_class(repository, db_service)
|
67
|
-
else:
|
68
|
-
# 기존 서비스의 db 세션 업데이트
|
69
|
-
service_registry._instances[name].db_service.db = db
|
70
|
-
|
71
|
-
return service_registry._instances[name]
|
64
|
+
repository_class, service_class = service_registry.get(name)
|
65
|
+
repository = repository_class(db)
|
66
|
+
return service_class(repository, db)
|
72
67
|
return _get_service
|
73
68
|
|
74
69
|
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/users/token")
|
aiteamutils/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"""버전 정보"""
|
2
|
-
__version__ = "0.2.
|
2
|
+
__version__ = "0.2.31"
|
@@ -5,12 +5,12 @@ aiteamutils/base_service.py,sha256=E4dHGE0DvhmRyFplh46SwKJOSF_nUL7OAsCkf_ZJF_8,2
|
|
5
5
|
aiteamutils/cache.py,sha256=tr0Yn8VPYA9QHiKCUzciVlQ2J1RAwNo2K9lGMH4rY3s,1334
|
6
6
|
aiteamutils/config.py,sha256=7pJHBml8RRXC9FpoRBx0emofFkvtxsyk9_Rcur2F9hI,2724
|
7
7
|
aiteamutils/database.py,sha256=raYKRZjEfefM3SnoPYozPu7OUGm62XWOUqZzN4_cayw,33479
|
8
|
-
aiteamutils/dependencies.py,sha256=
|
8
|
+
aiteamutils/dependencies.py,sha256=16Q_76gu9Vff-1XzYar_RREGEegIbUyZJzBbYf7HiR0,3943
|
9
9
|
aiteamutils/enums.py,sha256=ipZi6k_QD5-3QV7Yzv7bnL0MjDz-vqfO9I5L77biMKs,632
|
10
10
|
aiteamutils/exceptions.py,sha256=YV-ISya4wQlHk4twvGo16I5r8h22-tXpn9wa-b3WwDM,15231
|
11
11
|
aiteamutils/security.py,sha256=jxJsWSjJOMVlNaBFxroIXrAgseJYKl_vQ_kfmHblPIA,13498
|
12
12
|
aiteamutils/validators.py,sha256=3N245cZFjgwtW_KzjESkizx5BBUDaJLbbxfNO4WOFZ0,7764
|
13
|
-
aiteamutils/version.py,sha256=
|
14
|
-
aiteamutils-0.2.
|
15
|
-
aiteamutils-0.2.
|
16
|
-
aiteamutils-0.2.
|
13
|
+
aiteamutils/version.py,sha256=YK0jUv01ukicmNcU34hKfOfAtqr0QfPU2FTKHjSy49g,42
|
14
|
+
aiteamutils-0.2.31.dist-info/METADATA,sha256=0j6hq7VMfiaw5f0W9IBD67LK2BSBaXRuRI4cP5_6Xw0,1718
|
15
|
+
aiteamutils-0.2.31.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
16
|
+
aiteamutils-0.2.31.dist-info/RECORD,,
|
File without changes
|