Skip to main content

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

Project description

pyhttpstatus-utils

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

Badges

docs

Documentation Status License Status

info

Hit Count Contributors

tests

Travis-CI Build Status Code Coverage Status

package

PyPI Package latest release Supported versions

other

Requirements Status

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

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

pyhttpstatus-utils-0.2.2.tar.gz (10.1 kB view hashes)

Uploaded Source

Built Distributions

pyhttpstatus_utils-0.2.2-py3.6.egg (17.6 kB view hashes)

Uploaded Source

pyhttpstatus_utils-0.2.2-py3-none-any.whl (12.3 kB view hashes)

Uploaded Python 3

Supported by

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