Web application generator. Using FastAPI, MySql as databas.I am referring to tianolo's full-stack-fastapi-postgresql
https://github.com/tiangolo/full-stack-fastapi-postgresql
I changed it to my favorite format.
- JWT token authentication.
- SQLAlchemy models(MySql).
- Alembic migrations.
- Use redis demo.
- File upload demo.
- apscheduler cron task (:noqa)
Go to the directory where you want to create your project and run:
pip install cookiecutter
cookiecutter https://github.com/CoderCharm/fastapi-mysql-generator
cd your_project/
pip install -r requirements.txt
In the project/app/core/config/development_config.py
or production_config.py
file.
MySql and Redis config info
cd your_project/
# Generate mapping
alembic revision --autogenerate -m "init commit"
# Generate tables
alembic upgrade head
cd your_project/app
python create_user.py
cd your_project/app
python main.py
or
uvicorn main:app --host=127.0.0.1 --port=8010 --reload
online doc address
http://127.0.0.1:8010/api/docs