https://github.com/edgarrmondragon/backports.httpmethod
A backport of Python 3.11+ http.HTTPMethod enum for Python 3.7+
https://github.com/edgarrmondragon/backports.httpmethod
backports enum
Last synced: 9 months ago
JSON representation
A backport of Python 3.11+ http.HTTPMethod enum for Python 3.7+
- Host: GitHub
- URL: https://github.com/edgarrmondragon/backports.httpmethod
- Owner: edgarrmondragon
- License: mit
- Created: 2023-11-14T05:34:44.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-24T18:05:31.000Z (10 months ago)
- Last Synced: 2025-03-28T02:46:43.493Z (10 months ago)
- Topics: backports, enum
- Language: Python
- Homepage: https://pypi.org/p/backports.httpmethod
- Size: 90.8 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# backports.httpmethod
[](https://pypi.org/project/backports.httpmethod)
[](https://pypi.org/project/backports.httpmethod)
A backport of Python 3.11+ [`http.HTTPMethod`](https://docs.python.org/3/library/http.html#http.HTTPMethod) enum for Python 3.7+.
-----
**Table of Contents**
- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
## Installation
```console
pip install backports.httpmethod
```
## Usage
```python
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] # [, , ]
```
## License
`backports-httpmethod` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.