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-1.1.3.dev271.tar.gz
(19.4 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-1.1.3.dev271.tar.gz.
File metadata
- Download URL: shadowob_sdk-1.1.3.dev271.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ef80f98534b83ed0868e6065018f353c9e95f67919585f0665afd2f474e3a39
|
|
| MD5 |
1e76b506785e3f0a96a87431fbf51d91
|
|
| BLAKE2b-256 |
eeddf300c941ba785dea15966d4fff20e6e63c9a2f7d76d0f1dd70305090ddaa
|
File details
Details for the file shadowob_sdk-1.1.3.dev271-py3-none-any.whl.
File metadata
- Download URL: shadowob_sdk-1.1.3.dev271-py3-none-any.whl
- Upload date:
- Size: 16.5 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 |
ea212ffbd3a2211b57da2ea1ce304195d69877cde3e94ed008bc47a96e9c5777
|
|
| MD5 |
682eade012b12da8707a33a9697929f1
|
|
| BLAKE2b-256 |
23bea32ab2457e4115d229501c79d078522ed45405aace5eba5d6393b3324f7c
|