Skip to main content

dxpipe-sdk

dxpipe-sdk is a Python SDK for DxPipe model editing, simulation execution, streaming result retrieval, and runtime command control.

Features

  • Token-based authentication against the DxPipe backend
  • Create models for supported workspace types and open existing models
  • Add, remove, connect, and configure components in the model graph
  • Save model snapshots and start simulation jobs
  • Poll or stream logs, plots, tables, inspect data, and container messages
  • Send runtime commands to components during online or transient execution

Requirements

  • Python 3.10 or later
  • A reachable DxPipe service endpoint
  • A DxPipe account that can obtain access tokens

Install

Install from a built wheel or from PyPI after publication:

pip install dxpipe-sdk

For local development in this repository:

pip install -e .

Quick Start

from dxpipe_sdk import DxPipeClient

client = DxPipeClient(
    base_url="http://localhost:8000",
    username="admin",
    password="your-password",
)

model = client.create_model(
    name="sdk-demo-model",
    workspace_type="lps_online",
    description="Created by dxpipe-sdk",
)

source = model.add_component("Source", position=(0, 0))
pipe = model.add_component("Pipe", position=(240, 0))
load = model.add_component("Load", position=(480, 0))

model.connect(source, "0", pipe, "0")
model.connect(pipe, "1", load, "0")

model.save()
job = model.run(timeout=120, image="dxpipe")

for message in job.stream_results(timeout=2):
    print(message.get("type"), message.get("key"))

Public API

The package currently exports these main entry points:

  • DxPipeClient
  • Model
  • Component
  • Connection
  • Job
  • MetaService
  • ResultStream
  • LogMessage
  • PlotMessage
  • TableMessage
  • InspectMessage
  • ContainerMessage
  • DxPipeError
  • AuthError
  • APIError
  • NotFoundError
  • ValidationError

Examples

  • examples/quickstart.py: create, save, run, and fetch results
  • examples/transient_streaming.py: stream transient online results and send commands during execution
  • examples/run_existing_model.py: open an existing model by ID and run it

Release Validation

Build and metadata check:

python -m build
python -m twine check dist/*

Minimal install smoke test with the built wheel:

python -m venv .smoke-venv
.smoke-venv\Scripts\python -m pip install dist\dxpipe_sdk-0.1.2-py3-none-any.whl
.smoke-venv\Scripts\python -c "from dxpipe_sdk import DxPipeClient, Model, Job, ResultStream; print('smoke ok')"

Release Workflow

If you want to publish a new version yourself, the repository now includes a reusable PowerShell script:

.\scripts\release.ps1 -Repository pypi -Token "pypi-..."

Recommended process:

  1. Update version in pyproject.toml.
  2. Run the release script from the dxpipe-sdk directory.
  3. Wait for PyPI index propagation if the published install smoke test fails on the first try.

The script performs these steps automatically:

  • clean dist/
  • python -m build
  • python -m twine check dist/*
  • python -m unittest tests.test_public_api
  • install the built wheel into a temporary virtual environment for a local smoke test
  • upload to PyPI or TestPyPI
  • create a fresh temporary virtual environment and install the published package for a post-publish smoke test

Examples:

# Full publish to PyPI
.\scripts\release.ps1 -Repository pypi -Token "pypi-..."

# Full publish to TestPyPI
.\scripts\release.ps1 -Repository testpypi -Token "pypi-..."

# Local validation only, without upload
.\scripts\release.ps1 -SkipUpload -SkipSmokeTest

You can also avoid passing tokens on the command line by using environment variables:

$env:PYPI_TOKEN = "pypi-..."
.\scripts\release.ps1 -Repository pypi

License

This package is currently distributed as proprietary software.

Metadata

Release files for dxpipe-sdk 0.2.0

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

Source distribution (sdist)

Source distribution for dxpipe-sdk 0.2.0
File Size Uploaded Provenance Actions
dxpipe_sdk-0.2.0.tar.gz 25.3 kB Without provenance Details for dxpipe_sdk-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dxpipe-sdk 0.2.0
File Interpreter ABI Platform Actions
dxpipe_sdk-0.2.0-py3-none-any.whl Python 3 none any Details for dxpipe_sdk-0.2.0-py3-none-any.whl

Total release size: 49.2 kB

Release files / dxpipe_sdk-0.2.0.tar.gz

Download URL dxpipe_sdk-0.2.0.tar.gz
Size 25.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fb677958bd98faceb74699d3075acd63947d3d74e4d9bb3434c4da76b8cdbffa
BLAKE2b-256 checksum
How to use checksums
ae82fefb241d2ff209be2c9ba70105e5f8ebae3aea956c59f46662b10910a66d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / dxpipe_sdk-0.2.0-py3-none-any.whl

Download URL dxpipe_sdk-0.2.0-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e92d6d777d23650f3ddda8b1a63ed91ca407fa33895d8ff715a7bc73f37692d8
BLAKE2b-256 checksum
How to use checksums
2977655dc0f78f41d1b257de88fe0bd294038ff7fa3979799eca229ce77a4730
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for dxpipe-sdk 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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