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.0b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22d8196b37127c501b7f881bcbf7fa955bfd4bcda3cb553a6c6bec037d178c5e |
|
MD5 | c39da336c477fe6e02760cdcf69bd6cb |
|
BLAKE2b-256 | 8f4cfadad92f7536bd0be2a649484506bc9af278e3f2551cbbab82878d8d1670 |
Close
Hashes for backports_httpmethod-0.2.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72b7de374ada35f1896ee2b793fc309acb40875bbe0b0309e714fac88473bcf0 |
|
MD5 | 53167b2f85130f665fa06a571b1c2a53 |
|
BLAKE2b-256 | 303cfe9464b08a3c492692fc61ce4de8bba5565f9c157a781d718448fe6a255b |