Extension of Python package pyhttpstatus providing addtional utilities.
Project description
pyhttpstatus-utils
Extension of Python package pyhttpstatus providing mapping of HTTP statuses.
Badges
info |
|
---|---|
tests |
|
package |
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
Built Distributions
File details
Details for the file pyhttpstatus-utils-0.2.0.tar.gz
.
File metadata
- Download URL: pyhttpstatus-utils-0.2.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dda6cf3810241aa454bb704856ee326714d42674f5171cd67b3ea64316c7baa |
|
MD5 | 779b0a7f63b022151eea614ce1c2c28a |
|
BLAKE2b-256 | 2c6e13f2c5c70eebdd09a3988d3ff6bbdb2caf5540f6a79f80abd12f50a260e8 |
File details
Details for the file pyhttpstatus_utils-0.2.0-py3.6.egg
.
File metadata
- Download URL: pyhttpstatus_utils-0.2.0-py3.6.egg
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5faf30fae118037c378a5bfb3c0cdcbe10b955f510f6cdfc9a5d31d5a0c2ff76 |
|
MD5 | 01a7bc7b55c54ecf81c0962ed6540096 |
|
BLAKE2b-256 | 90d8f2cf2f7c7d99628c3e47e1433efd89016968cf73aec9deb48500b6c8084b |
File details
Details for the file pyhttpstatus_utils-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: pyhttpstatus_utils-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 277b0945c83d794c59a53f7ee499181513e1e55ff2bbbf4d6f82867727ee6b62 |
|
MD5 | 4b5986abed034d5483f8d91dbc001d48 |
|
BLAKE2b-256 | 384d4262b04226f79e1c95190101138f36073d42fcb68afb2e2c56c425a65a51 |