{"id":17639482,"url":"https://github.com/muhssamy/fabricops","last_synced_at":"2025-04-14T09:12:00.071Z","repository":{"id":258685827,"uuid":"874363218","full_name":"muhssamy/fabricops","owner":"muhssamy","description":"This package is designed to be used within an Azure DevOps Pipeline to update a Fabric Workspace from a Git repository using a user with an email and password","archived":false,"fork":false,"pushed_at":"2024-10-18T11:30:51.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T09:11:40.859Z","etag":null,"topics":["devops","devops-pipeline","fabric","git-integration","microsoft","microsoft-fabric","microsoft-fabric-api"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/fabricops/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/muhssamy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-17T17:34:46.000Z","updated_at":"2025-01-26T11:02:59.000Z","dependencies_parsed_at":"2024-10-20T05:46:23.771Z","dependency_job_id":null,"html_url":"https://github.com/muhssamy/fabricops","commit_stats":null,"previous_names":["muhssamy/fabricops"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhssamy%2Ffabricops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhssamy%2Ffabricops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhssamy%2Ffabricops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhssamy%2Ffabricops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muhssamy","download_url":"https://codeload.github.com/muhssamy/fabricops/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852182,"owners_count":21171842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","devops-pipeline","fabric","git-integration","microsoft","microsoft-fabric","microsoft-fabric-api"],"created_at":"2024-10-23T05:04:25.026Z","updated_at":"2025-04-14T09:12:00.039Z","avatar_url":"https://github.com/muhssamy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/muhssamy/fabricops/actions/workflows/github-release.yml/badge.svg?event=deployment)](https://github.com/muhssamy/fabricops/actions/workflows/github-release.yml)\n\n# FabricOps\n\nThis package is built on top of this [repository](https://github.com/PowerBiDevCamp/FabConWorkshopSweden).\nI have enhanced it to be more suitable for Azure Pipelines and Added New Fuctions for DevOps Pipeline Activies.\n\n## Description\n\nThis package is designed to be used within an Azure DevOps Pipeline to update a Fabric Workspace from a Git repository using a user with an email and password. It supports both public client and confidential client applications. For more information about the differences, click [here](https://learn.microsoft.com/en-us/entra/msal/msal-client-applications)\n\n**Note** This is currently the only available method because Microsoft does not support service principals for these operations. Once it becomes available, please use it. For more information, check Microsoft Entra supported identities [here](https://learn.microsoft.com/en-us/rest/api/fabric/core/git/update-from-git).\n\nAnother method is to schedule a notebook on Fabric running under the authority of a user who is a contributor or higher in an administration workspace using [this](https://semantic-link-labs.readthedocs.io/en/stable/sempy_labs.html#sempy_labs.update_from_git) libirary.\n\n### Install\n\nTo install the package, use the following command:\n\n```python\npip install fabricops\n```\n\n## Usage\n\n### 1- Create Config File For Pipeline Contents\n\nyou can add the following tasks in your `azure-pipeline.yml` to create the files\n\n```yml\n\n- bash: 'python -m pip install fabricops --no-cache-dir --upgrade'\ndisplayName: 'Install FabricOps'\n\n- task: PythonScript@0\ndisplayName: 'Create Config File'\ninputs:\n    scriptSource: 'filePath'\n    scriptPath: '$(Build.SourcesDirectory)/create_configs.py' \n    arguments: '--WORKSPACE_ID $(WORKSPACE_ID) --WORKSPACE_WH_ID $(WORKSPACE_WH_ID) --CLIENT_ID $(CLIENTID) --TENANT_ID $(TENANTID) --USER_NAME $(email) --PASSWORD $(password) --CLIENT_SECRET $(CLIENTSECRET)'\n    workingDirectory: '$(Build.SourcesDirectory)'\n\n# Step 3: Publish the file as a pipeline artifact\n- task: PublishPipelineArtifact@1\ninputs:\n    targetPath: 'linkedservice-config.json'\n    artifact: 'config-file'\ndisplayName: 'Publish created file as artifact'\n\n- task: DownloadPipelineArtifact@2\ninputs:\n    artifact: 'config-file'\n    path: '$(Pipeline.Workspace)'\ndisplayName: 'Download created file'\n\n```\n\nand the content of `create_configs.py` exists in the Samples Folder.\n\n### 2- To Update Fabric Pipelines\n\nyou can use the following task\n\n```yml\n- script: |\n      python3 -c \"from fabricops import update_linked_services; update_linked_services('$(Pipeline.Workspace)/linkedservice-config.json', '$(Build.SourcesDirectory)')\"\n    displayName: 'PY Modify JSON Files'\n\n```\n\n### 3- Update Workspace From Git Repo\n\nNow you can update your Fabric Workspace From connected Repo. `update.py` in samples Folder\n\n```yml\n\n- task: PythonScript@0\ndisplayName: 'Run a Python script'\ninputs:\n    scriptSource: 'filePath'\n    scriptPath: '$(Build.SourcesDirectory)/update.py'\n    arguments: '--WORKSPACE_ID $(WORKSPACE_ID) --CLIENT_ID $(CLIENTID) --TENANT_ID $(TENANTID) --USER_NAME $(email) --PASSWORD $(password) --CLIENT_SECRET $(CLIENTSECRET)'\n    workingDirectory: '$(Build.SourcesDirectory)'\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhssamy%2Ffabricops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhssamy%2Ffabricops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhssamy%2Ffabricops/lists"}