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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aboutcode_pipeline-0.2.0.tar.gz
.
File metadata
- Download URL: aboutcode_pipeline-0.2.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4da24e20473b361a3a855a4945f256c40e05dbe631ec3bd26bd7b0c83e6c815 |
|
MD5 | d2a228413f9abd0b580ea6a0623ab411 |
|
BLAKE2b-256 | ae15af19ecaec26067b576be8867b6eb298f39125404437ffabd872711565a50 |
File details
Details for the file aboutcode_pipeline-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: aboutcode_pipeline-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5b4bd12af308163eeb815686e7bba45ac9486f9d64a85cd1836f01d581fe6d1 |
|
MD5 | 8dc325fd6b8719b96e6ffb7fb2b369e8 |
|
BLAKE2b-256 | 096daf0f08f4fc77af36905cbde873044d365d1d16e9cb7ea5f7486c9685a94f |