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.1.tar.gz (18.0 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.1-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: obv_fab_deploy-0.2.1.tar.gz
  • Upload date:
  • Size: 18.0 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.1.tar.gz
Algorithm Hash digest
SHA256 8915d14234f1e171bd77b05c6ecbdb0804535dea9d2ac9c163378136d03fbc86
MD5 b6d21561142577e0eecd479d64157c9c
BLAKE2b-256 e82cd76e95235c3af283fd2999979ad3072f57f38d45d4b5bc23b32336259d52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: obv_fab_deploy-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 22.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9c01014dc9523bcfe6cabbc0fccb92d24a733ca32603e8e300bdead31c9ca593
MD5 7a3eb5639accde90984e2fb795b16d89
BLAKE2b-256 354be898f66fb3d2d5549b7d650ecb32d840b246df83cd46f62f68359a6623b9

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