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.1b3-cp313-cp313-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.13Windows x86-64

dhttpy-0.6.1b3-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.1b3-cp313-cp313-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

dhttpy-0.6.1b3-cp312-cp312-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.12Windows x86-64

dhttpy-0.6.1b3-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.1b3-cp312-cp312-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

dhttpy-0.6.1b3-cp311-cp311-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.11Windows x86-64

dhttpy-0.6.1b3-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.1b3-cp311-cp311-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dhttpy-0.6.1b3-cp310-cp310-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.10Windows x86-64

dhttpy-0.6.1b3-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.1b3-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.1b3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.6.1b3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dhttpy-0.6.1b3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 896b10e04aeb92f977c723b8c4dc4f2debb4b8b20803d3256cbe21b4eee7b515
MD5 0e8a589a665bd9d44f1d7e78a7f1cd32
BLAKE2b-256 0f9e6964fdbf14a9842217f65dd5ca8f987760c0d4c369b0929ab6f07e72c52e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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.1b3-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.1b3-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 64eea13c4ff1bb34bc3ffc6854c6a0835174da5cc62f67b0813522679bb2aac6
MD5 8565b42eac7d04a0a39380348e35a40c
BLAKE2b-256 e8fe941e4785ed0d91ac4d071f75ee219273ef647e48d37d1a0d63c0ba05fba0

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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.1b3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.1b3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 51b8ff9a018a940fcfdb52e8ff8f4dada68b2979482f5d531c122550fe0be7ea
MD5 76834d7d13ac252fd6dfc3ef15e00cb6
BLAKE2b-256 96aec07b975b9e83c1f3843b8092ceffcca34bb8ed3bcad63434cb872c0d1a71

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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.1b3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.6.1b3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dhttpy-0.6.1b3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1e4d7b7dfa7e3972a6d243d561318e03b43f16c699d3a90f186b51523b020af2
MD5 45bf5c3dc7633471de769204fa90362f
BLAKE2b-256 00f570501715b95b62fdc29ceec9b826ececa3a2fedc5031f00131045b5c2645

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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.1b3-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.1b3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2180b7f8833925a58b7fc4c4b5e888cf3ff160b6238c050417c953e1b05e1d16
MD5 7693be907428d94278fa6b17423f4445
BLAKE2b-256 35237cf8e20f61584307581b2165a92ca95b5377ed7a8eeea98bbeaf44bcbc12

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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.1b3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.1b3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d848b7e738199a06df74e554b0a1c4f93f0deab1f4e57b506780b3a235486e38
MD5 0b4794bf976699908f6c9aa9adb3e40c
BLAKE2b-256 0ad3cd5f693595c47abc85caefa29214a717f069b44e6501006d81d28bead578

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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.1b3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.6.1b3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dhttpy-0.6.1b3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fd97ba237a37617d0c958071601a8fcf118eabc1d8cee8f01d86f53cf701817b
MD5 ae9d4c3c293e4c80f312512094f7669c
BLAKE2b-256 4ba2154ea2acba4fc806c2ec2800030d58700da389bc7fd4be326ee0c7b18651

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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.1b3-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.1b3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6aa8a159b0221b023d6d8957fa6452314e2874657b1b4ca4e2444bc791022620
MD5 2d2501ea9b172b3e00cbe419022e526b
BLAKE2b-256 7efed70a6cac4e92d93e31d4bd267c725f615484aa9cb832c980b2d0e8ee1f44

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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.1b3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.1b3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f75d68d4b94b31db9b6f5671f86e0ae483aced7e4a76e80bd41a4ef8ca78641e
MD5 54d4d4fb8da3d18cb293ab2ef21cc7c5
BLAKE2b-256 e1f20f28cbff1c459039b4c8a17ce960a1e7c0c2ef28217351e5df881d3bfcf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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.1b3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.6.1b3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dhttpy-0.6.1b3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0527c79f0b8a3f975f07116401e116d296dc3124abea3566088d4e5c21740a34
MD5 fe625f963d7ab3ddb4f51d1d47308ba5
BLAKE2b-256 bb142e53ff3648bc73eb042e572ec79e387fafda04cab3e7673bb54a89ba0ea0

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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.1b3-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.1b3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3137ab047ea23b83ad97b85e2fb2db64db34f742e882361c0e1e179713fd228f
MD5 996607ad53e85d69c9e1a5882771ddba
BLAKE2b-256 de2e09b6888406f80a5a0892665c2ee2a6fb89fe5eee18d16f1a07ae7753ab56

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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.1b3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.6.1b3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6c01629b6d42186e9ba0badbd441d961a314a96df704bf5c20dc0f5dbe5eec81
MD5 53fd7e37ebad519f289348b9098b5905
BLAKE2b-256 07adffa2e9f21ada354a69704e14758f95e85db5500a83ad9ee8f0c326314c70

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.6.1b3-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