aiteamutils 0.2.3__py3-none-any.whl → 0.2.5__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/__init__.py +1 -5
- aiteamutils/base_repository.py +6 -5
- aiteamutils/base_service.py +2 -2
- aiteamutils/validators.py +7 -4
- aiteamutils/version.py +1 -1
- {aiteamutils-0.2.3.dist-info → aiteamutils-0.2.5.dist-info}/METADATA +1 -1
- {aiteamutils-0.2.3.dist-info → aiteamutils-0.2.5.dist-info}/RECORD +8 -8
- {aiteamutils-0.2.3.dist-info → aiteamutils-0.2.5.dist-info}/WHEEL +0 -0
aiteamutils/__init__.py
CHANGED
@@ -20,7 +20,6 @@ from .base_service import BaseService
|
|
20
20
|
from .base_repository import BaseRepository
|
21
21
|
from .validators import validate_with
|
22
22
|
from .enums import ActivityType
|
23
|
-
from .cache import CacheManager
|
24
23
|
from .version import __version__
|
25
24
|
|
26
25
|
__all__ = [
|
@@ -52,8 +51,5 @@ __all__ = [
|
|
52
51
|
"validate_with",
|
53
52
|
|
54
53
|
# Enums
|
55
|
-
"ActivityType"
|
56
|
-
|
57
|
-
# Cache
|
58
|
-
"CacheManager"
|
54
|
+
"ActivityType"
|
59
55
|
]
|
aiteamutils/base_repository.py
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
"""기본 레포지토리 모듈."""
|
2
|
-
from typing import TypeVar, Generic, Dict, Any, List, Optional, Type
|
3
|
-
from sqlalchemy.orm import DeclarativeBase
|
2
|
+
from typing import TypeVar, Generic, Dict, Any, List, Optional, Type, Union
|
3
|
+
from sqlalchemy.orm import DeclarativeBase, Load
|
4
4
|
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
|
5
5
|
from sqlalchemy import select, or_, and_
|
6
|
-
from .database import
|
6
|
+
from .database import DatabaseService
|
7
7
|
from .exceptions import CustomException, ErrorCode
|
8
8
|
from sqlalchemy.orm import joinedload
|
9
9
|
from sqlalchemy.sql import Select
|
10
|
+
from fastapi import Request
|
10
11
|
|
11
12
|
ModelType = TypeVar("ModelType", bound=DeclarativeBase)
|
12
13
|
|
@@ -14,10 +15,10 @@ class BaseRepository(Generic[ModelType]):
|
|
14
15
|
##################
|
15
16
|
# 1. 초기화 영역 #
|
16
17
|
##################
|
17
|
-
def __init__(self, db_service:
|
18
|
+
def __init__(self, db_service: DatabaseService, model: Type[ModelType]):
|
18
19
|
"""
|
19
20
|
Args:
|
20
|
-
db_service (
|
21
|
+
db_service (DatabaseService): 데이터베이스 서비스 인스턴스
|
21
22
|
model (Type[ModelType]): 모델 클래스
|
22
23
|
"""
|
23
24
|
self.db_service = db_service
|
aiteamutils/base_service.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
"""기본 서비스 모듈."""
|
2
2
|
from datetime import datetime
|
3
3
|
from typing import TypeVar, Generic, Dict, Any, List, Optional, Type, Union
|
4
|
-
from sqlalchemy.orm import DeclarativeBase
|
4
|
+
from sqlalchemy.orm import DeclarativeBase, Load
|
5
5
|
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
|
6
|
-
from .database import
|
6
|
+
from .database import DatabaseService
|
7
7
|
from .exceptions import CustomException, ErrorCode
|
8
8
|
from .base_repository import BaseRepository
|
9
9
|
from .security import hash_password
|
aiteamutils/validators.py
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
"""유효성 검사 관련 유틸리티 함수들을 모아둔 모듈입니다."""
|
2
2
|
|
3
|
-
from typing import Any, Optional,
|
3
|
+
from typing import Type, Dict, Any, Callable, TypeVar, Optional, List, Union
|
4
|
+
from functools import wraps
|
5
|
+
from sqlalchemy import Table
|
4
6
|
from sqlalchemy.ext.asyncio import AsyncSession
|
5
|
-
from
|
6
|
-
from
|
7
|
+
from fastapi import Request
|
8
|
+
from inspect import signature
|
9
|
+
from pydantic import BaseModel
|
7
10
|
import re
|
8
11
|
|
9
12
|
from .exceptions import ErrorCode, CustomException
|
10
|
-
from .database import
|
13
|
+
from .database import DatabaseService
|
11
14
|
from .base_model import Base
|
12
15
|
|
13
16
|
def validate_with(validator_func, unique_check=None, skip_if_none=False):
|
aiteamutils/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"""버전 정보"""
|
2
|
-
__version__ = "0.2.
|
2
|
+
__version__ = "0.2.5"
|
@@ -1,7 +1,7 @@
|
|
1
|
-
aiteamutils/__init__.py,sha256
|
1
|
+
aiteamutils/__init__.py,sha256=h7iFifWvRlaComsk4VPapRr16YhD19Kp1LuBzLHqdgQ,1170
|
2
2
|
aiteamutils/base_model.py,sha256=ODEnjvUVoxQ1RPCfq8-uZTfTADIA4c7Z3E6G4EVsSX0,2708
|
3
|
-
aiteamutils/base_repository.py,sha256=
|
4
|
-
aiteamutils/base_service.py,sha256=
|
3
|
+
aiteamutils/base_repository.py,sha256=qdwQ7Sj2fUqxpDg6cWM48n_QbwPK_VUlG9zTSem8iCk,18968
|
4
|
+
aiteamutils/base_service.py,sha256=E4dHGE0DvhmRyFplh46SwKJOSF_nUL7OAsCkf_ZJF_8,24733
|
5
5
|
aiteamutils/cache.py,sha256=tr0Yn8VPYA9QHiKCUzciVlQ2J1RAwNo2K9lGMH4rY3s,1334
|
6
6
|
aiteamutils/config.py,sha256=vC6k6E2-Y4mD0E0kw6WVgSatCl9K_BtTwrVFhLrhCzs,665
|
7
7
|
aiteamutils/database.py,sha256=U71cexPsSmMTKgp098I574PupqnuPltujI4QKHBG2Cc,29952
|
@@ -9,8 +9,8 @@ aiteamutils/dependencies.py,sha256=EJeVtq_lACuoheVhkX23N9xiak9bGD-t3-2JtlgBki0,4
|
|
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=AZszaTxVEGi1jU1sX3QXHGgshp1lVvd0xXvZejXvs_w,12643
|
12
|
-
aiteamutils/validators.py,sha256=
|
13
|
-
aiteamutils/version.py,sha256=
|
14
|
-
aiteamutils-0.2.
|
15
|
-
aiteamutils-0.2.
|
16
|
-
aiteamutils-0.2.
|
12
|
+
aiteamutils/validators.py,sha256=9BHm9Zy9paHLArWXbXYjXBQYjOs4XEvM7kAaGEFvz7Q,7747
|
13
|
+
aiteamutils/version.py,sha256=wpvxOxJZfuu0Qef9dgGV7eDMrhxlMA4E5VAt26kNVpo,42
|
14
|
+
aiteamutils-0.2.5.dist-info/METADATA,sha256=vueKYW49HcZXRuikTPvC-xp3vQPcOjqlA6nzGTH-LoU,1717
|
15
|
+
aiteamutils-0.2.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
16
|
+
aiteamutils-0.2.5.dist-info/RECORD,,
|
File without changes
|