Skip to content

fsilvestre90/receipt_processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI-Celery-Redis-Flower

🚀 Overview

This project integrates FastAPI for API development, Celery for distributed task processing, and Redis as a message broker and storage

🛠 Built With

  • FastAPI – Modern, high-performance web framework
  • Celery – Distributed task queue
  • Redis – In-memory data store & message broker

🔧 Setup & Usage

Build & Start all services:

   docker-compose up --build

Run Integration tests: Ensure all dependent containers are running first then run the integration tests container

   docker-compose up -d
   docker-compose up integration_tests

Submit 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"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published