Skip to main content

A backport of Python 3.11+ `http.HTTPMethod` enum

Project description

backports.httpmethod

PyPI - Version PyPI - Python Version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

backports_httpmethod-0.2.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

backports_httpmethod-0.2.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

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

Hashes for backports_httpmethod-0.2.1.tar.gz
Algorithm Hash digest
SHA256 dd730ceb82e646bbea5747ccdc89b670adfd1626a621282c51b1b514e89a88fe
MD5 4fdb43cfc99e37ac21f380633f9eb98e
BLAKE2b-256 599aa2d5d34f62039135fe7f876dcd6d70f98aa2b7c6946ce709b2344f658453

See more details on using hashes here.

File details

Details for the file backports_httpmethod-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for backports_httpmethod-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ff5d1323c6dfaaa436c69673307dbf555dc623de92d33063cf9de1cbe9ce558
MD5 b7743141b19d5f6b5fe66b2408c82e4b
BLAKE2b-256 c66e5c6808bff6e2f34b55ca05aedc2475f14ff70388d05f4556e89085b73e7d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page