Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/masci/fastapi-template


https://github.com/masci/fastapi-template

Last synced: 10 days ago
JSON representation

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+
- Poetry

Install 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
```