Fastflow
Deploy to Kubernetes with helm chart
kubectl create ns fastflow
helm -n fastflow upgrade --install fastflow chart
To install in more namespaces, create the namespace and run the helm command again, this time with the
--skip-crds flag.
kubectl create ns fastflow-dev
helm -n fastflow-dev upgrade --install fastflow chart --skip-crds
Run examples
Apply examples
kubectl -n fastflow create -f examples/01-helloworld/workflow.yaml
kubectl -n fastflow create -f examples/02-digraph/workflow.yaml
Inspect results
kubectl -n fastflow get workflows
kubectl -n fastflow get tasks -l workflow=helloworld
Developer setup
For developing the fastflow project
Generate CRDS
python3 generate_crds.py
Create CRDS
Can also be installed by applying the helm chart
kubectl create -f chart/crds/kopfpeering-crd.yaml
find chart/crds/generated -name *.yaml -exec kubectl create -f '{}' \;
Delete CRDS
find chart/crds/generated -name *.yaml -exec kubectl delete -f '{}' \;
Virtual environment
python3 -m venv ~/venvs/fastflow
. ~/venvs/fastflow/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -e .
Run from outside cluster
Will use kubectl config for cluster access. Greate for development, and can run with debugger attached.
Prepare namespace
kubectl create ns fastflow-dev
kubectl -n fastflow-dev apply -f - << EOYML
apiVersion: kopf.dev/v1
kind: KopfPeering
metadata:
name: default
EOYML
Run as module (useful for debugger)
python3 -m fastflow \
--namespace fastflow-dev \
--dev
Run from cli
fastflow --namespace fastflow-dev --dev
Run Tests
Install test-requirements
python3 -m pip install -e . -r test-requirements.txt
Prepare namespace
kubectl create ns fastflow-test
kubectl -n fastflow-test apply -f test/kopf-test-peering.yaml
Run the tests as module
python3 -m pytest --color=yes
Run the tests from cli
pytest --color=yes
Building whl package and Docker image
Cleanup old packages
rm -Rf dist
Build package
python3 -m pip install build
python3 -m build
Build Docker image using minikube
rm -Rf dist && python3 -m build
eval $(minikube -p minikube docker-env)
DOCKER_BUILDKIT=1 docker build -t fastflow .
Use helm to run the image in Kubernetes, by specifying the image tag we just created
helm -n fastflow-dev upgrade --install --set imageOverride=fastflow fastflow chart
Example using custom Task implementations
The Operator needs to be able to load the custom code. Here is an example using the examples/03-farmlife example
workflow. This workflow uses custom tasks implemented in examples/03-farmlife/tasks-impl/farmlife.py.
Run the operator locally
Run the operator so it can load the custom code
fastflow --dev --namespace fastflow-dev examples/03-farmlife/tasks-impl/farmlife.py
Apply the example workflow
kubectl -n fastflow-dev create -f examples/03-farmlife/workflow.yaml
Metadata
Release files for python-fastflow 0.8.1
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 |
|---|---|---|---|---|
| python_fastflow-0.8.1.tar.gz | 34.0 kB | Without provenance | Details for python_fastflow-0.8.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_fastflow-0.8.1-py3-none-any.whl | Python 3 | none | any | Details for python_fastflow-0.8.1-py3-none-any.whl |
Total release size: 54.3 kB
Release files / python_fastflow-0.8.1.tar.gz
| Download URL | python_fastflow-0.8.1.tar.gz |
|---|---|
| Size | 34.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b943fe6478af703e2057cefe6442918f0eb1c9288f1d695ff7c45c50464ee71
|
|
BLAKE2b-256 checksum How to use checksums |
f01bb77e86111d0945750cf20864cfdde942797b08aafd76ffafee6dbc9f028c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / python_fastflow-0.8.1-py3-none-any.whl
| Download URL | python_fastflow-0.8.1-py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74900344e849a1c53cca9727bdc7aa67ea68270b06b1d9461ed7f5122d720124
|
|
BLAKE2b-256 checksum How to use checksums |
6a03b523f72b60b39a933ffa42ba20a9ced495098ea25ab4143209477b3c47b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for python-fastflow 0.8.1
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.