Skip to main content

Rust-backed sans-IO HTTP/2 codec for Python, wrapping the h2 crate

Project description

rh2

A Rust-backed, sans-IO HTTP/2 codec for Python, wrapping the h2 crate (the HTTP/2 implementation behind hyper/reqwest) via PyO3.

The h2 crate drives a connection over an async transport; rh2 runs it sans-IO by backing that transport with in-memory buffers and pumping the state machine by hand. The Python API mirrors hyper-h2:

import rh2

conn = rh2.H2Connection()
events = conn.receive_data(data_from_socket)
for event in events:
    if isinstance(event, rh2.RequestReceived):
        conn.send_headers(event.stream_id, 200, [(b"content-type", b"text/plain")])
        conn.send_data(event.stream_id, b"hello", end_stream=True)
socket.sendall(conn.data_to_send())

Status

Experimental. Server-side only.

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

rh2-0.0.2.tar.gz (11.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rh2-0.0.2-cp39-abi3-win_amd64.whl (317.6 kB view details)

Uploaded CPython 3.9+Windows x86-64

rh2-0.0.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (434.5 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

rh2-0.0.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (425.9 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

rh2-0.0.2-cp39-abi3-macosx_11_0_arm64.whl (395.3 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file rh2-0.0.2.tar.gz.

File metadata

  • Download URL: rh2-0.0.2.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rh2-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5c3b45f87aa2a3e3be6c39628553edd3ca1a1d5d8e6a086b305f07c2819c9ebe
MD5 dd2b5736d0b21270554cc5dd76c09dc2
BLAKE2b-256 6f949ca8dd007a64edadbb49f2e16907474ed22c0cd8a0e4a04f63c17a0225e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for rh2-0.0.2.tar.gz:

Publisher: publish.yml on Kludex/rh2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rh2-0.0.2-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: rh2-0.0.2-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 317.6 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rh2-0.0.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4ec195ef991ecdd99918f5914d0b72560b35b6be4d408505ad540f2ffe17630d
MD5 ab9f1f106160ebe85bb2b516e532c5aa
BLAKE2b-256 94d5940a3d3a86ba69a63532da3f431aa6b52116d0a5a46ba18439e11546a22c

See more details on using hashes here.

Provenance

The following attestation bundles were made for rh2-0.0.2-cp39-abi3-win_amd64.whl:

Publisher: publish.yml on Kludex/rh2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rh2-0.0.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rh2-0.0.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b18f95b17f20e41b295c69253c185cdc1123d9f426d867758379d12cc39db12
MD5 8813e783055f36120d720f2c0c154d93
BLAKE2b-256 9635b265e88d6837fd148c65586e80b46ed0c7f5b1ba2ba939d12301474cd6a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rh2-0.0.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on Kludex/rh2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rh2-0.0.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rh2-0.0.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d0ce02e0156dffc490f722be892cefc6928392dd6dfe31c08a887ff2fba41876
MD5 91ef4234888ee14f62755627f836dfef
BLAKE2b-256 1cb3f0ad9267bb2b44bdc64fd818e8bdf892863a78cd49a710e6ae8df4371df3

See more details on using hashes here.

Provenance

The following attestation bundles were made for rh2-0.0.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on Kludex/rh2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rh2-0.0.2-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: rh2-0.0.2-cp39-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 395.3 kB
  • Tags: CPython 3.9+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rh2-0.0.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c3e7355695519591f7f10d19502b10988aee267d74f41407cc7bea21ce2ae55
MD5 1579f6264e455842e25f1468073e7e4f
BLAKE2b-256 5847a4f82ea713423e00767fc71be3b077a9bd1eefda117ed51963425e10fe82

See more details on using hashes here.

Provenance

The following attestation bundles were made for rh2-0.0.2-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: publish.yml on Kludex/rh2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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