Skip to main content

Registry Stack Python SDK

PyPI version License: MIT Python Version Code style: black

A comprehensive Python SDK for the Registry Stack, providing Python interfaces for Operator Registry, Pipeline Registry, Executor, and Recorder operations.

Installation

pip install sw-registry-stack

For development:

pip install sw-registry-stack[dev]

Quick Start

Executor Operations

import asyncio
from sw_registry_stack import Executor

async def main():
    # Initialize the executor
    executor = Executor(
        base_path="/tmp/executor",
        bridge_lib_path="/path/to/libexecutor_bridge.so",
        debug=True
    )
    
    await executor.initialize()
    
    # Create a pipeline
    result = await executor.create(
        config={
            "json_file": "/path/to/pipeline.json",
            "background": True
        },
        device_id="my-device-001",
        enable_logging=True,
        on_unified_log=lambda entry: print(f"Log: {entry.message} from {entry.source}")
    )
    
    if result.status == "success":
        print(f"Pipeline created: {result.data.pipeline_id}")
        
        # Start the pipeline
        await executor.start(result.data.run_id)
        
        # Stop the pipeline
        await executor.stop(result.data.run_id)
        
        # Destroy the pipeline
        await executor.destroy(result.data.run_id)

if __name__ == "__main__":
    asyncio.run(main())

Unified Logging

The SDK provides structured logging with rich context:

from sw_registry_stack.modules.executor.utils.unified_logging import (
    UnifiedLogEntry, LOG_LEVELS, LOG_SOURCES
)

def log_callback(entry: UnifiedLogEntry):
    print(f"Log: {entry.message}")
    print(f"Level: {entry.level} ({LOG_LEVELS(entry.level).name})")
    print(f"Source: {entry.source} ({LOG_SOURCES(entry.source).name})")
    print(f"Node: {entry.node_id}")
    print(f"Pipeline: {entry.pipeline_id}")
    print(f"Data: {entry.data}")

Log Sources

  • NODE (0): C++ pipeline nodes
  • EXECUTOR (1): Executor core operations
  • PIPELINE (2): Pipeline management
  • SDK (3): Python SDK operations
  • SYSTEM (4): System components

Log Levels

  • DEBUG (0): Detailed debugging information
  • INFO (1): General information
  • WARNING (2): Warning messages
  • ERROR (3): Error conditions
  • CRITICAL (4): Critical failures

API Reference

Executor

Executor(base_path, bridge_lib_path, debug=False)

Create a new Executor instance.

Parameters:

  • base_path: str - Base directory for executor operations
  • bridge_lib_path: str - Path to the native bridge library
  • debug: bool - Enable debug logging

await executor.initialize()

Initialize the executor and load the native bridge.

await executor.create(config, device_id=None, enable_logging=False, on_unified_log=None)

Create a new pipeline.

Parameters:

  • config: dict - Pipeline configuration
  • device_id: str - Device identifier
  • enable_logging: bool - Enable unified logging
  • on_unified_log: callable - Logging callback function

Returns: PipelineCreateResponse

await executor.start(run_id)

Start a pipeline execution.

await executor.stop(run_id)

Stop a pipeline execution.

await executor.destroy(run_id)

Destroy a pipeline and clean up resources.

Metadata

Release files for anthriq-registry-stack 1.0.0

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

Built distribution (wheel)

Table of built distributions (wheels) for anthriq-registry-stack 1.0.0
File Interpreter ABI Platform Actions
anthriq_registry_stack-1.0.0-py3-none-any.whl Python 3 none any Details for anthriq_registry_stack-1.0.0-py3-none-any.whl

Release files / anthriq_registry_stack-1.0.0-py3-none-any.whl

Download URL anthriq_registry_stack-1.0.0-py3-none-any.whl
Size 142.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cab6f84d1d5361a30e8231132273b144d6c5a1ea3909a17052d040bfe4c71c43
BLAKE2b-256 checksum
How to use checksums
d888824417d826b20751942c2fe0f65b7c90240a931bc5458d5c636813a7101c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for anthriq-registry-stack 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

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