Tiny Argo Workflows python devkit
Project description
Tinyfan
Tinyfan: Minimalist Data Pipeline Kit - Generate Argo Workflows with Python
Features
- Generate Argo Workflows manifests from Python data pipeline definitions.
- Ease of Use and highly extendable
- Intuitive data model abstraction: let Argo handle orchestration—we focus on the data.
- Argo Workflows is notably lightweight and powerful – and so are we!
- Enhanced DevOps Experience: easly testable, Cloud Native and GitOps-ready.
Our Goal
- Minimize mental overhead when building data pipelines.
Not Our Goal
- Full-featured orchestration framework: We don't aim to be a battery-powered, comprehensive data pipeline orchestration solution.
No databases, web servers, or controllers—just a data pipeline compiler. Let's Algo Workflows handle all the complexity.
Installation
# Requires Python 3.10+
pipx install tinyfan
Tiny Example
# main.py
# Asset definitions
from tinyfan import asset
@asset(schedule="*/3 * * * *")
def world() -> str:
return "world"
@asset()
def greeting(world: str):
print("hello " + world)
# Apply the changes to argo workflow
tinyfan template main.py | kubectl apply -f -
Real World Example (still tiny though!)
from tinyfan import GcsStore, Flow
import os
# Build time configs:
# Pod configs are settled on the build time.
image = os.environ["IMAGE_NAME"]
# Runtime Configs:
# Other configs are revisited on runetime.
some_secret = os.environ[""]
# Flow is refer to the Argo Workflow Object.
# Flow configs are applied to all of child assets
flow = Flow(
name="flow",
image=os.environ["IMAGE_NAME"],
envSecrets=[""],
envConfigMaps=[""],
as_default=True,
)
image = os.environ['IMAGE_NAME'],
sa_name = os.environ['SERVICE_ACCOUNT_NAME'],
gcs_store = GcsStore(),
naive_store = NaiveStore()
flow = Flow(
store=naive_store,
)
# authorized by workload-identity-federation
@asset(
schedule = "*/10 * * * *",
image = "python3:alpine",
store = NaiveStore(),
)
def target() -> str:
return "world"
@asset(
schedule = "*/10 * * * *",
image = "python3:alpine",
store = GcsStore(),
)
def target() -> str:
return "world"
License
This project is licensed under the MIT 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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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
tinyfan-0.0.1-py3-none-any.whl
(12.4 kB
view details)
File details
Details for the file tinyfan-0.0.1-py3-none-any.whl.
File metadata
- Download URL: tinyfan-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69d5bc2486419274c17ac3b03b6bfc304d4817e0711444ca777b8e18ebbc85c9
|
|
| MD5 |
7a9b85ac371ab7d358147d79debb0b89
|
|
| BLAKE2b-256 |
750609ec5b7236b6f897a391b78a57b37dcbd1dfb34139ff81e1831a42be33c1
|