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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

File metadata

  • Download URL: dhttpy-0.6.0b4-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.0b4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 32b43934acfccdaed87cc09019aa1d2d33680a690187e61d0a7ade87ccdace02
MD5 7ff2098b450dfc259160b3b0959e2438
BLAKE2b-256 b2faf69878721ab45c9ad23dfeb3a390d517ababf1f009a7695f0feeaeaaf4ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b4-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 06fee030fe8adaa3c19985a89104a9d6e5d697efb2b97a49222169458e051e81
MD5 769b8336391d949011f719e24a2585c6
BLAKE2b-256 0baf60b2127e4a49535aac71b541fe21cc9712c5f079c42ddd617b7f318389fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6c90946bd6eb821aec2e9c37216e7222ec9b7840bd85c1cc5389cb7783fd2eeb
MD5 c984258f3f5ba411562f74046edfb9a7
BLAKE2b-256 c76b45ca427870084bce10f841d9e5b7fdfc4916ce0e876a1c70f5b574b52b20

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b4-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.0b4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 338b3842cc812f34afe457042b761f4f344c6e04a20a03ed10b7b516e9d21baa
MD5 11e6358886c330ac3e7fab1953fa5d41
BLAKE2b-256 98a6599e91aa63b7b4ce2748ee4618c686cc6cc77ec402f973b64438cb4f9bc2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b4-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1be3befe9f5b0a97acda2e56dcde6adaffe38459e6c017f8a10fd78ab5f4e79f
MD5 42b41b08f1ee7f34389a6b9bc5813339
BLAKE2b-256 f488be454e94e237c6a92757749bcaeae80d5951dcc2e961f30b8eb57e2d1f7a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 60c6fe3ffef394a0af03c81a1f5b9c13b2979441f22daa373705ef7559de4383
MD5 340f9af792512c55ec6ffd5b10b41288
BLAKE2b-256 30b95bc0bad2633fe7d939518c9e7571735d88ef76b7fa7abc7f506249fdeb8a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b4-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.0b4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1692667acc64f5beb1ced8b363c2b45b9f9b0d0c114a48fb5e0275887b6436ee
MD5 16f305b8c37977d2237e1e3ec3e69c9e
BLAKE2b-256 6f80da990f20a982b3685f35f7927f2b1f30453b10f8e7089766ecb841570147

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b4-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c6f9c0b72fdf5bd904eb9e34a48d39c2ce7c82e3e511d98834e5718e31751a4e
MD5 29a497a954a4db3289d158f604986791
BLAKE2b-256 e4132c0de3afd789b8f8cef935780f4f406456142815bd7d5b70e0e35fe0c249

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42a420b23b20dd9a9b07adcc278ba933313295e06192d22fdd56b4af98fd03bc
MD5 39a8755f81a31e77105bc6a5cc54defd
BLAKE2b-256 ede0faca8147117b89b2f262a3b9270e10d88e16da77d5d960cde8829ef19f18

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.0b4-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.0b4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ac015d85ab6244efcb0c8ae9ae9d6d14df6d3de5b14f1d61616314c8e4a351fe
MD5 d4f79d10325dc31f3bcc4436997f8fde
BLAKE2b-256 0c517f504f34c81858ca1f65efe97c439c07d0814684013ec13aac4814a54958

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b4-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bef85d9b458e8f0a3f29984dd5df0c8ae7f2cf87dc3601ede4608b0db486c1cc
MD5 02625e8332000d3fcfdb0107d98cd1ff
BLAKE2b-256 5210ffb5e8dd8cd60f83cd699cf3308d2fdcc15a371e725c4a183dc7c63903a7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.0b4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 37eca18daa8757b06dae75144191ae485774de55aec7fa830cb5784c1d4d4c22
MD5 3094a361da54acaa097ef909226a51e6
BLAKE2b-256 069cf15bc27b1ba02a76a7c36fde79739306bfd54681486dab5246a4b0866545

See more details on using hashes here.

Provenance

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