FastAPI X Poetry와 함께 쓰세요.
app/ : 주요 코드
app/core/ : 서버에 핵심 기능 (response, error, deps 등)
app/router/ : fastapi.APIRouter.
app/schema/ : response나 DTO를 위한 pydantic 모델.
settings는 자동으로 .env 파일을 읽어서 환경 변수를 설정합니다.
.env typing을 검사하려면 app/core/config.py를 확인하세요.
이 프로젝트는 Python 가상 환경(venv)을 사용합니다. 아래 단계를 따라 개발 환경을 설정하세요.
- Python 3.11 이상
- pip (최신 버전)
- poetry (최신 버전)
- 프로젝트 클론
git clone https://github.com/your-team/cool-project.git- Poetry 설치
- Windows:
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py - - macOS 및 Linux:
curl -sSL https://install.python-poetry.org | python3 -
- 의존성 패키지 설치
poetry install.example.env 파일을 .env로 복사하고, 필요한 환경 변수를 설정하세요.
poetry run python3 -m appSentry를 사용하려면, .env 파일에 SENTRY_DSN을 추가하세요.
https://sentry.io