Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skvggor/microservice-python-fastapi
(WIP) A scaffold for microservices using Python and FastAPI. This project is intended to be used as a template for new projects.
https://github.com/skvggor/microservice-python-fastapi
api coverage fastapi microservice pytest python
Last synced: 24 days ago
JSON representation
(WIP) A scaffold for microservices using Python and FastAPI. This project is intended to be used as a template for new projects.
- Host: GitHub
- URL: https://github.com/skvggor/microservice-python-fastapi
- Owner: skvggor
- Created: 2024-08-17T22:20:32.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-24T19:55:30.000Z (5 months ago)
- Last Synced: 2024-12-15T19:08:50.460Z (27 days ago)
- Topics: api, coverage, fastapi, microservice, pytest, python
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# microservice-python-fastapi
WORK IN PROGRESS
A scaffold for microservices using Python and FastAPI. This project is intended to be used as a template for new projects.
---
[![microservice-python-fastapi](https://github.com/skvggor/microservice-python-fastapi/actions/workflows/build-and-testing.yml/badge.svg)](https://github.com/skvggor/microservice-python-fastapi/actions/workflows/build-and-testing.yml)
---
## Dependencies (docker)
- Docker
- Docker Compose### Set .env
```bash
cp .env.example .env
```### Run
```bash
docker-compose up --build
```## Dependencies (local)
- Python 3.10+
- Pip + virtualenv### Prepare
```bash
python3 -m venv venv
source venv/bin/activate
pip install pip-tools
pip-compile requirements.in
```### Installation
```bash
pip install -r requirements.txt
```### Run
#### Development
```bash
fastapi dev main.py
```#### Production
```bash
fastapi run --host 0.0.0.0 --port 8000
```### Test
```bash
pytest
```### Coverage
```bash
pytest -vv --cov=. --cov=src --cov-report=term-missing --cov-report=xml .
```