Skip to main content

A Python wrapper for Power BI REST API with Pandas integration

Project description

pbipandas

CI PyPI

pbipandas is a lightweight Python client for the Power BI REST API that helps you authenticate and retrieve data directly into Pandas DataFrames. This package helps to get metadata details for all items (including datasets, dataflows, reports, refresh logs, datasources) in all of your workspaces.


🚀 Features

  • 🗂️ Get metadata for all items in all workspaces
  • 🔐 Easy OAuth2 authentication using client credentials
  • 📊 Seamless integration with Pandas for data analysis
  • ⚡ Simplifies working with Power BI API endpoints

📦 Installation

pip install pbipandas

Or for development:

git clone https://github.com/hoangdinh2710/pbipandas.git
cd pbipandas
pip install -e .

🔧 Usage

from pbipandas import PowerBIClient

pbi_client = PowerBIClient(
    tenant_id="your-tenant-id",
    client_id="your-client-id",
    client_secret="your-client-secret"
)

# Example: 
1. get_all_dataset
dataset_df = pbi_client.get_all_datasets()
2. Get all dataset history logs
dataset_df = pbi_client.get_all_dataset_refresh_history()
3. Get all dataset sources
dataset_sources_Df = pbi_client.get_all_dataset_sources()

🧪 Running Tests

pytest

🧹 Lint and Format Code

flake8 .
black .

📄 License

MIT License


🙌 Contributing

Pull requests are welcome! Please open an issue first to discuss what you would like to change.


✨ Reference

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

pbipandas-0.1.8.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pbipandas-0.1.8-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file pbipandas-0.1.8.tar.gz.

File metadata

  • Download URL: pbipandas-0.1.8.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for pbipandas-0.1.8.tar.gz
Algorithm Hash digest
SHA256 59da1b855246bcb3333a7fd2add8c7c2953044b6bc9993c3d9963298a68e606a
MD5 94d517faec004f952fddda0bad6d6a48
BLAKE2b-256 9da8969bb0c9bf5cc1bc7557b4303ff619aa9f510faf0c50cdd52d80a7f0e556

See more details on using hashes here.

File details

Details for the file pbipandas-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: pbipandas-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for pbipandas-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4e23cf1e6a0fb9418f0fbc84e49f66282ec3adda660156a3eb1f1c20e3aac535
MD5 c4a085bb66e8a1e9d4ec4b3c2943fdb0
BLAKE2b-256 ac8e342d9d60779edad956693625ebe18c71cd79da51bb7586900296c96b2de2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page