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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5c59f64ff5430cec8c18358574a65704c6a905b901db47e6ea328e8d5a4a83c |
|
MD5 | c11624af7530ed2014df5e3f1ba2d5a0 |
|
BLAKE2b-256 | a53ceab641455d1c5dd2796001273a72e7b10fe96ba4afbdc78a407cd95e77f8 |
Close
Hashes for backports_httpmethod-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 461ec4a698c75e501123ce50ccd625087c4d9cdcf1d6744f2300ec6fe3856a8a |
|
MD5 | 3549b9b3fe8937e4e2e221d44ebb0be6 |
|
BLAKE2b-256 | 96a96bfbc2e872d806aff03a746c53f2f66bd2665a8225b21f2586e342128c15 |