How viyasarsingaram5-sketch/redis-fastapi works
This is a small FastAPI service with a single user-lookup workflow: requests check Redis, fall back to an in-memory user map, and cache successful lookups for 15 seconds. It also exposes a Redis health check and a root message. The Redis client is configured from environment variables in rd_client.py. The README is empty, so the graph reflects only the sampled source; the user data and API handlers share main.py.
Main entry points: main.py FastAPI routes · rd_client.py Redis client config
Components 5
API and user data
- FastAPI routes
main.py - In-memory users
main.py
Redis cache
- Redis client config
rd_client.py - Redis
Other components
- HTTP caller
Connections 6
- HTTP caller → FastAPI routes: requests routes
main.py - FastAPI routes → Redis client config: uses client
main.py - FastAPI routes → Redis: checks health
main.py - FastAPI routes → Redis: reads cache
main.py - FastAPI routes → In-memory users: looks up user
main.py - FastAPI routes → Redis: writes cache
main.py