Skip to main content

PBIP Tools

Python 3.12 License: MIT Ruff pre-commit

PBIP-tools is a Python package designed to process Power BI-generated JSON files for enhanced human-readability and seamless version control integration. The package provides two key executables:

  1. json-clean: Converts nested and complex Power BI-generated JSON files into a human-readable format.

  2. json-smudge: Reverses the cleaning process, restoring the JSON files to a format that Power BI can properly load.

Features

  • Human-readable JSON: The json-clean utility de-nests JSON objects and JSON strings for easier understanding and editing.

  • Restoration for Power BI: The json-smudge utility ensures that files cleaned by json-clean can be reloaded into Power BI.

  • Command-line utilities: Both json-clean and json-smudge can be used directly from the command line for seamless file processing.

Installation

You can install the package using pip:

pip install pbip-tools

Usage

Cleaning a JSON File

To clean a Power BI-generated JSON file for readability, run the following command:

json-clean <file-or-glob> [<file-or-glob2> ... ]

Example:

json-clean report.json my_folder/*.json

Smudging a JSON File

To restore a cleaned JSON file to its original state for Power BI loading, run:

json-smudge <file-or-glob> [<file-or-glob2> ...]

Example:

json-smudge cleaned_report.json cleaned/**/*.json

Dependencies

This package depends solely on Python’s standard libraries. For contributing and testing, pre-commit and pytest may be required.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

If you would like to contribute, feel free to open issues or submit pull requests.

Release files for pbip-tools 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pbip-tools 0.3.0
File Size Uploaded
pbip_tools-0.3.0.tar.gz 5.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pbip-tools 0.3.0
File Interpreter ABI Platform
pbip_tools-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 MB

Release files / pbip_tools-0.3.0.tar.gz

Download URL pbip_tools-0.3.0.tar.gz
Size 5.7 MB
Tags Source
SHA-256 checksum
How to use checksums
bfc4f369938f06408e866d755f43fa77efeca1cf67c9b1efe2ad66eb7bff677d
BLAKE2b-256 checksum
How to use checksums
bece82619466a985e6f2cd0f6ce61d7d6534a488305425956998439d50fb4070
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / pbip_tools-0.3.0-py3-none-any.whl

Download URL pbip_tools-0.3.0-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6085bc56bc4ca5af365f30c34bcd349d9d4871b9cfcb25416d1c370078cd1f4
BLAKE2b-256 checksum
How to use checksums
4fc0efbb3076db89111fddfc3b30fd160b45a039690c52e30c9ef6f73ef7ba28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page