Skip to main content

Creating a Registry

To create a registry follow the example below:

from typing import Any, Dict, Protocol, Tuple, runtime_checkable

from dynflow import Registry


@runtime_checkable
class BaseComponent(Protocol):
    def run(self, args: Tuple[Any], **kwargs: Dict[str, Any]) -> Any: ...


registry = Registry("ComponentRegistry", BaseComponent)

How to Register Componnets

from file1.py import registry

@registry.register('MyComponent1')
class MyComponent1:
    def run(self, args: Tuple[Any], **kwargs: Dict[str, Any]) -> Any:
        print("Running MyComponent with args:", args, "and kwargs:", kwargs)


@registry.register('MyComponent2')
class MyComponent2:
    def run(self, args: Tuple[Any], **kwargs: Dict[str, Any]) -> Any:
        print("Running MyComponent with args:", args, "and kwargs:", kwargs)        

Config File Examples

  1. JSON Format See config.json for an example of a JSON configuration file.

  2. YAML Format See config.yml for an example of a YAML configuration file.

  3. CFG Format See config.cfg for an example of a CFG configuration file.

For building build Pipeline from list of components use example

How to maintain

  1. Running unit-tests python -m unittest discover -s tests
  2. Removing Cache files pyclean -d jupyter package ruff -v .

Metadata

Release files for dynflow 0.1.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 dynflow 0.1.0
File Size Uploaded
dynflow-0.1.0.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dynflow 0.1.0
File Interpreter ABI Platform
dynflow-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / dynflow-0.1.0.tar.gz

Download URL dynflow-0.1.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bed004b73de3bc6812d05bc0b2a993f6cad910127d270e617cc9571366b2c364
BLAKE2b-256 checksum
How to use checksums
ac28130dc347ae0f7556e8eaab4261dba8e064b7b393598e53d725a61f70b553
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.24

Release files / dynflow-0.1.0-py3-none-any.whl

Download URL dynflow-0.1.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
904eeb8ae0910161609bfcff6ce1987755cb0420d441d3532ca999969730f6c5
BLAKE2b-256 checksum
How to use checksums
e47dff6f3fea5fc79d681382ebc87d05cdb64432756e939f1299fd79366a6799
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.24

Release history Release notifications | RSS feed

This release

0.1.0 This release

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