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 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 run

Install requirements.txt using pip install -r requirements.txt. Although not required, setting up a virtualenv is advised.

Using Python

python main.py <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="path/to/python /path/to/main.py $@"

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="path/to/python /path/to/main.py" $*

Arguments

The usage for the tool is as follows:

python main.py <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.1.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.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hhttpcode-1.0.1.tar.gz
  • Upload date:
  • Size: 19.1 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.1.tar.gz
Algorithm Hash digest
SHA256 21739277f395df1cb777841727f1cc0f364cc0f9120336b943b75d90b77e69c8
MD5 8f88035969e9f0037ca9debac6fc3f17
BLAKE2b-256 9ded4b3ce090e6e07785469d83679094ec4b323c76314ba403d5d8e6280d6a1a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hhttpcode-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a25470cf1f7254c8258229d2283d6b778bf694584f99cc819a8b4262c8136517
MD5 04591b6d00709b9d17d3b448ba0ff7de
BLAKE2b-256 58293dd9b09d05d02f8d6ab2197d3274d151a216a15528a169edca8bdc39bcd3

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