Local development framework for Microsoft Fabric notebooks: source-of-truth Python, generated .Notebook artifacts, mocked Fabric APIs, parallel local testing.
Project description
pyfabric-dev
A development framework for Microsoft Fabric
notebooks. Write plain Python modules in src/, generate Fabric .Notebook
artifacts from them, and run + test everything locally with mocked Fabric APIs.
Status:
v0.5.2. APIs are stabilizing but pre-1.0; minor versions may break.Disclaimer: not affiliated with or endorsed by Microsoft.
Why
Fabric notebooks have two pain points:
- They can't
importPython modules. Code must be inlined into notebook cells, which fights every Python convention. - They're nearly impossible to test locally.
mssparkutilsandnotebookutilsonly exist in the Fabric runtime.
pyfabric-dev solves both:
- A source-of-truth pattern: you write modules under
src/; the generator compiles them into.Notebook/artifacts (committed to git, ready for Fabric Git integration). - A local execution layer: mocks
mssparkutils/notebookutils, sets up PySpark + Delta with a per-checkout Derby metastore, and runs your notebooks and pipelines off-cloud. - A parallel test runner that mirrors a Fabric pipeline's batching, so the same suite that passes locally is the one that runs in CI.
Install
Requires Python 3.13 or 3.14 and a JDK 17+ on $PATH (for PySpark).
pip install pyfabric-dev
CLIs
After installing, four console scripts are on your PATH:
| Command | Purpose |
|---|---|
pyfabric-generate |
Compile src/ modules into Fabric .Notebook/ artifacts |
pyfabric-run-notebook |
Execute one notebook locally (resolves %run deps) |
pyfabric-run-pipeline |
Execute a pipeline-content.json DAG locally |
pyfabric-test |
Parallel pytest runner with isolated per-worker metastores |
All four accept --project-root <dir> (default: CWD).
Five-minute walkthrough
git clone https://github.com/CashHero/pyfabric-dev.git
cd pyfabric-dev/examples/minimal-medallion
pyfabric-generate --project-root .
pyfabric-test --project-root . --config config/test_batches.json
pyfabric-run-pipeline --project-root . --dry-run sales_etl
examples/minimal-medallion/ is a working bronze/silver/gold pipeline over
toy sales data. See its README.md for details.
Documentation
- Getting started
- Source-of-truth pattern — how
src/→.Notebook/works - Local execution — how the runner mocks Fabric APIs
- Testing — fixtures, parallelism, batching
- Hooks reference — customizing the runners for your project
Used in production by
- CashHero — the internal pipeline this framework was extracted from.
Contributing
See CONTRIBUTING.md. PRs welcome.
License
Apache 2.0. See NOTICE for attribution.
Project details
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 pyfabric_dev-0.5.2.tar.gz.
File metadata
- Download URL: pyfabric_dev-0.5.2.tar.gz
- Upload date:
- Size: 54.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57f2800857424934b325d73d81784d897768576467a735a79f77772a894c51fd
|
|
| MD5 |
41a8309e90b4cde3f6ee09c13b974734
|
|
| BLAKE2b-256 |
c2718b39de347c39492751b22332a469a35db622f14031e15d615b0b56e7f683
|
Provenance
The following attestation bundles were made for pyfabric_dev-0.5.2.tar.gz:
Publisher:
publish.yml on CashHero/pyfabric-dev
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyfabric_dev-0.5.2.tar.gz -
Subject digest:
57f2800857424934b325d73d81784d897768576467a735a79f77772a894c51fd - Sigstore transparency entry: 1809692299
- Sigstore integration time:
-
Permalink:
CashHero/pyfabric-dev@e8adc502bc960b518d3cad53a4edd0a34c685a67 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/CashHero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e8adc502bc960b518d3cad53a4edd0a34c685a67 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyfabric_dev-0.5.2-py3-none-any.whl.
File metadata
- Download URL: pyfabric_dev-0.5.2-py3-none-any.whl
- Upload date:
- Size: 56.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3301c4a4b7f873e053ada6648afa613a6119293693b2be0bc4fa6bd4450cfea8
|
|
| MD5 |
fcb3f37dd0ca9b5f8c6883e91b273990
|
|
| BLAKE2b-256 |
d529a12270d494d383081a5dc8dca743d07a3d6281e9cf39b1ebfbac6d02a22f
|
Provenance
The following attestation bundles were made for pyfabric_dev-0.5.2-py3-none-any.whl:
Publisher:
publish.yml on CashHero/pyfabric-dev
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyfabric_dev-0.5.2-py3-none-any.whl -
Subject digest:
3301c4a4b7f873e053ada6648afa613a6119293693b2be0bc4fa6bd4450cfea8 - Sigstore transparency entry: 1809692314
- Sigstore integration time:
-
Permalink:
CashHero/pyfabric-dev@e8adc502bc960b518d3cad53a4edd0a34c685a67 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/CashHero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e8adc502bc960b518d3cad53a4edd0a34c685a67 -
Trigger Event:
release
-
Statement type: