Skip to main content

A lightweight pipeline orchestration library inspired by Luigi

Project description

nolead

Python Tests

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nolead-0.1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nolead-0.1.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

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

Hashes for nolead-0.1.0.tar.gz
Algorithm Hash digest
SHA256 30ecee100c6e0884558e1445b2edca6fd95ea6bcbbca3fb744f5a0e2eb00aca2
MD5 eaf6f4a74c44dba1b4712a9023cbf991
BLAKE2b-256 ccc6974a704d8626d4c857e37795403b0eb66b574e1262f2892adf4fb2165770

See more details on using hashes here.

Provenance

The following attestation bundles were made for nolead-0.1.0.tar.gz:

Publisher: publish-to-pypi.yml on ruivieira/nolead

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for nolead-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8aa3890b54dfe9bf87409ea78d0207f9737eec2468bfa88f239789523df51fa5
MD5 d91730150d677fbe1cad90aa9f152f10
BLAKE2b-256 d1d808504d144c47c70cbb5e1d35fb8d2a95858654afcca5d766ead9574ab09d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nolead-0.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on ruivieira/nolead

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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