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

Uploaded CPython 3.13Windows x86-64

dhttpy-0.5.0b2-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.0b2-cp313-cp313-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

dhttpy-0.5.0b2-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.0b2-cp312-cp312-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

dhttpy-0.5.0b2-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.0b2-cp311-cp311-macosx_11_0_arm64.whl (6.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

dhttpy-0.5.0b2-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.0b2-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.0b2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.5.0b2-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.0b2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 df2e3fe76a952146e89bcb42182d8a8296412f245aac5affa0252fc33f03cc78
MD5 0d63a79e9d6d0c6469f3da35e64d9be2
BLAKE2b-256 b9a2e867f3c8dd0e0d4317f1cfd3bf46ec3ecc75b633f91f359949c4894a27a5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b2-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9e0e2bc11a76667797e90971c16b68f5ffb1d3949f4d5afced980d1abe295da2
MD5 aa840b4ecbcd11cc371e6b7350d99499
BLAKE2b-256 eb8b8aa94284e21f5928abe24396a6e678c156abbf427dcae8eb1bce9dd408fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e963791d93c0261496a6451e7801e51936cf1a2f9efb452d6deaff02ac8d831e
MD5 f586aa3bb4b0c884a7eb93eb33d1729d
BLAKE2b-256 bc0448b84f5f2a46c54abd9bbd0bcb978254d70e922656a67227a65d8d03a7a2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.5.0b2-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.0b2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a368b582a303792d19776d26c2e359c69fac65fd6e6374d89bf20f2d0da9b99d
MD5 e43fdd3e3fb6f38c803f076df1ee8f60
BLAKE2b-256 ae7f5d206ac381422453e62fe286b8a255d196e9c1c38ae8be3fdacd9dd928fb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bb62beb686275fc3745cfbbcdd34099f348ca7f505f5f6dac984476f5372707d
MD5 44956bc64ef2a405399365f9752f09bb
BLAKE2b-256 db85d7850cd8982dbed5edc9cb80e05322f8c8ec9efc9ff1f8f3ba47a122814d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6102310ac2aed0d8b2c864bc9c6c29eb82de6a7db8eddd730c57f5a48557c96c
MD5 b54aa072570b6320fb1ff29a328838ef
BLAKE2b-256 38a57bf7a1e31c5a98bcceca22c17dbe942a73673d870e10f63f765e327b1e28

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.5.0b2-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.0b2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5f3dbc3b1c0277aa9c8c1e301a25d2488d5e91c249b9f0738cb3996650e97570
MD5 fecff3bf120943753801b2660fb37d92
BLAKE2b-256 1c924558a389e43ef8ca12a8b581b62ef5230ee73a5c32ac237735b8f319aa6e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7112156ff66fe312654e367b0d9f7b694e77ce4a07e9b793f68aef08e801ba8e
MD5 afd607caddedd0b401410ec4bb099b3f
BLAKE2b-256 1d7de9b050621ee85eba1111245a31dbcc91cd6a9a4381b6603ade99f14056e6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba54e16b24b0d5d36df3afcbe5684f162464954251f11f027a908abe830ddcf1
MD5 5baadcec874302aa2cedcf931abdbeb9
BLAKE2b-256 3b170c6c940f0f404195de72fd7dac0663e8f7ba24dd1207fe2d8742e538807c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.5.0b2-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.0b2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b33dcbe39e2a2e4305ac6f31e16c3441eb2a3b0896bf8472fe638b4a7104e7cc
MD5 3da02a84de9d68ba7a2246353a5934be
BLAKE2b-256 f413922704d663b49542574165e0f725a0ff1bbd0b69c27e13741c0e8fcd03eb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0fe72a256487057d73f74ff0fc5671f1c59aa04947f60f5e1dfddd6c02950e94
MD5 36eb79d629aac4794c0bb71c5800f09d
BLAKE2b-256 bc13adcfa61badaf4b0c2ba3e810c93cfb56c72f954c84295034d83e489ff456

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dcb9a7372d5e8d0bdc0b0fb785139f9b0dfae8d05fc36422e1c0f1ce2bdb5974
MD5 559ed07389613a0cfdce1016dbe59dda
BLAKE2b-256 c33560a5b44b68af70d3c17d7de0f484d7c646405abdc8282de3728bedc8c34c

See more details on using hashes here.

Provenance

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