pingio — Python client SDK
Python client for the Pingio secure messaging relay: register/login against the central auth server, connect over WebSocket, and send/receive direct messages with presence.
The hosted endpoint is https://pingio.ioservices.io (auth at /oauth/*,
relay WebSocket at wss://pingio.ioservices.io/ws) — the defaults, so the
client works out of the box against the hosted service, or point it at your
own deployment.
Install
pip install pingio
Only dependency: websocket-client.
Python 3.9+.
CLI
pingio register --username alice --display-name "Alice A"
pingio login --username alice # password prompted if omitted
pingio whoami # introspect the stored token
pingio send --to 9f1c... --message "hello from python"
pingio receive # stream incoming DMs until Ctrl+C
pingio logout
The same works via python -m pingio .... Tokens are stored in
~/.pingio/python-config.json (mode 0600) between runs. Use --auth-url /
--relay-url to target a self-hosted relay.
Library
from pingio import PingioClient
client = PingioClient() # hosted defaults
client.register("alice", "s3cret-password") # or client.login(...)
print(client.whoami())
with client: # connect() + auth handshake
client.set_presence("online")
message = client.send_dm("9f1c2e...", "hello from python")
print("stored as", message["id"])
frame = client.receive(timeout=30) # next incoming protocol frame
if frame and frame["type"] == "message":
print("DM:", frame["payload"]["message"]["content"])
Protocol notes
WebSocket frames are JSON envelopes
{"id": <uuid4>, "type": <type>, "timestamp": <epoch-ms>, "payload": {...}}:
- auth:
type="auth",payload={token, deviceFingerprint}→auth_response - DM send:
type="message",payload={recipientId, content, isEphemeral, clientMessageId}→message_sentfor the sender; the recipient receivestype="message"withpayload.message - presence:
type="presence_update",payload={status, message}with statusonline | away | busy | offline - liveness:
type="ping"→type="pong"
The device fingerprint mirrors the TypeScript client
(packages/mcp-server) so the auth server's device verification treats this
client the same way.
Development
pip install -e .
python -m unittest discover -s tests -v
License
MIT — see LICENSE.
Metadata
Release files for pingio 0.1.0
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 | |
|---|---|---|---|---|
| pingio-0.1.0.tar.gz | 15.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pingio-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.5 kB
Release files / pingio-0.1.0.tar.gz
| Download URL | pingio-0.1.0.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5458a64d3b7702a8bcfcf1df0611b492ac436495e7807c4aa38b575f5d9475b4
|
|
BLAKE2b-256 checksum How to use checksums |
ef77c36d27c75b9cf8756ba60a004bd43295bd2778c9fbceada3e17a20c844d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / pingio-0.1.0-py3-none-any.whl
| Download URL | pingio-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5fa36b633e1c549f212821dd7a2d9815e7479f089ac83c18b84e86007b65d94
|
|
BLAKE2b-256 checksum How to use checksums |
588240222aef74e3e27f1408405b02330024ab2ea88e9e67c322e25c5a345ec0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for pingio 0.1.0
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.