yuppie-powerbi
Power BI REST API 客户端库(基于服务主体 + OAuth2 client_credentials),无 MCP 依赖。
从 yuppie-mcp-powerbi 仓库拆出的纯 Python 库:如果你只想在自己的项目里调用 Power BI REST API / 执行 DAX 查询,不想引入 MCP 及其版本约束,直接用这个包。
安装
uv add yuppie-powerbi # 或 pip install yuppie-powerbi
快速开始
from yuppie_powerbi import PowerBIClient, PowerBIConfig
config = (
PowerBIConfig.from_env()
) # 读 PB_TENANT_ID/PB_CLIENT_ID/PB_CLIENT_SECRET/PB_DATASET_ID 等环境变量
client = PowerBIClient(config)
result = await client.execute_dax(config.dataset_id, "EVALUATE VALUES('SITE'[SITE])")
print(result)
模块结构
yuppie_powerbi— 包根直接暴露PowerBIClient与PowerBIConfigyuppie_powerbi.config—PowerBIConfig环境配置(服务主体凭据,from_env()校验必填项)yuppie_powerbi.client—PowerBIClient异步客户端:token 获取(自动刷新缓存)、execute_dax()、get_group_reports()- 无 mcp / pydantic 依赖(deps 仅 python-dotenv、httpx)
与 MCP Server 的关系
同一仓库的 packages/yuppie-mcp-powerbi 是本库的 MCP 壳(把 DAX 查询等封装为 MCP 工具),PyPI 分发(uvx yuppie-mcp-powerbi),依赖本包。两者版本独立演进。
依赖
Python ≥ 3.10;python-dotenv、httpx
Metadata
Release files for yuppie-powerbi 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yuppie_powerbi-0.1.0.tar.gz | 3.7 kB | Without provenance | Details for yuppie_powerbi-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yuppie_powerbi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for yuppie_powerbi-0.1.0-py3-none-any.whl |
Total release size: 8.5 kB
Release files / yuppie_powerbi-0.1.0.tar.gz
| Download URL | yuppie_powerbi-0.1.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5a82722b065abb0ff395b9c7f2eae922b2094637ecfb9b33ea8883a2b9eac5e
|
|
BLAKE2b-256 checksum How to use checksums |
701beb4ddd1fe9bfc3c4333b6fdcbf6c2dec7ac1d38e17cbf6fb913a11496e3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / yuppie_powerbi-0.1.0-py3-none-any.whl
| Download URL | yuppie_powerbi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17b4d6c9be86e48dcb2f7c12ee6c4dd70fa024bead2e721121304b4666ffb6d3
|
|
BLAKE2b-256 checksum How to use checksums |
e00ae55926ac920831c7c127ee7081a00db38e85962cb46d894783df45e5d950
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for yuppie-powerbi 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.