Metadata-Version: 2.1
Name: needlr
Version: 0.1.5
Summary: Needlr provides a unified cross-experience Microsoft Fabric SDK.
Author-email: Tonio Lora <tonio.lora@microsoft.com>, Tim Brown <timothy.brown@microsoft.com>, Emily Nguyen <emily.nguyen@microsoft.com>, Bret Myers <bret.myers@microsoft.com>, Will Johnson <will.johnson@microsoft.com>
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Topic :: Software Development
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: msal>=1.31.0
Requires-Dist: pydantic>=2.8.0
Requires-Dist: pyodbc>=5.2.0
Requires-Dist: requests>=2.32.3

# 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](https://pypi.org/project/needlr/) 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](https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.interactivebrowsercredential?view=azure-python) to use your personal credentials or `auth.FabricServicePrincipal` to use a service principal (which is supported for most but not all APIs).

```python
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](https://github.com/microsoft/needlr/tree/main/samples) and please be sure to share your ideas with us on what you need to support your Fabric deployments by creating an [issue](https://github.com/microsoft/needlr/issues).

## Additional Resources

* [Contributing](https://github.com/microsoft/needlr/blob/main/CONTRIBUTING.md) to the project
* Official [Fabric REST API](https://learn.microsoft.com/en-us/rest/api/fabric/articles/) docs
