Registry / database / upstash

upstash

JSON →
library1.2.0pypypi✓ verified 29d ago

Unified Python SDK for Upstash cloud services including Redis, Vector, QStash, and Workflow. Provides serverless-friendly clients optimized for edge and serverless environments with HTTP-based connections. Replaces the older individual packages (upstash-redis, upstash-vector, upstash-qstash).

pip install upstash
INSTALL
IMPORT
SIG · UPSTASH
U
upstash
databasepythonv1.2.0
Install
—
Import
—
Disk
—
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v? · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
2/4 runs
2/4 runs
py 3.11
2/4 runs
2/4 runs
py 3.12
2/4 runs
2/4 runs
py 3.13
2/4 runs
2/4 runs
py 3.9
2/4 runs
2/4 runs
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Redis
✓ from upstash_redis import Redis
✗ from upstash import Redis
Redis client is imported from upstash_redis, not from the top-level upstash module.
Index
✓ from upstash_vector import Index
✗ from upstash import Vector
Vector client is the Index class from upstash_vector.
QStash
✓ from upstash_qstash import QStash
QStash client is imported from upstash_qstash submodule.

Minimal Redis set/get using the Upstash Redis client with HTTP-based connection.

import os from upstash_redis import Redis redis = Redis( url=os.environ.get('UPSTASH_REDIS_REST_URL', ''), token=os.environ.get('UPSTASH_REDIS_REST_TOKEN', '') ) redis.set('greeting', 'Hello from Upstash!') value = redis.get('greeting') print(value)
Debug
Known issues
gotchaUpstash Redis uses HTTP REST calls, not the Redis wire protocol. Standard redis-py commands that rely on persistent TCP connections (SUBSCRIBE, BLPOP, WATCH) are not supported.
fix
Use QStash for pub/sub messaging patterns instead of Redis SUBSCRIBE.
affects: all
gotchaRedis.from_env() reads UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN from environment. These must be the REST endpoint, not the standard Redis port 6379 URL.
fix
Use the REST URL from the Upstash console (https://...upstash.io), not the redis:// connection string.
affects: all
breakingThe unified 'upstash' package changed internal module structure. Imports like 'from upstash.redis import Redis' do not work. Use 'from upstash_redis import Redis'.
fix
from upstash_redis import Redis
affects: all
gotchaRedis.get() returns None for missing keys, not raising a KeyError. Pipeline results are returned as a list, not individual values.
fix
Always check for None when reading keys: value = redis.get('key') or 'default'
affects: all
gotchaEach Redis command makes an individual HTTP request. Use pipelines to batch multiple commands and reduce latency.
fix
pipe = redis.pipeline(); pipe.set('a', '1'); pipe.get('a'); results = pipe.execute()
affects: all
breakingWhile the separate upstash-redis, upstash-vector, and upstash-qstash packages are being consolidated, the unified 'upstash' package is not yet available for installation on PyPI or for the specified Python environment (python:3.13-alpine). Attempting 'pip install upstash' will result in 'No matching distribution found'.
fix
Continue to use 'pip install upstash-redis' (or other specific Upstash SDKs like upstash-vector, upstash-qstash) until the unified 'upstash' package is officially released and available for your platform.
affects: all
Upgrade
Version history
1.2.0latest on PyPI
Audit
Dependencies
httpxrequiredUsed as the HTTP transport layer for all Upstash API calls.
Agent activity
63 hits · last 30 days
node
56
OpenAI (training)
1
Resources