https://github.com/srneha24/fastapi-with-redis
A simple example application to show the basic usage of Redis as a cache service, message broker and schedular backend with FastAPI
https://github.com/srneha24/fastapi-with-redis
celery celery-redis celerybeat fastapi python3 redis redis-cache redisinsight
Last synced: 10 months ago
JSON representation
A simple example application to show the basic usage of Redis as a cache service, message broker and schedular backend with FastAPI
- Host: GitHub
- URL: https://github.com/srneha24/fastapi-with-redis
- Owner: srneha24
- License: agpl-3.0
- Created: 2023-10-03T17:16:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-20T19:20:18.000Z (about 2 years ago)
- Last Synced: 2023-12-20T20:39:46.961Z (about 2 years ago)
- Topics: celery, celery-redis, celerybeat, fastapi, python3, redis, redis-cache, redisinsight
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Using Redis With FastAPI
This project was made on WSL2.
### USED TOOLS AND TECHNOLOGIES
- FastAPI - _As an HTTP server_
- Redis - _As a cache service, message broker and schedular backend_
- Redisinsight - _To visualise Redis data on a GUI_
- Celery - _As a scheduler_
- Celery Beat - _To automate the scheduling_
### Build
- Create an envionment file, titled `.env` on the same root as the docker-compose, with the follwing variables
- **DOCKER_CONTAINER_IP:** The IP address of the redis-stack image inside the container
- **FASTAPI_IP:** The IP address of the fastapi_app image inside the container
- To build the project, run the following command on your console of choice
```
docker-compose build
```
### RUN
To run this project, run the following command on your console of choice
```
docker-compose up
```