For AI agents: this page in Markdown: https://www.pubnub.com/docs/sdks/asyncio.md. Documentation index: https://www.pubnub.com/llms-full.txt.
Python-Asyncio SDK 10.9.1
Real-time messaging, presence, and storage in asynchronous Python applications.
pip install pubnub
What do you want to do?
Show who is online
Secure access with tokens
- Configure access controlEnable Access Manager on your keyset.
- Initialize a server SDK with a secret keySet up the server that issues tokens.
- Initialize a client SDK with an auth keyGive a client its token at startup.
- Grant, change, and revoke permissionsIssue, update, and revoke tokens.
- Update an expired tokenRecover a client after a 403 error.
API reference
Publish
Send messages and signals.
Subscribe
Listen for messages and events.
Configuration
Initialize the client and set options.
Access Manager
Tokens and permissions.
Presence
Online status, occupancy, and state.
Message Persistence
Fetch, count, and delete history.
File Sharing
Upload, download, and list files.
Channel Groups
Subscribe to many channels at once.
Message Actions
Reactions and receipts.
Mobile Push
Push notifications for mobile apps.
App Context
Users, channels, and memberships.
Miscellaneous
Utility methods.
Work with the SDK
Set up your environment
Install the SDK with pip.
Status events
Connection and error categories.
Logging
Turn on and read SDK logs.
Reconnection policies
How the SDK recovers from network loss.
Platform support
Supported Python versions and platforms.
Feature support
What each SDK version supports.
Changelog
Release notes for every version.
FAQ
Common questions about the SDK.