Hyper HTTP/2 Client for Python (hyper-up)

0.9.0 · abandoned · verified Thu Apr 16

hyper-up is a Python HTTP/2 client library, providing an API similar to Python's `http.client` for interacting with HTTP/2 servers. It is a fork of the `hyper` project by Lukasa, which has been explicitly abandoned since 2021. The `hyper-up` package itself has not seen updates since 2017, making it unmaintained and potentially insecure. Users are strongly advised to use modern, actively maintained HTTP clients instead.

Common errors

Warnings

Install

Imports

Quickstart

Establishes an HTTP/2 connection to a server, sends a GET request, and prints the response. This example is based on the original `hyper` library's usage, which `hyper-up` replicates. Due to the library's unmaintained status, connecting to modern HTTPS servers might encounter SSL/TLS errors or security warnings.

import ssl
from hyper import HTTPConnection

# Note: http2bin.org is an example; actual HTTP/2 server availability may vary.
# This library is unmaintained and may have security vulnerabilities.
try:
    # Using HTTPS for HTTP/2. The default port for HTTP/2 over TLS is 443.
    conn = HTTPConnection('http2bin.org:443')
    conn.request('GET', '/get')
    resp = conn.get_response()
    print(f"Status: {resp.status}")
    print(f"Headers: {resp.headers}")
    print(f"Body: {resp.read().decode('utf-8')}")
except ssl.SSLError as e:
    print(f"SSL Error: {e}. This often indicates issues with TLS negotiation or outdated cryptography.")
except Exception as e:
    print(f"An unexpected error occurred: {e}")

view raw JSON →