Metadata-Version: 2.4
Name: fabric-demos
Version: 0.0.5
Summary: A library to install Microsoft Fabric demos with one line.
Author: Mure Data
License-Expression: MIT
Project-URL: Repository, https://github.com/muredata/fabric-demos
Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Requires-Python: <3.13,>=3.10
Description-Content-Type: text/markdown
Requires-Dist: ms-fabric-cli
Requires-Dist: dummy-notebookutils
Requires-Dist: IPython

# fabric-demos

[![PyPi version](https://badgen.net/pypi/v/fabric-demos/)](https://pypi.org/project/fabric-demos)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

> This is experimental

fab-demos is a sample toolkit to easily install Microsoft Fabric demos via Fabric CLI or notebook.

## Usage from CLI

Requires [Fabric CLI](https://microsoft.github.io/fabric-cli/). 

Install:

```
$ uv tool install fab-demos  # or: pip install fab-demos
```

Browse all demos:

```bash
$ fab auth login
$ fab config set default_capacity <capacity_name>
$ fabdemos browse
```

Install a demo:

```bash
$ fabdemos install -n <demo_name> -ws <workspace_name>
```

## Usage within Fabric

Within a Python notebook, run:

```
%pip install fab-demos
```

Assign capacity:

```
import os
os.environ['FABDEMOS_CAPACITY'] = '<capacity_name>'
```

Browse all demos:

```
import fabric_demos as fabdemos
fabdemos.browse()
```

Install a demo:

```
fabdemos.install(name="<demo_name>")
```

## References

Similar repositories:

- [dbdemos](https://github.com/databricks-demos/dbdemos): Databricks toolkit to install demos in a notebook. Uses asset bundles
- [fabric-jumpstart](https://github.com/microsoft/fabric-jumpstart): Fabric toolkit to install demos in a notebook. Uses fabric-cicd

## License

The tool is available as open-source under the terms of the [MIT License](https://opensource.org/license/MIT).
