Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Guide to Using the Python SDK for Microsoft Fabric REST API

Description

The Microsoft Fabric API provides developers with programmatic access to manage and interact with Microsoft Fabric resources. It enables developers to automate a wide array of tasks, including data integration, data warehousing, big data analytics, deployment process automation, Fabric items provisioning, and more.

This document provides an overview of the API endpoints, authentication methods, and usage examples for the Python SDK for Fabric REST API. The Python SDK is a client library that simplifies communication with the Microsoft Fabric API service and handles serialization and error handling for you.

Installation via pip

To install the client library via pip:

pip install microsoft-fabric-api

Getting Started

1. Register your application

Register your application to use Microsoft Fabric API.

2. Authenticate for the Microsoft Fabric service

The Microsoft Fabric Python Client Library supports the use of TokenCredential classes in the azure-identity library.

You can read more about available Credential classes at Azure Identity client library for Python.

The recommended library for authenticating against Microsoft Identity (Azure AD) is MSAL.

For an example of how to acquire a Microsoft Entra token for Microsoft Fabric Service, see Microsoft Fabric API - get token.

3. Create a Microsoft Fabric client object with an authentication provider

An instance of the FabricClient class handles building requests, sending them to the Microsoft Fabric API, and processing the responses. To create a new instance of this class, you need to provide a instance of TokenCredential or the string representation of its underlying Microsoft Entra access token.

4. Make requests to Microsoft Fabric

Once you have completed authentication and have a FabricClient, you can begin to make calls to the service.

For example, to get a list of workspaces:

from azure.identity import DefaultAzureCredential
from microsoft_fabric_api import FabricClient

# Create credential and client
credential = DefaultAzureCredential(exclude_interactive_browser_credential=False)
fabric_client = FabricClient(credential)

# Get the list of workspaces using the client
workspaces = [workspace for workspace in fabric_client.core.workspaces.list_workspaces()]
print(f"Number of workspaces: {len(workspaces)}")
for workspace in workspaces:
    print(f"Workspace: {workspace.display_name}, Capacity ID: {workspace.capacity_id}")

Documentation and resources

Metadata

Release files for microsoft-fabric-api 0.1.0b30

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for microsoft-fabric-api 0.1.0b30
File Interpreter ABI Platform
microsoft_fabric_api-0.1.0b30-py3-none-any.whl Python 3 none any Details

Release files / microsoft_fabric_api-0.1.0b30-py3-none-any.whl

Download URL microsoft_fabric_api-0.1.0b30-py3-none-any.whl
Size 3.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
68f7ad473e7de8bed9295e18954f5ac15058b7f02525df02ec57223341a8d4df
BLAKE2b-256 checksum
How to use checksums
054d05326a58b9c80b0cab611392304a7f3073834c71a2f8d4f40379da4486ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Security for microsoft-fabric-api 0.1.0b30

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page