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()

Groups and steps selection

from aboutcode.pipeline import BasePipeline
from aboutcode.pipeline import group

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

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

    @group("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.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

aboutcode_pipeline-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aboutcode_pipeline-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for aboutcode_pipeline-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d6917d56bb5cf01a626cf50d0a799aedf8a2aff167974de4b2190e493c8e7a76
MD5 1c53100c3237d711b6401a51b1313cde
BLAKE2b-256 abfbe3681ec948132e111b1858c819e2ce5cb16b1ae85659ef24a170247d0ead

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aboutcode_pipeline-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07ac77ee76d0acc237c5dfbcdeab2fd3289e24cbd503e1dc54178990a9466ca6
MD5 e4c2d4fbd8df5639683f621517d8cdda
BLAKE2b-256 6d97e36c49a998606e8f14549f03cabe7901362799c50346823b4e759ba6aed5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page