Skip to main content

Runline U Python Client

This package provides a Python API for interacting with Runline's U platform. Use of Runline services requires an active Runline customer account and any required service credentials.

The package is publicly downloadable for customer convenience, but it remains subject to the included proprietary license.

Installation

pip install runline-u

For local development from this repository:

pip install -e ".[dev]"

Usage

from runline_u import UClient

client = UClient(host="eval.runline.com", port=40001)
client.subscribe(topic="ABC_CORP/MY_REPORT_GROUP/MY_REPORT_NAME")
client.publish(
    topic="ABC_CORP/OTHER_REPORT_GROUP/OTHER_REPORT_NAME",
    single_page_content=get_data_as_list_of_lists()
)

The direct host/port constructor remains supported for applications that use a single HubServer. Applications that need HubServer hot failover can use endpoint configuration:

from runline_u import UClient, UClientEndpoint

client = UClient(
    primary_endpoint=UClientEndpoint("primary-hub.example.com", 40001, secure=True),
    backup_endpoint=UClientEndpoint("backup-hub.example.com", 40001, secure=True),
)

Backup endpoints are optional. A missing, unconfigured, or identical backup HubServer endpoint is treated as no backup.

For password-based authentication, a backup AuthServer can be supplied. The primary AuthServer is always tried first:

token = client.get_authn_token(
    "https://primary-auth.example.com:40151/api/v1/basicauthntoken",
    password,
    backup_auth_url="https://backup-auth.example.com:40151/api/v1/basicauthntoken",
)
client.authenticate(token)

Applications can also authenticate with a saved token and configure renewal, which avoids storing user credentials in the application:

client.authenticate(
    saved_token,
    renew_auth_url="https://primary-auth.example.com:40151/api/v1/renewauthntoken",
    backup_renew_auth_url="https://backup-auth.example.com:40151/api/v1/renewauthntoken",
    token_renewal_interval_minutes=60,
)

UpTickXL backward compatibility

Existing UpTickXL Python applications can install the runline-u package and continue using legacy imports:

pip install runline-u
from uptickxl_client import UpTickXLClient

New applications should prefer the modern API:

from runline_u import UClient

Both import styles use the same underlying Runline U implementation. The legacy facade preserves the old top-level import path and public compatibility names, while falsey client host values intentionally use the modern RUNLINE-PROD1 default.

Complete Example

A complete example application is included with the runline-u package. It demonstrates subscriptions, wildcard subscriptions, callbacks for processing incoming reports, publishing reports, authentication, periodic publishing, and interaction with a supplied Excel workbook.

Copy editable examples into your current directory:

runline-u-copy-examples

Or choose a destination:

runline-u-copy-examples ./my-runline-u-examples

Update the copied u_example_server.py for your entity, endpoint/authentication details, and credentials, then run:

python runline-u-examples/u_example_server.py

Open the copied Client_of_U_Server_Example.xlsx while the example server is running to use the workbook as a front end for publishing requests and viewing responses.

Release Notes

Release notes are maintained in CHANGELOG.md.

Download files

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

Source Distribution

runline_u-0.1.3.tar.gz (66.8 kB view details)

Uploaded Source

Built Distribution

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

runline_u-0.1.3-py3-none-any.whl (61.1 kB view details)

Uploaded Python 3

File details

Details for the file runline_u-0.1.3.tar.gz.

File metadata

  • Download URL: runline_u-0.1.3.tar.gz
  • Upload date:
  • Size: 66.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for runline_u-0.1.3.tar.gz
Algorithm Hash digest
SHA256 62e04dfa6aed650e5c31791c9582365c7770cad16e5d04b9b1f77f087d48f929
MD5 78c374e54b69ccdbb0df5d5396e77c6b
BLAKE2b-256 54f93d7f0e50446b7a3c9fecd5493a41414fdea346c7f4c3eccaa27b48c9d5ca

See more details on using hashes here.

File details

Details for the file runline_u-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: runline_u-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 61.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for runline_u-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 387b01c2a2de2718d3001f274e879d19eb1b9a9ffd51b0c3faca9d75ec3897a4
MD5 2f559f5480f961fd13d8fc21b1d5134c
BLAKE2b-256 1d3dc17094b4d71e5f61419e24d41beef199e9f23d86fa0e5609032b296e3fed

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.2

2 files

Supported by

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