aiteamutils 0.2.60__py3-none-any.whl → 0.2.62__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 CHANGED
@@ -1,5 +1,4 @@
1
1
  from .base_model import Base
2
- from .database import DatabaseService
3
2
  from .exceptions import (
4
3
  CustomException,
5
4
  ErrorCode,
@@ -28,9 +27,6 @@ __all__ = [
28
27
  "BaseService",
29
28
  "BaseRepository",
30
29
 
31
- # Database
32
- "DatabaseService",
33
-
34
30
  # Exceptions
35
31
  "CustomException",
36
32
  "ErrorCode",
@@ -26,13 +26,23 @@ class BaseRepository(Generic[ModelType]):
26
26
  source_function=f"{self.__class__.__name__}.model"
27
27
  )
28
28
 
29
- self.session = session
29
+ self._session = session
30
30
  self.model = model
31
31
 
32
32
  @property
33
33
  def session(self) -> AsyncSession:
34
34
  return self._session
35
35
 
36
+ @session.setter
37
+ def session(self, value: AsyncSession):
38
+ if value is None:
39
+ raise CustomException(
40
+ ErrorCode.DB_CONNECTION_ERROR,
41
+ detail="Session cannot be None",
42
+ source_function=f"{self.__class__.__name__}.session"
43
+ )
44
+ self._session = value
45
+
36
46
  async def list(
37
47
  self,
38
48
  skip: int = 0,
@@ -45,7 +55,7 @@ class BaseRepository(Generic[ModelType]):
45
55
  """
46
56
  # 기본 CRUD 작업 호출
47
57
  return await list_entities(
48
- session=self.db_session,
58
+ session=self.session,
49
59
  model=self.model,
50
60
  skip=skip,
51
61
  limit=limit,
aiteamutils/validators.py CHANGED
@@ -10,7 +10,6 @@ from pydantic import BaseModel, field_validator
10
10
  import re
11
11
 
12
12
  from .exceptions import ErrorCode, CustomException
13
- from .database import DatabaseService
14
13
  from .base_model import Base
15
14
 
16
15
  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.60"
2
+ __version__ = "0.2.62"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiteamutils
3
- Version: 0.2.60
3
+ Version: 0.2.62
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,6 +1,6 @@
1
- aiteamutils/__init__.py,sha256=h7iFifWvRlaComsk4VPapRr16YhD19Kp1LuBzLHqdgQ,1170
1
+ aiteamutils/__init__.py,sha256=kRBpRjark0M8ZwFfmKiMFol6CbIILN3WE4f6_P6iIq0,1089
2
2
  aiteamutils/base_model.py,sha256=ODEnjvUVoxQ1RPCfq8-uZTfTADIA4c7Z3E6G4EVsSX0,2708
3
- aiteamutils/base_repository.py,sha256=ir2ftophKKd_9BQ9B0LbszMqUyFeWkQ1MmFF6WBLcWc,1682
3
+ aiteamutils/base_repository.py,sha256=MPqOSIJ_d62mTQETyytGJsZInoeNxa4kZxvzRrgqV3E,2019
4
4
  aiteamutils/base_service.py,sha256=Ncomi5yBUL4oHrMx_J1yUKVrUIYo6YmnYJWAWOIwQx8,2217
5
5
  aiteamutils/cache.py,sha256=07xBGlgAwOTAdY5mnMOQJ5EBxVwe8glVD7DkGEkxCtw,1373
6
6
  aiteamutils/config.py,sha256=YdalpJb70-txhGJAS4aaKglEZAFVWgfzw5BXSWpkUz4,3232
@@ -8,8 +8,8 @@ aiteamutils/database.py,sha256=MtmrX_pDzKFQM-P3OAfm2mALvhRg-v5JWtGBoiegeU0,1484
8
8
  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
- aiteamutils/validators.py,sha256=3N245cZFjgwtW_KzjESkizx5BBUDaJLbbxfNO4WOFZ0,7764
12
- aiteamutils/version.py,sha256=W0y4-03EvxLX9F9qSLA2iCovEsiyhT86gHqCOTRNhGU,42
13
- aiteamutils-0.2.60.dist-info/METADATA,sha256=Gu1bs923MYkC_xKFhMKgS8PrSsK2ne2UJRUxBBeflRI,1718
14
- aiteamutils-0.2.60.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
- aiteamutils-0.2.60.dist-info/RECORD,,
11
+ aiteamutils/validators.py,sha256=PvI9hbMEAqTawgxPbiWRyx2r9yTUrpNBQs1AD3w4F2U,7726
12
+ aiteamutils/version.py,sha256=M2UWsWIly1xFp_aMvmSvbRhj0CF2FsV9Q5nsmtzSqg4,42
13
+ aiteamutils-0.2.62.dist-info/METADATA,sha256=7LzQK72Ug1SxsNfRBppJgAU__V3GffKvFscySD6ChFc,1718
14
+ aiteamutils-0.2.62.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
+ aiteamutils-0.2.62.dist-info/RECORD,,