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

https://github.com/kougen/fastapi-crud-template

Template repository for FastApi CRUD bootstrapping
https://github.com/kougen/fastapi-crud-template

docker fastapi python template

Last synced: about 2 months ago
JSON representation

Template repository for FastApi CRUD bootstrapping

Awesome Lists containing this project

README

          

# FastAPI CRUD Template

This is a template for FastAPI CRUD operations.

## Features

- FastAPI
- Repository Pattern (from [pyrepositories](https://pypi.org/project/pyrepositories/))
- Automatic docker image build and publish on release

## Configure GitHub action

You will have to set up 2 secrets and 2 variables in your repository

Secrets:
- `DOCKER_PUSH`: A github classic token with packages `read` and `write` permissions
- `HUB_PASSWORD`: Docker Hub token.

Variables:
- `HUB_NS`: Docker hub target **N**ame**S**pace
- `HUB_REPO`: Docker hub target repository

## Requirements

- Python 3.8+

## Installation

```bash
pip install -r requirements.txt --upgrade
```

## Usage

You will find a `lib.py` in the `app` directory. This is where you will define helper functions for your CRUD operations.

There is also a `models.py` in the `app` directory. This is where you will define your Pydantic models.

## Future plans
- Possibility to decide easily between `ghcr.io` and docker hub targers