Skip to main content

Unofficial Microsoft Fabric deployment toolkit by Obvience

Project description

obv-fab-deploy

Unofficial Microsoft Fabric deployment toolkit built by obviEnce.

Automates deployment of Lakehouses, Notebooks, Semantic Models, Reports, and Data Pipelines across Microsoft Fabric workspaces using direct REST API calls.

Install

pip install obv-fab-deploy

Authentication

In a Fabric notebook — no setup needed, uses DefaultAzureCredential automatically.

From a regular Python environment — pass a Service Principal credentials dict:

creds = {
    "tenant_id": "your-tenant-id",
    "client_id": "your-client-id",
    "client_secret": "your-client-secret",
}

Quick Start

from obv_fab_deploy import (
    deploy_lakehouse_with_shortcuts,
    deploy_notebook,
    deploy_semantic_model,
    deploy_report,
    deploy_pipeline,
)

creds = {
    "tenant_id": "...",
    "client_id": "...",
    "client_secret": "...",
}

# Deploy a lakehouse with its shortcuts
deploy_lakehouse_with_shortcuts(
    source_workspace_name="DEV",
    source_lakehouse_name="my_lakehouse",
    target_workspace_name="PROD",
    target_lakehouse_name="my_lakehouse",
    creds=creds,
)

# Deploy a notebook (auto-rebinds to target lakehouse)
deploy_notebook(
    source_workspace_name="DEV",
    source_notebook_name="my_notebook",
    target_workspace_name="PROD",
    target_notebook_name="my_notebook",
    target_lakehouse_name="my_lakehouse",
    creds=creds,
)

# Deploy a semantic model (rebinds Direct Lake connection)
deploy_semantic_model(
    source_workspace_name="DEV",
    source_semantic_model_name="my_model",
    target_workspace_name="PROD",
    target_semantic_model_name="my_model",
    target_lakehouse_name="my_lakehouse",
    creds=creds,
)

# Deploy a report (rebinds to target semantic model)
deploy_report(
    source_workspace_name="DEV",
    source_report_name="my_report",
    target_workspace_name="PROD",
    target_report_name="my_report",
    target_dataset_name="my_model",
    creds=creds,
)

# Deploy a data pipeline (rebinds sinks + notebook references)
deploy_pipeline(
    source_workspace_name="DEV",
    pipeline_name="my_pipeline",
    target_workspace_name="PROD",
    target_lakehouse_name="my_lakehouse",
    creds=creds,
)

Utility Functions

from obv_fab_deploy import (
    list_workspaces,
    get_workspace_id_by_name,
    list_items,
    refresh_semantic_model,
    rebind_report,
)

# List all workspaces
workspaces = list_workspaces(creds)

# Get a workspace ID
ws_id = get_workspace_id_by_name("My Workspace", creds)

# List items in a workspace (optionally filter by type)
items = list_items("My Workspace", "SemanticModel", creds)

# Refresh a semantic model
refresh_semantic_model("My Workspace", "My Model", creds=creds)

# Rebind a report to a different semantic model
rebind_report("My Report", "My Model", "My Workspace", creds=creds)

Features

  • Lakehouse — Deploy lakehouses and replicate OneLake shortcuts
  • Notebook — Deploy notebooks with automatic default lakehouse rebinding
  • Semantic Model — Deploy with Direct Lake connection patching (TMDL)
  • Report — Deploy reports with automatic dataset rebinding
  • Data Pipeline — Deploy pipelines with sink and notebook activity rebinding
  • Auth — Works with Service Principal (ClientSecretCredential) or environment auth (DefaultAzureCredential)
  • No sempy/mssparkutils required — Uses direct Fabric REST API calls only

Dependencies

  • requests
  • azure-identity

Project Structure

obv_fab_deploy/
├── __init__.py          # Public API exports
├── utils.py             # Auth, workspace/item lookups, rebind, refresh
├── lakehouse.py         # Lakehouse deployment with shortcuts
├── notebook.py          # Notebook deployment
├── semantic_model.py    # Semantic model deployment with Direct Lake rebinding
├── report.py            # Report deployment with dataset rebinding
└── pipeline.py          # Pipeline deployment with activity rebinding
tests/
└── test_cases.py        # Manual test script (not included in package)

License

MIT © obviEnce

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

obv_fab_deploy-0.2.0.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

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

obv_fab_deploy-0.2.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file obv_fab_deploy-0.2.0.tar.gz.

File metadata

  • Download URL: obv_fab_deploy-0.2.0.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for obv_fab_deploy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f5178546bd925b79ef6d03b0ae479078e06ccc0bf667b771e2f858c7199a8fc4
MD5 f02e8d359af808f71990d68d66c5a409
BLAKE2b-256 6407b05909216458d5f5ba034cdefe11b907f56f7ed8453c381588982eb39a90

See more details on using hashes here.

File details

Details for the file obv_fab_deploy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: obv_fab_deploy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for obv_fab_deploy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5339b1ca4ef5d064aae3465ce6d633fa84cd2a231391bfc3fb6d44ba04d98d80
MD5 37800a775651424bc31761c37d325b0c
BLAKE2b-256 6b83f13ef9f4f2992b3dcb62c11ff2ed7cb0df463949e65bcaf862e3e5751f2a

See more details on using hashes here.

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