Skip to main content

PBI-PBIP Filters

Python 3.12 License: MIT Ruff pre-commit

PBI-PBIP Filters 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 pbi-pbip-filters

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 PBI-PBIP-filters 0.0.3

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

Source distribution (sdist)

Source distribution for PBI-PBIP-filters 0.0.3
File Size Uploaded
pbi_pbip_filters-0.0.3.tar.gz 5.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for PBI-PBIP-filters 0.0.3
File Interpreter ABI Platform
pbi_pbip_filters-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 MB

Release files / pbi_pbip_filters-0.0.3.tar.gz

Download URL pbi_pbip_filters-0.0.3.tar.gz
Size 5.7 MB
Tags Source
SHA-256 checksum
How to use checksums
23a1812fdce3b3d9968ab7cd6e300f46e1bcfd5766ce2d9125add623ca2386b1
BLAKE2b-256 checksum
How to use checksums
500148ca85942373657211922448ab88ce018e45af72956b56e2f8d1cd0c25f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.2

Release files / pbi_pbip_filters-0.0.3-py3-none-any.whl

Download URL pbi_pbip_filters-0.0.3-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ae2caa9dd947e4d0edaac9881594b78ec2a5e30af0b130319e8472f86c27ed2
BLAKE2b-256 checksum
How to use checksums
418e4981bd36c1f5dc26393d8a1548f1a70b5e90e7ca6c9eba2ab4901f1c183b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

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