파이썬에서 종속성 관리와 패키징을 위한 도구
Poetry requires Python 3.9+. It is multi-platform and the goal is to make it work equally well on Linux, macOS and Windows.
파이썬 3.9 버전 이상을 필요로 함
자주 쓰게 되는 명령어
================================================
# 의존성 설치
poetry install
# 패키지 추가
poetry add requests
# 패키지 제거
poetry remove requests
# 의존성 업데이트
poetry update
# 전체 업데이트
poetry update requests
================================================
# 패키지 빌드
poetry build
# 패키지 배포
poetry publish poetry publish --build
================================================
# 가상환경에서 명령 실행
poetry run python script.py
# 가상환경 셀 진입
poetry shell
# 설정 관리
poetry config --list
*poetry config virtualenvs.in-project true 로 설정하면
같은 디렉토리 내에 .venv 파일로 저장됨
*그렇지 않을 때는 다른 폴더에 모든 가상환경이 같은 경로에 저장됨
# pyproject.toml 검증
poetry check
================================================
# 가상환경 정보 조회
poetry env info
# 프로젝트의 가상환경 목록
poetry env list
# 가상환경 삭제
poetry env remove <python>
# 사용할 Python 버전 지정
poetry env use python3.12
================================================
# 캐시 목록 조회
poetry cache list
# 캐시 삭제
poetry cache clear PyPI --all
'Infrastructure > Monitoring' 카테고리의 다른 글
[monitoring] Test PC로 기능 테스트 중 성능 저하 현상 (0) | 2025.03.31 |
---|---|
[Monitoring] InfluxDB v1 웹 인터페이스 에러 (2) | 2024.09.03 |
[Monitoring] Telegraf/Influxdb/Grafana를 이용한 Windows, Linux 시스템 모니터링 설정 및 문제 해결 (2) | 2024.09.02 |