This project integrates FastAPI for API development, Celery for distributed task processing, and Redis as a message broker and storage
- FastAPI – Modern, high-performance web framework
- Celery – Distributed task queue
- Redis – In-memory data store & message broker
Build & Start all services:
docker-compose up --buildRun Integration tests: Ensure all dependent containers are running first then run the integration tests container
docker-compose up -d
docker-compose up integration_testsSubmit receipt curl request
curl -X POST "http://localhost:8080/receipts/process" \
-H "Content-Type: application/json" \
-d '{
"retailer": "Target",
"purchaseDate": "2022-01-01",
"purchaseTime": "13:01",
"items": [
{
"shortDescription": "Mountain Dew 12PK",
"price": "6.49"
},
{
"shortDescription": "Emils Cheese Pizza",
"price": "12.25"
},
{
"shortDescription": "Knorr Creamy Chicken",
"price": "1.26"
},
{
"shortDescription": "Doritos Nacho Cheese",
"price": "3.35"
},
{
"shortDescription": "Klarbrunn 12-PK 12 FL OZ",
"price": "12.00"
}
],
"total": "35.35"
}'Check points curl request
curl -X GET "http://localhost:8080/receipts/RECEIPT_ID/points" \
-H "Accept: application/json"