Python installation#

The following instructions are not a full installation, but help you get started with Connext right away by installing the RTI Connext Python API.

Note that a full Connext installation is required to use add-on libraries, the code generator, infrastructure services, tools, and utilities.

1. Install the Python API#

Install the Python API as follows:

pip install rti.connext

2. Get a free evaluation license#

Get a free evaluation license file at https://www.rti.com/free-trial.

After filling out a brief form, you will receive an email with the license file, rti_license.dat.

(You don’t need to download any additional installer at this point to continue using the Python API.)

Existing customers

If you have already purchased a Connext bundle, please follow the installation instructions here instead.

3. Run a Hello World program#

Run a simple Connext application to verify the installation in a directory of your choice.

Copy the rti_license.dat file to your installation directory, or set the environment variable RTI_LICENSE_FILE to the path of the license file.

Create a file named hello_publisher.py with the following content:

hello_publisher.py#
from time import sleep
import rti.connextdds as dds
from rti.types.builtin import String


participant = dds.DomainParticipant(0)
topic = dds.Topic(participant, "Hello", String)
writer = dds.DataWriter(topic)

for i in range(100):
    writer.write(String(f"Hello World #{i}"))
    sleep(1)

Create a file named hello_subscriber.py with the following content:

hello_subscriber.py#
import rti.connextdds as dds
import rti.asyncio
from rti.types.builtin import String

async def main():
    participant = dds.DomainParticipant(0)
    topic = dds.Topic(participant, "Hello", String)
    reader = dds.DataReader(topic)

    async for data in reader.take_data_async():
        print(data)

rti.asyncio.run(main())

In one terminal, run the subscriber:

$ python hello_subscriber.py

In another terminal, run the publisher:

$ python hello_publisher.py

You should see the following output in the subscriber terminal:

String(value='Hello World #0')
String(value='Hello World #1')
...

Congratulations! You have successfully installed the Connext Python API.

Next steps#

Now you’re ready to build your own Connext distributed applications. You can complete many of the tutorials with just the Python API, but some require the full Connext installation.

Learn Connext