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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file backports_httpmethod-0.2.1.tar.gz.
File metadata
- Download URL: backports_httpmethod-0.2.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd730ceb82e646bbea5747ccdc89b670adfd1626a621282c51b1b514e89a88fe
|
|
| MD5 |
4fdb43cfc99e37ac21f380633f9eb98e
|
|
| BLAKE2b-256 |
599aa2d5d34f62039135fe7f876dcd6d70f98aa2b7c6946ce709b2344f658453
|
File details
Details for the file backports_httpmethod-0.2.1-py3-none-any.whl.
File metadata
- Download URL: backports_httpmethod-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ff5d1323c6dfaaa436c69673307dbf555dc623de92d33063cf9de1cbe9ce558
|
|
| MD5 |
b7743141b19d5f6b5fe66b2408c82e4b
|
|
| BLAKE2b-256 |
c66e5c6808bff6e2f34b55ca05aedc2475f14ff70388d05f4556e89085b73e7d
|