backports-httpmethod 0.2.1

Last updated:

0 purchases

backports-httpmethod 0.2.1 Image
backports-httpmethod 0.2.1 Images
Add to Cart

Description:

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.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.