skip to navigation
skip to content

pyhttpstatus-utils 0.2.2

Extension of Python Standard Library http.HTTPStatus providing addtional utilities.

pyhttpstatus-utils

Extension of Python Standard Library’s http.HTTPStatus providing mapping of HTTP statuses.

Badges

docs
info
tests
package
other

Install

pip install pyhttpstatus-utils

Functions

  • http_status_dict(override_dict=None): HTTP Status Dictionary with Overrides if provided.
  • http_status_code_to_desc(http_status_code): Get HTTP status code description.
  • http_status_code_to_type(http_status_code): Get HTTP Status Code Type.
  • is_http_status_type(http_status_code): Match if provided HTTP Status Code is expected HTTP Status Code Type.
  • is_http_status_successful(http_status_code): Check if HTTP Status Code is type Successful
  • validate_http_code(http_code, minimum=100, maximum=599, strict=True, default_http_code=0): Validate HTTP code. If strict, throw, else just return default_http_code.

HTTP Status Code Types

  • 100: HttpStatusType.INFORMATIONAL,
  • 200: HttpStatusType.SUCCESSFUL,
  • 300: HttpStatusType.REDIRECTION,
  • 400: HttpStatusType.CLIENT_ERROR,
  • 500: HttpStatusType.SERVER_ERROR

Requirements

pyhttpstatus-utils module is built upon Python 3 and has dependencies upon several Python modules available within Python Package Index PyPI.

make install-requirements

or

python3 -m pip uninstall --yes --no-input -r requirements.txt
python3 -m pip install --upgrade -r requirements.txt

Dependencies

Release History

0.2.2 (2017-12-10)

  • readthedocs.org

0.2.0 (2017-12-05)

  • README.rst
  • Tests
  • Travis CI

0.1.1 (2016-11-22)

  • Makefile and yapf cleanup

0.1.0 (2016-11-17)

  • Initial Code
  • Code pulled from TuneLab/tune-mv-integration-python

0.0.1 (2016-11-17)

  • Initial commit
 
File Type Py Version Uploaded on Size
pyhttpstatus-utils-0.2.2.tar.gz (md5) Source 2017-12-10 9KB
pyhttpstatus_utils-0.2.2-py3-none-any.whl (md5) Python Wheel 3.6 2017-12-10 12KB
pyhttpstatus_utils-0.2.2-py3.6.egg (md5) Python Egg 3.6 2017-12-10 17KB