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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd730ceb82e646bbea5747ccdc89b670adfd1626a621282c51b1b514e89a88fe |
|
MD5 | 4fdb43cfc99e37ac21f380633f9eb98e |
|
BLAKE2b-256 | 599aa2d5d34f62039135fe7f876dcd6d70f98aa2b7c6946ce709b2344f658453 |
Close
Hashes for backports_httpmethod-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ff5d1323c6dfaaa436c69673307dbf555dc623de92d33063cf9de1cbe9ce558 |
|
MD5 | b7743141b19d5f6b5fe66b2408c82e4b |
|
BLAKE2b-256 | c66e5c6808bff6e2f34b55ca05aedc2475f14ff70388d05f4556e89085b73e7d |