Skip to content

Roflaff/FastAPI-BE-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI-B/E-template

A production-ready FastAPI backend template designed for rapid development.
Features include:

  • Modern Python project structure using Poetry
  • Built-in support for environment variables and configuration
  • Ready-to-use API documentation (Swagger UI)
  • Easily customizable for your business logic
  • Pre-configured for Docker and containerized deployment

Use this template to quickly bootstrap new FastAPI projects with best practices.

Run

  • run on dev (<project_name> -> you can change your project name )
poetry run uvicorn <project_name>.main:app --host 0.0.0.0 --port 8000 --reload
  • OR run python file
./project_name/__main__.py

Struct

.
├── logs
│   ├── error.log
│   ├── info.log
│   └── warning.log
├── project_name
│   ├── api
│   │   ├── v1
│   │   │   └── user.py
│   │   └── router.py
│   ├── pipeline
│   │   └── start_server.py
│   ├── schemas
│   │   ├── request.py
│   │   ├── response.py
│   │   └── user.py
│   ├── services
│   │   └── v1
│   │       └── user.py
│   ├── utils
│   │   └── logger.py
│   ├── __main__.py
│   ├── config.py
│   └── main.py
├── README.md
├── poetry.lock
└── pyproject.toml

API Docs

http://localhost:8000/docs