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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

dhttpy-0.6.0b3-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.0b3-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.0b3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.6.0b3-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.0b3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c67fe4f4120b5f2002dbbfe17fd088fad8a74b3f950db3e5c57a42d06252365c
MD5 48755ae7edaf79582499ae8bc7d9f63d
BLAKE2b-256 c3ecaeb3b8bd7025465c6924d36e19bc4663ddd50a4901d833658836d35fb45e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b3-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4f52a53710400406138b87ef415b35b268de669e95763a62c12650629c5785d3
MD5 aec3c074a2e6a4ead457c5b4ab22bed0
BLAKE2b-256 427ea88c8ddfcacdf1b2b33c9a6bbb5d72dd8da62cfec7cdb27b50cd6e2b82c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2a601427abee1c5b028300a1c306dcf9adf5d76fff07ee5db2b62e9d81efa869
MD5 a3a25a2d74f4c7c4c0b53ef12d4c73d6
BLAKE2b-256 9fae61d63706470940de71468ff8305c7dd9019b30d1656671ef99a140ce1c72

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b3-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.0b3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 28c1be5cf6cda3e927dac731b3abd05ce1ba228791b2e5c48c03318bc2a86f3e
MD5 89b6ca3234041610c4bcca34061f53ec
BLAKE2b-256 1170cfd00d168048756a437c008e6710a2302099eacbf71d998f31ff2a81a2e4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 133bd108a40c8acdf2b200486d0698d003a8bf179b7e3ca2aa257fe3891ff436
MD5 620cc7a5ea9276d78553409e31cbeac5
BLAKE2b-256 0f6546af21dc4e31dfed28807cc53e4efcf5edfd5a7f1c300a8014f609fbc65d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db232281674cf921588f62e2ff6304f493ec949ead21064f045c672d57acddb7
MD5 db27cfc0a2c1f2be3f2f43071d785028
BLAKE2b-256 081bcfa36207f03b34867d1bc45f17cb0dfbb4c27204f9f10a4874d3d0d0d3ab

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b3-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.0b3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 14aabd23c27b98c35c824964f09688745a09cc312263a46fcfb2cfac095e7579
MD5 e4572f490543116e5bc66a748c829e2e
BLAKE2b-256 f1341cfcffec4a500628d739b67c8eb158e3b72133d60154abb729bdebee58e7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0a240d38cd6f4ae02abcc1323396b34f47bd2cdd8a44527be55314d074de2a19
MD5 73d145cc945d67419651b8fe5345c448
BLAKE2b-256 2914cac2b1d483d5f5fcf49a21ee934b737b21b38a92a50fe25298ed73dd6b98

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d777638249f293d11b59e641d145b95cfc2537ba390e0fc1593a3dc2fd63a2c9
MD5 eda71706097e60af02073602e5a12a95
BLAKE2b-256 437978a653dd6f50fd81e5396e66f3807fbc9886bc53dcef3fcffbc95948bcb2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b3-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.0b3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3b6c5ac9b2e7755efef55dee814270303cc81a617bde789283d0df1a0773c58c
MD5 d5f30a5f3b4a28a7dab447bb0bc5c7df
BLAKE2b-256 2c4f022f91ef80e20273731da6f6e576cd57f97ec00fff1cd6ee36f091e72f2b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 90ad578be9d235f72f3d53806c2a35cab12f13be9925bb0a85ad77a23d43113b
MD5 0b32dc5a81daaed3956affe1bc7a9606
BLAKE2b-256 25275e5f15da2ebf0a410dd59da321164571bf2914839d01f6dec47091c90ee9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 29db3b756cc1f9837cfa3639ce59393b9e25e324805fcfd9586d40dec09b289b
MD5 47c3cdad9f8ea1a9b8122abd43d8e034
BLAKE2b-256 1722133165eaed0bd0a543192525b0a203c67a7b67b049319972bd1a752fefc1

See more details on using hashes here.

Provenance

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