Skip to main content

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.

Metadata

Release files for dhttpy 0.6.1

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

Built distributions (wheels)

Table of built distributions (wheels) for dhttpy 0.6.1
File
dhttpy-0.6.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
dhttpy-0.6.1-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details
dhttpy-0.6.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
dhttpy-0.6.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
dhttpy-0.6.1-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details
dhttpy-0.6.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
dhttpy-0.6.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
dhttpy-0.6.1-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details
dhttpy-0.6.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
dhttpy-0.6.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
dhttpy-0.6.1-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details
dhttpy-0.6.1-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 79.7 MB

Release files / dhttpy-0.6.1-cp313-cp313-win_amd64.whl

Download URL dhttpy-0.6.1-cp313-cp313-win_amd64.whl
Size 6.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
aa25a3e59f8a3da3d416c3633e127b7f143089ba21d14e60f12a53525d5a3f30
BLAKE2b-256 checksum
How to use checksums
5cee7641230f081d512b41d3b5fc5245a81ffdf8fe6ecab362468c0429006d65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / dhttpy-0.6.1-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL dhttpy-0.6.1-cp313-cp313-manylinux_2_34_x86_64.whl
Size 7.4 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
fcaaf67dc6563033d6754d485524f42d6fd259910145ca893e7e780b28297b26
BLAKE2b-256 checksum
How to use checksums
05d5cdef0c85ac96082dbbec69e06c526f84349b6657d06af0ed49ca2d4d6fe8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / dhttpy-0.6.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL dhttpy-0.6.1-cp313-cp313-macosx_11_0_arm64.whl
Size 6.4 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8b8fedf3a4a80b7d31c16898c9ca5a193fb714bf0203eec7cdedc62ab08ebb3e
BLAKE2b-256 checksum
How to use checksums
a881eecb57da52ebb493c679be7b3a113e497219c258d7f740cc0837b61d4dee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / dhttpy-0.6.1-cp312-cp312-win_amd64.whl

Download URL dhttpy-0.6.1-cp312-cp312-win_amd64.whl
Size 6.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
361caf5e8bf97ab487fba966b4636d5b765841e080627839800cad246fe16602
BLAKE2b-256 checksum
How to use checksums
0e01ad38ef1863ac7349851aa222aac38651204c9691f4d32af86132abdb9a79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / dhttpy-0.6.1-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL dhttpy-0.6.1-cp312-cp312-manylinux_2_34_x86_64.whl
Size 7.4 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
6f0fa18781eaa8296d68524ddc4138664dd2bc58f659deb8fe91dbacf8cef6ab
BLAKE2b-256 checksum
How to use checksums
5b3dfa829fdf340b84fc2e5db9fe84e1674ec9aa34fd0c29ff8ea385a97f2683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / dhttpy-0.6.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL dhttpy-0.6.1-cp312-cp312-macosx_11_0_arm64.whl
Size 6.4 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
089a5fb3b8fed16ae6496ca6960f7b4f80fc43ed461b603f81b8337d6dfc0f11
BLAKE2b-256 checksum
How to use checksums
5670135bfe55deb59b9a1609a074bdb3701b7225f53e194f080dce0b28b60562
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / dhttpy-0.6.1-cp311-cp311-win_amd64.whl

Download URL dhttpy-0.6.1-cp311-cp311-win_amd64.whl
Size 6.0 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
fc5a4d8a848c7676c06c71025280ad515427eb1f7afcd467ac3fbeda496f186f
BLAKE2b-256 checksum
How to use checksums
b25b08f21bab0dfd4e6344c21fdb7360f17ba2a763fe7aa1507443120eb87f26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / dhttpy-0.6.1-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL dhttpy-0.6.1-cp311-cp311-manylinux_2_34_x86_64.whl
Size 7.4 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
78813810b5bf2cbe0801545362e1b9406b00e13075c3404a04a5dc7197a9be73
BLAKE2b-256 checksum
How to use checksums
43e6e34aee5ac49040d4daa271d0c98c4637c93841362b04256d2d917db001f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / dhttpy-0.6.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL dhttpy-0.6.1-cp311-cp311-macosx_11_0_arm64.whl
Size 6.5 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0869dcc8b6ef1ee442e0ebeb7c0ada9b5a63ae9d7bf5f5f5ee313c69fb834e30
BLAKE2b-256 checksum
How to use checksums
bfd5d2eff6cbbf81b41dc450d039cc795d145434fb306fdd6bed7c7f9a3dc146
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / dhttpy-0.6.1-cp310-cp310-win_amd64.whl

Download URL dhttpy-0.6.1-cp310-cp310-win_amd64.whl
Size 6.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
fac2cd440c35e0b99f0476d7356e7a48b282f65491b851199c34a5cee3a988ec
BLAKE2b-256 checksum
How to use checksums
dc6e8e27057ce6c15c7f1e0b7a8e3c19b2216243d314bba9a321ef4a26b8b325
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / dhttpy-0.6.1-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL dhttpy-0.6.1-cp310-cp310-manylinux_2_34_x86_64.whl
Size 7.4 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
b386ed99c049dd2cf250bd4a58f315d143d76ff97c5e9fe86c1f4989c61afb28
BLAKE2b-256 checksum
How to use checksums
13de1a242cbd559c6e236b9f7c0646ce18a9eac9f5160c48d5b2de79b105b25b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log

Release files / dhttpy-0.6.1-cp310-cp310-macosx_11_0_arm64.whl

Download URL dhttpy-0.6.1-cp310-cp310-macosx_11_0_arm64.whl
Size 6.5 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
99c8128442d418012f744bcd4aaea4e12eec9b094a55b90d5305d58fc7601d61
BLAKE2b-256 checksum
How to use checksums
89499dae18cc3f4c55fc2670db9b4e94ab1a4bd069c0c225e0a7256dc385d975
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.

Transparency log
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