aiteamutils 0.2.54__py3-none-any.whl → 0.2.56__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
aiteamutils/__init__.py CHANGED
@@ -1,11 +1,5 @@
1
1
  from .base_model import Base
2
- from .database import (
3
- DatabaseService,
4
- DatabaseServiceManager,
5
- get_db,
6
- get_database_service,
7
- lifespan
8
- )
2
+ from .database import DatabaseService
9
3
  from .exceptions import (
10
4
  CustomException,
11
5
  ErrorCode,
@@ -36,10 +30,6 @@ __all__ = [
36
30
 
37
31
  # Database
38
32
  "DatabaseService",
39
- "DatabaseServiceManager",
40
- "get_db",
41
- "get_database_service",
42
- "lifespan",
43
33
 
44
34
  # Exceptions
45
35
  "CustomException",
aiteamutils/config.py CHANGED
@@ -1,6 +1,5 @@
1
1
  """설정 모듈."""
2
2
  from typing import Union
3
- from .database import DatabaseServiceManager
4
3
  from .exceptions import CustomException, ErrorCode
5
4
 
6
5
  class Settings:
@@ -11,13 +10,28 @@ class Settings:
11
10
  jwt_algorithm: str = "HS256",
12
11
  access_token_expire_minutes: int = 30,
13
12
  token_issuer: str = "ai-team",
14
- token_audience: str = "ai-team"
13
+ token_audience: str = "ai-team",
14
+ db_url: str = None,
15
+ db_echo: bool = False,
16
+ db_pool_size: int = 5,
17
+ db_max_overflow: int = 10,
18
+ db_pool_timeout: int = 30,
19
+ db_pool_recycle: int = 1800
15
20
  ):
21
+ # JWT 설정
16
22
  self.JWT_SECRET = jwt_secret
17
23
  self.JWT_ALGORITHM = jwt_algorithm
18
24
  self.ACCESS_TOKEN_EXPIRE_MINUTES = access_token_expire_minutes
19
25
  self.TOKEN_ISSUER = token_issuer
20
26
  self.TOKEN_AUDIENCE = token_audience
27
+
28
+ # 데이터베이스 설정
29
+ self.DB_URL = db_url
30
+ self.DB_ECHO = db_echo
31
+ self.DB_POOL_SIZE = db_pool_size
32
+ self.DB_MAX_OVERFLOW = db_max_overflow
33
+ self.DB_POOL_TIMEOUT = db_pool_timeout
34
+ self.DB_POOL_RECYCLE = db_pool_recycle
21
35
 
22
36
  _settings: Union[Settings, None] = None
23
37
 
@@ -55,18 +69,14 @@ async def init_settings(
55
69
  jwt_algorithm=jwt_algorithm,
56
70
  access_token_expire_minutes=access_token_expire_minutes,
57
71
  token_issuer=token_issuer,
58
- token_audience=token_audience
72
+ token_audience=token_audience,
73
+ db_url=db_url,
74
+ db_echo=db_echo,
75
+ db_pool_size=db_pool_size,
76
+ db_max_overflow=db_max_overflow,
77
+ db_pool_timeout=db_pool_timeout,
78
+ db_pool_recycle=db_pool_recycle
59
79
  )
60
-
61
- if db_url:
62
- await DatabaseServiceManager.get_instance(
63
- db_url=db_url,
64
- db_echo=db_echo,
65
- db_pool_size=db_pool_size,
66
- db_max_overflow=db_max_overflow,
67
- db_pool_timeout=db_pool_timeout,
68
- db_pool_recycle=db_pool_recycle
69
- )
70
80
 
71
81
  def get_settings() -> Settings:
72
82
  """현재 설정을 반환하는 함수
aiteamutils/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  """버전 정보"""
2
- __version__ = "0.2.54"
2
+ __version__ = "0.2.56"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiteamutils
3
- Version: 0.2.54
3
+ Version: 0.2.56
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,16 +1,16 @@
1
- aiteamutils/__init__.py,sha256=IAvWobxODQeMIgttFf3e1IGMO-DktLyUmnHeKqGDZWg,1346
1
+ aiteamutils/__init__.py,sha256=h7iFifWvRlaComsk4VPapRr16YhD19Kp1LuBzLHqdgQ,1170
2
2
  aiteamutils/base_model.py,sha256=ODEnjvUVoxQ1RPCfq8-uZTfTADIA4c7Z3E6G4EVsSX0,2708
3
3
  aiteamutils/base_repository.py,sha256=vqsundoN0h7FVvgqTBEnnJNMcFpvMK0s_nxBWdIYg-U,7846
4
4
  aiteamutils/base_service.py,sha256=s2AcA-6_ogOQKgt2xf_3AG2s6tqBceU4nJoXO1II7S8,24588
5
5
  aiteamutils/cache.py,sha256=07xBGlgAwOTAdY5mnMOQJ5EBxVwe8glVD7DkGEkxCtw,1373
6
- aiteamutils/config.py,sha256=OM_b7g8sqZ3zY_DSF9ry-zn5wn4dlXdx5OhjfTGr0TE,2876
6
+ aiteamutils/config.py,sha256=YdalpJb70-txhGJAS4aaKglEZAFVWgfzw5BXSWpkUz4,3232
7
7
  aiteamutils/database.py,sha256=x0x5gnSyGfwo_klL9O65RnGOQID6c9tH2miwFveVyoE,6326
8
8
  aiteamutils/dependencies.py,sha256=UrPjMfUlmG1uGGeWI0H7fINfxChL-LTfD-odFUA5xqQ,5965
9
9
  aiteamutils/enums.py,sha256=ipZi6k_QD5-3QV7Yzv7bnL0MjDz-vqfO9I5L77biMKs,632
10
10
  aiteamutils/exceptions.py,sha256=_lKWXq_ujNj41xN6LDE149PwsecAP7lgYWbOBbLOntg,15368
11
11
  aiteamutils/security.py,sha256=xFVrjttxwXB1TTjqgRQQgQJQohQBT28vuW8FVLjvi-M,10103
12
12
  aiteamutils/validators.py,sha256=3N245cZFjgwtW_KzjESkizx5BBUDaJLbbxfNO4WOFZ0,7764
13
- aiteamutils/version.py,sha256=JYxMqBzmgoiMWtDBCvBWs8eM_bzABcUkIdy_n1MOyd4,42
14
- aiteamutils-0.2.54.dist-info/METADATA,sha256=qbHv86w3VnIJnNHPoUzRRHXcFr47eXOgf9vIFBrBLrY,1718
15
- aiteamutils-0.2.54.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
- aiteamutils-0.2.54.dist-info/RECORD,,
13
+ aiteamutils/version.py,sha256=E7HYjTw_97NdpIF9YF-EvDFT9_Hi3ocTj0YQB21nMd4,42
14
+ aiteamutils-0.2.56.dist-info/METADATA,sha256=IWmmOB7FT0NhrvUKgNq4UNL5HvAuNMAu45ye759an-k,1718
15
+ aiteamutils-0.2.56.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
+ aiteamutils-0.2.56.dist-info/RECORD,,