A lightweight pipeline orchestration library inspired by Luigi
Project description
nolead
A lightweight pipeline orchestration library.
Features
- Simple task annotation with
@Task()decorator - Automatic dependency resolution with
uses()function - Clean task completion with
done()function - Single entry point to run entire pipelines with
run_task()
Installation
pip install .
Quick Example
from nolead import Task, run_task, uses, done
@Task()
def fetch_data():
print("Fetching data...")
return [1, 2, 3, 4, 5]
@Task()
def process_data():
print("Processing data...")
# Get result from the dependent task
data = uses(fetch_data)
# Process the data
processed_data = [x * 2 for x in data]
return done(processed_data)
@Task()
def save_results():
print("Saving results...")
# Get result from the dependent task
processed_data = uses(process_data)
# Save the results
print(f"Results saved: {processed_data}")
return done(True)
if __name__ == "__main__":
# Execute the pipeline by running the final task
result = run_task(save_results)
print(f"Pipeline completed with result: {result}")
Advanced Usage
You can also use named tasks:
@Task(name="fetch_users")
def fetch_users():
# ... implementation ...
return users
# Later, refer to the task by name
users = uses("fetch_users")
Check out the examples/ directory for more complex usage scenarios.
Development
This project uses several development tools to ensure code quality:
- Ruff: For linting and code formatting
- Mypy: For static type checking
- Pytest: For unit testing
Development Setup
# Install development dependencies
make deps
Running Tests and Checks
# Run all checks (lint, type check, tests)
make all
# Run individual checks
make lint # Run linting
make check # Run type checking
make test # Run unit tests
# Clean up project
make clean
License
Apache 2.0 License
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 nolead-0.1.0.tar.gz.
File metadata
- Download URL: nolead-0.1.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30ecee100c6e0884558e1445b2edca6fd95ea6bcbbca3fb744f5a0e2eb00aca2
|
|
| MD5 |
eaf6f4a74c44dba1b4712a9023cbf991
|
|
| BLAKE2b-256 |
ccc6974a704d8626d4c857e37795403b0eb66b574e1262f2892adf4fb2165770
|
Provenance
The following attestation bundles were made for nolead-0.1.0.tar.gz:
Publisher:
publish-to-pypi.yml on ruivieira/nolead
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nolead-0.1.0.tar.gz -
Subject digest:
30ecee100c6e0884558e1445b2edca6fd95ea6bcbbca3fb744f5a0e2eb00aca2 - Sigstore transparency entry: 215737460
- Sigstore integration time:
-
Permalink:
ruivieira/nolead@73640344618bc2cef5dd3ec813137d20b835cb58 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ruivieira
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@73640344618bc2cef5dd3ec813137d20b835cb58 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nolead-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nolead-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8aa3890b54dfe9bf87409ea78d0207f9737eec2468bfa88f239789523df51fa5
|
|
| MD5 |
d91730150d677fbe1cad90aa9f152f10
|
|
| BLAKE2b-256 |
d1d808504d144c47c70cbb5e1d35fb8d2a95858654afcca5d766ead9574ab09d
|
Provenance
The following attestation bundles were made for nolead-0.1.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on ruivieira/nolead
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nolead-0.1.0-py3-none-any.whl -
Subject digest:
8aa3890b54dfe9bf87409ea78d0207f9737eec2468bfa88f239789523df51fa5 - Sigstore transparency entry: 215737469
- Sigstore integration time:
-
Permalink:
ruivieira/nolead@73640344618bc2cef5dd3ec813137d20b835cb58 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ruivieira
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@73640344618bc2cef5dd3ec813137d20b835cb58 -
Trigger Event:
release
-
Statement type: