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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

File metadata

  • Download URL: dhttpy-0.6.0b1-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.0b1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 96825ab464446a2948debdcd8bc56d7a705e6a1cec71524ab402b850e23381c9
MD5 670739ff7c1076427920cab6a3a1808c
BLAKE2b-256 6ae1ed3d750627828e371ee03dcdf8555cbdda37d1ed67bd860181cc45cdc54c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a2120d61404058b7f491dbe4ea568316ad9ebcd4d164b22700af269f7e40e246
MD5 4ac439a4bf3171e9d56665b4d3340619
BLAKE2b-256 bfa85e2fbfb5ae3cf6e43cf50ad06fc0d682281129b5437c6aeae0ec2b21f9f1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0516a5ab458f3526517dc54f3f8b3fd5de44ded4f3ce73b567c92b12496ba9f6
MD5 9d7dc326431003d37f1d1b49f91fa0a1
BLAKE2b-256 549ec0081c7346c30426a824e5d5adb42ada8cdaf6dbd7c1f5bc77fcacadff3d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b1-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.0b1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d12f77b3656a0871f08486362d49ea4322560138df6764253ec9df116deff114
MD5 cb6e691cfabe0104eb31235a2fe2d42c
BLAKE2b-256 a8fec363580c1ebbf3bf940c39e0ccc12722e13705e0baa9c3e497dac33338ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b404c523acb818a8235130c4906f484ac2607455d5fb229f47e487568a1fef62
MD5 f9659db21d68b218fb06a572aa24b632
BLAKE2b-256 eed9787560b30627e8ae6df08f1d88e7b616011f08f4587074130ba586f78d3f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef4188b2b7e4b70699dfa36d76569f658c51cdb2d445b611adeec741d852794e
MD5 386b5cd2b885b46c5835bd9762ee7daa
BLAKE2b-256 b02600592ef40ba5fd141c0101fbdf752bafb861b87ad48b709f93ad9e785bf6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b1-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.0b1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1bfa263e3bf3f19b56825b452a7421ed985b70afa135deb5e6749c8f9e1e6bac
MD5 7393e31894a372443161f9e1bd4d0633
BLAKE2b-256 64776b354f2aeb2eedb68e52b197443a389828bb62ceb0dfcc2fd78f42220fbf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 efd9f56109ae036ed7884b107e5dd0793d2799a2c57cbf96d15b3dbeb518ba99
MD5 87f9d8462d404fd32f8659bbea445891
BLAKE2b-256 a2221b44f43d61e23b96729c1113ac5111d7b0329091151de5168d7881584fb6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b72126c86d03c5dd94389ed4cd9b499babad9407ccd134e36407bde9468a19b4
MD5 42e000bc047790f30046d726c3d480ca
BLAKE2b-256 23652ac8811254a235aeadddd61312d01ff695e0e25b3694b5d10a4696df6644

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b1-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.0b1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 881bd11a09adb43d3eedf063b761e9b48afb45f9fd40d98de47142166cfadbcb
MD5 a8e1f400434758c1dee4a45803ab50e0
BLAKE2b-256 3cb35fa9f8334b72f8f52fbd293fddfaa39dfefd6d7f4519ed12799c902c84d9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9d96a83f69f587c8c57cba4fedb35c215ac3ec037b2bce99ce0ad48e56fbd784
MD5 ca71af8a49880de338dcf13c588dda39
BLAKE2b-256 3caca00cd802ab5d15219ceb1c26943083ae72790252d3c260a8d4d6b6f4c941

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 72a15839f520877f0f42acfd51ecede8fa6ca5ef6b8a52ac7578d633bf7d12b7
MD5 8a3fedeb27feb185c93966b65c22cd9c
BLAKE2b-256 0742f43b7dccaa6ac13b27ba3e45ab5bbdabdd8fa2a5b304917a64902915c58c

See more details on using hashes here.

Provenance

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