{"id":20551596,"url":"https://github.com/clarketm/pprintjson","last_synced_at":"2025-06-19T18:40:56.553Z","repository":{"id":32961073,"uuid":"147878791","full_name":"clarketm/pprintjson","owner":"clarketm","description":"A json pretty printer for Python 🐍","archived":false,"fork":false,"pushed_at":"2023-01-16T23:00:38.000Z","size":109,"stargazers_count":15,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-15T16:17:43.400Z","etag":null,"topics":["json","ppjson","pprint","pprintjson","python"],"latest_commit_sha":null,"homepage":"https://pprintjson.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clarketm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-07T22:00:17.000Z","updated_at":"2023-10-24T13:19:35.000Z","dependencies_parsed_at":"2023-02-10T06:46:00.730Z","dependency_job_id":null,"html_url":"https://github.com/clarketm/pprintjson","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/clarketm/pprintjson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fpprintjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fpprintjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fpprintjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fpprintjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clarketm","download_url":"https://codeload.github.com/clarketm/pprintjson/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fpprintjson/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260807285,"owners_count":23066124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","ppjson","pprint","pprintjson","python"],"created_at":"2024-11-16T02:32:24.565Z","updated_at":"2025-06-19T18:40:51.542Z","avatar_url":"https://github.com/clarketm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [pprintjson](https://pprintjson.readthedocs.io/en/latest/)\n\n[![PyPi release](https://img.shields.io/pypi/v/pprintjson.svg)](https://pypi.org/project/pprintjson/)\n[![PyPi versions](https://img.shields.io/pypi/pyversions/pprintjson.svg)](https://pypi.org/project/pprintjson/)\n[![Downloads](https://pepy.tech/badge/pprintjson)](https://pepy.tech/project/pprintjson)\n[![Documentation Status](https://readthedocs.org/projects/pprintjson/badge/?version=latest)](https://pprintjson.readthedocs.io/en/latest/?badge=latest)\n\nA json pretty printer for Python 🐍.\n\n[Check out the pprintjson docs](https://pprintjson.readthedocs.io/en/latest/)\n\n## Installation\n\nInstall with the standard [`json`](https://docs.python.org/3/library/json.html) JSON encoder\n\n```bash\n$ pip install pprintjson\n```\n\nInstall with the premier [`simplejson`](https://simplejson.readthedocs.io/en/latest/) JSON encoder\n```bash\n$ pip install pprintjson[simplejson]\n```\n\n## Usage\n\n```text\n\nusage: pprintjson.py [-h] [-i num] [-o file] [-c cmd] [-v] [file]\n\nA pretty-printing function for json.\n\npositional arguments:\n  file                    json \u003cfile\u003e to pretty-print\n\noptional arguments:\n  -h, --help              show this help message and exit\n  -i num, --indent num    indent \u003cnum\u003e number of spaces at each level (default: 4)\n  -o file, --output file  write output to \u003cfile\u003e instead of stdout (default: stdout)\n  -c cmd, --command cmd   json \u003ccmd\u003e to pretty-print\n  -v, --version           show program's version number and exit\n\n```\n\n### Script\n\nPretty print JSON from a **file** using the `pprintjson` CLI.\n\n```bash\n$ pprintjson \"./path/to/file.json\"\n```\n\nPretty print JSON from a **stdin** using the `pprintjson` CLI.\n\n```bash\n$ echo '{ \"a\": 1, \"b\": \"string\", \"c\": true }' | pprintjson\n```\n\nPretty print JSON from a **string** using the `pprintjson` CLI.\n\n```bash\n$ pprintjson -c '{ \"a\": 1, \"b\": \"string\", \"c\": true }'\n```\n\nPretty print JSON from a **string** with an *indent* of **1**.\n\n```bash\n$ pprintjson -c '{ \"a\": 1, \"b\": \"string\", \"c\": true }' -i 1\n```\n\nPretty print JSON from a **string** and save *output* to a file **output.json**.\n\n```bash\n$ pprintjson -c '{ \"a\": 1, \"b\": \"string\", \"c\": true }' -o ./output.json\n```\n\n### Module\n\nPretty print JSON from a **dict** using the `pprintjson` module.\n\n```python\n\n# 1. import the \"pprintjson\" function.\nfrom pprintjson import pprintjson as ppjson\n\n# 2. pretty print JSON.\nobj = { \"a\": 1, \"b\": \"string\", \"c\": True }\n\nppjson(obj)\n```\n\n![stdout](https://raw.githubusercontent.com/clarketm/pprintjson/master/pprintjson.png)\n\n## License\n\nMIT \u0026copy; [**Travis Clarke**](https://blog.travismclarke.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarketm%2Fpprintjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclarketm%2Fpprintjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarketm%2Fpprintjson/lists"}