Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/masci/fastapi-template
https://github.com/masci/fastapi-template
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/masci/fastapi-template
- Owner: masci
- Created: 2022-05-07T08:02:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-05T11:31:41.000Z (about 2 years ago)
- Last Synced: 2024-10-28T22:42:29.448Z (about 2 months ago)
- Language: Python
- Size: 61.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fastapi-template
Quickly prototype backend services, deployment included.
## Development
The project consists in a Python package implemented with a [src layout](https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/).
Requirements:
- Python 3.9+
- PoetryInstall requirements:
```sh
$ poetry install
```To run the app locally:
```sh
$ DEBUG=1 poetry run MyApi
```To run the tests:
```sh
poetry run pytest
```## Deployment
To build the Docker container:
```sh
docker build . -t myapi
```To run the container:
```sh
$ docker run -p 8080:8080 myapi
```