A FastAPI-based service for managing store product inventory.
-
GET /
Welcome message and docs link. -
POST /products/
Create a new product. Requires API key. -
GET /products/
List products (paginated). Requires API key. -
GET /products/{product_id}
Get product details. Requires API key. -
PATCH /products/{product_id}
Update product fields. Requires API key. -
DELETE /products/{product_id}
Delete a product. Requires API key. -
POST /products/{product_id}/increment
Increase product stock. Requires API key. -
POST /products/{product_id}/decrement
Decrease product stock. Requires API key.
docker-compose up --build- App runs at http://localhost:8000
- Postgres DB at port 5432
Install dependencies:
poetry installRun migrations:
bin/prepare.shStart the app:
bin/run.shRun tests:
bin/test.sh- Import
ssm-postman-collection.jsonfor Postman collection with example requests - Motivation for frameworks in
motivation.md
Visit http://localhost:8000/docs for interactive Swagger UI.