https://github.com/anjasfedo/fastapi
API Development with FastAPI
https://github.com/anjasfedo/fastapi
fastapi
Last synced: 2 months ago
JSON representation
API Development with FastAPI
- Host: GitHub
- URL: https://github.com/anjasfedo/fastapi
- Owner: Anjasfedo
- Created: 2024-03-29T22:59:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-27T15:40:36.000Z (about 2 years ago)
- Last Synced: 2025-01-17T03:27:24.856Z (over 1 year ago)
- Topics: fastapi
- Language: Python
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
create virtual enviroment
`py -3 -m venv venv`
run venv
`venv\Scripts\activate`
install fastapi full
`pip install fastapi[all]`
run fastapi server
`uvicorn main:app --reload`
`uvicorn app.main:app --reload`
create hex random number on bash for secret key
`openssl rand -hex 32`
Initialize alembic
`alembic init [folder name]`
Make migration on database with revision
`alembic revision -m [message]`
Run the migration
`alembic upgrade [revision number]`
Upgrade by step
`alembic upgrade [+n step]`
Show current revision
`alembic current`
Show updated revision
`alembic head`
Run updated revision
`alembic upgrade head`
Rollback with revision
`alembic downgrade [revision number]`
Rollback by step
`alembic downgrade [-n step]`
Auto create revision from model
`alembic revision --autogenerate -m [message]`
**Note:** 1. deprecated bycrypt