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

Uploaded CPython 3.13Windows x86-64

dhttpy-0.5.0b3-cp313-cp313-manylinux_2_34_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

dhttpy-0.5.0b3-cp313-cp313-macosx_11_0_arm64.whl (6.7 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

dhttpy-0.5.0b3-cp312-cp312-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.12Windows x86-64

dhttpy-0.5.0b3-cp312-cp312-manylinux_2_34_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

dhttpy-0.5.0b3-cp312-cp312-macosx_11_0_arm64.whl (6.7 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

dhttpy-0.5.0b3-cp311-cp311-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.11Windows x86-64

dhttpy-0.5.0b3-cp311-cp311-manylinux_2_34_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

dhttpy-0.5.0b3-cp311-cp311-macosx_11_0_arm64.whl (6.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dhttpy-0.5.0b3-cp310-cp310-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.10Windows x86-64

dhttpy-0.5.0b3-cp310-cp310-manylinux_2_34_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

dhttpy-0.5.0b3-cp310-cp310-macosx_11_0_arm64.whl (6.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: dhttpy-0.5.0b3-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/6.1.0 CPython/3.13.12

File hashes

Hashes for dhttpy-0.5.0b3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3a5e866b035d9b1ad69a0a29d113a23f5fa2fe0e89ad41aae34cf9bc15669f35
MD5 2752f94fc356ab1b338631b9a6f087e9
BLAKE2b-256 2ea9e338fd520a681091d0b09ec653f29341803b478754b7ba4b8afa1a0770b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b3-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 21e40409142ecaf337b30f236be1bb51f6849b3c489326f3fb899e6b98e4c6ba
MD5 bd4ef343eb66361acd97c4977571df6f
BLAKE2b-256 9bd5ca39cb51e4c64a215170ab980e2a67554a2b6359cb5c761a4278b2416685

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b907a1fb2efdc03b8e50c05dba409d4b2f0d94109ce4faf5e42775dae7ff183
MD5 e1e4169791e38f2452e3866367d4da90
BLAKE2b-256 fc0892b8078b394e5228c51bb555404d2721456709b8cbc046e7da1616c99319

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.5.0b3-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/6.1.0 CPython/3.13.12

File hashes

Hashes for dhttpy-0.5.0b3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a075828c94945cb532f0f13f0daf4bc5802477760325384a3c98e70732b8ac42
MD5 57ad934764a3e0f6283fc6f48f5a23d1
BLAKE2b-256 4a629b506f4d98a0711e005380d6873781a8cba4bfa75d6f1b4a22baa97dbe2b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 99d557fc5f021e5b9eb441316ea7f8c9db8cf6724ac22095b51112cd7da47611
MD5 65a3dc8a153122ce4d845586fdab3f90
BLAKE2b-256 07b2251f8f401abdf00a3227c58889099971026df5f6727b09821053876f0a75

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 491251373d04270728440d9745d327e2f426fecb897d33f2247b338ec129cdcb
MD5 5a84a8c24621e34d39f8ccb0f347e769
BLAKE2b-256 fbab50e14b83025dfd94bc8f29acfc0cde6b61ef3a1a4265c5563c850cf02532

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.5.0b3-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/6.1.0 CPython/3.13.12

File hashes

Hashes for dhttpy-0.5.0b3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9c82815aeb858062435648c3ad5d276507cd73cb803912245fc774f1e763013a
MD5 0a0e1021a8ad34259b8b7fb8bad41a38
BLAKE2b-256 db902c3023cadffa09b3fff3a701062a2311053780171bfa555c44adf756dafa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e189a23b23ff797a4f6c374687b225f8e67ccf4e2fc833853594e876023ba2c3
MD5 70ab5fabab7a99eec63be1e736871352
BLAKE2b-256 b05f4aaa2dfd1fbc4822fdbc2408a234bfae6ea779b836693365695d34e0777e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2231681a5ab6eb61658398970dd51fb924a470f5394dd0f42b8affaf067c3485
MD5 ce7aa3689252dffa88d5794391d3a307
BLAKE2b-256 ad6d2d8b16844e7f9ae7bfbca3dee37fef4742b5129c8a786fdc83fd5ba5aa40

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.5.0b3-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/6.1.0 CPython/3.13.12

File hashes

Hashes for dhttpy-0.5.0b3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 79c588970729e6bd55ae090bfc4b2d702d2059ff1a4f3dbf62e8fe5b46a928c7
MD5 aae34eac0164fcc030a63918e6a273f8
BLAKE2b-256 895bc61bdef8a89aa180b953e9f8bafd602e886293c9e399ee20b240b2069530

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a71f557835781527f485fc60c0be4fcc5883c898c4334c6306a162565d473cc5
MD5 2fc5e82a7824b45b55ac99686c204995
BLAKE2b-256 cefa35d7e224870e745fcb1849b34a5ca6df944090de0e0701945344eb372828

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.5.0b3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6cd2b9a0513fbf3aa4545be7a7245434243d26b0a748843c6ba91d082eecb66b
MD5 68ce50a2c56ddcf855e48f0afa08c46d
BLAKE2b-256 69729b2a0f940b0c073e36970951df31c294440a4059b0b6bec2d6b13927a18f

See more details on using hashes here.

Provenance

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