Skip to main content

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:

  1. They can't import Python modules. Code must be inlined into notebook cells, which fights every Python convention.
  2. They're nearly impossible to test locally. mssparkutils and notebookutils only 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; JDK 21 matches Fabric Runtime 2.0).

pip install "pyfabric-dev[runtime-2-0]"

The runtime-2-0 extra pins Spark, Delta, pandas, numpy, pyarrow and the other packages Fabric Runtime 2.0 ships, at the versions it ships, so local tests run on what Fabric runs. Without it you get only floors on Spark and Delta. pyfabric-check-runtime fails when a venv has drifted from those versions; run it in CI.

CLIs

After installing, five 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
pyfabric-check-runtime Check that Python and the installed packages match a Fabric runtime

The first 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

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.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyfabric-dev 0.7.0
File Size Uploaded Provenance Actions
pyfabric_dev-0.7.0.tar.gz 61.2 kB With provenance Details for pyfabric_dev-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyfabric-dev 0.7.0
File Interpreter ABI Platform Actions
pyfabric_dev-0.7.0-py3-none-any.whl Python 3 none any Details for pyfabric_dev-0.7.0-py3-none-any.whl

Total release size: 120.9 kB

Release files / pyfabric_dev-0.7.0.tar.gz

Download URL pyfabric_dev-0.7.0.tar.gz
Size 61.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5c629770bd3f6e3b22f0b81b9183fe38e8d6c9502563b1896a532f918a9375ba
BLAKE2b-256 checksum
How to use checksums
35f2901363165a70244d5bddaa3b248c865c1c04a149d2e77423a5ea9c617fb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 30, 2026.

Transparency log

Release files / pyfabric_dev-0.7.0-py3-none-any.whl

Download URL pyfabric_dev-0.7.0-py3-none-any.whl
Size 59.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb69910afccf8b6dd6db3f81e6a77d7149bc4c62466f935cd4c5fbf34a666b8d
BLAKE2b-256 checksum
How to use checksums
105f17145b5c0213c5a4b4c264a28dec13d0b35480acc5a145fcf68c9630cf53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 30, 2026.

Transparency log

Security for pyfabric-dev 0.7.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyfabric_dev-0.7.0.tar.gz

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 Nov 30, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page