Skip to main content

Pypeworks

Pypeworks is an open-source framework for implementing parallelized dataflows in Python.

Install

Pypeworks is available through the PyPI repository and can be installed using pip:

pip install pypeworks

Quick start

Pypeworks' central concept is that of the Pipework. A pipework may be defined as a directed acylic graph, wherein each Node serves as a processing unit, taking in data, transforming it, and forwarding it to the next node, until the exit node is reached.

Pypeworks offers two ways to set-up a Pipework. A pipework may be instantiated and constructed on the fly:

from pypeworks import (
    Pipework, 
    Node,
    Connection
)

pipework = (

   Pipework(

      min = Node(
         lambda xs: ("min", min(xs))
      ),

      mean = Node(
         lambda xs: ("mean", sum(xs) / len(xs))
      ),

      max = Node(
         lambda xs: ("max", max(xs))
      ),

      connections = [
         Connection( "enter" , "min"  ),
         Connection( "enter" , "mean" ),
         Connection( "enter" , "max"  ),
         Connection( "min"   , "exit" ),
         Connection( "mean"  , "exit" ),
         Connection( "max"   , "exit" )
      ]

   )

)

print(
   dict(
      pipework([1, 2, 3, 4, 5, 6, 7, 8])
   )
) # {'max': 8, 'mean': 4.5, 'min': 1}

Alternatively, a pipework may be implemented as a templatable, reusable class:

from pypeworks import (
   Pipework
)

class Pipework(Pipework):

   @Pipework.connect(input = "enter")
   @Pipework.connect(output = "exit")
   def min(self, xs : list[int]):
      return ("min", min(xs))

   @Pipework.connect(input = "enter")
   @Pipework.connect(output = "exit")
   def mean(self, xs : list[int]):
      return ("mean", sum(xs) / len(xs))

   @Pipework.connect(input = "enter")
   @Pipework.connect(output = "exit")
   def max(self, xs : list[int]):
      return ("max", max(xs))

print(
   dict(
      Pipework()([1, 2, 3, 4, 5, 6, 7, 8])
   )
) # {'max': 8, 'mean': 4.5, 'min': 1}

Metadata

Release files for pypeworks 0.3.1

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

Source distribution (sdist)

Source distribution for pypeworks 0.3.1
File Size Uploaded Provenance Actions
pypeworks-0.3.1.tar.gz 39.8 kB Without provenance Details for pypeworks-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 86.1 kB

Release files / pypeworks-0.3.1.tar.gz

Download URL pypeworks-0.3.1.tar.gz
Size 39.8 kB
Tags Source
SHA-256 checksum
How to use checksums
037f12df57f661f41650118399a2cd1d9d316fadbc0f4c91f6f0804de6554be9
BLAKE2b-256 checksum
How to use checksums
bdce91a18221c4c47a14eaa043baf322c845e33b40b823ec3bd6a595c4af8e05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / pypeworks-0.3.1-py3-none-any.whl

Download URL pypeworks-0.3.1-py3-none-any.whl
Size 46.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3de6444bb740c99ff18af2506cc26545e5a839eb9fcfdad53191c85a822af49
BLAKE2b-256 checksum
How to use checksums
257d03d294cb89cfc416781541d99a561cbc6d877132ab91cf203909d8e9f329
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Security for pypeworks 0.3.1

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