Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trade_safety-1.6.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trade_safety-1.6.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file trade_safety-1.6.0.tar.gz.

File metadata

  • Download URL: trade_safety-1.6.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for trade_safety-1.6.0.tar.gz
Algorithm Hash digest
SHA256 a93a857a750f31a7c1fc3300bb3e2e41a0289198efe2f931bfb2f182840f8479
MD5 cb719d0d20388051f718bdf9956f03bd
BLAKE2b-256 e24353d91323b082b82e27d5f6b74d1f72b2235f09c9c556ed423a5bc950e555

See more details on using hashes here.

Provenance

The following attestation bundles were made for trade_safety-1.6.0.tar.gz:

Publisher: publish-backend.yml on algorima/trade-safety

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trade_safety-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: trade_safety-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for trade_safety-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c91ef600e5f7f9a6726d73e7de1881ef32299116bb8cd42d2132edffa3810f1e
MD5 84bff36b40ef579e0152d31ebe36230c
BLAKE2b-256 efb69f3737566622c86ed5ab06c220db3f4bef9858b7e665d817ed412406fc0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for trade_safety-1.6.0-py3-none-any.whl:

Publisher: publish-backend.yml on algorima/trade-safety

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page