This is a template for fastapi projects. It includes a basic structure for the project, a docker-compose file for development and a dockerfile for production.
The guides on fastapi, SQLmodel ORM and docker are a good place to start.
The project structure is as follows:
└── Project Directory
├── Virtual Environment(if you have to use one)
└── Project
├── README.md
├── README.Docker.md
├── Dockerfile
├── compose.yaml
├── app.py
├── requirements.txt
├── .gitignore
└── src
├── __init__.py
├── database
│ ├── README.md
│ ├── __init__.py
│ ├── connect.py
│ ├── enums.py
│ └── models.py
├── main
│ ├── README.md
│ ├── __init__.py
│ ├── app.py
│ └── routes
│ ├── README.md
│ ├── __init__.py
│ └── users.py
├── schemas
│ ├── README.md
│ └── __init__.py
├── tests
│ └── README.md
└── utilities
└── README.md
- Clone the repository
- Create a virtual environment and activate it Resources on how to create a virtual environment: