prettyson
A Python-based JSON file formatter, inspired by Black.
installation
You can install prettyson via pip:
$ python3 -m pip install prettyson
how to use
Using prettyson is very simple; you just pass it the JSON files you want to format.
$ prettyson my_json_file.json my_json_files/*.json
By default, prettyson will reformat your files in-place if they are incorrectly
formatted. If you just want to check your files, but not reformat them (as you would
in a pre-commit or CI context for example), you can use the dry run option:
$ prettyson --dry-run my_json_file.json
If you also want it to sort the JSON keys, use the sort option:
$ prettyson --sort my_json_file.json
By default, the indentation that is used is four spaces; you could specify a different amount of spaces via the indent option, or use tabs instead via the use tabs option:
$ prettyson --indent 2 my_json_file.json # 2-space indentation
$ prettyson --use-tabs my_json_file.json # tab indentation
You can get an exhaustive list of options by running:
$ prettyson --help
Metadata
Release files for prettyson 0.0.2
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 |
|---|---|---|---|---|
| prettyson-0.0.2.tar.gz | 16.6 kB | Without provenance | Details for prettyson-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prettyson-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for prettyson-0.0.2-py3-none-any.whl |
Total release size: 34.9 kB
Release files / prettyson-0.0.2.tar.gz
| Download URL | prettyson-0.0.2.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aad9c642dff02fbd36a87e66649ea35cc2c4f4d9bb7dc1e3909d98b47f500533
|
|
BLAKE2b-256 checksum How to use checksums |
d7f3ec648277668807f8483d5225cb30d02ea35ac3d9b824cfa307785ed10ee5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Release files / prettyson-0.0.2-py3-none-any.whl
| Download URL | prettyson-0.0.2-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3de755386fff5266dd17715ca2c843632e6a72fc2261df9864d5286d5008d6c4
|
|
BLAKE2b-256 checksum How to use checksums |
efbdf3e10a732044939a2d8401467a5c4581934be8ee2f8a4d9a81f13192d045
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Security for prettyson 0.0.2
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.