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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b1a3e52aab321319d6c4c56070c74f2974fdf24bb5cef5dad4d24a7bbedd7ca
|
|
| MD5 |
d270db774f1fc4962f03239715eb8b9a
|
|
| BLAKE2b-256 |
3efc1e5aef90a9d722efac8c7e3d208cc6d4195d7c0d847603ce778229248933
|
File details
Details for the file aboutcode_pipeline-0.2.1-py3-none-any.whl.
File metadata
- Download URL: aboutcode_pipeline-0.2.1-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
477ed53ea0065095d6b9512e07db351b9a7c85a722a6ceb57062b72ed6288d3b
|
|
| MD5 |
73edf4b262afa2d024347d46f8f2e66c
|
|
| BLAKE2b-256 |
2f8d550094f0bcebfb429f7db36e67cf542097c69cae409ec3daaf66a4ac9b2e
|