Skip to content

microsoft/needlr

Repository files navigation

Needlr: A Unified SDK for Microsoft Fabric

The Needlr packages provides a unified, cross-experience Microsoft Fabric SDK. The goal of Needlr is to simplify the way you work with Fabric APIs and support deployments and automation allowing you to focus on solving your business problems.

Quickstart

Needlr is available on PyPi and can be installed via pip install needlr.

With needlr installed, you first authenticate by creating a Fabric client. You can use either auth.FabricInteractiveAuth to use your personal credentials or auth.FabricServicePrincipal to use a service principal (which is supported for most but not all APIs).

from needlr import auth, FabricClient

fc = FabricClient(
    auth=auth.FabricInteractiveAuth(
        scopes=['https://api.fabric.microsoft.com/.default'])
    )
for ws in fc.workspace.ls():
    print(f"{ws.name}: Id:{ws.id} Capacity:{ws.capacityId}")

Needlr supports many of the Fabric REST APIs and we appreciate contributions to help us close that gap.

Some of our best supported APIs include:

  • Data Warehouse
  • Data Engineering
  • Real-time Intelligence

Needlr has been designed to support Fabric deployment and automation and follows a convention to make it easier to discover and connect APIs.

  • List items like workspaces, tables: fc.<item>.ls() as in fc.workspace.ls()
  • Create items like lakehouses, event streams: fc.<item>.create() as in fs.lakehouse.create('NameOfLakehouse')
  • Delete items: fc.<item>.delete() as in fc.warehouse.delete(worskspace_id, warehouse_id)

Get started with more of our samples and please be sure to share your ideas with us on what you need to support your Fabric deployments by creating an issue.

Additional Resources

About

Microsoft Fabric SDK and utilities

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages