Skip to main content

Smudge and Clean filters for Power BI-generated JSON files.

Project description

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.

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

pbip_tools-0.0.4.tar.gz (5.7 MB view details)

Uploaded Source

Built Distribution

pbip_tools-0.0.4-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file pbip_tools-0.0.4.tar.gz.

File metadata

  • Download URL: pbip_tools-0.0.4.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

Hashes for pbip_tools-0.0.4.tar.gz
Algorithm Hash digest
SHA256 9cc550ebd49a0541471340b6ba16a1f0d456cb8345e7614cdea6de6c4aac363c
MD5 872ce655b8d91ac0cd6e05b4b671269b
BLAKE2b-256 80424c65f3d7410133d185ec5c614ea3bf480ee2f4b2f89bb80895fc8db8a4c3

See more details on using hashes here.

File details

Details for the file pbip_tools-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pbip_tools-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for pbip_tools-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 773916a90322b0b6affff43db15c7b4411c98061d67654bd15afb412c4356be1
MD5 12eff51580592fd82d49c12a97520af7
BLAKE2b-256 486f4db554a9c46373afaccaae6f94ce33ca3aa8dd5db8994041ba3099c7b11b

See more details on using hashes here.

Supported by

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