Azure Web PubSub
Python SDK for Azure Web PubSub
Disclaimer
Unless you need something decently simple (e.g. server-to-client one-way communication), I think Socket.IO may be a better option. Azure Web PubSub has a managed service for Socket.IO (read more here), or you can host your own server with python-socketio
Installation
pip install pubsub-az
Authorization
PUBSUB_CONN_STR(Connection string in the portal)
Environment (.env)
For convenience, you can set os.environ["PUBSUB_CONN_STR"] and can skip specifying it on every call.
E.g., create a .env file:
PUBSUB_CONN_STR="<PUBSUB_CONN_STR>"
Then load it before importing
from dotenv import load_dotenv
load_dotenv()
import pubsub_az as pz
pz.service(hub='<hub>') # just works!
CLI
Basic listener priting messages received. To install, run:
pip install pubsub-az[client]
Then, to execute from the terminal:
pubsub-client --user "<user-id>" --hub "<hub>" --groups "<g1>" "<g2>" # ...
Metadata
Release files for pubsub-az 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pubsub-az-0.1.2.tar.gz | 4.1 kB | Without provenance | Details for pubsub-az-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pubsub_az-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pubsub_az-0.1.2-py3-none-any.whl |
Total release size: 8.6 kB
Release files / pubsub-az-0.1.2.tar.gz
| Download URL | pubsub-az-0.1.2.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03dd7602d7fe96b566685a0de3403ed87f6373d53abb1edb321c0d861fb1e7e1
|
|
BLAKE2b-256 checksum How to use checksums |
0f9d04b8b3b393113d0a9283d1f650191d5b146b2fe0587748b8078797956cb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.6
|
Release files / pubsub_az-0.1.2-py3-none-any.whl
| Download URL | pubsub_az-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ce091f86ec7c907c945dfe44605d5cea0cd7f2b13e3d7b2ad147fe14be266aa
|
|
BLAKE2b-256 checksum How to use checksums |
2dfb6fc705fd464ab026490afe2275a9fedf83249f074bcbeaf14c6f7fa51282
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.6
|
Security for pubsub-az 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.