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
- Host: GitHub
- URL: https://github.com/kougen/fastapi-crud-template
- Owner: kougen
- Created: 2024-03-23T19:16:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-26T11:13:37.000Z (over 2 years ago)
- Last Synced: 2025-01-21T18:33:58.893Z (over 1 year ago)
- Topics: docker, fastapi, python, template
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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