{"id":21071275,"url":"https://github.com/yisuschrist/requests-pprint","last_synced_at":"2026-03-08T01:33:52.812Z","repository":{"id":229448435,"uuid":"776759706","full_name":"YisusChrist/requests-pprint","owner":"YisusChrist","description":"Pretty print your python HTTP requests!","archived":false,"fork":false,"pushed_at":"2026-03-06T11:17:02.000Z","size":1123,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-06T15:36:26.855Z","etag":null,"topics":["python","requests","requests-library-python","rich-python","rich-text"],"latest_commit_sha":null,"homepage":"https://deepwiki.com/YisusChrist/requests-pprint","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YisusChrist.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-24T12:16:44.000Z","updated_at":"2026-03-06T11:17:04.000Z","dependencies_parsed_at":"2025-05-12T13:23:50.192Z","dependency_job_id":"fdbe3eae-3a8e-4dd6-b41b-13c2e1f0dbb6","html_url":"https://github.com/YisusChrist/requests-pprint","commit_stats":null,"previous_names":["yisuschrist/requests-pprint"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/YisusChrist/requests-pprint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YisusChrist%2Frequests-pprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YisusChrist%2Frequests-pprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YisusChrist%2Frequests-pprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YisusChrist%2Frequests-pprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YisusChrist","download_url":"https://codeload.github.com/YisusChrist/requests-pprint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YisusChrist%2Frequests-pprint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30240899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"ssl_error","status_checked_at":"2026-03-08T00:55:48.608Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["python","requests","requests-library-python","rich-python","rich-text"],"created_at":"2024-11-19T18:51:14.928Z","updated_at":"2026-03-08T01:33:52.775Z","avatar_url":"https://github.com/YisusChrist.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/YisusChrist/requests-pprint/issues\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues/YisusChrist/requests-pprint?color=171b20\u0026label=Issues%20%20\u0026logo=gnubash\u0026labelColor=e05f65\u0026logoColor=ffffff\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/YisusChrist/requests-pprint/forks\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/forks/YisusChrist/requests-pprint?color=171b20\u0026label=Forks%20%20\u0026logo=git\u0026labelColor=f1cf8a\u0026logoColor=ffffff\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/YisusChrist/requests-pprint/stargazers\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/stars/YisusChrist/requests-pprint?color=171b20\u0026label=Stargazers\u0026logo=octicon-star\u0026labelColor=70a5eb\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/YisusChrist/requests-pprint/actions\"\u003e\n        \u003cimg alt=\"Tests Passing\" src=\"https://github.com/YisusChrist/requests-pprint/actions/workflows/github-code-scanning/codeql/badge.svg\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/YisusChrist/requests-pprint/pulls\"\u003e\n        \u003cimg alt=\"GitHub pull requests\" src=\"https://img.shields.io/github/issues-pr/YisusChrist/requests-pprint?color=0088ff\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\n    \u003c/a\u003e\n    \u003ca href=\"https://opensource.org/license/gpl-3.0\"\u003e\n        \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/YisusChrist/requests-pprint?color=0088ff\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/YisusChrist/requests-pprint/issues/new/choose\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/YisusChrist/requests-pprint/issues/new/choose\"\u003eRequest Feature\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/YisusChrist/requests-pprint/discussions\"\u003eAsk Question\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/YisusChrist/requests-pprint/security/policy#reporting-a-vulnerability\"\u003eReport security bug\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n![Alt](https://repobeats.axiom.co/api/embed/f0abd941e547c55036eec4b15875c81929581aab.svg \"Repobeats analytics image\")\n\n\u003cbr\u003e\n\n`requests-pprint` is a Python library that allows you to print your HTTP requests and responses in a pretty format. It is based on the `requests` library and uses the `rich` library to print the response in a more readable way.\n\n\u003cdetails\u003e\n\u003csummary\u003eTable of Contents\u003c/summary\u003e\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n  - [From PyPI](#from-pypi)\n  - [Manual installation](#manual-installation)\n  - [Uninstall](#uninstall)\n- [Usage](#usage)\n  - [1. Pretty Print HTTP Request](#1-pretty-print-http-request)\n  - [2. Pretty Print HTTP Response](#2-pretty-print-http-response)\n  - [3. Print Response Summary](#3-print-response-summary)\n  - [4. Pretty Print Asynchronous HTTP Response](#4-pretty-print-asynchronous-http-response)\n  - [5. Pretty Print Asynchronous Response Summary](#5-pretty-print-asynchronous-response-summary)\n- [Contributors](#contributors)\n  - [How do I contribute to requests-pprint?](#how-do-i-contribute-to-requests-pprint)\n- [License](#license)\n\n\u003c/details\u003e\n\n## Requirements\n\nHere's a breakdown of the packages needed and their versions:\n\n- [poetry](https://pypi.org/project/poetry) \u003e= 1.7.1 (_only for manual installation_)\n- [aiohttp](https://pypi.org/project/aiohttp) \u003e= 3.9.5\n- [requests](https://pypi.org/project/requests) \u003e= 2.31.0\n- [rich](https://pypi.org/project/rich) \u003e= 13.7.1\n\n\u003e [!NOTE]\\\n\u003e The software has been developed and tested using Python `3.12.1`. The minimum required version to run the software is Python 3.6. Although the software may work with previous versions, it is not guaranteed.\n\n## Installation\n\n### From PyPI\n\n`requests-pprint` can be installed easily as a PyPI package. Just run the following command:\n\n```bash\npip3 install requests-pprint\n```\n\n\u003e [!IMPORTANT]\\\n\u003e For best practices and to avoid potential conflicts with your global Python environment, it is strongly recommended to install this program within a virtual environment. Avoid using the --user option for global installations. We highly recommend using [pipx](https://pypi.org/project/pipx) for a safe and isolated installation experience. Therefore, the appropriate command to install `requests-pprint` would be:\n\u003e\n\u003e ```bash\n\u003e pipx install requests-pprint\n\u003e ```\n\n### Manual installation\n\nIf you prefer to install the program manually, follow these steps:\n\n\u003e [!NOTE]\\\n\u003e This will install the version from the latest commit, not the latest release.\n\n1. Download the latest version of [requests-pprint](https://github.com/YisusChrist/requests-pprint) from this repository:\n\n   ```sh\n   git clone https://github.com/YisusChrist/requests-pprint\n   cd requests-pprint\n   ```\n\n2. Install the package:\n\n   ```sh\n   poetry install --only main\n   ```\n\n### Uninstall\n\nIf you installed it from PyPI, you can use the following command:\n\n```bash\npipx uninstall requests-pprint\n```\n\n## Usage\n\n### 1. Pretty Print HTTP Request\n\n```python\nimport requests\nfrom requests_pprint import pprint_http_request\n\n# Prepare a sample HTTP request\nurl = 'https://api.example.com'\nheaders = {'User-Agent': 'Mozilla/5.0'}\nbody = {'key': 'value'}\nrequest = requests.Request('POST', url, headers=headers, json=body)\nprepared_request = request.prepare()\n\n# Print the formatted HTTP request\npprint_http_request(prepared_request)\n```\n\nOutput:\n\n![1](https://i.imgur.com/VG7rfZq.png)\n\n### 2. Pretty Print HTTP Response\n\n```python\nimport requests\nfrom requests_pprint import pprint_http_response\n\n# Send a sample HTTP request\nresponse = requests.get('https://example.com')\n\n# Print the formatted HTTP response\npprint_http_response(response)\n```\n\nOutput:\n\n![2](https://i.imgur.com/uDF8sBk.png)\n\n### 3. Print Response Summary\n\n```python\nimport requests\nfrom requests_pprint import print_response_summary\n\n# Send a sample HTTP request\nresponse = requests.get('https://example.com')\n\n# Print a summary of the HTTP response\nprint_response_summary(response)\n```\n\nOutput:\n\n![3](https://i.imgur.com/eCPqCT1.png)\n\n---\n\nSince 2024-07-28, `requests-pprint` supports asynchronous requests from the [aiohttp](https://pypi.org/project/aiohttp) library. You can use the `pprint_async_http_request` and `pprint_async_http_response` functions to print the formatted HTTP request and response, respectively, as well as the `print_async_response_summary` function to print a summary of the HTTP response.\n\nHere is an example of how to use these functions:\n\n### 4. Pretty Print Asynchronous HTTP Response\n\n```python\nimport asyncio\nimport aiohttp\n\nfrom requests_pprint import pprint_async_http_response\n\nasync def main():\n    async with aiohttp.ClientSession() as session:\n        url = \"https://api.example.com\"\n        headers = {\"User-Agent\": \"Mozilla/5.0\"}\n        body = {\"key\": \"value\"}\n        async with session.post(url, headers=headers, json=body) as response:\n            await pprint_async_http_response(response)\n\n\nasyncio.run(main())\n```\n\nOutput:\n\n![4](https://i.imgur.com/uDF8sBk.png)\n\n### 5. Pretty Print Asynchronous Response Summary\n\n```python\nimport asyncio\nimport aiohttp\n\nfrom requests_pprint import print_async_response_summary\n\nasync def main():\n    async with aiohttp.ClientSession() as session:\n        url = \"https://api.example.com\"\n        headers = {\"User-Agent\": \"Mozilla/5.0\"}\n        body = {\"key\": \"value\"}\n        async with session.post(url, headers=headers, json=body) as response:\n            await print_async_response_summary(response)\n\n\nasyncio.run(main())\n```\n\nOutput:\n\n![5](https://i.imgur.com/eCPqCT1.png)\n\n## Contributors\n\n\u003ca href=\"https://github.com/YisusChrist/requests-pprint/graphs/contributors\"\u003e\u003cimg src=\"https://contrib.rocks/image?repo=YisusChrist/requests-pprint\" /\u003e\u003c/a\u003e\n\n### How do I contribute to requests-pprint?\n\nBefore you participate in our delightful community, please read the [code of conduct](https://github.com/YisusChrist/.github/blob/main/CODE_OF_CONDUCT.md).\n\nI'm far from being an expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests!\n\nWe also need people to test out pull requests. So take a look through [the open issues](https://github.com/YisusChrist/requests-pprint/issues) and help where you can.\n\nSee [Contributing Guidelines](https://github.com/YisusChrist/.github/blob/main/CONTRIBUTING.md) for more details.\n\n## License\n\n`requests-pprint` is released under the [GPL-3.0 License](https://opensource.org/license/GPL-3.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyisuschrist%2Frequests-pprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyisuschrist%2Frequests-pprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyisuschrist%2Frequests-pprint/lists"}