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.2.0.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for http_constants-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9ec2c87a083220823304fa5da68fa5696d4e8b2f3fea9982eca13df5e38ddcb |
|
MD5 | d4437fc502c5c4c1669a22457b8bc189 |
|
BLAKE2b-256 | fdae3dd475ff2c451519320eb37fac4624c64c15dae73ed4029a5c3abeff951a |