Skip to main content

requests-h2

Requests that supports HTTP/1.1 and HTTP/2.

It may help people who want requests-style coding to send HTTP2 requests and don't want to upgrade their OpenSSL version, and it allows you to send HTTP/1.1 and HTTP/2 requests extremely easily.

requests-h2是一个支持http2的http请求库,本项目基于requests与httpcore,除增加了额外参数外,与requests使用方法一致。

You use it just like requests:

>>> import requests-h2 as requests
>>> r = requests.get('https://www.google.com', http2=True)
>>> r.status_code
200
>>> r.version
'HTTP/2'

Installation

You can install requests-h2 either via the Python Package Index (PyPI) or from source.

To install using pip:

pip install requests-h2

Requirements

Python 3.7+

Dependencies

  • requests
  • httpcore
  • urllib3<2

Motivation

We are used to using requests to send HTTP requests, but it doesn't support HTTP2 util 2023 and maybe util now. Although there are some libraries which have already supported HTTP2,but it's hard for me to change dependencies,so i created this project to meet my demands. And the urllib3 which requests relies on is doing their effort to support HTTP2,but they need OpenSSL > 1.11,and anyone who don't want to upgrade it still can use this library.

Metadata

Release files for requests-h2 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for requests-h2 0.1.1
File Size Uploaded Provenance
requests-h2-0.1.1.tar.gz 18.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for requests-h2 0.1.1
File Interpreter ABI Platform
requests_h2-0.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 37.9 kB

Release files / requests-h2-0.1.1.tar.gz

Download URL requests-h2-0.1.1.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0ee762d1b4786aefa99098a650b823e01dbe787dd91da386882037aeb6bb43ff
BLAKE2b-256 checksum
How to use checksums
9dfd34c770eb2c49fe099fc17269e4d5dea8c00954f71f29045100f01d2d0b74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / requests_h2-0.1.1-py2.py3-none-any.whl

Download URL requests_h2-0.1.1-py2.py3-none-any.whl
Size 19.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
657fb8ed40ccccca088366d6b8331a0aa75b56a63166b3532ea0b5c2990ec8b4
BLAKE2b-256 checksum
How to use checksums
104471391843a457245b13cc803b838960894ad502e0c8a31c6ff62041f99b1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Security for requests-h2 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page