Shadow SDK — Python client for Shadow server REST API and Socket.IO real-time events
Project description
Shadow Python SDK
Python client for the Shadow server REST API and Socket.IO real-time events.
Installation
pip install shadowob-sdk
Quick Start
from shadowob_sdk import ShadowClient, ShadowSocket
# REST API
client = ShadowClient("https://shadowob.com", token="your-jwt-token")
me = client.get_me()
print(f"Logged in as {me['username']}")
# Send a message
msg = client.send_message("channel-id", "Hello from Python!")
print(f"Sent message: {msg['id']}")
# Real-time events
socket = ShadowSocket("https://shadowob.com", token="your-jwt-token")
socket.on("message:new", lambda msg: print(f"New message: {msg['content']}"))
socket.connect()
socket.join_channel("channel-id")
socket.wait() # Block until disconnected
API Reference
See the full documentation for complete API reference.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shadowob_sdk-0.4.0.tar.gz
(8.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shadowob_sdk-0.4.0.tar.gz.
File metadata
- Download URL: shadowob_sdk-0.4.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17fa0ab72b097915b6d03b308b5290b735c1d296da985aaf12be5d3af53da46c
|
|
| MD5 |
a8048020f0d6e1f110add81750454521
|
|
| BLAKE2b-256 |
712012e346be414a7e96d6f92b0be72ff0ec4d68e2b3cc8e2ad4788848a4173f
|
File details
Details for the file shadowob_sdk-0.4.0-py3-none-any.whl.
File metadata
- Download URL: shadowob_sdk-0.4.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da46932c8a0e1e800b3b5be99bde1ecf9d58336f24b477612ad03a5d882eaf5d
|
|
| MD5 |
aa2641e139f4cce7238657f751da1e30
|
|
| BLAKE2b-256 |
513d461d125a4d417eb78445d4de53aeadec84301ff03f4df5bc6d55588ce6e0
|