Skip to main content

SDK for XRTC API - the next generation TCP streaming protocol

Project description



This is an SDK for XRTC API in Python. It implements the following features:

  • handling parallel HTTPs requests with asyncio/aiohttp, appropriate error management
  • loading login and connection configurations from .env file or from the environment
  • parsing configurations, serialized and deserialized request bodies and response data with Pydantic

To start using XRTC, please obtain your free API token at XRTC web site

This project is sponsored by Delta Cygni Labs Ltd with the headquarters in Tampere, Finland.


Installation from Pypi:

pip install xrtc

From source:

pip install .

Login credentials and connection URLs

Login credentials are taken from the environment or from a .env file (e.g. xrtc.env) placed to the work directory. Here is the format of a sample file:

# XRTC credentials

Usage examples

See examples directory in GitHub. Examples show discrete and continuous use of the XRTC API.

Simple set and get:

import os

from xrtc import *

async def main():

    # Connection credentials from environment variables
    os.environ["ACCOUNT_ID"] = "123456789"
    os.environ["API_KEY"] = "****"

    async with XRTC() as xrtc:
        # Upload data
        await xrtc.set_item(items=[{"portalid": "send", "payload": "sämple"}])

        # Download data and parse it
        print((await xrtc.get_item(portals=[{"portalid": "send"}])).dict())

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

xrtc-0.1.1.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

xrtc-0.1.1-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

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