Executable Workflow
Documentation: https://namuan.github.io/py-executable-checklist
Source Code: https://github.com/namuan/py-executable-checklist
PyPI: https://pypi.org/project/py-executable-checklist/
Helper classes to develop executable workflow scripts
Installation
pip install py-executable-checklist
Example Usage
import logging
from argparse import ArgumentParser, RawDescriptionHelpFormatter
from py_executable_checklist.workflow import run_workflow, WorkflowBase
# Common functions across steps
# Workflow steps
class DoSomething(WorkflowBase):
"""
Go to this page
Copy the command
Run the command
Copy the output and paste it into the email
"""
username: str
def execute(self):
logging.info(f"Hello {self.username}")
# output
return {"greetings": f"Hello {self.username}"}
# Workflow definition
def workflow():
return [
DoSomething,
]
# Boilerplate
def parse_args():
parser = ArgumentParser(
description=__doc__, formatter_class=RawDescriptionHelpFormatter
)
parser.add_argument("-u", "--username", type=str, required=True, help="User name")
parser.add_argument(
"-v",
"--verbose",
action="store_true",
default=False,
dest="verbose",
help="Display context variables at each step",
)
return parser.parse_args()
def main(args):
context = args.__dict__
run_workflow(context, workflow())
if __name__ == "__main__":
args = parse_args()
main(args)
Development
- Clone this repository
- Requirements:
- Poetry
- Python 3.7+
- Create a virtual environment and install the dependencies
poetry install
- Activate the virtual environment
poetry shell
Validating build
make build
Release process
A release is automatically published when a new version is bumped using make bump. See .github/workflows/build.yml
for more details. Once the release is published, .github/workflows/publish.yml will automatically publish it to PyPI.
Metadata
Release files for py-executable-checklist 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py_executable_checklist-1.4.0.tar.gz | 3.9 kB | Without provenance | Details for py_executable_checklist-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_executable_checklist-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for py_executable_checklist-1.4.0-py3-none-any.whl |
Total release size: 7.5 kB
Release files / py_executable_checklist-1.4.0.tar.gz
| Download URL | py_executable_checklist-1.4.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
723ff35a724cade19618f40cc32520cc47f250ce6acc87ae2091b2dd55d1df75
|
|
BLAKE2b-256 checksum How to use checksums |
c596e403ad980a9e651536bc4003228f4115805d8c0dcde35e14cc4425269e22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.9.16 Linux/5.15.0-1031-azure
|
Release files / py_executable_checklist-1.4.0-py3-none-any.whl
| Download URL | py_executable_checklist-1.4.0-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
704d114b75fb2f359319708a46e975758bdbf3ae6bf09e6d285f50808c0fbfed
|
|
BLAKE2b-256 checksum How to use checksums |
a06b920d1623a90aaa64aecc5ca2f339a5af483f872ed76ecb223ab48c5ce776
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.9.16 Linux/5.15.0-1031-azure
|
Security for py-executable-checklist 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.