Skip to main content

Inhumate RTI Client for Python

This is the Python client for the Inhumate RTI (RunTime Infrastructure), part of the Inhumate Suite.

See the Inhumate Suite documentation for more in-depth topics and an overview of the software suite.

Installing

pip install inhumate-rti

Quick Start

import inhumate_rti as RTI

rti = RTI.Client(application="Python RTI App")
rti.wait_until_connected()

def on_connect():
    print("Connected")
rti.on("connect", on_connect)

def on_hello(content): 
    print(f"Received: {content}")
rti.subscribe_text("hello", on_hello)

rti.publish_text("hello", "Hello World!")

Note that the Python client is multi-threaded by default. subscribe callbacks are called from a separate receive thread. Depending on your use case, you might want to use the single-threaded pattern and main_loop constructor argument:

import inhumate_rti as RTI

def main_loop():
    print("." if rti.connected else "x", end="", flush=True)
    if rti and rti.connected: rti.publish_text("foo", "bar")

# connect after initializing, otherwise 'rti' will be undefined in the main loop
rti = RTI.Client(application="Python RTI App", main_loop=main_loop, main_loop_idle_time=1.0)
rti.connect() # blocks further execution

For a more complete usage example, see usage_example.py and usage_example_main_loop.py.

Running tests

Clone the project from GitHub, and in the python folder:

python -m virtualenv .venv
. .venv/bin/activate
pip install -r inhumate_rti/requirements.txt 
pip install -r test/requirements.txt
pytest

Feedback & Contributing

Feedback and contributions of any kind are welcome.

Metadata

Release files for inhumate-rti 3.0.5

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

Source distribution (sdist)

Source distribution for inhumate-rti 3.0.5
File Size Uploaded
inhumate_rti-3.0.5.tar.gz 30.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for inhumate-rti 3.0.5
File Interpreter ABI Platform
inhumate_rti-3.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 78.2 kB

Release files / inhumate_rti-3.0.5.tar.gz

Download URL inhumate_rti-3.0.5.tar.gz
Size 30.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ac01f5c9bd5e805044482a38dadea65603380740321015544b756cf7d8294f89
BLAKE2b-256 checksum
How to use checksums
d60abeacff26ed35c50e7acafe068557b48073d90299f42a25a7834b26ef9349
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release files / inhumate_rti-3.0.5-py3-none-any.whl

Download URL inhumate_rti-3.0.5-py3-none-any.whl
Size 47.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e0daf80ab22104cc781813e7777d75e0cb502af00fb92d3834d39e9bc47a8a1
BLAKE2b-256 checksum
How to use checksums
bdd05ad15f3f5fcdca635e7d15919ba4209c82741648aa0c252a85911ade3d00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release history Release notifications | RSS feed

3.0.7

2 release files

3.0.6

2 release files

This release

3.0.5 This release

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.9.3

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.93

2 release files

0.0.92

2 release files

0.0.91

2 release files

0.0.90

2 release files

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