Skip to main content

Build and Install

Build from pip

pip install intrepid-python-sdk

Build from sources

Create a new conda environment with conda create -n intrepid python=3.10

Activate environment with

conda activate intrepid

Install poetry with pip install poetry and all requirements pip install -r requirements.txt

Build Python Intrepid SDK

poetry build
poetry install

Example for showcasing Python bindings

Create Python Node

A Python node is created from dashboard and rendered according to the Python function signature that is attached.

A Python SDK allows to

  1. register any user-defined function to the runtime and
  2. execute the service that exposes such function(s)

In the example below, two functions are declared and registered to the Intrepid runtime. Finally the runtime is started and made ready for execution

import asyncio
from intrepid_python_sdk import Intrepid
from pydantic import BaseModel


def simple_node(a: int, b: int) -> int:
    """Example node that adds two numbers"""
    return a + b

def simple_node_with_defaults(a: int = 10, b: int = 10) -> int:
    """Example node that adds two numbers (with default values)"""
    return a + b


if __name__ == "__main__":
    runtime = Intrepid(namespace="test")
    runtime.register_node(simple_node)
    runtime.register_node(simple_node_with_defaults, label="SimpleNodeDefault", description="A node handling types with default values")
    runtime.start("0.0.0.0", 8765)

The code above can be saved to my_node.py and executed with python my_node.py

You can now connect Intrepid Agent to 0.0.0.0:8765

Start Intrepid Runtime Core

Execute the Intrepid runtime (intrepid-agent) with arguments --web to expose the control dashboard to localhost --load ws://<host>:<port> where the service is running

./intrepid-agent --web --load ws://localhost:8765

This should show

  ╔══════════════════════════════════╗
  ║                                  ║
  ║ 🚀  Web service is running on:   ║
  ║                                  ║
  ║ 🔗  http://127.0.0.1:9180        ║
  ║                                  ║
  ╚══════════════════════════════════╝

Point the browser to http://127.0.0.1:9180 and search for the exposed nodes (right click and search) At this point you can create the behavior you need, by importing and connecting the nodes you need. Click Run to execute such behavior.

Publish node

Not yet implemented.

Examples

An exhaustive list of sample nodes is provided in examples/agent/run_demo.py.

An example to call ROS2 utilities is provided in examples/agent/ros2_demo.py

Metadata

Release files for intrepid-python-sdk 0.1.15

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

Source distribution (sdist)

Source distribution for intrepid-python-sdk 0.1.15
File Size Uploaded
intrepid_python_sdk-0.1.15.tar.gz 37.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for intrepid-python-sdk 0.1.15
File Interpreter ABI Platform
intrepid_python_sdk-0.1.15-py3-none-any.whl Python 3 none any Details

Total release size: 84.3 kB

Release files / intrepid_python_sdk-0.1.15.tar.gz

Download URL intrepid_python_sdk-0.1.15.tar.gz
Size 37.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a10ad975a88b07c8a343ed860d6b251c048be2a2c76fa248236ff3603fcaecc7
BLAKE2b-256 checksum
How to use checksums
090289ac84c3b285a36ffa0aaa569ddf1e8cb7a651ed6e358f0c8527a8d47103
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / intrepid_python_sdk-0.1.15-py3-none-any.whl

Download URL intrepid_python_sdk-0.1.15-py3-none-any.whl
Size 47.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
642a207fd976255492c13ea446d3829e806fbc2f88da81b63786c5ba01f16b1d
BLAKE2b-256 checksum
How to use checksums
9d45f661f9d02ed0de4e504206e1e69747e673813407f8125da01f389c9450db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.1.15 This release

2 release files

0.1.11

1 release file

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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