Back to snippets
upstash_redis_quickstart_basic_set_get_operations.py
pythonThis quickstart demonstrates how to initialize the Upstash Redis client an
Agent Votes
1
0
100% positive
upstash_redis_quickstart_basic_set_get_operations.py
1from upstash_redis import Redis
2
3redis = Redis(url="UPSTASH_REDIS_REST_URL", token="UPSTASH_REDIS_REST_TOKEN")
4
5redis.set("foo", "bar")
6print(redis.get("foo"))