README.md 727 B

A simple example of using Fast API in Python.

Preconditions:

  • Python 3

Clone the project

git clone git@gitee.com:cao-lixu/fastap_minio.git

Run local

Install dependencies

pip install -r requirements.txt

Run minio

docker run -p 9000:9000 minio/minio:RELEASE.2021-06-17T00-10-46Z server /data

Run server

uvicorn app.main:app --reload

Run test

pytest test/test.py

Run with docker

Run server

docker-compose up -d --build

Run test

docker-compose exec app pytest test/test.py

API documentation (provided by Swagger UI)

http://127.0.0.1:8000/docs

Run server

docker-compose exec --username=fastapi