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.5.0b1-cp313-cp313-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.13Windows x86-64

dhttpy-0.5.0b1-cp313-cp313-manylinux_2_34_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

dhttpy-0.5.0b1-cp313-cp313-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

dhttpy-0.5.0b1-cp312-cp312-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.12Windows x86-64

dhttpy-0.5.0b1-cp312-cp312-manylinux_2_34_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

dhttpy-0.5.0b1-cp312-cp312-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

dhttpy-0.5.0b1-cp311-cp311-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.11Windows x86-64

dhttpy-0.5.0b1-cp311-cp311-manylinux_2_34_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

dhttpy-0.5.0b1-cp311-cp311-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dhttpy-0.5.0b1-cp310-cp310-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.10Windows x86-64

dhttpy-0.5.0b1-cp310-cp310-manylinux_2_34_x86_64.whl (7.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

dhttpy-0.5.0b1-cp310-cp310-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file dhttpy-0.5.0b1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.5.0b1-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.5.0b1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 06bdb53cbd74536c6cd63907a840ed6e530983ab65239cbf98360ded57a1fb39
MD5 f114403be361456eecb21adbb5d77eef
BLAKE2b-256 ff9dc026889ee9ba2ef71418eebfa187223a00092449832080265bea0353d11f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.5.0b1-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.5.0b1-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.5.0b1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 007bf998649879611596d0fb84100be649063da61bd2215df419fbbc9631c4a0
MD5 043e85333990584012a6eb8f52ce10f4
BLAKE2b-256 5a160b35a11a65fa0e1d27e99957ede4c000c4695f67fd0dcfc838eefeddfc0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.5.0b1-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.5.0b1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.5.0b1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1a36df6e4d24e77dbde3a96d0acf33963202ff718a34013a5c9dc1fd356459f8
MD5 81c0e95a5fd0a4e227258fcbe16f1653
BLAKE2b-256 010747f6e5ed8ed0c74ac8f1b624eeddc367cedcbf0034f229c7a61eca25d4bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.5.0b1-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.5.0b1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.5.0b1-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.5.0b1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 04a7e004bca3f03702495cc7a93359ba98e93623697036bd8ef5644e4b42cca8
MD5 5a026ee3923828fc980491c89785863a
BLAKE2b-256 73a053972a859c8b4965767cb9d944868bdc08c82d1a060f95231f9b43abb85c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.5.0b1-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.5.0b1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.5.0b1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0919efc0d0f3ce41c3af67867a3987fa4604f12f53f1a65e799b2db0a5b16696
MD5 4d120ff0a74fa7d796995778cd543ff8
BLAKE2b-256 74863986fa8dffd1e8493f75ea33c80447e0711dda42a39ddec86b78b50f5c11

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.5.0b1-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.5.0b1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.5.0b1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b13630c348f380c54d6149db84e02fa283b9289cc55bb64e03cd77872df0432
MD5 7e2fbc7d769658e5afad79591321ad32
BLAKE2b-256 d31077dd56271a07dcbe6cc08514e77e56fffca43c93754aeedf01f3d09c0e48

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.5.0b1-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.5.0b1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.5.0b1-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.5.0b1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 58eaf4c61a1ef902764f168e7b63a948a708c172488a04a0295176e552b157b1
MD5 c36ab59130abd692e03cd4ad9d41f5db
BLAKE2b-256 f1610b77e7d32fa2452dcb5085584af9dfcd1a3d50cfd2f1223cddaea589558a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.5.0b1-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.5.0b1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.5.0b1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2e84059eee6a02f2938d331276a422a6b6e4cff517d92a3a6ce3652043f468a5
MD5 40107812df4398262a9bf495023c79d9
BLAKE2b-256 d5f665540e521327ea9cf161e67f851e5ded7f8a53bbc5a2fcf1ce266c658a81

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.5.0b1-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.5.0b1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.5.0b1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b29abf19814c70d3670d1012b9bfe0ecc6bfdb7bea4595a61effcd1a205e9b0e
MD5 c5045e140c731b45f38b4d87914e2457
BLAKE2b-256 8f7589ef2db8e13218d9ac6e31bd57d27086df41d0728fa411cf96113bb14a2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.5.0b1-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.5.0b1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.5.0b1-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.5.0b1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6c43c72a14e25f06a4879dc8d92e8630be747e79f7889b142e74b95e7623e9d4
MD5 fb13305ac0a7742f8009f80072121e7b
BLAKE2b-256 bad9856963818f5af27ab45b18f0ca9d43b3f7fd16da7e51bdf462a7c72865c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.5.0b1-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.5.0b1-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dhttpy-0.5.0b1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d21f4207cfbcc5d6fadad0735d013d2e7713a9fcc8a0c542f0b461320a3dddf2
MD5 176ba0b5ce37159efa2bb498a4ee9be6
BLAKE2b-256 26a5ea9d64b4a4fed2478aa2b9b5a294d311fd25c674dfa9383555d2fec15726

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhttpy-0.5.0b1-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.5.0b1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dhttpy-0.5.0b1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 edfa1f3cb6bef50fdd3f5fc032ea4c599c34bb79e5631d844970befbe564949f
MD5 741026942977da1a4bf7db549375ed9d
BLAKE2b-256 3e74207b47b2643699c3f7d7966b56871e79de03e485b9e2e2d54c398786e09b

See more details on using hashes here.

Provenance

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