{"id":18005604,"url":"https://github.com/areed1192/power-bi-python-api","last_synced_at":"2025-04-05T03:10:34.999Z","repository":{"id":41126285,"uuid":"350194742","full_name":"areed1192/power-bi-python-api","owner":"areed1192","description":"The Unofficial Python API wrapper for the Microsoft Power BI REST API.","archived":false,"fork":false,"pushed_at":"2025-01-12T15:49:32.000Z","size":101,"stargazers_count":62,"open_issues_count":6,"forks_count":22,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T02:08:21.813Z","etag":null,"topics":["api-wrapper","microsoft","power-bi","power-bi-api","python"],"latest_commit_sha":null,"homepage":"","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/areed1192.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["areed1192"],"patreon":"sigmacoding","custom":null}},"created_at":"2021-03-22T03:29:34.000Z","updated_at":"2025-03-23T01:58:42.000Z","dependencies_parsed_at":"2024-04-01T18:54:19.323Z","dependency_job_id":"8cde6ad1-c7a2-4d98-9bc3-84e84581d5fd","html_url":"https://github.com/areed1192/power-bi-python-api","commit_stats":{"total_commits":33,"total_committers":2,"mean_commits":16.5,"dds":"0.030303030303030276","last_synced_commit":"c6bf2cfc9b2771ded1a81c1d9ef2ba303a3b2f60"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":"areed1192/sigma-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areed1192%2Fpower-bi-python-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areed1192%2Fpower-bi-python-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areed1192%2Fpower-bi-python-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areed1192%2Fpower-bi-python-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/areed1192","download_url":"https://codeload.github.com/areed1192/power-bi-python-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"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":["api-wrapper","microsoft","power-bi","power-bi-api","python"],"created_at":"2024-10-30T00:20:46.524Z","updated_at":"2025-04-05T03:10:34.980Z","avatar_url":"https://github.com/areed1192.png","language":"Python","funding_links":["https://github.com/sponsors/areed1192","https://patreon.com/sigmacoding","https://www.patreon.com/sigmacoding"],"categories":[],"sub_categories":[],"readme":"# Unofficial Power Bi Python API\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Resources](#resources)\n- [Setup](#setup)\n- [Usage](#usage)\n- [Support These Projects](#support-these-projects)\n\n## Overview\n\nVersion: **0.1.2**\n\nPower BI is a business analytics service by Microsoft. It aims to provide interactive\nvisualizations and business intelligence capabilities with an interface simple enough\nfor end users to create their own reports and dashboards. It is part of the Microsoft\nPower Platform. This library allows you to use the Power BI Rest API from python. Along\nwith providing the different endpoints, it will also handle the authentication process\nfor you.\n\n## Resources\n\n- [Power BI App Registration Portal](https://dev.powerbi.com/Apps)\n- [Power BI Rest API Documentation](https://docs.microsoft.com/en-us/rest/api/power-bi/)\n\n## Setup\n\n**Setup - Requirements Install:**\n\nFor this particular project, you only need to install the dependencies, to use the project. The dependencies\nare listed in the `requirements.txt` file and can be installed by running the following command:\n\n```console\npip install -r requirements.txt\n```\n\nAfter running that command, the dependencies should be installed.\n\n**Setup - Local Install:**\n\nIf you are planning to make modifications to this project or you would like to access it\nbefore it has been indexed on `PyPi`. I would recommend you either install this project\nin `editable` mode or do a `local install`. For those of you, who want to make modifications\nto this project. I would recommend you install the library in `editable` mode.\n\nIf you want to install the library in `editable` mode, make sure to run the `setup.py`\nfile, so you can install any dependencies you may need. To run the `setup.py` file,\nrun the following command in your terminal.\n\n```console\npip install -e .\n```\n\nIf you don't plan to make any modifications to the project but still want to use it across\nyour different projects, then do a local install.\n\n```console\npip install .\n```\n\nThis will install all the dependencies listed in the `setup.py` file. Once done\nyou can use the library wherever you want.\n\n**Setup - PyPi Install:**\n\nTo **install** the library, run the following command from the terminal.\n\n```console\npip install python-power-bi\n```\n\n**Setup - PyPi Upgrade:**\n\nTo **upgrade** the library, run the following command from the terminal.\n\n```console\npip install --upgrade python-power-bi\n```\n\n## Usage\n\nHere is a simple example of using the `powerbi` library.\n\n```python\nfrom pprint import pprint\nfrom configparser import ConfigParser\nfrom powerbi.client import PowerBiClient\n\n# Initialize the Parser.\nconfig = ConfigParser()\n\n# Read the file.\nconfig.read('config/config.ini')\n\n# Get the specified credentials.\nclient_id = config.get('power_bi_api', 'client_id')\nredirect_uri = config.get('power_bi_api', 'redirect_uri')\nclient_secret = config.get('power_bi_api', 'client_secret')\n\n# Initialize the Client.\npower_bi_client = PowerBiClient(\n    client_id=client_id,\n    client_secret=client_secret,\n    scope=['https://analysis.windows.net/powerbi/api/.default'],\n    redirect_uri=redirect_uri,\n    credentials='config/power_bi_state.jsonc'\n)\n\n# Initialize the `Dashboards` service.\ndashboard_service = power_bi_client.dashboards()\n\n# Add a dashboard to our Workspace.\ndashboard_service.add_dashboard(name='my_new_dashboard')\n\n# Get all the dashboards in our Org.\npprint(dashboard_service.get_dashboards())\n```\n\n## Support These Projects\n\n**Patreon:**\nHelp support this project and future projects by donating to my [Patreon Page](https://www.patreon.com/sigmacoding). I'm\nalways looking to add more content for individuals like yourself, unfortuantely some of the APIs I would require me to\npay monthly fees.\n\n**YouTube:**\nIf you'd like to watch more of my content, feel free to visit my YouTube channel [Sigma Coding](https://www.youtube.com/c/SigmaCoding).\n\n**Questions:**\nIf you have questions please feel free to reach out to me at [coding.sigma@gmail.com](mailto:coding.sigma@gmail.com?subject=[GitHub]%20Fred%20Library)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fareed1192%2Fpower-bi-python-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fareed1192%2Fpower-bi-python-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fareed1192%2Fpower-bi-python-api/lists"}