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.3.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.3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hhttpcode-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 41d625f903895d98e7f9f0891a1b97d798fdc8bc2773cae76f6f1a42a9bc5c84
MD5 beaf65b3b769e6188190c3850eee262e
BLAKE2b-256 ad10a604174fdae0ff570dd892568e32445090c0583eb0ebaff825c03f42f7fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hhttpcode-1.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f83c3ff2d5ee6fa87e6ef695b94e083e3cdd4c4fe023ca3c1f33e130dd5f7750
MD5 4e1791e6e3c4d107becde7fa375ff47d
BLAKE2b-256 b1af4f1afa5810e98c87feec09aa88e4476d1ad39356fd6143ba5e52c40e055d

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