Create a FastAPI project with Poetry - FastAPI + uvicorn + nginx + docker-compose

Create a FastAPI project with Poetry - FastAPI + uvicorn + nginx + docker-compose

Create a FastAPI project with Poetry

1. Poetry
  • Install Poetry
  • Tạo project với lệnh poetry new: Poetry commands
    • poetry new app:
      app ├── pyproject.toml ├── README.rst ├── app │ └── __init__.py └── tests ├── __init__.py └── test_my_package.py
    • poetry new demo --name app:
      demo ├── pyproject.toml ├── README.rst ├── app │ └── __init__.py └── tests ├── __init__.py └── test_my_package.py
    • poetry new --src demo:
      demo ├── pyproject.toml ├── README.rst ├── src │ └── __init__.py └── tests ├── __init__.py └── test_my_package.py
    • Add package:
      poetry add package_name

Reference:

Đăng nhận xét

Mới hơn Cũ hơn