Simple JSON printer for Python - print colorized, formatted JSON with one function
Project description
jprint2
Print Python objects as colorized, formatted JSON.
Installation
pip install jprint2
Usage
def jprint(*objects: Any, indent: bool = True) -> None:
...
>>> from jprint2 import jprint
>>> jprint("a", "b", "c")
[
"a",
"b",
"c"
]
>>> jprint({"name": "Mark", "mood": 10})
{
"name": "Mark",
"mood": 10
}
>>> jprint({"name": "Mark", "age": 30}, indent=False)
{"name": "Mark", "age": 30}
License
MIT License
Author
Mark Lidenberg marklidenberg@gmail.com
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
jprint2-0.4.1.tar.gz
(52.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jprint2-0.4.1.tar.gz.
File metadata
- Download URL: jprint2-0.4.1.tar.gz
- Upload date:
- Size: 52.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d77434cbfed9439a712ff39f23d10e13e23ba6f108a953926c03c1c693a2f81
|
|
| MD5 |
823d50612291788ce691a698a496eff5
|
|
| BLAKE2b-256 |
4b1b49f0a617f23a282d5e67fb520a57cc0b9e0d782750081d17e526732654a3
|
File details
Details for the file jprint2-0.4.1-py3-none-any.whl.
File metadata
- Download URL: jprint2-0.4.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce1463cca07db71544caadcc94aa34e34609cce99757be7118950a7c1550f82b
|
|
| MD5 |
ea60e71d7ddf9c6f24814567e86dcf73
|
|
| BLAKE2b-256 |
ed24fb2f294730a14b0b7822f234a1052c4c0b26f4586d2e73cac649c6702235
|