Skip to main content

Python SDK for ART WebSocket platform with sync/async support

Project description

Python ADK (ART Development Kit)

The Python ADK enables your applications to connect and communicate with the ART (A Realtime Tech) platform in real-time. It supports both synchronous and asynchronous modes for seamless integration into any Python project.

This SDK provides everything needed to authenticate clients, establish secure connections, subscribe to channels, exchange encrypted messages, and manage collaborative real-time data — all with minimal setup.


Documentation

For complete documentation, and detailed guides, visit:


Installation

Install the Python ADK via pip:

pip install art_adk

Requirements:

  • Python 3.8+
  • websockets
  • aiohttp (for async operations)
  • pynacl (for encryption)

Getting Started

Prerequisites

Before using the Python ADK, you need:

  1. Client Credentials - Sign up at the ART Live Dashboard and generate your client credentials. Add the adk-service.json file to your project root:
{
  "Client-ID": "YOUR_CLIENT_ID",
  "Client-Secret": "YOUR_CLIENT_SECRET",
  "Org-Title": "YOUR_ORG",
  "ProjectKey": "YOUR_PROJECT_KEY",
  "Environment": "YOUR_ENV_NAME"
}
  1. Passcode for Authentication - Before connecting, you need to obtain a passcode. See the authentication guide for detailed steps on obtaining your passcode via get_security_code().

  2. Start Building - Use the obtained passcode as AuthToken in your config (see Quick Start examples below).

For complete guides on authentication, channels, encryption, and advanced features, visit the Python ADK Documentation.


Quick Start

Synchronous Usage

Option 1: Context Manager

from art_adk import Adk
import os

config = {
    "ROOT": os.getcwd(),
    "Uri": "dev.arealtimetech.com/ws",
    "AuthToken": "your_passcode"  # Obtain via get_security_code()
}

# Automatic connection management
with Adk(config) as adk:
    # Subscribe to a channel
    subscription = adk.subscribe("my-channel")

    # Listen for messages
    subscription.listen(lambda data: print(f"Received: {data}"))

    # Send a message
    subscription.push("message", {"text": "Hello from ART!"})

Option 2: Manual Connection

from art_adk import Adk
import os

config = {
    "ROOT": os.getcwd(),
    "Uri": "dev.arealtimetech.com/ws",
    "AuthToken": "your_passcode"
}

adk = Adk(config)
adk.connect()

# Subscribe and interact
subscription = adk.subscribe("my-channel")
subscription.push("message", {"text": "Hello!"})

# Clean up
adk.disconnect()

Asynchronous Usage

Option 1: Async Context Manager

from art_adk import AsyncAdk
import asyncio
import os

async def main():
    config = {
        "ROOT": os.getcwd(),
        "Uri": "dev.arealtimetech.com/ws",
        "AuthToken": "your_passcode"
    }

    # Automatic async connection management
    async with AsyncAdk(config) as adk:
        # Subscribe to a channel
        subscription = await adk.subscribe("my-channel")

        # Listen for messages
        subscription.listen(lambda data: print(f"Received: {data}"))

        # Send a message
        await subscription.push("message", {"text": "Hello from ART!"})

asyncio.run(main())

Option 2: Manual Async Connection

from art_adk import AsyncAdk
import asyncio
import os

async def main():
    config = {
        "ROOT": os.getcwd(),
        "Uri": "dev.arealtimetech.com/ws",
        "AuthToken": "your_passcode"
    }

    adk = AsyncAdk(config)
    await adk.connect()

    # Subscribe and interact
    subscription = await adk.subscribe("my-channel")
    await subscription.push("message", {"text": "Hello!"})

    # Clean up
    await adk.disconnect()

asyncio.run(main())

Support & Resources


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

art_adk-0.0.1.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

art_adk-0.0.1-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file art_adk-0.0.1.tar.gz.

File metadata

  • Download URL: art_adk-0.0.1.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for art_adk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2bd287380207c539c24fd40fd22b2a3fbbc521f4a7a3d1c56d3565a5b7e04a01
MD5 0ba2d1c174b8a07c6794a040fb771481
BLAKE2b-256 775a875ccc1123f5f3795c329b6196c0c032e2adaa5c1caebacb279ceeb397b4

See more details on using hashes here.

File details

Details for the file art_adk-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: art_adk-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 37.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for art_adk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae7646ce30697bd0e26f2a6317ab30dd2e1ef4dfef0f2f7cabf78d56f699d232
MD5 c3dc90485b23425132eccb90a15cf8df
BLAKE2b-256 64820c93ce31bb734ef667adf3208e0c2c6233b4f3625d3b9daef3141d56f4e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page