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.

Download files

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

Source Distribution

inhumate_rti-3.0.1.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

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

inhumate_rti-3.0.1-py3-none-any.whl (46.2 kB view details)

Uploaded Python 3

File details

Details for the file inhumate_rti-3.0.1.tar.gz.

File metadata

  • Download URL: inhumate_rti-3.0.1.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.21

File hashes

Hashes for inhumate_rti-3.0.1.tar.gz
Algorithm Hash digest
SHA256 f0b71f76987b0c7bae02f753cd0db0a24dc7a1c9b6b51b8a2204f99f27f52301
MD5 5f9c6361d1f17713cb7598e173d2f0ac
BLAKE2b-256 55203b8bb142aae4f886f874b2cd595011697a79c6a864289a851f0a69ece0fb

See more details on using hashes here.

File details

Details for the file inhumate_rti-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: inhumate_rti-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 46.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.21

File hashes

Hashes for inhumate_rti-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c598be760cc818c5d429d9ff4cb33987ac6e9c1b4335e0750a5328d351a04fad
MD5 52bab0de59f6d85ecfe90e04559eb328
BLAKE2b-256 e13850c05014b003b7c58c874b6f51186da1bdb8da33b5b6bd8bb91fa7f9f7c4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 files

3.0.0

2 files

2.1.0

2 files

2.0.8

2 files

2.0.7

2 files

2.0.6

2 files

2.0.5

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.9.3

2 files

1.9.2

2 files

1.9.1

2 files

1.9.0

2 files

1.8.1

2 files

1.8.0

2 files

1.7.3

2 files

1.7.2

2 files

1.7.1

2 files

1.7.0

2 files

1.6.4

2 files

1.6.3

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

2 files

1.5.4

2 files

1.5.3

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.0.93

2 files

0.0.92

2 files

0.0.91

2 files

0.0.90

2 files

0.0.27

2 files

0.0.26

2 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