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.
Metadata
Release files for pyfabric-dev 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyfabric_dev-0.5.2.tar.gz | 54.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyfabric_dev-0.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 110.2 kB
Release files / pyfabric_dev-0.5.2.tar.gz
| Download URL | pyfabric_dev-0.5.2.tar.gz |
|---|---|
| Size | 54.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57f2800857424934b325d73d81784d897768576467a735a79f77772a894c51fd
|
|
BLAKE2b-256 checksum How to use checksums |
c2718b39de347c39492751b22332a469a35db622f14031e15d615b0b56e7f683
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 13, 2026.
Transparency logRelease files / pyfabric_dev-0.5.2-py3-none-any.whl
| Download URL | pyfabric_dev-0.5.2-py3-none-any.whl |
|---|---|
| Size | 56.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3301c4a4b7f873e053ada6648afa613a6119293693b2be0bc4fa6bd4450cfea8
|
|
BLAKE2b-256 checksum How to use checksums |
d529a12270d494d383081a5dc8dca743d07a3d6281e9cf39b1ebfbac6d02a22f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 13, 2026.
Transparency log