Skip to main content

Process-based shared-memory compute pipelines built on pyshmem.

Project description

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

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, and serve.
  4. GUI guide for editing configs, validating locally, inspecting graphs, and launching viewers.
  5. Runtime guide for lifecycle, metrics, worker health, and synthetic inputs.
  6. Extensions guide for custom kernels, sources, and sinks.
  7. Control plane guide for remote management, SSE events, and the Python client.
  8. API reference, core API, and kernel catalog for the detailed reference surface.
  9. Troubleshooting for common setup and runtime issues.

Project details


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.2.tar.gz (143.6 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.2-py3-none-any.whl (140.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shmpipeline-1.0.2.tar.gz
  • Upload date:
  • Size: 143.6 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.2.tar.gz
Algorithm Hash digest
SHA256 143686614ff839c4b07660156adfe51dacc884030e87aa68d5e954728f9e376a
MD5 f80068bf0dc8fe092e07081bd3c4a356
BLAKE2b-256 8156d1d16e8cb7a4709fe50770546b081ceea6502c06b0e96797e56f95106453

See more details on using hashes here.

Provenance

The following attestation bundles were made for shmpipeline-1.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: shmpipeline-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 140.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 593edba8f3f600a5988ce887cf8d2f21f5526a474c644c795d5890b9b9976ce0
MD5 cd0df48036df241fa9ad3e6c1a6a2f88
BLAKE2b-256 25dcda482f772fedd981b1a69c5f86030d43e45975fd6835ef433ecab32050e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for shmpipeline-1.0.2-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 Pingdom Monitoring Sentry Error logging StatusPage Status page