poethepoet (poe)

Python용 태스크 러너. pyproject.toml에 스크립트를 정의하고 poe <task>로 실행한다. Node.js의 npm run <script>에 해당한다.

기본 사용법

# pyproject.toml
[tool.poe.tasks]
start = "uvicorn app.main:app --reload"
test = "pytest"
lint = "ruff check ."
migrate = "alembic upgrade head"
poe start                # 태스크 실행
uv run poe start         # uv 가상환경 활성화 + 태스크 실행

태스크 타입

타입설명예시
cmd단일 쉘 명령 (기본)start = "uvicorn app:app"
scriptPython 함수 호출setup = { script = "scripts:setup" }
shell쉘 스크립트 (파이프 등)check = { shell = "ruff check . && pytest" }
sequence여러 태스크 순차 실행all = ["lint", "test"]

Node.js 비교

Node.jsPython (poe)
package.jsonscriptspyproject.toml[tool.poe.tasks]
npm run startpoe start
npxuvx
태스크 러너 내장uv는 미내장 → poe로 보완

관련 문서

  • uv — 함께 사용하는 패키지 매니저 (uv run poe <task>)