{"id":13468795,"url":"https://github.com/reorx/httpstat","last_synced_at":"2025-05-13T23:07:26.837Z","repository":{"id":37334324,"uuid":"66913302","full_name":"reorx/httpstat","owner":"reorx","description":"curl statistics made simple","archived":false,"fork":false,"pushed_at":"2023-10-03T17:31:57.000Z","size":355,"stargazers_count":6074,"open_issues_count":7,"forks_count":387,"subscribers_count":132,"default_branch":"master","last_synced_at":"2025-04-29T18:59:55.444Z","etag":null,"topics":["cli","curl","http","python","visualization"],"latest_commit_sha":null,"homepage":"","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/reorx.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,"governance":null}},"created_at":"2016-08-30T06:30:59.000Z","updated_at":"2025-04-28T23:01:56.000Z","dependencies_parsed_at":"2023-02-19T01:01:06.054Z","dependency_job_id":"ba838b6c-edca-4bb0-bb3c-b15cbcb99f17","html_url":"https://github.com/reorx/httpstat","commit_stats":{"total_commits":84,"total_committers":5,"mean_commits":16.8,"dds":0.04761904761904767,"last_synced_commit":"5b593d7b790e0d6ce5ae7da39a3648d0200abfe0"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reorx%2Fhttpstat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reorx%2Fhttpstat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reorx%2Fhttpstat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reorx%2Fhttpstat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reorx","download_url":"https://codeload.github.com/reorx/httpstat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251565802,"owners_count":21609979,"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":["cli","curl","http","python","visualization"],"created_at":"2024-07-31T15:01:19.240Z","updated_at":"2025-04-29T18:59:59.769Z","avatar_url":"https://github.com/reorx.png","language":"Python","readme":"# httpstat\n\n![screenshot](screenshot.png)\n\nhttpstat visualizes `curl(1)` statistics in a way of beauty and clarity.\n\nIt is a **single file🌟** Python script that has **no dependency👏** and is compatible with **Python 3🍻**.\n\n\n## Installation\n\nThere are three ways to get `httpstat`:\n\n- Download the script directly: `wget https://raw.githubusercontent.com/reorx/httpstat/master/httpstat.py`\n\n- Through pip: `pip install httpstat`\n\n- Through homebrew (macOS only): `brew install httpstat`\n\n\u003e For Windows users, @davecheney's [Go version](https://github.com/davecheney/httpstat) is suggested. → [download link](https://github.com/davecheney/httpstat/releases)\n\n## Usage\n\nSimply:\n\n```bash\npython httpstat.py httpbin.org/get\n```\n\nIf installed through pip or brew, you can use `httpstat` as a command:\n\n```bash\nhttpstat httpbin.org/get\n```\n\n### cURL Options\n\nBecause `httpstat` is a wrapper of cURL, you can pass any cURL supported option after the url (except for `-w`, `-D`, `-o`, `-s`, `-S` which are already used by `httpstat`):\n\n```bash\nhttpstat httpbin.org/post -X POST --data-urlencode \"a=b\" -v\n```\n\n### Environment Variables\n\n`httpstat` has a bunch of environment variables to control its behavior.\nHere are some usage demos, you can also run `httpstat --help` to see full explanation.\n\n- \u003cstrong\u003e\u003ccode\u003eHTTPSTAT_SHOW_BODY\u003c/code\u003e\u003c/strong\u003e\n\n  Set to `true` to show response body in the output, note that body length\n  is limited to 1023 bytes, will be truncated if exceeds. Default is `false`.\n\n- \u003cstrong\u003e\u003ccode\u003eHTTPSTAT_SHOW_IP\u003c/code\u003e\u003c/strong\u003e\n\n  By default httpstat shows remote and local IP/port address.\n  Set to `false` to disable this feature. Default is `true`.\n\n- \u003cstrong\u003e\u003ccode\u003eHTTPSTAT_SHOW_SPEED\u003c/code\u003e\u003c/strong\u003e\n\n  Set to `true` to show download and upload speed.  Default is `false`.\n\n  ```bash\n  HTTPSTAT_SHOW_SPEED=true httpstat http://cachefly.cachefly.net/10mb.test\n  \n  ...\n  speed_download: 3193.3 KiB/s, speed_upload: 0.0 KiB/s\n  ```\n\n- \u003cstrong\u003e\u003ccode\u003eHTTPSTAT_SAVE_BODY\u003c/code\u003e\u003c/strong\u003e\n\n  By default httpstat stores body in a tmp file,\n  set to `false` to disable this feature. Default is `true`\n\n- \u003cstrong\u003e\u003ccode\u003eHTTPSTAT_CURL_BIN\u003c/code\u003e\u003c/strong\u003e\n\n  Indicate the cURL bin path to use. Default is `curl` from current shell $PATH.\n\n  This exampe uses brew installed cURL to make HTTP2 request:\n\n  ```bash\n  HTTPSTAT_CURL_BIN=/usr/local/Cellar/curl/7.50.3/bin/curl httpstat https://http2.akamai.com/ --http2\n  \n  HTTP/2 200\n  ...\n  ```\n\n  \u003e cURL must be compiled with nghttp2 to enable http2 feature\n  \u003e ([#12](https://github.com/reorx/httpstat/issues/12)).\n\n- \u003cstrong\u003e\u003ccode\u003eHTTPSTAT_METRICS_ONLY\u003c/code\u003e\u003c/strong\u003e\n\n  If set to `true`, httpstat will only output metrics in json format,\n  this is useful if you want to parse the data instead of reading it.\n\n- \u003cstrong\u003e\u003ccode\u003eHTTPSTAT_DEBUG\u003c/code\u003e\u003c/strong\u003e\n\n  Set to `true` to see debugging logs. Default is `false`\n\n\nFor convenience, you can export these environments in your `.zshrc` or `.bashrc`,\nexample:\n\n```bash\nexport HTTPSTAT_SHOW_IP=false\nexport HTTPSTAT_SHOW_SPEED=true\nexport HTTPSTAT_SAVE_BODY=false\n```\n\n## Related Projects\n\nHere are some implementations in various languages:\n\n\n- Go: [davecheney/httpstat](https://github.com/davecheney/httpstat)\n\n  This is the Go alternative of httpstat, it's written in pure Go and relies no external programs. Choose it if you like solid binary executions (actually I do).\n\n- Go (library): [tcnksm/go-httpstat](https://github.com/tcnksm/go-httpstat)\n\n  Other than being a cli tool, this project is used as library to help debugging latency of HTTP requests in Go code, very thoughtful and useful, see more in this [article](https://medium.com/@deeeet/trancing-http-request-latency-in-golang-65b2463f548c#.mm1u8kfnu)\n\n- Bash: [b4b4r07/httpstat](https://github.com/b4b4r07/httpstat)\n\n  This is what exactly I want to do at the very beginning, but gave up due to not confident in my bash skill, good job!\n\n- Node: [yosuke-furukawa/httpstat](https://github.com/yosuke-furukawa/httpstat)\n\n  [b4b4r07](https://twitter.com/b4b4r07) mentioned this in his [article](https://tellme.tokyo/post/2016/09/25/213810), could be used as a HTTP client also.\n\n- PHP: [talhasch/php-httpstat](https://github.com/talhasch/php-httpstat)\n\n  The PHP implementation by @talhasch\n\nSome code blocks in `httpstat` are copied from other projects of mine, have a look:\n\n- [reorx/python-terminal-color](https://github.com/reorx/python-terminal-color) Drop-in single file library for printing terminal color.\n\n- [reorx/getenv](https://github.com/reorx/getenv) Environment variable definition with type.\n","funding_links":[],"categories":["Python","Networking Tools \u0026 Concepts","Lovely Commands","Python (1887)","Programming Languages","HTTP Clients","Useful Command Line Tools","visualization","CLIs","Networking"],"sub_categories":["Configure WDT service","Enable Proton in Steam","Python","viii. Linear Regression","JavaScript Libraries for Machine Learning","HTTP Clients"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freorx%2Fhttpstat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freorx%2Fhttpstat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freorx%2Fhttpstat/lists"}