This project is a simple image processing application built with Celery, Redis, and FastAPI. It allows users to upload images, apply various transformations asynchronously using Celery workers, and retrieve the processed images.
-
Activate Virtual Environment
Activate your virtual environment to isolate dependencies:
source venv/bin/activate # For Unix/Linux .\venv\Scripts\activate # For Windows
-
Install Requirements
pip install -r requirements.txt
-
Configure Redis
- Rename .env.env file to .env and replace it with your Redis URL/paths or remote Redis configuration.
- For instructions on how to install Redis on your local computer, refer to Redis Documentation
- You can also use Redis with Docker. Check out Redis Docker Hub for more details.
-
Run FastAPI Server
uvicorn main:app
-
Run Celery Worker
celery -A tasks worker --loglevel=info
- Add the "-P solo" flag if you're running the Windows version of Redis.