An open API service indexing awesome lists of open source software.

https://github.com/roflaff/fastapi-be-template

B/E python FastAPI template.
https://github.com/roflaff/fastapi-be-template

backend devcontainer docker-compose docker-container fastapi poetry python template

Last synced: about 2 months ago
JSON representation

B/E python FastAPI template.

Awesome Lists containing this project

README

          

# 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 ( -> you can change your project name )
```bash
poetry run uvicorn .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
```bash
http://localhost:8000/docs
```