Skip to main content

Extension of Python package pyhttpstatus providing addtional utilities.

Project description

pyhttpstatus-utils

Extension of Python package pyhttpstatus providing mapping of HTTP statuses.

Badges

info

License Status Hit Count Contributors

tests

Travis-CI Build Status Code Coverage Status

package

PyPI Package latest release Supported versions 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.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.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distributions

pyhttpstatus_utils-0.2.0-py3.6.egg (17.6 kB view details)

Uploaded Source

pyhttpstatus_utils-0.2.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file pyhttpstatus-utils-0.2.0.tar.gz.

File metadata

File hashes

Hashes for pyhttpstatus-utils-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4dda6cf3810241aa454bb704856ee326714d42674f5171cd67b3ea64316c7baa
MD5 779b0a7f63b022151eea614ce1c2c28a
BLAKE2b-256 2c6e13f2c5c70eebdd09a3988d3ff6bbdb2caf5540f6a79f80abd12f50a260e8

See more details on using hashes here.

File details

Details for the file pyhttpstatus_utils-0.2.0-py3.6.egg.

File metadata

File hashes

Hashes for pyhttpstatus_utils-0.2.0-py3.6.egg
Algorithm Hash digest
SHA256 5faf30fae118037c378a5bfb3c0cdcbe10b955f510f6cdfc9a5d31d5a0c2ff76
MD5 01a7bc7b55c54ecf81c0962ed6540096
BLAKE2b-256 90d8f2cf2f7c7d99628c3e47e1433efd89016968cf73aec9deb48500b6c8084b

See more details on using hashes here.

File details

Details for the file pyhttpstatus_utils-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyhttpstatus_utils-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 277b0945c83d794c59a53f7ee499181513e1e55ff2bbbf4d6f82867727ee6b62
MD5 4b5986abed034d5483f8d91dbc001d48
BLAKE2b-256 384d4262b04226f79e1c95190101138f36073d42fcb68afb2e2c56c425a65a51

See more details on using hashes here.

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