Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

dhttp API bindings

dhttp-api publishes language bindings for the Rust dhttp endpoint facade.

Node SDK

@genmeta/dhttp follows Node/Undici. Root exports Endpoint, callable Service, standard Web Request/Response/Headers/ReadableStream, plain object EndpointOptions, and authority capability interfaces. @genmeta/dhttp/raw exposes Connection, UnresolvedRequest, MessageReader, MessageWriter, and HeaderField.

Node entry points

import { Endpoint, Service } from "@genmeta/dhttp";
import { Connection, UnresolvedRequest } from "@genmeta/dhttp/raw";

CommonJS is also supported:

const { Endpoint, Service } = require("@genmeta/dhttp");
const raw = require("@genmeta/dhttp/raw");

Node endpoint options

const endpoint = await Endpoint.create({
  identity,
  dnsSchemes: ["h3", "mdns", "system"],
  bindPatterns: ["*"],
});

EndpointOptions is a plain object TypeScript interface. There is no public new EndpointOptions() helper in the root package.

Node server API

Endpoint.listen(function) receives raw UnresolvedRequest objects:

endpoint.listen(async (request) => {
  const headers = await request.reader.readHeader();
  await request.writer.writeHeader([
    {
      name: new TextEncoder().encode(":status"),
      value: new TextEncoder().encode("204"),
    },
  ]);
  await request.writer.close();
});

For Request -> Response, use Service:

const service = new Service()
  .get("/hello", () => new Response("hello"))
  .fallback(() => new Response("not found", { status: 404 }));

endpoint.listen(service);

Service is a callable raw handler created with new Service(). Service.from(handler) converts a high-level Fetch handler into a service.

Node raw request connection context

UnresolvedRequest does not expose connection, but it remains an aggregate raw request context. Need identity information through explicit connection endpoints:

await request.localAuthority();
await request.remoteAuthority();

The accepted peer connection context is not an owner Connection handle and is not exposed as one.

Node RequestInit policy fields

credentials, cache, mode, keepalive, and priority preserve standard Request shape but currently do not provide browser cookie/cache/CORS/page-lifecycle behavior. Endpoint identity is endpoint/connection configuration and is not controlled by Request.credentials.

Non-empty integrity is not supported. window must be unset or null.

Python SDK

Python root dhttp follows aiohttp for high-level client and server APIs. Raw DHTTP message primitives live under dhttp.raw.

Python client

endpoint = await dhttp.Endpoint.create(dns_schemes=["h3", "mdns", "system"])

async with endpoint.post("https://peer.example/items", json={"name": "reimu"}) as response:
    data = await response.json()

Python raw server

async def raw_handler(request: dhttp.raw.UnresolvedRequest) -> None:
    await request.writer.write_header([dhttp.raw.HeaderField(b":status", b"204")])
    await request.writer.close()

handle = endpoint.listen(raw_handler)

Python high-level server

service = dhttp.Service().get("/hello", lambda request: dhttp.Response.text("hello"))
handle = endpoint.listen(service)

Python raw primitives

dhttp.raw.Connection.open_request() returns aggregate UnresolvedRequest, which keeps local_authority() / remote_authority() endpoint accessors. MessageReader exposes read_header(), read_data(), and stop(code). MessageWriter exposes write_header(headers), write_data(data), flush(), close(), and reset(code).

Python breaking changes

Removed Python public names: EndpointOptions, ReadStream, WriteStream, IncomingStream, StreamPair, LocalAuthorityImpl, RemoteAuthorityImpl, open_request_stream, listen_streams, read_header_frame, read_data_frame_chunk, send_header, and send_data.

Use keyword arguments to Endpoint.create(...), dhttp.raw primitives, Connection.open_request(), Endpoint.listen(...), MessageReader.read_*, and MessageWriter.write_* instead.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

dhttpy-0.6.0b2-cp313-cp313-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.13Windows x86-64

dhttpy-0.6.0b2-cp313-cp313-manylinux_2_34_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

dhttpy-0.6.0b2-cp313-cp313-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

dhttpy-0.6.0b2-cp312-cp312-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.12Windows x86-64

dhttpy-0.6.0b2-cp312-cp312-manylinux_2_34_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

dhttpy-0.6.0b2-cp312-cp312-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

dhttpy-0.6.0b2-cp311-cp311-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.11Windows x86-64

dhttpy-0.6.0b2-cp311-cp311-manylinux_2_34_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

dhttpy-0.6.0b2-cp311-cp311-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dhttpy-0.6.0b2-cp310-cp310-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.10Windows x86-64

dhttpy-0.6.0b2-cp310-cp310-manylinux_2_34_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

