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
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.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6917d56bb5cf01a626cf50d0a799aedf8a2aff167974de4b2190e493c8e7a76 |
|
MD5 | 1c53100c3237d711b6401a51b1313cde |
|
BLAKE2b-256 | abfbe3681ec948132e111b1858c819e2ce5cb16b1ae85659ef24a170247d0ead |
File details
Details for the file aboutcode_pipeline-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: aboutcode_pipeline-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07ac77ee76d0acc237c5dfbcdeab2fd3289e24cbd503e1dc54178990a9466ca6 |
|
MD5 | e4c2d4fbd8df5639683f621517d8cdda |
|
BLAKE2b-256 | 6d97e36c49a998606e8f14549f03cabe7901362799c50346823b4e759ba6aed5 |