Smudge and Clean filters for Power BI-generated JSON files.
Project description
PBI-PBIP Filters
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:
-
json-clean
: Converts nested and complex Power BI-generated JSON files into a human-readable format. -
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 byjson-clean
can be reloaded into Power BI. -
Command-line utilities: Both
json-clean
andjson-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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pbi_pbip_filters-0.0.3.tar.gz
.
File metadata
- Download URL: pbi_pbip_filters-0.0.3.tar.gz
- Upload date:
- Size: 5.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23a1812fdce3b3d9968ab7cd6e300f46e1bcfd5766ce2d9125add623ca2386b1 |
|
MD5 | 8617ad4d68534ae5aa472d82db2834b8 |
|
BLAKE2b-256 | 500148ca85942373657211922448ab88ce018e45af72956b56e2f8d1cd0c25f2 |
File details
Details for the file pbi_pbip_filters-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: pbi_pbip_filters-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ae2caa9dd947e4d0edaac9881594b78ec2a5e30af0b130319e8472f86c27ed2 |
|
MD5 | 6f5360d88fcee4685eda867b77dfc79d |
|
BLAKE2b-256 | 418e4981bd36c1f5dc26393d8a1548f1a70b5e90e7ca6c9eba2ab4901f1c183b |