Skip to main content

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.4.0. 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).

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

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

pyfabric_dev-0.4.0.tar.gz (52.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyfabric_dev-0.4.0-py3-none-any.whl (55.6 kB view details)

Uploaded Python 3

File details

Details for the file pyfabric_dev-0.4.0.tar.gz.

File metadata

  • Download URL: pyfabric_dev-0.4.0.tar.gz
  • Upload date:
  • Size: 52.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyfabric_dev-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3cd3b39ddeea1c784a529879f58294be7faa7e99c5b76b7e8db9abf246f196b3
MD5 6f41adea94a13657a1b011ddf2f5a4e8
BLAKE2b-256 38bf66b21dadb944a23342e564eedf8a0c7b718a81eac0173af10d7d2a0ae5d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfabric_dev-0.4.0.tar.gz:

Publisher: publish.yml on CashHero/pyfabric-dev

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyfabric_dev-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pyfabric_dev-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 55.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyfabric_dev-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26c3b3fc44fe3af4b2a92c056fc156af4b1de42b7ea4e064af433ed9a58deabc
MD5 48d0109f9807c735775c2c0d9700cc3d
BLAKE2b-256 42dec7bf6d8a0afa686942b52b3bff2069199eee08b1166fd023db5513356c7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfabric_dev-0.4.0-py3-none-any.whl:

Publisher: publish.yml on CashHero/pyfabric-dev

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page