Last updated:
0 purchases
backportshttpmethod 0.2.1
backports.httpmethod
A backport of Python 3.11+ http.HTTPMethod enum for Python 3.7+.
Table of Contents
Installation
Usage
License
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.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.