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.0.1a1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5edfb1b0a7d970014b680d6ade735af0d1ea64b6347259530efe18a174f1d26e |
|
MD5 | 3b9b1747dc0b9cb5bc4e7afdd87f7e7e |
|
BLAKE2b-256 | 2b5ba7cb5d8dfa905b9dfa6e055547af15f769623d78972e07d9117493cab3de |
Close
Hashes for backports_httpmethod-0.0.1a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff16df35ad3b755eade6293d9a05464cc47e75f9d3224987f25f687c830380ae |
|
MD5 | 3ae32489c3cdf3194df56f3d6a0e6728 |
|
BLAKE2b-256 | e8d80890be5fab547ce103a767d9bb14e9e9a7d53686454bffe37d42bbbcd67a |