Registry / azure / fabric-analytics-sdk

fabric-analytics-sdk

JSON →
library0.0.3.post10pypypi✓ verified 25d ago

The Fabric Analytics SDK for Python provides programmatic access to Microsoft Fabric Analytics services. It allows interaction with datasets, lakehouses, and warehouses within Fabric. The current version is 0.0.3.post1. Given its early 0.0.x versioning and the release patterns typical for new Microsoft SDKs, frequent updates and potential breaking changes are expected.

pip install fabric-analytics-sdk
INSTALL
IMPORT
SIG · FABRIC-ANALYTICS-S
F
fabric-analytics-sdk
azurepythonv0.0.3.post10
Install
3.6s avg
Import
Disk
41MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.3.post10 · 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
glibc
py 3.10
✓ —
✓ 4.1s
py 3.11
✓ —
✓ 3.7s
py 3.12
✓ —
✓ 3.2s
py 3.13
✓ —
✓ 3.3s
py 3.9
✕ build_error
✕ build_error
41MB installed
● package 41MB
Code
Verified usage

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

AnalyticsClient
from fabric import AnalyticsClient
from fabric.analytics_client import AnalyticsClient

This quickstart demonstrates how to initialize the Fabric Analytics client using `DefaultAzureCredential` and retrieve basic information about a Fabric item (like a Lakehouse) within a specified workspace. It also shows how to list items in a workspace. Remember to replace placeholder IDs or set them as environment variables and ensure proper Azure authentication and Fabric permissions.

import os from fabric_analytics.analytics_client import AnalyticsClient from azure.identity import DefaultAzureCredential from azure.core.exceptions import ResourceNotFoundError # IMPORTANT: Ensure your environment is configured for Azure authentication. # For local development, set environment variables like AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET # or use Azure CLI/VS Code login. More info: https://learn.microsoft.com/en-us/azure/developer/python/authentication/managed-identity-sdk-azure-cli try: # Initialize DefaultAzureCredential. It attempts various authentication methods. credential = DefaultAzureCredential() # Replace with your actual Fabric workspace ID and item ID. # For a runnable example, ensure these environment variables are set. workspace_id = os.environ.get("FABRIC_WORKSPACE_ID", "<YOUR_FABRIC_WORKSPACE_ID>") item_id = os.environ.get("FABRIC_ITEM_ID", "<YOUR_FABRIC_ITEM_ID>") item_type = os.environ.get("FABRIC_ITEM_TYPE", "Lakehouse") # e.g., "Lakehouse", "Warehouse", "Dataset" if workspace_id == "<YOUR_FABRIC_WORKSPACE_ID>" or item_id == "<YOUR_FABRIC_ITEM_ID>": print("Please set FABRIC_WORKSPACE_ID and FABRIC_ITEM_ID environment variables, or replace placeholders in the code.") exit(1) client = AnalyticsClient(credential=credential) print(f"Attempting to get item: {item_id} of type {item_type} in workspace {workspace_id}") # Example: Get a specific Fabric item (e.g., Lakehouse, Warehouse, Dataset) item_info = client.get_item(workspace_id=workspace_id, item_id=item_id, item_type=item_type) print(f"Successfully retrieved item: {item_info.display_name} (ID: {item_info.id})") print(f"Description: {item_info.description or 'No description'}") # Example: List items in a workspace print(f"\nListing first 3 items in workspace {workspace_id}:") items_list_response = client.list_items(workspace_id=workspace_id) if items_list_response.value: for i, item in enumerate(items_list_response.value): if i >= 3: break print(f"- {item.display_name} (Type: {item.type}, ID: {item.id})") else: print("No items found or insufficient permissions.") except ResourceNotFoundError as e: print(f"Error: Resource not found. Please check workspace ID, item ID, item type, and permissions. Details: {e}") except Exception as e: print(f"An unexpected error occurred: {e}") print("Ensure your Azure environment is set up correctly and you have sufficient permissions in Fabric.")
Debug
Known issues
breakingAs a pre-release library (version 0.0.x), the API surface is considered unstable. Breaking changes, renames, and removals can occur in any minor or patch release without prior deprecation warnings. Applications using this SDK should be prepared for frequent updates and potential rewrites.
fix
Always pin to exact versions (`fabric-analytics-sdk==0.0.3.post1`) in your `requirements.txt` or `pyproject.toml` and thoroughly review release notes/changelogs for each update before upgrading.
affects: 0.0.x series
gotchaAuthenticating with Azure services requires proper setup of `DefaultAzureCredential`. This often involves setting environment variables (`AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`), logging in via Azure CLI (`az login`), or configuring Managed Identities. Incorrect setup is a common cause of `AuthenticationFailedError` or similar credential errors.
fix
Refer to the `azure-identity` documentation for configuring `DefaultAzureCredential` for your specific environment. Ensure your principal has the necessary roles in Microsoft Fabric.
affects: All versions
gotchaEven with correct authentication, operations will fail if the authenticated principal lacks the required permissions (e.g., 'Fabric Admin', 'Contributor', 'Viewer', or specific item permissions) within the specific Fabric workspace or item. Errors like `ResourceNotFoundError` or `Unauthorized` can stem from insufficient permissions.
fix
Verify that the Azure AD principal used for authentication has the appropriate roles and permissions assigned in the Microsoft Fabric workspace and to the specific items where operations are being performed.
affects: All versions
gotchaThe PyPI package name is `fabric-analytics-sdk`, but the top-level import for the library is `fabric_analytics`. This difference in naming convention can sometimes lead to confusion for new users trying to import modules.
fix
After `pip install fabric-analytics-sdk`, remember to use `from fabric_analytics.<module> import <Class>` for your imports.
affects: All versions
Upgrade
Version history
0.0.3.post10latest on PyPI · released Jun 22, 2026
Audit
Dependencies
azure-identityrequiredRequired for Azure authentication (e.g., DefaultAzureCredential).
azure-corerequiredCore Azure SDK utilities and exception handling.
azure-mgmt-msirequiredUsed for Managed Service Identity operations within Azure authentication.
msalrequiredMicrosoft Authentication Library for Python, used for Azure AD authentication.
requestsrequiredHTTP client library for making API requests.
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
fabric-analytics-sdk — pip install fabric-analytics-sdk · libregistry