qstash
Python SDK for Upstash QStash
What it is and what it does
QStash is a Python client for Upstash's HTTP-based message queue and scheduling service. It lets you publish messages to HTTP endpoints, schedule recurring or delayed tasks using cron expressions, and verify incoming webhook signatures from QStash. The SDK wraps HTTP calls to the QStash API and provides convenience methods for common operations like publishing JSON payloads, creating schedules, and receiving authenticated messages.
Typically used in serverless environments (AWS Lambda, Vercel Functions, etc.) where you need to queue work, schedule background jobs, or coordinate between services without managing your own message broker. It depends on httpx for HTTP requests and pyjwt for signature verification, and supports Python 3.8 through 3.13.
Use it for:
- Queue HTTP requests to be delivered with retry logic and scheduling in serverless functions
- Schedule recurring tasks using cron expressions without a persistent scheduler
- Verify and process webhook callbacks from QStash in your application handlers
- Publish messages to LLM APIs (e.g., OpenAI) with callback handling for results
- Implement delayed task execution with configurable backoff and retry strategies
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python SDK for publishing and receiving messages through Upstash QStash, an HTTP-based messaging and scheduling service for serverless and edge runtimes.
Yes, if you are building on Upstash's infrastructure or need a managed message queue for serverless workloads. The package is actively maintained, has low install friction, carries a permissive MIT license, and has no known vulnerabilities. It is production-ready (GA status) and suitable for applications that rely on QStash for messaging and scheduling.
Install
qstash on PyPI
pip
pip install qstashuv
uv add qstashpoetry
poetry add qstashInstalling qstash
Before you install
Low install friction with only two runtime dependencies (httpx and pyjwt). Actively maintained with recent releases; marked as GA and covered by Upstash Professional Support.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
Quickstart
pip install qstash
from qstash import QStash
client = QStash("<QSTASH_TOKEN>")
res = client.message.publish_json(
url="https://example.com",
body={"hello": "world"},
)
print(res.message_id)
Requires a valid QStash token from the Upstash Console (https://console.upstash.com/qstash) to authenticate API calls.
Verify before relying
- Whether the package handles automatic retries for failed message deliveries to endpoints
- Whether LLM provider integrations beyond OpenAI are supported
- Performance characteristics under high message volume
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — httpx, pyjwt |
| Maintenance | actively maintained — 149 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 281,149/month — #8,105 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: qstash-3.4.0-py3-none-any.whl
Keywords: QStash, Upstash QStash, Serverless Queue
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
upstash-redisHTTP-based Redis client for Python that…
permissive · top 5,000 on PyPI
upstash-vectorPython client for Upstash Vector, a serverless…
permissive · top 15,000 on PyPI
upstash-ratelimitProvides connectionless rate limiting for…
permissive · top 15,000 on PyPI
hatchet-sdkHatchet SDK is the official Python client for…
permissive · top 5,000 on PyPI
rq-schedulerAdds job scheduling capabilities to RQ (Redis…
permissive · top 15,000 on PyPI
slixmppSlixmpp is an async-first XMPP library for…
permissive · top 15,000 on PyPI
clx-sdk-xmsPython SDK for the CLX Communications REST API…
permissive · top 15,000 on PyPI
azure-servicebusAzure Service Bus client library for Python…
unclear · top 1,000 on PyPI
saqSAQ is an async job queue framework that runs…
permissive · top 15,000 on PyPI
celeryCelery is a distributed task queue that lets…
permissive · top 1,000 on PyPI