A backport of Python 3.11+ `http.HTTPMethod` enum
Project description
backports.httpmethod
A backport of Python 3.11+ http.HTTPMethod
enum for Python 3.7+.
Table of Contents
Installation
pip install backports.httpmethod
Usage
import sys
if sys.version_info >= (3, 11):
from http import HTTPMethod
else:
from backports.httpmethod import HTTPMethod
HTTPMethod.GET == 'GET' # True
HTTPMethod.GET.value # 'GET'
HTTPMethod.GET.description # 'Retrieve the target.'
list(HTTPMethod)[:3] # [<HTTPMethod.GET: 'GET'>, <HTTPMethod.HEAD: 'HEAD'>, <HTTPMethod.POST: 'POST'>]
License
backports-httpmethod
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
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 backports_httpmethod-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f9ba53a2e4b1cd33eddf09a552c1718aa35eeb1dc5b2fdef110c60f5b1a54cd |
|
MD5 | edce1fc05542237aa264dc9ce7f7ec7d |
|
BLAKE2b-256 | 391a9d32a974c507635875db5972c8adc5c1224bc61362e8cf3710442c0e7400 |
Close
Hashes for backports_httpmethod-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f055b990c645588f621b951d65fe635d5ee09c973ea785c9788a9f3fb865e9f |
|
MD5 | 8100a5c4752cc4e6c53298ce17c3f68d |
|
BLAKE2b-256 | bf6916339d6925bd58ae7b6e99408c63868868f5bc75dcba1266a5f6c074fdf1 |