AI Team Utilities
Project description
AI Team Utils
AI Team의 공통 유틸리티 패키지입니다.
설치 방법
pip install aiteamutils
사용 예시
from aiteamutils.database import DatabaseService
# DB 서비스 초기화
db_service = DatabaseService("postgresql+asyncpg://user:pass@localhost/db")
# DB 세션 사용
async with db_service.get_db() as session:
# DB 작업 수행
pass
# 트랜잭션 사용
async with db_service.transaction():
# 트랜잭션 내 작업 수행
result = await db_service.create_entity(UserModel, {"name": "test"})
# 예외 처리
from aiteamutils.exceptions import CustomException, ErrorCode
try:
# 작업 수행
pass
except CustomException as e:
# 에러 처리
print(e.to_dict())
주요 기능
-
데이터베이스 유틸리티
- 세션 관리
- 트랜잭션 관리
- 기본 CRUD 작업
- 외래키 검증
- 유니크 필드 검증
-
인증/인가 유틸리티
- JWT 토큰 관리
- 비밀번호 해싱
- Rate Limiting
-
예외 처리
- 표준화된 에러 코드
- 에러 체인 추적
- 로깅 통합
-
공통 모델
- 기본 모델 클래스
- 타입 검증
- 유효성 검사
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiteamutils-0.2.121.tar.gz
(20.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiteamutils-0.2.121.tar.gz.
File metadata
- Download URL: aiteamutils-0.2.121.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ae320b0a3db352d0c81869220c30a7c0d570be12cea92e200d7ca6029a3559d
|
|
| MD5 |
5d9e0bab67a1093c2193b4fe8b10128f
|
|
| BLAKE2b-256 |
ca3eafda5721eca5006d0baeb7ea95b363f2ef3a9d28a084bf0b5eceee404517
|
File details
Details for the file aiteamutils-0.2.121-py3-none-any.whl.
File metadata
- Download URL: aiteamutils-0.2.121-py3-none-any.whl
- Upload date:
- Size: 25.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d6827a64f53ee21a229c2fdf95299804765db9d616202ff40c1d184633ca7e4
|
|
| MD5 |
d1be6bd9729493845b4a42288c2f2884
|
|
| BLAKE2b-256 |
5c850688a347e64501f9a3a0ee6e96fe129153f7da79d4dc0d5a3b8778e0cd02
|