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.2.tar.gz (19.0 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.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hhttpcode-1.0.2.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for hhttpcode-1.0.2.tar.gz
Algorithm Hash digest
SHA256 1d845d236add3ce94428359af403152803d17cf70168dcfa4e44c857c71eacae
MD5 b7d3991f596dea022a4d44f235cdaa58
BLAKE2b-256 97bfa7a688161e8c348988a446779bcbaea69a0f872a189b4dd127008cf3965d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hhttpcode-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for hhttpcode-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87d97bcd25632272212b93f85b320deaa0f67a1f18cc1aea59c42cb3a38bcfcf
MD5 0ed7beb1e3b53c6619861fe3166e8516
BLAKE2b-256 245087339b3d6822346cdac80592749a52fe8f695790b64893e483eea1adbfa7

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