dhttpy-0.6.0b2-cp310-cp310-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file dhttpy-0.6.0b2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.6.0b2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 6.0 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dhttpy-0.6.0b2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d58cc5f3a0b0e1b06ffc2f168223b0faeefc1c57c1400f7f29987a1d40e0bb31
MD5 f06b3bd6851b941e2531ba1f04983f7c
BLAKE2b-256 3a704c819970497059482530fa84a826cc66e592be47fa054c42bd67b22812c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp313-cp313-win_amd64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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

File details

Details for the file dhttpy-0.6.0b2-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.0b2-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6cadd39c4ecc72df87f4544eb27c8b8c08d82542080d789a82f2a2fb77ab364d
MD5 b793ce4a05dba12829d52e8efb8c4b01
BLAKE2b-256 ea131afaef52d1241b970f9049dd4fea8d4408570f1429e3644506e94ede5630

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp313-cp313-manylinux_2_34_x86_64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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

File details

Details for the file dhttpy-0.6.0b2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.0b2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ac5adcc2d7f606e4c326f6219e5456a9cbf6596765c8c6d34b5c692f2d95e3e5
MD5 b75a5a686586bc8d0d1c4bb9294a1180
BLAKE2b-256 52f8cf6b37fd2e5b55fb8f59d95ee96541f867ea5a4e7f7410eb840fc0650c9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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

File details

Details for the file dhttpy-0.6.0b2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.6.0b2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 6.0 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dhttpy-0.6.0b2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6caecadc3ae2b68dcd20859f5a7d6392a43b86e5c5fd676998bed571fd6090c5
MD5 5a0177d773f014d41d4906b6db1eedde
BLAKE2b-256 7a359814aff776421c1b12cb2121eecdad58311f3f97b3aa065b78dc6782699b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp312-cp312-win_amd64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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

File details

Details for the file dhttpy-0.6.0b2-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.0b2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f19946a18a39dd7e1f5614b46f74a1d3397a74456c5b335084596f1c0c16b2a2
MD5 6158e9d2e556c12e83210629b339fa0f
BLAKE2b-256 1501734db5c0dac980772adfccdd3dca66acc4d34364d9560e62187bdb88769e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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

File details

Details for the file dhttpy-0.6.0b2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.0b2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5723a6ba910f7cd1938796d9106ec11b2e72ee0ad0a908952221fa3d5d60c3cd
MD5 3c86b0ae091603a2cbd0984569f314da
BLAKE2b-256 8f473c3a1f32fc80cbe0780756cb8faed768aef6d8c7ec76c7568fef6b8c9fe2

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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

File details

Details for the file dhttpy-0.6.0b2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.6.0b2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 6.0 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dhttpy-0.6.0b2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cd4318707d4245bc0bd6748ca045c6b2d152657b2baad91dfc7eac5fc6f3e16e
MD5 64b14d6fb3dceedb1de0cbb742334887
BLAKE2b-256 9ecf584005eddd4e5d6c5c94d61be4a10838b7c72bd042a179732bf8a5133cb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp311-cp311-win_amd64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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

File details

Details for the file dhttpy-0.6.0b2-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.0b2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e3c466e43e780ced99e68abfcfd2eb35dfb05385ad34c6f0cefa4b2a7e7493b8
MD5 83586c2a35f62f93a49fcf8a9b4e7cd4
BLAKE2b-256 9368eb045fadcdb8e5866238dde1ef92801888d230b0afd7722957ac97b40f17

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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

File details

Details for the file dhttpy-0.6.0b2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.0b2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 111725fb73d83668a980e6c241fd38edf0de31383a349be5ba7759b5ae4377f8
MD5 de559b226f8f77863750c1928cdc3454
BLAKE2b-256 fdf0d27991d29b390a708585720d9e01110fe242299e40ba1c307f93d42de97b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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

File details

Details for the file dhttpy-0.6.0b2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.6.0b2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 6.0 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dhttpy-0.6.0b2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 643dde9336d45bdebe827b6fe42e448d04455f8eb6295a827069787985b65c82
MD5 24bb5e8538be344a6fd33d459737e95c
BLAKE2b-256 3a66a26fbb1effb66b8c6e37da061598e4d270620de1cbc52d9b16f205d89cee

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp310-cp310-win_amd64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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

File details

Details for the file dhttpy-0.6.0b2-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.0b2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3d2b082519e3976ba2fcd9725766c29a85d1768281cde46882cef92c74717323
MD5 eea352d287701d252f3ca44f7928401b
BLAKE2b-256 2acc512d2d87f552c5ba8cd53ee747c97cfb5ecbf4671eb12b530225aa12c2ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp310-cp310-manylinux_2_34_x86_64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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

File details

Details for the file dhttpy-0.6.0b2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.0b2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 707ef112af7397f439fd39fde4805b0b6206c5f959fda36c7dff209246ac5d71
MD5 44887f0643c762702be022a875c4eccf
BLAKE2b-256 6698956b44785aec8762e1666d21f9fe3365ec6c2fd18c6d99563e7e5705e2f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.0b2-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on genmeta/dhttp

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