A code-first approach to managing PySpark jobs, built on the pyfecto framework and geared for Databricks environments
Project description
db-zpark-pyf 🐍
A lightweight framework for writing modular, testable, and expressive data workflows in Python using PySpark and pyfecto.
This is the Python sibling of db-zpark, following similar principles for separation of concerns, functional programming, and structured workflow execution.
✨ Key Concepts
- WorkflowTask: Top-level job orchestrator (e.g. for a pipeline or table group).
- WorkflowSubtask: A reusable unit of work representing a single table or logical step.
- WorkflowSubtasksRunner: A strategy to execute a collection of subtasks (e.g. sequentially).
- TaskEnvironment: Shared resources like
SparkSession, passed to all components. - Effect system: All execution is managed through
PYIO(frompyfecto) for clean logging, retrying, and chaining.
🚀 Example: Simulating a Delta Pipeline
Each table (users, orders, products) is handled by its own WorkflowSubtask, and all are coordinated by a WorkflowTask with a sequential runner.
🧪 Check the example here:
➡️ examples/delta_tables_workflow.py
🔁 Databricks Runtime Compatibility
| db-zpark-pyf | Pyfecto | Python | Spark | DBR |
|---|---|---|---|---|
| 0.1.0 | 0.2.0 | 3.11 | 3.5.x | 15.4 LTS |
🛠 Development Setup
📦 Install via pip
To use db-zpark-pyf in your own project:
pip install db_zpark_pyf
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 db_zpark_pyf-0.1.0.tar.gz.
File metadata
- Download URL: db_zpark_pyf-0.1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.9 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7959a27e375db9a014551c25fc38cf7138e70b547e58ec88c060d6788a63a01
|
|
| MD5 |
5e88df6c3df5fdb81424c808907f73d6
|
|
| BLAKE2b-256 |
533416c5f40a2a034032365a68487fbe94347992316d31c0950e92cee6f21b3f
|
File details
Details for the file db_zpark_pyf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: db_zpark_pyf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.9 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c733fe13e7663500485d0b3337d1daaa6242627517cb346bd36cf4e3b59f571
|
|
| MD5 |
ee68682470866bb7a604ddb55e14d960
|
|
| BLAKE2b-256 |
3fc7fcaba96143b631135e78fdb490ab50d034e52758c553d97ffaa995da3c7e
|