A wrapper around fabric-cicd for deploying Fabric solutions from GitHub repositories
Project description
Fabric Launcher: From repo to workspace, deploy Fabric solutions effortlessly
A Python library to automate deployment of Microsoft Fabric solutions from GitHub repositories into Fabric workspaces. Fabric-launcher is designed to run within Fabric notebooks. It is ideal for simple, automated deployment for solution accelerators, demos, tutorials, and samples.
fabric-launcher is a wrapper around fabric-cicd and supports all Fabric item types that fabric-cicd supports.
Overview
fabric-launcher provides a high-level Python interface for orchestrating end-to-end deployment of Microsoft Fabric workspace solutions. It's designed for use within Fabric Python notebooks and simplifies:
- 📥 Downloading source code from GitHub repositories
- 🚀 Deploying artifacts to Fabric workspaces (all types supported by fabric-cicd)
- 📁 Uploading files to Lakehouse Files area
- ▶️ Triggering notebook execution for post-deployment tasks
Note: For parameterization, value replacement, and the latest item type compatibility, see the fabric-cicd documentation.
Installation
%pip install fabric-launcher
notebookutils.session.restartPython()
Quick Start
import notebookutils
from fabric_launcher import FabricLauncher
# Initialize and deploy
launcher = FabricLauncher(notebookutils)
launcher.download_and_deploy(
repo_owner="myorg",
repo_name="my-fabric-solution",
workspace_folder="workspace"
)
With Configuration File (Recommended)
# Config file in your repo: config/deployment.yaml
launcher = FabricLauncher(
notebookutils,
config_repo_owner="myorg",
config_repo_name="my-solution",
config_file_path="config/deployment.yaml",
environment="PROD"
)
launcher.download_and_deploy()
Staged Deployment
launcher.download_and_deploy(
repo_owner="myorg",
repo_name="my-solution",
item_type_stages=[
["Lakehouse", "KQLDatabase"], # Stage 1
["Notebook", "Eventstream"], # Stage 2
["SemanticModel", "Report"] # Stage 3
]
)
Examples
See the examples/ directory for complete working code:
- basic_deployment_examples.py - Simple deployment workflow
- advanced_deployment_examples.py - Configuration files, validation, reporting
- staged_deployment_examples.py - Multi-stage deployment patterns
- accessing_launcher_properties_examples.py - Accessing deployment metadata
Documentation
- Quick Reference - Syntax reference and common operations
- Contributing Guide - Development setup and guidelines
- Changelog - Version history and release notes
Key Features
✅ Simple API - High-level methods abstract complexity
✅ Fabric-native - Designed for Fabric notebooks with notebookutils
✅ Flexible deployment - Staged deployment or custom item type selection
✅ GitHub integration - Public and private repository support
✅ Configuration management - YAML/JSON config files with environment overrides
✅ Post-deployment validation - Automatic verification of deployed items
✅ Comprehensive reporting - Deployment tracking and audit trails
Supported Item Types
Supports all fabric-cicd item types:
Data: Lakehouse, KQLDatabase, Eventhouse
Compute: Notebook, Eventstream
Analytics: SemanticModel, Report, KQLDashboard
Other: Reflex, DataAgent, and more
See fabric-cicd docs for the complete list.
Note: For item types not yet supported by fabric-cicd, use post-deployment notebooks with custom code via
launcher.run_notebook().
Safety Features
By default, fabric-launcher validates that the target workspace is empty (except for the current notebook) before deployment to prevent accidentally overwriting existing work.
# Default: validates workspace is empty
launcher = FabricLauncher(notebookutils)
launcher.download_and_deploy(...) # Blocks if workspace has existing items
# To deploy to non-empty workspace (use with caution)
launcher = FabricLauncher(notebookutils, allow_non_empty_workspace=True)
Main Methods
| Method | Purpose |
|---|---|
download_and_deploy() |
Download from GitHub and deploy in one operation |
download_repository() |
Download repository to local directory |
deploy_artifacts() |
Deploy Fabric items from local directory |
upload_files_to_lakehouse() |
Upload files to Lakehouse Files area |
copy_data_folders_to_lakehouse() |
Copy multiple folders to Lakehouse |
run_notebook() |
Execute a Fabric notebook asynchronously |
validate_deployment() |
Validate deployed items are accessible |
See QUICKSTART.md for detailed syntax and parameters.
Post-Deployment Utilities
The fabric_launcher.post_deployment_utils module provides utility functions for common post-deployment tasks:
Item Management:
get_folder_id_by_name()- Find folders by display nameget_item_definition_from_repo()- Load item definitions from repositoryscan_logical_ids()- Map logical IDs to actual workspace IDsreplace_logical_ids()- Replace logical IDs in definitionscreate_or_update_fabric_item()- Generic item creation with logical ID replacementmove_item_to_folder()- Organize items into folders
Eventhouse & KQL Database:
get_kusto_query_uri()- Get Kusto query service URI for an Eventhouseexec_kql_command()- Execute KQL management commandscreate_shortcut()- Create OneLake shortcuts in Fabric itemscreate_accelerated_shortcut_in_kql_db()- Create shortcuts with accelerated external tables
SQL Endpoints:
get_sql_endpoint()- Get SQL endpoint connection strings for Lakehouse/Warehouseexec_sql_query()- Execute SQL queries against Fabric SQL endpoints
These helpers are useful for:
- Deploying custom item types not yet supported by fabric-cicd
- Handling cross-item references and logical ID remapping
- Post-deployment organization and configuration
- Eventhouse and KQL Database setup with shortcuts
- SQL-based data validation and queries
See examples/post_deployment_utils_examples.py for comprehensive usage examples including Eventhouse, KQL Database, and SQL operations.
Development and Testing
# Clone the repository
git clone https://github.com/microsoft/fabric-launcher.git
cd fabric-launcher
# Install in development mode
pip install -e .
pip install -r requirements-dev.txt
# Run tests
pytest tests/ -v
# Check code formatting
ruff format fabric_launcher/ tests/
ruff check fabric_launcher/ tests/
See tests/README.md for detailed testing documentation.
Requirements
- Python 3.10, 3.11, or 3.12 (compatible with fabric-cicd dependency)
- Access to Microsoft Fabric workspace
- Running within a Fabric Python notebook (for
notebookutilsaccess)
Note: semantic-link-sempy is a runtime dependency that is pre-installed in Fabric notebook environments. For local development or testing outside of Fabric, the package uses mocked versions of these dependencies.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE for details.
Security
See SECURITY.md for security policy and reporting vulnerabilities.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fabric_launcher-0.4.0.tar.gz.
File metadata
- Download URL: fabric_launcher-0.4.0.tar.gz
- Upload date:
- Size: 71.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00e050e2a015535e774c7bee0d303a08ae3f580024526309a47c803f1adc61a7
|
|
| MD5 |
43f60a4f7a4a41182399b5b64702d119
|
|
| BLAKE2b-256 |
b8fb32f5110c5ba36f15c5310b911b9b8217441f59d8b43b6e266a1221610c4c
|
Provenance
The following attestation bundles were made for fabric_launcher-0.4.0.tar.gz:
Publisher:
python-publish.yml on microsoft/fabric-launcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fabric_launcher-0.4.0.tar.gz -
Subject digest:
00e050e2a015535e774c7bee0d303a08ae3f580024526309a47c803f1adc61a7 - Sigstore transparency entry: 912769798
- Sigstore integration time:
-
Permalink:
microsoft/fabric-launcher@0bd3c2811b44113c1b04148d1fd5baf39b455aaf -
Branch / Tag:
refs/tags/0.4.0 - Owner: https://github.com/microsoft
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0bd3c2811b44113c1b04148d1fd5baf39b455aaf -
Trigger Event:
release
-
Statement type:
File details
Details for the file fabric_launcher-0.4.0-py3-none-any.whl.
File metadata
- Download URL: fabric_launcher-0.4.0-py3-none-any.whl
- Upload date:
- Size: 44.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ddf7fa769adb573707a052fc47049235d90a2428ba8b223c52bc3486497cb4e
|
|
| MD5 |
6d6332699ce44e55de0c769900fc94d0
|
|
| BLAKE2b-256 |
ba6b22e58f1de1d6df0aa0f2c277963fb4ebe28964235fe04428e4533f57e10a
|
Provenance
The following attestation bundles were made for fabric_launcher-0.4.0-py3-none-any.whl:
Publisher:
python-publish.yml on microsoft/fabric-launcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fabric_launcher-0.4.0-py3-none-any.whl -
Subject digest:
1ddf7fa769adb573707a052fc47049235d90a2428ba8b223c52bc3486497cb4e - Sigstore transparency entry: 912769893
- Sigstore integration time:
-
Permalink:
microsoft/fabric-launcher@0bd3c2811b44113c1b04148d1fd5baf39b455aaf -
Branch / Tag:
refs/tags/0.4.0 - Owner: https://github.com/microsoft
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0bd3c2811b44113c1b04148d1fd5baf39b455aaf -
Trigger Event:
release
-
Statement type: