{"id":17395846,"url":"https://github.com/muhssamy/updatefromgit","last_synced_at":"2026-01-29T03:03:58.450Z","repository":{"id":257827059,"uuid":"871985518","full_name":"muhssamy/updatefromgit","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-17T16:32:01.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T14:06:03.313Z","etag":null,"topics":["azure-devops","devops-pipeline","fabric","git-integration","microsoft-fabric"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/updatefromgit/","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-13T13:48:38.000Z","updated_at":"2024-10-17T16:07:03.000Z","dependencies_parsed_at":"2024-10-19T18:53:25.936Z","dependency_job_id":null,"html_url":"https://github.com/muhssamy/updatefromgit","commit_stats":null,"previous_names":["muhssamy/updatefromgit"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhssamy%2Fupdatefromgit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhssamy%2Fupdatefromgit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhssamy%2Fupdatefromgit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhssamy%2Fupdatefromgit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muhssamy","download_url":"https://codeload.github.com/muhssamy/updatefromgit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249085438,"owners_count":21210267,"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":["azure-devops","devops-pipeline","fabric","git-integration","microsoft-fabric"],"created_at":"2024-10-16T12:03:43.380Z","updated_at":"2026-01-29T03:03:53.421Z","avatar_url":"https://github.com/muhssamy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![UpdateFromGit PyPI and TestPyPI](https://github.com/muhssamy/updatefromgit/actions/workflows/github-release.yml/badge.svg)](https://github.com/muhssamy/updatefromgit/actions/workflows/github-release.yml)\n\n# Update From Git\n\nThis package is built on top of this [repository](https://github.com/PowerBiDevCamp/FabConWorkshopSweden).I have enhanced it to be more suitable for Azure Pipelines.\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 updatefromgit\n```\n\n### Usage\n\nFirst, import the required functions. This example uses a `confidential App` but you can use a public one and omit the `client secret`\n\n```python\nimport logging\nimport os\nimport sys\nimport time\nfrom azlog import AzLogger\n\nfrom updatefromgit import (\n    acquire_token_user_id_password_confidential,\n    commit_all_items_to_git,\n    get_git_status,\n    update_workspace_from_git,\n)\n\nlogger = AzLogger(__name__)\nlogger.setLevel(logging.INFO)\n\n```\n\nNext, create your constants:\n\n```python\nFABRIC_API_URL = \"https://api.fabric.microsoft.com/v1\"\nCLIENT_ID = \"\"\nTENANT_ID = \"\"\nUSERNAME = \"\"\nPASSWORD = \"\"\nWORKSPACE_ID = \"\"\n\n```\n\nThen, you can call the functions:\n\n```python\naccess_token = acquire_token_user_id_password_confidential(\n    TENANT_ID, CLIENT_ID, USERNAME, PASSWORD, CLIENT_SECRET\n)\nupdate_workspace_from_git(WORKSPACE_ID, access_token)\ntime.sleep(600) #adjust it per your need\nworkspace_head = get_git_status(WORKSPACE_ID, access_token)\ncommit_all_items_to_git(WORKSPACE_ID, workspace_head, access_token)\nlogger.command(\"Program Completed\")\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhssamy%2Fupdatefromgit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhssamy%2Fupdatefromgit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhssamy%2Fupdatefromgit/lists"}