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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

File metadata

  • Download URL: dhttpy-0.6.1b1-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.1b1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 53956556ccc8bfdb6b5cd240c26fa92f6d65e3624c13cb45265fbc1c7847f777
MD5 def1c1eb31028c495fab68ba83b17003
BLAKE2b-256 a639e4b63197a5912aaf8be7845b712485de74092adc54178786ce7c523781ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 29b7bfe1983d5c92898b932ff55b0cd4a23970fbe9a69a5d16bd25e375780b86
MD5 804daf10eaca820544d7de1a7720add8
BLAKE2b-256 4ce9d6c0463cb5a3a2c919ee9c60bd35a9f52b7053f2260690cc7ba2b11a1a76

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a9fc4055490ceca4e702811d65bff1e3928780213c48af95e84aae7daf17bc00
MD5 04f12e9a73da757752c19704919f7b4f
BLAKE2b-256 848e0c1f51287ced29536745cc40a6700fbcf0c1c6d11ab3df6327255b021324

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.1b1-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.1b1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 86761f54375388691743a56f6b020ccdcc7f01981683d3c6edad55602f9e1be0
MD5 26ebd46983607b9127b5790c680a4e17
BLAKE2b-256 464e71f1fd0761278eb80ee5a598219449e39237f954d9363bbbc46b70b08f06

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 52cc0ac5919a4278e403bda75797f33d9982023decec8bef8aed7fc06a451a2d
MD5 c3585755da3ab3501791ca7fe0b2b447
BLAKE2b-256 7c27accf6646dce1a0fa45ac337c1c5a74d32d6137b64365624ee178e23e6478

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f590a5e619f0397bf37afb73a1d5e87488f5cf38ef015601436298cc5407ccd6
MD5 530cefcc6d8ee0befcf31acac924e3f6
BLAKE2b-256 d0ffa72ab8faf361a1436040524c89862597bb15526d57cb0044fbc1383831e5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.1b1-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.1b1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 29013bd2f13b6fadb1d1a08e436f4f6f62d3da31d6dbeded55529b5e6e6e9e8e
MD5 12f87261980c3d59505709121cc38101
BLAKE2b-256 7f58e3b10eb4837cb32e15dd26cc379209c17561f02b62931376c2f2f8d615b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cf8515e47be2c9a84a841a1c99bcea44470ac370a08bbc181a2b1d01496e3d7d
MD5 c55c4839e72c2d89e8d14fa1844fcc87
BLAKE2b-256 02ef4e01f977676b011c3a63ce6c9952e189a410bf5b3e628c8f76b176908a6e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a5d15706360a95cf13020fb8fd810dab3f990758970c1192d67125847a34e690
MD5 1e0f9176834410d2bfc5ad09b2322f81
BLAKE2b-256 c933f70d2e18ee8645583ea074f7d890799b68dc7e9d819ece435a0bd50970bc

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.1b1-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.1b1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a8f8c49add7d875e35dd2a1d1c8f8714a3ff09c0fb940c6def75585e7e134428
MD5 b9a5b96c5573ada0b25bb01633265e3b
BLAKE2b-256 26d5735dc2ee83a7aeb2450de09556e08f3c69d5f70e12547659e2f7e8e686e0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 941bd1a5e03ef24110e54d944c86b8cb2111b0b2fb10514ed0959a0c87e1d7d4
MD5 1260db943f52d44122df7b75d7517da4
BLAKE2b-256 c172452f1cf2d9c08c71a10e3b8898e470e06788f3ddc9ceb43755a0cf28013b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b357e7b8012be417f476bfbdb13a18ca32a593298d1515d9323ad74c602d2e74
MD5 e31c880870bce87115815b548e4318d1
BLAKE2b-256 fa09a79e68ce0fc16cb1945116f44a49ab1d09fbd4ceaa8cfaf48ef2098110cf

See more details on using hashes here.

Provenance

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