A simple example of using Fast API in Python.
- Python 3.8.1
git clone https://github.com/DongheeKang/Fastapi_minimal.git
pip install -r requirements.txt
Uvicorn is an ASGI web server implementation for deployment with python Typically you should run uvicorn from the command line.
uvicorn app.main:app --reload
pytest app/test.py
docker-compose up -d --build
docker-compose exec app pytest test/test.py
http://127.0.0.1:8000/docs
docker-compose exec db psql --username=fastapi --dbname=fastapi_dev
If you want to use github actions for build in CI, there is an easy step to migrate from circleci to github actions. https://docs.github.com/en/actions/migrating-to-github-actions/migrating-from-circleci-to-github-actions