Skip to main content

Python SDK for building Local Apps that integrate with RealtimeX

Project description

RealtimeX Local App SDK - Python

Python SDK for building Local Apps that integrate with RealtimeX.

Installation

pip install realtimex-sdk

Prerequisites

Before using this SDK, ensure your Supabase database is set up via the Main App:

  1. Open RealtimeXSettingsLocal Apps
  2. Create or configure your Local App
  3. Select Compatible ModeLogin to SupabaseAuto-Setup Schema

Note: Schema setup is handled entirely by the Main App.

Quick Start

import asyncio
from realtimex_sdk import RealtimeXSDK

async def main():
    # Declare permissions in config
    sdk = RealtimeXSDK(config=SDKConfig(
        permissions=['activities.write', 'webhook.trigger']
    ))
    
    # Insert activity
    activity = await sdk.activities.insert({
        "type": "new_lead",
        "email": "user@example.com"
    })
    
    # Trigger agent (auto-run)
    result = await sdk.webhook.trigger_agent(
        raw_data=activity,
        auto_run=True,
        agent_name="lead-processor",
        workspace_slug="sales",
        thread_slug="general"
    )
    print(f"Task created: {result['task_uuid']}")
    
    # Or create calendar event for manual review
    result = await sdk.webhook.trigger_agent(
        raw_data=activity,
        auto_run=False
    )

asyncio.run(main())

Configuration (Optional)

Override auto-detected values if needed:

from realtimex_sdk import RealtimeXSDK, SDKConfig

sdk = RealtimeXSDK(config=SDKConfig(
    url="http://custom-host:3001"  # Default: localhost:3001
))

Environment Variables

When your app is started by the Main App, these are auto-set:

Variable Description
RTX_APP_ID Your app's unique ID
RTX_APP_NAME Your app's display name

API Reference

See the main TypeScript README for full API documentation.

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

realtimex_sdk-1.0.9.tar.gz (56.9 kB view details)

Uploaded Source

Built Distribution

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

realtimex_sdk-1.0.9-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file realtimex_sdk-1.0.9.tar.gz.

File metadata

  • Download URL: realtimex_sdk-1.0.9.tar.gz
  • Upload date:
  • Size: 56.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for realtimex_sdk-1.0.9.tar.gz
Algorithm Hash digest
SHA256 ea3a06c6fbf12edf5f238d086c8a3a23e4c27f3932ba5afbf49d05cfb619add4
MD5 4a3acae8f11497129167947971850be9
BLAKE2b-256 784830020e20588628408d02fdbfeeb4fdc02b5f85e4e634daf36a182864a68c

See more details on using hashes here.

File details

Details for the file realtimex_sdk-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: realtimex_sdk-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for realtimex_sdk-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 531afa24d4b24919ef39a4d3f5906992379d5fd07aad95cfe710918a53155bd4
MD5 6bbf903f6154624f53d313babba5e111
BLAKE2b-256 488e666d2c732b14467c928d5691de4f14617a7896f33f81fd75ef14d73ecd3d

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