Skip to main content

shmpipeline

Links

What It Is

shmpipeline builds local, process-based compute pipelines on top of named shared-memory streams from pyshmem.

It is a good fit when you want explicit dataflow, process isolation, and shared-memory throughput without giving up a small Python API, YAML-driven configuration, or interactive tooling.

Typical uses include:

  • adaptive optics and other real-time sensor / control pipelines
  • CPU or GPU processing graphs around shared-memory streams
  • validating, inspecting, and running pipelines from Python or the CLI
  • editing and supervising pipelines from a desktop GUI
  • extending the runtime with custom kernels, sources, and sinks

Good starting points:

Installation

Full docs: Installation guide

Choose the smallest install that matches your workflow:

  • Base runtime and CLI: pip install shmpipeline
  • GPU support: pip install "shmpipeline[gpu]"
  • Desktop GUI: pip install "shmpipeline[gui]"
  • Remote control service: pip install "shmpipeline[control]"
  • Editable source install: pip install -e .
  • Full local development environment: pip install -e ".[control,gpu,gui,test,docs]"

Quick smoke test against a checked-in example:

shmpipeline validate examples/affine_transformation/pipeline.yaml
shmpipeline describe examples/affine_transformation/pipeline.yaml --json

Open The GUI For The Observatory AO Example

Relevant docs:

From the repository root:

pip install "shmpipeline[gui]"
shmpipeline-gui examples/observatory_ao_system/pipeline.yaml

The full GUI can auto-launch a local loopback control server when you press Build or Start.

If you want to launch the server yourself first:

shmpipeline serve examples/observatory_ao_system/pipeline.yaml --host 127.0.0.1 --port 8765
shmpipeline-gui examples/observatory_ao_system/pipeline.yaml

Quickstart For The Python API

Full docs:

Minimal pipeline config:

shared_memory:
  - name: input_frame
    shape: [4]
    dtype: float32
    storage: cpu

  - name: scaled_frame
    shape: [4]
    dtype: float32
    storage: cpu

kernels:
  - name: scale_stage
    kind: cpu.scale
    input: input_frame
    output: scaled_frame
    parameters:
      factor: 2.0

Run it from Python:

import numpy as np

from shmpipeline import PipelineConfig, PipelineManager

config = PipelineConfig.from_yaml("pipeline.yaml")
manager = PipelineManager(config)
manager.build()
manager.start()

manager.get_stream("input_frame").write(np.array([1, 2, 3, 4], dtype=np.float32))
result = manager.get_stream("scaled_frame").read_new(timeout=2.0)
print(result)

manager.stop()
manager.shutdown()

If you prefer the CLI for the same pipeline:

shmpipeline validate pipeline.yaml
shmpipeline describe pipeline.yaml
shmpipeline run pipeline.yaml --duration 5.0
shmpipeline benchmark pipeline.yaml --duration 5.0 \
  --source input_frame:random:1000 --json

Popular Example Pages

More Documentation

Start with these in roughly the order most users need them:

  1. Configuration guide for the full YAML model, parameters, and shared-memory definitions.
  2. Worked examples for complete CPU, GPU, custom-operation, AO, and plugin-backed pipelines.
  3. CLI guide for validate, describe, run, benchmark, and serve.
  4. GUI guide for editing configs, validating locally, inspecting graphs, and launching viewers.
  5. Performance guide for benchmark baselines, lock polling, placement, and CPU/GPU tuning.
  6. Runtime guide for lifecycle, metrics, worker health, and synthetic inputs.
  7. Extensions guide for custom kernels, sources, and sinks.
  8. Control plane guide for remote management, SSE events, and the Python client.
  9. API reference, core API, and kernel catalog for the detailed reference surface.
  10. Troubleshooting for common setup and runtime issues.

Download files

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

Source Distribution

shmpipeline-1.0.4.tar.gz (147.2 kB view details)

Uploaded Source

Built Distribution

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

shmpipeline-1.0.4-py3-none-any.whl (141.7 kB view details)

Uploaded Python 3

File details

Details for the file shmpipeline-1.0.4.tar.gz.

File metadata

  • Download URL: shmpipeline-1.0.4.tar.gz
  • Upload date:
  • Size: 147.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for shmpipeline-1.0.4.tar.gz
Algorithm Hash digest
SHA256 e0abe31c3da337ea6c50b0b3cacada34911d6e93158911dd80412493ab75ae2a
MD5 ceef907c546f7d35be6febc1cd72676d
BLAKE2b-256 04a85c35def9855800198377120c436b9c762425aa7ed2e4a3bc0102833605c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for shmpipeline-1.0.4.tar.gz:

Publisher: pypi.yml on jacotay7/shmpipeline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shmpipeline-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: shmpipeline-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 141.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for shmpipeline-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b82594038d03d41b57ff3b852112088f55ad464b533163a6dd5cd2d5199df24b
MD5 9ea128a6239cd9c199583844caab6e54
BLAKE2b-256 7d8a9e53f48e9e5d9609df781acabf27102b830ca4da5992e29beb9bb545163d

See more details on using hashes here.

Provenance

The following attestation bundles were made for shmpipeline-1.0.4-py3-none-any.whl:

Publisher: pypi.yml on jacotay7/shmpipeline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page