Python
FastAPI
Environment Setup
Install FastAPI and upstash-redis
.
Database Setup
Create a Redis database using Upstash Console or Upstash CLI and export the UPSTASH_REDIS_REST_URL
and UPSTASH_REDIS_REST_TOKEN
to your environment.
API Setup
Create main.py
:
main.py
Run
Run the app locally with fastapi dev main.py
, check http://127.0.0.1:8000/