HTTP Request Methods
HTTP verbs that python core's HTTP parser supports.
This module provides an export that is just like HTTP request methods from Developer Mozilla, with the following differences:
- All method names are lower-cased.
- All method names are upper-cased.
HTTP Status Codes
Also this module provides a list with all HTTP Status Codes and you can get only status description by status code or get all status.
We use the methods package from Node.js as inspiration
Install
Install and update using Pip:
$ pip install httpmethods
API
import httpmethods as methods
A Simple Example
from httpmethods import get_http_methods
for method in get_http_methods():
print(method)
$ get
$ post
$ put
$ delete
$ ...
from httpmethods import get_http_methods
for _method in get_http_methods(uppercase=True):
print(_method)
$ GET
$ POST
$ PUT
$ DELETE
$ ...
from httpmethods import get_status_codes, get_status_by_code
print(get_status_by_code(200))
print(get_status_by_code(401))
print(get_status_codes())
$ 200 OK
$ 401 Unauthorized
$ {
$ 100: "100 Continue",
$ 101: "101 Switching Protocols",
$ 103: "103 Early Hints",
$ ...
$ }
License
Metadata
Release files for httpmethods 1.0.5
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 | |
|---|---|---|---|---|
| httpmethods-1.0.5.tar.gz | 3.4 kB | Without provenance | Details |
Release files / httpmethods-1.0.5.tar.gz
| Download URL | httpmethods-1.0.5.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce2c4b14a470fc2d07ca3e0e47d23922c257b187d6637692beef311f12e42929
|
|
BLAKE2b-256 checksum How to use checksums |
9284a89e1a205dd71a8b9f17b6f8a4f4007e5418aa7e6b94969f4d45301b71d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.1
|
Security for httpmethods 1.0.5
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.