Skip to main content

Quickly look up HTTP codes in the terminal

Project description

HTTP Code Lookup

Allows you to very quickly view and search an offline version of the Wikipedia's HTTP Codes page.

What the hell is this?

Look up specific codes

code lookup

Filter using wildcards

wildcard lookup

Don't know the status code?

text lookup

How to Install

pip install hhttpcode

Using Python

python -m http-code <search_term>

Using alias/DOSKEY

Setting up an alias for the script will allow you to use a custom, short "name" for any action.

For Unix systems place the following into .bashrc or .zshrc

alias http-code="python -m httcode $@"

For Windows place the following into your bat file that runs on terminal startup. If you do not know how to set this up, look into this answer on Stack Overflow

DOSKEY http-code="python -m httcode" $*

Arguments

The usage for the tool is as follows:

http-code <search_term> --output-as-json --no-pretty --indent-size --no-colour
  • <search_term>
    • Mandatory: Can be either a 3 digit code (use x to replace unknowns, eg: 2xx for all codes starting with 2) or a text search.
  • --output-as-json
    • Optional: Output as JSON, by default will pretty-print JSON... use --no-pretty to disable
  • --no-pretty
    • Optional: Disable pretty printing of JSON, does nothing without --output-as-json flag set
  • --indent-size
    • Optional: Change the default (2) indent size
  • --no-colour
    • Optional: Disable colour for non-JSON output

How to test

python tests/test.py

Known Issues

  • Tests don't run on Windows systems :|

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

hhttpcode-1.0.4.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hhttpcode-1.0.4-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file hhttpcode-1.0.4.tar.gz.

File metadata

  • Download URL: hhttpcode-1.0.4.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for hhttpcode-1.0.4.tar.gz
Algorithm Hash digest
SHA256 b8664fd085bce4cfc40d1e82bee820a1cce95185370998a1f694e0e75b8512fd
MD5 f4377d2e2ba08a926da6515354292f2d
BLAKE2b-256 5b33c7196569d41c10509e8445cf4a32723930e12fb38e1a5ff37c577a4d9c06

See more details on using hashes here.

File details

Details for the file hhttpcode-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: hhttpcode-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for hhttpcode-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fddb9ba71fa3c492b40e2f00eb6b42e21438a633cf6d1d8ba1ed0d9df63e9941
MD5 2b68751205475d3bf4e82bb0203b3b60
BLAKE2b-256 297134af8328e9466764d2bc16f8804d3feeb582fccabd57ac1073499cfc66f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page