Skip to main content

AboutCode Pipeline library. Execute code in steps.

Project description

aboutcode.pipeline

Define and run pipelines.

Install

pip install aboutcode.pipeline

Define and execute a pipeline

from aboutcode.pipeline import BasePipeline

class PrintMessages(BasePipeline):
    @classmethod
    def steps(cls):
        return (cls.step1,)

    def step1(self):
        print("Message from step1")

PrintMessages().execute()

Options and steps selection

from aboutcode.pipeline import BasePipeline
from aboutcode.pipeline import optional_step


class PrintMessages(BasePipeline):
    @classmethod
    def steps(cls):
        return (cls.step1, cls.step2)

    def step1(self):
        print("Message from step1")

    @optional_step("foo")
    def step2(self):
        print("Message from step2")


# Execute pipeline with group selection
run = PrintMessages(selected_groups=["foo"])
exitcode, error = run.execute()

# Execute pipeline with steps selection
run = PrintMessages(selected_steps=["step1"])
exitcode, error = run.execute()

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

aboutcode_pipeline-0.2.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

aboutcode_pipeline-0.2.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file aboutcode_pipeline-0.2.1.tar.gz.

File metadata

  • Download URL: aboutcode_pipeline-0.2.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aboutcode_pipeline-0.2.1.tar.gz
Algorithm Hash digest
SHA256 4b1a3e52aab321319d6c4c56070c74f2974fdf24bb5cef5dad4d24a7bbedd7ca
MD5 d270db774f1fc4962f03239715eb8b9a
BLAKE2b-256 3efc1e5aef90a9d722efac8c7e3d208cc6d4195d7c0d847603ce778229248933

See more details on using hashes here.

File details

Details for the file aboutcode_pipeline-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for aboutcode_pipeline-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 477ed53ea0065095d6b9512e07db351b9a7c85a722a6ceb57062b72ed6288d3b
MD5 73edf4b262afa2d024347d46f8f2e66c
BLAKE2b-256 2f8d550094f0bcebfb429f7db36e67cf542097c69cae409ec3daaf66a4ac9b2e

See more details on using hashes here.

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