Configure and execute pipelines with Python (similar to GitHub workflows or Jenkins pipelines).
Project description
pypeline - Define Your CI/CD Pipeline Once, Run It Anywhere
Pypeline lets you define your build, test, and deployment pipeline in a single YAML file and run it consistently across your local development environment and any CI/CD platform (GitHub Actions, Jenkins, etc.). No more platform-specific configurations – write once, run anywhere.
Key Features
-
Unified Pipeline Definition: Users can define their entire pipeline in a single YAML file, eliminating the need to switch between different syntaxes and configurations for different CI/CD tools.
-
Extensibility: Pypeline supports execution steps defined not only through installed Python packages but also from local scripts.
-
Execution Context: Allow sharing information and state between steps. Each step in the pipeline receives an execution context that can be updated during step execution.
-
Dependency Handling: Every step can register its dependencies and will only be scheduled if anything has changed.
-
Use as a Library:
PipelineConfigandPipelineLoader[T]are generic — define your own step base class and use pypeline's infrastructure (config loading, step resolution, shared context) to build custom pipelines for any domain, not just CI/CD. See Use Pypeline as a Library.
Installation
Use pipx (or your favorite package manager) to install and run it in an isolated environment:
pipx install pypeline-runner
This will install the pypeline command globally, which you can use to run your pipelines.
[!NOTE] The Python package is called
pypeline-runnerbecause the namepypelinewas already taken on PyPI. The command-line interface ispypeline.
Documentation: pypeline-runner.readthedocs.io
Quick Start
pipx install pypeline-runner
pypeline init --project-dir my-pipeline
cd my-pipeline
pypeline run
Walkthrough: Getting Started with Pypeline
To get started run the init command to create a sample project:
pypeline init --project-dir my-pipeline
The example project pipeline is defined in the pipeline.yaml file.
pipeline:
- step: CreateVEnv
module: pypeline.steps.create_venv
config:
bootstrap_script: .bootstrap/bootstrap.py
- step: WestInstall
module: pypeline.steps.west_install
description: Download external modules
- step: MyStep
file: steps/my_step.py
description: Run a custom script
This pipeline consists of three steps:
CreateVEnv: This is a built-in step that creates a Python virtual environment.WestInstall: This is a built-in step that downloads external modules using thewesttool.MyStep: This is a custom step that runs a script defined in thesteps/my_step.pyfile.
You can run the pipeline using the run command:
pypeline run --project-dir my-pipeline
Contributing
The project uses Poetry for dependencies management and packaging. You can set up the development environment using one of the following methods:
Option 1: Using Poetry directly (minimal setup)
poetry install
Option 2: Using pypeline-runner (runs the full pipeline including tests and checks)
pipx install pypeline-runner
pypeline run
To execute the test suite, call pytest inside Poetry's virtual environment via poetry run:
poetry run pytest
For those using VS Code there are tasks defined for the most common commands:
- run tests
- run all checks configured for pre-commit
- generate documentation
See the .vscode/tasks.json for more details.
This repository uses commitlint for checking if the commit message meets the conventional commit format.
Credits
This package was created with Copier and the browniebroke/pypackage-template project template.
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 pypeline_runner-1.29.2.tar.gz.
File metadata
- Download URL: pypeline_runner-1.29.2.tar.gz
- Upload date:
- Size: 35.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a47fc25e96e2ae44e75770de3f8fe837b3768325263da6ff80f74df4ef2956b9
|
|
| MD5 |
94c4bf18c558533da1b5bd57efa4db73
|
|
| BLAKE2b-256 |
c0dc8af032c0b626b889ab67e9c6e099598f553c268ba703687b394da61d9fcc
|
Provenance
The following attestation bundles were made for pypeline_runner-1.29.2.tar.gz:
Publisher:
ci.yml on cuinixam/pypeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypeline_runner-1.29.2.tar.gz -
Subject digest:
a47fc25e96e2ae44e75770de3f8fe837b3768325263da6ff80f74df4ef2956b9 - Sigstore transparency entry: 1155183289
- Sigstore integration time:
-
Permalink:
cuinixam/pypeline@2257cab710de035b66cbafb534aededb7271ea48 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/cuinixam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@2257cab710de035b66cbafb534aededb7271ea48 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pypeline_runner-1.29.2-py3-none-any.whl.
File metadata
- Download URL: pypeline_runner-1.29.2-py3-none-any.whl
- Upload date:
- Size: 42.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
176a9cb5b830d5f5837ef990c454dfde9db3b5e56d07869b0377f50708ba18c6
|
|
| MD5 |
28eb68fddd9894dfe317dabe19b9e1bb
|
|
| BLAKE2b-256 |
a48bd3e3ad067b6247b8e7ed43264c59db45f9449cd6f8acd01782546646634e
|
Provenance
The following attestation bundles were made for pypeline_runner-1.29.2-py3-none-any.whl:
Publisher:
ci.yml on cuinixam/pypeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pypeline_runner-1.29.2-py3-none-any.whl -
Subject digest:
176a9cb5b830d5f5837ef990c454dfde9db3b5e56d07869b0377f50708ba18c6 - Sigstore transparency entry: 1155183290
- Sigstore integration time:
-
Permalink:
cuinixam/pypeline@2257cab710de035b66cbafb534aededb7271ea48 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/cuinixam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@2257cab710de035b66cbafb534aededb7271ea48 -
Trigger Event:
push
-
Statement type: