AI-powered safety analysis for K-pop merchandise trading
Project description
Trade Safety Backend
K-pop 굿즈 거래 안전성 AI 분석 Python 패키지
주요 기능
- LLM 기반 거래글 분석
- 다국어 지원 (한국어 번역 및 뉘앙스 설명)
- 위험 신호 탐지 (결제, 판매자, 플랫폼, 가격, 콘텐츠)
- 시장가 대비 가격 분석
- Freemium 모델
설치
cd backend
poetry install
사용법
서비스 사용
from aioia_core.settings import OpenAIAPISettings
from trade_safety.service import TradeSafetyService
from trade_safety.settings import TradeSafetyModelSettings
openai_api = OpenAIAPISettings(api_key="sk-...")
model_settings = TradeSafetyModelSettings()
service = TradeSafetyService(
openai_api=openai_api,
model_settings=model_settings,
)
analysis = await service.analyze_trade("급처분 양도해요")
print(f"위험도: {analysis.risk_score}/100")
FastAPI 통합
from trade_safety.api.router import create_trade_safety_router
router = create_trade_safety_router(app_config)
app.include_router(router, prefix="/api/v2")
개발
poetry install
poetry run make test
poetry run make lint
poetry run make type-check
poetry run make format
환경 변수
| 변수명 | 필수 | 설명 |
|---|---|---|
OPENAI_API_KEY |
O | OpenAI API 키 |
TWITTER_BEARER_TOKEN |
X | Twitter/X URL 분석용 (미설정 시 URL 분석 불가) |
의존성
- aioia-core (공통 인프라)
- FastAPI, SQLAlchemy, Pydantic
- OpenAI API 키 필요
라이선스
Apache 2.0
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
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 trade_safety-1.12.0.tar.gz.
File metadata
- Download URL: trade_safety-1.12.0.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d310e479efe33bc8d0ef63a2dbf277816df2601493735709e8bfe06db2cc4286
|
|
| MD5 |
36022d0be2a214367d371aa39c2ca4c8
|
|
| BLAKE2b-256 |
279476e1e2e49a8f555cec7ca6ec5572b53a6975e898d138aa5309ee8813e6a7
|
Provenance
The following attestation bundles were made for trade_safety-1.12.0.tar.gz:
Publisher:
publish-backend.yml on algorima/trade-safety
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trade_safety-1.12.0.tar.gz -
Subject digest:
d310e479efe33bc8d0ef63a2dbf277816df2601493735709e8bfe06db2cc4286 - Sigstore transparency entry: 928262994
- Sigstore integration time:
-
Permalink:
algorima/trade-safety@333f6ad4dad9ba5b86f931c3b70a2eca8d2d65d1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/algorima
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-backend.yml@333f6ad4dad9ba5b86f931c3b70a2eca8d2d65d1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file trade_safety-1.12.0-py3-none-any.whl.
File metadata
- Download URL: trade_safety-1.12.0-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
923ccfc8e9604c51acf6fa07b91d120518166cf227175248df98ecb2d7d6cac7
|
|
| MD5 |
22ad166fec515492b13ec660128d6913
|
|
| BLAKE2b-256 |
0a271af735dd704b9aa5d2d27c5b04e58f4005213c5917a5c6ce2f4f4c148603
|
Provenance
The following attestation bundles were made for trade_safety-1.12.0-py3-none-any.whl:
Publisher:
publish-backend.yml on algorima/trade-safety
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trade_safety-1.12.0-py3-none-any.whl -
Subject digest:
923ccfc8e9604c51acf6fa07b91d120518166cf227175248df98ecb2d7d6cac7 - Sigstore transparency entry: 928263007
- Sigstore integration time:
-
Permalink:
algorima/trade-safety@333f6ad4dad9ba5b86f931c3b70a2eca8d2d65d1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/algorima
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-backend.yml@333f6ad4dad9ba5b86f931c3b70a2eca8d2d65d1 -
Trigger Event:
push
-
Statement type: