The set of standard http constants
Project description
HTTP Status Constants
A set of constants for HTTP statuses and headers. Improve your code readability.
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
In[1]:
from http_constants import status
status.SERVICE_UNAVAILABLE
Out[1]:
503
---
In[2]:
from http_constants.status import HttpStatus
HttpStatus(500).get_meaning()
Out[2]:
'Internal Server Error'
Methods
In[1]:
from http_constants import method
method.GET
Out[1]:
"GET"
URI Schemas
In[1]:
from http_constants import schema
schema.HTTP
Out[1]:
"http"
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 Distribution
Close
Hashes for http_status_codes-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2c3779c0d1e6421071701c7a678274432a920efc298bf36bf5100a0ce76216b |
|
MD5 | 7f05983fe2ffac13a902a85b03dad20d |
|
BLAKE2b-256 | 6920742a8d41147cc5777f176ea12260fe5a45ecfd3bd40dbb9c4401e458ae64 |