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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

File metadata

  • Download URL: dhttpy-0.6.0b5-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.0b5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 61c539da942c2932912eaff5006be5fe631c61126fe3fd88594a85a2cb0c7a38
MD5 692b26944252a14c6783511e99449d5c
BLAKE2b-256 4fd6714b3e37c4eed1a096fc7bfcb7e1dcb02661a47b8156ccde85696a909e4e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b5-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 43d2e593d54b3cff28ff5a35dc7a4069d8ba1dd733622d469cc6e21eb7b73653
MD5 3a119877f4003aef039655fb5218a19f
BLAKE2b-256 605b395f8f69ffeb6ce8a55ee99974c74c739b6ed9ff49389857945cbc3260ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 746cb7cea259289b818d1864b1f5dfe36b5a18f853b33769a1013d9d39c18018
MD5 f5e1f5a46335a40b9a82b22d3101e74e
BLAKE2b-256 26fad2569eae9d19d5c55ef83885bcdf6458a0b91e8497168f8550d7f1e377a5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b5-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.0b5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3f4c4c2e8215274943f781cf5b8e8d7c31d529feb151cfa6b95d0979506768df
MD5 f5dfe69104eadc0c6f6e346cfe5cb4da
BLAKE2b-256 b431710aa5bc86a46c002b56a9982c0ac57b46945aee9c07d4e54fce1740ac84

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b5-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f05b9abd8e1e379b46e99d215fe0550b4d21a3e96517bcea50feb5c161842947
MD5 32bde1d8f00cb13dac45829f69dccc18
BLAKE2b-256 889808c719630c6a4bace013a76c129858804764a00e9de7e3fc98857145707f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8461f3e74c7818be9a28c0078094ab85a0793f940d8e3357f0c93c0f1bd330ba
MD5 9b9fa88d1638d0093ad2fdf6804197e0
BLAKE2b-256 7d9d1fae4ca5c6f4758a68c3bfb22b01a4008ab1405bdc93a9bc429b8ee97bd0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b5-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.0b5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cf2374563a7cb7c5adeee10ba7c2194620e8b7c077b5f37d1f0b35807c63e443
MD5 3dae3b694207604f70300366a47ad630
BLAKE2b-256 8876a82bb1548adfed0382d99842dcfe175631f29b1aaae1128c5e7a93c44f65

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b5-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 93580b08a4e77d38f71f6ee7434a8b9863ec56010d285b0f64a285dfb0f7b077
MD5 38048727f71677777b74b9a1360ec01c
BLAKE2b-256 b9751e03446defccd288a545977e94f9593d5c60b1824b3d241955dba42497c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c36b7004dc348ecbec9e3cf079d19a02cc3d66ece288855614f5225657ec6bdb
MD5 5d25eb77f08ff9b2c83fb9ae93fddd61
BLAKE2b-256 c3acb204b64ca98d15a70a982d68eedc3e25ae4387f76d84dab7512c55987a64

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b5-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.0b5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e8a7150ae0e01329269b306839eb810b727d34bcd4a27ab3f93f288cbe29587d
MD5 6c3d492c3e043183c7e5b00064775a67
BLAKE2b-256 c862aaf00e850b486caaf4871f5532bfcc2d2c06af545442f6fc78b7310d27de

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b5-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b8854b002bb696f79c7166f4c44a6c0b0e86006c45b8cc576f43b87e7c5dd3a0
MD5 5ab413a7366317aaf218dbf69333bef6
BLAKE2b-256 a64fc1dce97ab3975ef8a583a677e7d1559f5bcdadb51911401d01fb2f8a8fba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dbc974383bafcc3f7a77754a4bb3d36cebe2b9e463877dc818255780c14f5b11
MD5 b7a945a8cf3ed9d0dbf1e6918db590cd
BLAKE2b-256 c4f700affe1c9a1cc1c64974b316695908f8e906a85f5ffa8b63a7cdf4733d15

See more details on using hashes here.

Provenance

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