https://github.com/peterchain/fastapi_template
Basic FastAPI backend template
https://github.com/peterchain/fastapi_template
Last synced: 7 days ago
JSON representation
Basic FastAPI backend template
- Host: GitHub
- URL: https://github.com/peterchain/fastapi_template
- Owner: PeterChain
- Created: 2021-02-03T18:03:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-04T12:40:38.000Z (over 5 years ago)
- Last Synced: 2024-10-19T10:26:03.083Z (over 1 year ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fast API backend app
## Purpose
Template app for a new Fast API backend application, it's applied to
a local SQLite database with no docker dependencies.
## What is included
- JWT Tokening mechanism and basic user management API.
- Application structure:
- **Migrations** directory for Alembic migration usage
- **Scripts** for creating the admin user
- **App/Models** for defining ORM models (using SQLAlchemy)
- **App/Schemas** for defining Pydantic models
- **App/Routes** for defining API routes (provides a directory for each version)
- **App/Services** for python objects for business logic
- **Dependencies** and **database** for cross utilities and configurations
## How to run
- Add the app directory to PYTHONPATH
- If models have been added, then
- Run Alembic revisions automatically (eg: `alembic revision --autogenerate`) or manually (eg: `alembic revision`)
- Perform changes to database (eg: `alembic upgrade head`)
- Run the initial script `python scripts/initial_user.py` for creating the admin user
- It uses the DB configuration of the app
- Run the app