aiteamutils 0.2.69__py3-none-any.whl → 0.2.71__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,47 @@
1
+ #기본 라이브러리
2
+ from fastapi import Request
3
+ from typing import TypeVar, Generic, Type, Dict, Any, Union, List
4
+ from sqlalchemy.orm import DeclarativeBase
5
+ from sqlalchemy.ext.asyncio import AsyncSession
6
+ from datetime import datetime
7
+
8
+ #패키지 라이브러리
9
+ from .exceptions import ErrorCode, CustomException
10
+ from .base_repository import BaseRepository
11
+ from .database import (
12
+ process_response,
13
+ build_search_filters
14
+ )
15
+
16
+ ModelType = TypeVar("ModelType", bound=DeclarativeBase)
17
+
18
+ class BaseService(Generic[ModelType]):
19
+ ##################
20
+ # 1. 초기화 영역 #
21
+ ##################
22
+ def __init__(
23
+ self,
24
+ model: Type[ModelType],
25
+ repository: BaseRepository[ModelType],
26
+ db_session: AsyncSession,
27
+ additional_models: Dict[str, Type[DeclarativeBase]] = None,
28
+ ):
29
+ self.model = model
30
+ self.repository = repository
31
+ self.db_session = db_session
32
+ self.additional_models = additional_models or {},
33
+
34
+ async def list(
35
+ self,
36
+ skip: int = 0,
37
+ limit: int = 100,
38
+ filters: Dict[str, Any] | None =
39
+ except Exception as e:
40
+ raise CustomException(
41
+ ErrorCode.INTERNAL_ERROR,
42
+ detail=str(e),
43
+ source_function=f"{self.__class__.__name__}.list",
44
+ original_error=e
45
+ )
46
+
47
+
aiteamutils/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  """버전 정보"""
2
- __version__ = "0.2.69"
2
+ __version__ = "0.2.71"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiteamutils
3
- Version: 0.2.69
3
+ Version: 0.2.71
4
4
  Summary: AI Team Utilities
5
5
  Project-URL: Homepage, https://github.com/yourusername/aiteamutils
6
6
  Project-URL: Issues, https://github.com/yourusername/aiteamutils/issues
@@ -1,7 +1,7 @@
1
1
  aiteamutils/__init__.py,sha256=kRBpRjark0M8ZwFfmKiMFol6CbIILN3WE4f6_P6iIq0,1089
2
2
  aiteamutils/base_model.py,sha256=ODEnjvUVoxQ1RPCfq8-uZTfTADIA4c7Z3E6G4EVsSX0,2708
3
3
  aiteamutils/base_repository.py,sha256=tG_xz4hHYAN3-wkrLvEPxyTucV4pzT6dihoKVJp2JIc,2079
4
- aiteamutils/base_service.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ aiteamutils/base_service.py,sha256=dYDj01UW8dQlFc-8Dth0NQBCFhRMXHTosmuUjl6LxP4,1385
5
5
  aiteamutils/cache.py,sha256=07xBGlgAwOTAdY5mnMOQJ5EBxVwe8glVD7DkGEkxCtw,1373
6
6
  aiteamutils/config.py,sha256=YdalpJb70-txhGJAS4aaKglEZAFVWgfzw5BXSWpkUz4,3232
7
7
  aiteamutils/database.py,sha256=CbX7eNFwqz9O4ywVQMLlLrb6hDUJPtsgGg_Hgef-p2I,8126
@@ -9,7 +9,7 @@ aiteamutils/enums.py,sha256=ipZi6k_QD5-3QV7Yzv7bnL0MjDz-vqfO9I5L77biMKs,632
9
9
  aiteamutils/exceptions.py,sha256=_lKWXq_ujNj41xN6LDE149PwsecAP7lgYWbOBbLOntg,15368
10
10
  aiteamutils/security.py,sha256=xFVrjttxwXB1TTjqgRQQgQJQohQBT28vuW8FVLjvi-M,10103
11
11
  aiteamutils/validators.py,sha256=PvI9hbMEAqTawgxPbiWRyx2r9yTUrpNBQs1AD3w4F2U,7726
12
- aiteamutils/version.py,sha256=iTtDVCq5BINkn6_WI3_4qXyk3lqUsZUtMpu4XtZxIxI,42
13
- aiteamutils-0.2.69.dist-info/METADATA,sha256=XXkxLRhC7-ffPnoUWSS7ovInUPO370JDNFQQNwJbk6Y,1718
14
- aiteamutils-0.2.69.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
- aiteamutils-0.2.69.dist-info/RECORD,,
12
+ aiteamutils/version.py,sha256=1l2meDdBD47c5mMOjfptLRBjmt-ePXSJ2Sr6Zgi8zAc,42
13
+ aiteamutils-0.2.71.dist-info/METADATA,sha256=6Jn_650khnReN9HdWa89k36lT7BHgR5EjmXSam2Pf8g,1718
14
+ aiteamutils-0.2.71.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
+ aiteamutils-0.2.71.dist-info/RECORD,,