guolunwei / fastapi-crud

Developing and Testing an Asynchronous API with FastAPI and Pytest.

Home Page:https://testdriven.io/blog/fastapi-crud/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fastapi-crud

Developing and Testing an Asynchronous API with FastAPI and Pytest.

Project Setup

docker compose up -d --build

check before continuing

http://localhost:8002/ping
http://localhost:8002/docs

Test Setup

docker compose up -d --build
docker compose exec web pytest .

Postgres Setup

docker compose up -d --build
docker compose exec db psql --username=hello_fastapi --dbname=hello_fastapi_dev
\l
\c hello_fastapi_dev
\dt
\q

Clear environment

docker compose down

About

Developing and Testing an Asynchronous API with FastAPI and Pytest.

https://testdriven.io/blog/fastapi-crud/


Languages

Language:Python 93.0%Language:Dockerfile 7.0%