Simple CRUD Web API that follows CQRS and Mediator patterns.
curl -X "GET" "http://localhost:5000/api/healthcheck/"
{"status": "ok"}
curl -X 'POST' \
'http://0.0.0.0:5000/api/v1/users/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"email": "mymail@gmail.com",
"phone": "+0000000",
"hashed_password": "strongpassword"
}'
{
"id": 1,
"email": "mymail@gmail.com",
"phone": "+0000000",
"hashed_password": "$2b$12$h/bkjN5WRJiBO6tTr/Ju1uDEiREZ0eBVb4e4EF8sIUSLkTN.WDCuC"
}
curl -X "GET" "http://0.0.0.0:5000/api/v1/users/1"
{
"id": 1,
"email": "mymail@gmail.com",
"phone": "+0000000",
"hashed_password": "$2b$12$h/bkjN5WRJiBO6tTr/Ju1uDEiREZ0eBVb4e4EF8sIUSLkTN.WDCuC"
}
curl -X 'DELETE' \
'http://0.0.0.0:5000/api/v1/users/1' \
-H 'accept: application/json'
{
"id": 1,
"email": "mymail@gmail.com",
"phone": "+0000000",
}
- FastAPI — Async web framework
- SQLAlchemy 2.0 — ORM for working with database
- Alembic — Database schema migration tool
- Write tests
- Add Exception handlers