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.value
503
>>> int(HttpStatus.SERVICE_UNAVAILABLE)
503
>>> HttpStatus.SERVICE_UNAVAILABLE.reason_phrase
'Service Unavailable'
>>> str(HttpStatus.SERVICE_UNAVAILABLE)
'503 SERVICE_UNAVAILABLE'
Metadata
Release files for http-constants 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| http-constants-0.5.0.tar.gz | 6.3 kB | Without provenance | Details for http-constants-0.5.0.tar.gz |
Release files / http-constants-0.5.0.tar.gz
| Download URL | http-constants-0.5.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
151cb595a0964110ee51e1f5bf09c1b30b025de37f32688f3d0ca58fc8dae43e
|
|
BLAKE2b-256 checksum How to use checksums |
d5333d45bce979cbcb87e9390240b2f2446a43f38816fc64ca084c2eb305c7c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
|
Security for http-constants 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.