Skip to main content

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

Commerce Automation

from shadowob_sdk import ShadowClient

client = ShadowClient("https://shadowob.com", token="your-jwt-token")

# Buyer-facing product context includes product, shop, provider, delivery, refund,
# credit, and asset homepage links.
context = client.get_commerce_product_context("product-id")

# Preview an offer, then purchase with an idempotency key.
preview = client.get_commerce_offer_checkout_preview("offer-id")
if preview["nextAction"] == "purchase":
    client.purchase_commerce_offer(
        "offer-id",
        idempotency_key="checkout-20260518-001",
    )

# Paid files return a short-lived grant token for authorized downloads or previews.
opened = client.open_paid_file("workspace-file-id")
print(opened["viewerUrl"], opened.get("grantToken"))

# External provider apps use an OAuth access token for app-scoped entitlements.
app_client = ShadowClient("https://shadowob.com", token="oauth-access-token")
access = app_client.get_oauth_commerce_entitlement_access(
    resource_id="oauth-app-id:premium",
)
if access["allowed"]:
    app_client.redeem_oauth_commerce_entitlement(
        resource_id="oauth-app-id:premium",
        idempotency_key="provider-delivery-001",
    )

API Reference

See the full documentation for complete API reference.

Metadata

Release files for shadowob-sdk 1.1.58

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shadowob-sdk 1.1.58
File Size Uploaded Provenance Actions
shadowob_sdk-1.1.58.tar.gz 35.0 kB Without provenance Details for shadowob_sdk-1.1.58.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shadowob-sdk 1.1.58
File Interpreter ABI Platform Actions
shadowob_sdk-1.1.58-py3-none-any.whl Python 3 none any Details for shadowob_sdk-1.1.58-py3-none-any.whl

Total release size: 62.4 kB

Release files / shadowob_sdk-1.1.58.tar.gz

Download URL shadowob_sdk-1.1.58.tar.gz
Size 35.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b2098cba4a8036b906e6a9067d4bcd129dc5be00b2b12c7c8aea8f3d1ba23a58
BLAKE2b-256 checksum
How to use checksums
cee8527654d4e78db3d75ae76ffb91102cb4af4c04aaf4bd2a77e3e1aa6df415
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / shadowob_sdk-1.1.58-py3-none-any.whl

Download URL shadowob_sdk-1.1.58-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64e923f64b979b2da2aa153ddcdd4b3004c69a8294f1c1b6f8e287d9252ea97a
BLAKE2b-256 checksum
How to use checksums
1d9757abb41d3cd9fb7e1d17994ee4c4427c83562f2c3a6d428b678a8f101fe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for shadowob-sdk 1.1.58

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.

Release history Release notifications | RSS feed

This release

1.1.58 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page