ably
Python REST and Realtime client library SDK for Ably realtime messaging service
What it is and what it does
Ably is a Python SDK that connects your application to Ably's hosted realtime messaging platform. It provides async-first APIs for pub/sub messaging, allowing you to publish messages to channels and subscribe to receive them in real time, along with features like message history and presence tracking. The SDK handles the underlying WebSocket and HTTP connections, authentication, and message serialization through dependencies on httpx, websockets, and msgpack.
The package is designed for building realtime features—live notifications, collaborative editing, activity feeds, and similar use cases—where you want reliable message delivery without managing your own infrastructure. It supports Python 3.7 through 3.14 and is actively maintained with no known security vulnerabilities.
Use it for:
- Build live notification systems where clients subscribe to channels and receive updates as they happen.
- Implement presence features to track which users are online or active in a shared space.
- Retrieve message history for a channel to show users recent activity when they reconnect.
- Create collaborative applications where multiple clients publish and receive state changes in real time.
- Add push notifications to mobile or web apps by integrating with Ably's push infrastructure.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Ably is a Python client library for connecting to Ably's realtime pub/sub messaging service, supporting message publishing, subscriptions, message history, and presence features.
Yes. Ably is a mature, actively maintained library with low install friction, no vulnerabilities, and permissive licensing. Install it if you need a managed realtime messaging service and are comfortable with Ably's hosted model and pricing. The SDK currently covers REST and basic realtime subscriptions; if you need advanced Ably Realtime features, check whether the MQTT adapter is required for your use case.
Install
ably on PyPI
pip
pip install ablyuv
uv add ablypoetry
poetry add ablyInstalling ably
Before you install
Low install friction with a pure-wheel distribution. The package is actively maintained with a recent release and no known vulnerabilities. Dependencies on httpx, websockets, and pyee are standard async/networking libraries.
License in practice
Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install ably
from ably import AblyRealtime
async with AblyRealtime('your-api-key', client_id='me') as client:
channel = client.channels.get('test-channel')
await channel.subscribe(lambda msg: print(msg.data))
await channel.publish('event', 'hello')
Requires Python 3.7 or later; async/await syntax requires understanding of asyncio; Ably API key required to connect to the service.
Verify before relying
- Whether full Ably Realtime features (beyond REST and basic subscriptions) are available in this SDK version or require the MQTT adapter.
- Performance characteristics and throughput limits under typical production loads.
- Reconnection and failover behavior during network interruptions.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — h2, httpx, msgpack, pyee, websockets |
| Maintenance | actively maintained — 140 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,385,602/month — #3,975 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ably-3.1.2-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
google-cloud-pubsublitePython client library for Google Cloud Pub/Sub…
permissive · top 5,000 on PyPI
pubnubPubNub Python SDK provides real-time…
unclear · top 15,000 on PyPI
realtimeA Python client for Supabase Realtime that…
permissive · top 1,000 on PyPI
google-cloud-pubsubPython client library for Google Cloud Pub/Sub,…
permissive · top 1,000 on PyPI
neonizeNeonize is a Python library for automating…
unclear · top 15,000 on PyPI
broadcasterBroadcaster provides a simple async broadcast…
permissive · top 15,000 on PyPI
gcloud-aio-pubsubAsyncio and threadsafe Python client for Google…
permissive · top 15,000 on PyPI
pubcontrolPublishes messages to multiple endpoints via…
permissive · top 15,000 on PyPI
slixmppSlixmpp is an async-first XMPP library for…
permissive · top 15,000 on PyPI
twitchAPIA Python client library for the Twitch Helix…
permissive · top 15,000 on PyPI