Skip to content

Instantly share code, notes, and snippets.

@codez0mb1e
Last active February 11, 2024 09:59
Show Gist options
  • Save codez0mb1e/af16e4b518ffb826e6f89452960ae548 to your computer and use it in GitHub Desktop.
Save codez0mb1e/af16e4b518ffb826e6f89452960ae548 to your computer and use it in GitHub Desktop.
Fast API project structure

Directories:

.                                         <- project root
|-- src/                                  <- source codes
|   |-- middleware/                       <- API middleware
|       |-- web3.py
|       |-- auth.py
|       |-- errors.py
|       |-- ...
|       |-- utils.py
|   |-- routes/                           <- API endpoints
|       |-- abstracts.py
|       |-- account.py
|       |-- market.py
|       |-- portfolio.py
|       |-- ...
|       |-- utils.py
|   |-- schemas/                          <- Request/response models
|       |-- account.py
|       |-- market.py
|       |-- portfolio.py
|       |-- ...
|       |-- utils.py
|   |-- main.py                           <- Fast API entrypoint
|   |-- config(.release|dev).yml          <- Configs section
|-- data/
|   |-- {data_version}/
|-- tests/
|   |-- unit/
|   |-- integration/
|   |-- e2e/
|-- docs/
|-- requirements.txt                       <- Reproduce env section
|-- requirements-dev.txt
|-- run.(sh|ps)
|-- docker-compose(.release|dev).yml       <- Deployment section
|-- Dockerfile
|-- Dockerfile.release
|-- .dockerignore
|-- .gitignore                             <- CI/CD section
|-- .github/workflows/
|   |-- build.yml
|   |-- release.yml
|-- CHANGELOG
|-- README.md                              <- Human readable section
|-- LICENSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment