Registry / devops / fabric-cicd

fabric-cicd

JSON →
library1.1.0pypypi✓ verified 84d ago

The `fabric-cicd` library provides a Pythonic interface and command-line tool for implementing Continuous Integration/Continuous Deployment (CI/CD) pipelines for Microsoft Fabric artifacts. It enables programmatic deployment, lifecycle management, and automation of Fabric items like notebooks, lakehouses, and data pipelines. Currently at version 0.3.1, it is under active development with frequent releases targeting new Fabric capabilities and improvements.

pip install fabric-cicd
INSTALL
IMPORT
SIG · FABRIC-CICD
F
fabric-cicd
devopspythonv1.1.0
Install
3.9s avg
Import
Disk
46MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 46.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 3.9s · import 0.000s · 48MB
46MB installed
● package 46MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FabricWorkspace
from fabric_cicd import FabricWorkspace
from fabric_cicd.fabric_cicd_client import FabricCICDClient
deploy_with_config
from fabric_cicd import deploy_with_config
FabricWorkspace
from fabric_cicd.fabric_workspace import FabricWorkspace

This quickstart demonstrates how to initialize the `FabricCICDClient` using Azure Service Principal credentials and perform a basic operation like listing Fabric workspaces. It uses environment variables for secure credential management. Authentication via a Service Principal is the recommended approach for automated CI/CD pipelines in Microsoft Fabric.

import os from fabric_cicd.fabric_cicd_client import FabricCICDClient # Ensure these environment variables are set for your service principal TENANT_ID = os.environ.get('FABRIC_TENANT_ID', 'YOUR_TENANT_ID') CLIENT_ID = os.environ.get('FABRIC_CLIENT_ID', 'YOUR_CLIENT_ID') CLIENT_SECRET = os.environ.get('FABRIC_CLIENT_SECRET', 'YOUR_CLIENT_SECRET') if not all([TENANT_ID, CLIENT_ID, CLIENT_SECRET]): print("Error: FABRIC_TENANT_ID, FABRIC_CLIENT_ID, and FABRIC_CLIENT_SECRET environment variables must be set.") print("Please configure these environment variables with your Azure Service Principal credentials.") exit(1) try: # Initialize the client client = FabricCICDClient( tenant_id=TENANT_ID, client_id=CLIENT_ID, client_secret=CLIENT_SECRET ) # Example: List workspaces (requires appropriate permissions) print("\nFetching Fabric workspaces...") workspaces = client.get_workspaces() if workspaces: print(f"Found {len(workspaces)} workspaces:") for ws in workspaces[:3]: # Print first 3 for brevity print(f" - {ws.display_name} (ID: {ws.id})") else: print("No workspaces found or insufficient permissions.") # Example: Deploy a dummy item (requires actual item ID and target workspace ID) # Uncomment and replace placeholders with actual values for deployment functionality. # source_workspace_id = "<YOUR_SOURCE_WORKSPACE_ID>" # item_id = "<YOUR_ITEM_ID>" # e.g., Notebook ID, Lakehouse ID # target_workspace_id = "<YOUR_TARGET_WORKSPACE_ID>" # # print(f"\nAttempting to deploy item {item_id} from {source_workspace_id} to {target_workspace_id}...") # try: # result = client.deploy_item(source_workspace_id, item_id, target_workspace_id) # print(f"Deployment successful: {result}") # except Exception as e: # print(f"Deployment failed: {e}") except Exception as e: print(f"\nAn error occurred during client operation: {e}")
fabric-cicd --version
Debug
Known issues
gotchaAuthentication heavily relies on Azure Service Principals. Ensure your Service Principal has the necessary permissions (e.g., Fabric Contributor or specific delegated permissions) on the target workspaces/items in Microsoft Fabric and is correctly registered in Azure AD. Incorrect permissions are a common source of 'Forbidden' or 'Unauthorized' errors.
fix
Verify Service Principal setup in Azure AD (Client ID, Tenant ID, Client Secret) and assign appropriate Fabric roles/permissions via the Fabric UI or PowerShell. Check logs for specific error messages (e.g., AADSTS codes).
affects: All versions
gotchaThe library differentiates between source and target workspaces during deployment. Understand the lifecycle of your Fabric items and how they are identified (e.g., by ID, type, name). Misunderstanding item identifiers or workspace relationships can lead to deployment failures.
fix
Familiarize yourself with Fabric workspace and item IDs. Use `client.get_workspaces()` and `client.get_workspace_items(workspace_id)` to programmatically retrieve these details and ensure they match your deployment intent.
affects: All versions
breakingAs of version 0.3.x, the library is still under active development, and its API is subject to change. Future versions (especially leading up to 1.0) may introduce breaking changes to method signatures, class structures, or authentication flows.
fix
Pin your `fabric-cicd` version in `requirements.txt` (e.g., `fabric-cicd==0.3.1`) and thoroughly test when upgrading to new minor or major versions. Always review release notes for breaking changes and migration guidance.
affects: <1.0
Upgrade
Version history
1.1.0latest on PyPI · released May 27, 2026
Audit
Dependencies
msalrequiredRequired for Azure Active Directory authentication (Service Principal).
pydanticrequiredUsed for data validation and settings management.
requestsrequiredHTTP client for interacting with Fabric APIs.
pyyamlrequiredUsed for loading configuration files, common in CI/CD scenarios.
Agent activity
6 hits · last 30 days
node
6
Resources
fabric-cicd — pip install fabric-cicd · libregistry