The set of standard http constants for headers and statuses
Project description
Http Constants
A set of constants for HTTP statuses and headers.
Installation
You can install Http Constants from PyPI:
pip install http-constants
The library is supported on Python 3.7+.
Usage
Headers
from http_constants.headers import HttpHeaders
HttpHeaders.ACCEPT
> 'Accept'
HttpHeaders.CONTENT_TYPE_VALUES.json
> 'application/json'
Statuses
from http_constants.status import HttpStatus
> HttpStatus.SERVICE_UNAVAILABLE
<HttpStatus.SERVICE_UNAVAILABLE: (503, 'Service Unavailable')>
HttpStatus.SERVICE_UNAVAILABLE.get_value()
> 503
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
http-constants-0.4.0.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for http_constants-0.4.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4269da7bac8dc50d294d7f086c75d927a56137f7fec86a5d738f265b3d3dec2e |
|
MD5 | 1bca7fa0d189ed1f19223b35691b11b1 |
|
BLAKE2b-256 | 7ca50fd7ea7cacca94d90b814e0a25d5c803c5b15f35d9a929f0785036b69558 |