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

Uploaded CPython 3.13Windows x86-64

dhttpy-0.6.1b2-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.1b2-cp313-cp313-macosx_11_0_arm64.whl (6.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

dhttpy-0.6.1b2-cp312-cp312-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.12Windows x86-64

dhttpy-0.6.1b2-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.1b2-cp312-cp312-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

dhttpy-0.6.1b2-cp311-cp311-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.11Windows x86-64

dhttpy-0.6.1b2-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.1b2-cp311-cp311-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dhttpy-0.6.1b2-cp310-cp310-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.10Windows x86-64

dhttpy-0.6.1b2-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.1b2-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.1b2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: dhttpy-0.6.1b2-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/7.0.0 CPython/3.13.14

File hashes

Hashes for dhttpy-0.6.1b2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4f0f79d5f6ceee8750bd96bb5dac37485153ccbed7aae72074cee45db1a012ae
MD5 3d2f3df511cc44790c721c0a0e61614b
BLAKE2b-256 84ca747f56e8de59ddf07bd345cdc3d15865989d1f9fbd80ec0253d70985883e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b2-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 28baab5c22616270a86029f6a967b63eb4464bee9219b498f2a0f320ea703935
MD5 b76df8da351be1b2848637d37ad29730
BLAKE2b-256 432f552d399817cf6fdc89c68b20b4f00331ff33e2e3d792feaa7ce19b44b518

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4f348f0cfe55040a3cfaf3c8eaaa44408d378d5c89f2c8c7b5f924169f85f6cb
MD5 0318ecd2b6821bc4a3e08bc86c6ba097
BLAKE2b-256 bfb93157af9d0ad136d1860762b82d711afa1462c2761f701ac451520ad3931e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.1b2-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/7.0.0 CPython/3.13.14

File hashes

Hashes for dhttpy-0.6.1b2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7df4295e69318b1a304734c4e87eaf7d1b024c2a778308800401ddd7801fd9f9
MD5 d1ca6d50973dc0e1a720a3f60b727a97
BLAKE2b-256 dd511cc445c7e13ddb663df618f339e1e37be038fd7a4447f6f80d3bb3525a09

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 148ee63a3e20bd2cc4e5dbdf620f9dbe5584a3fbfca286b2a4634c8871941d7f
MD5 ba64bffea5f8999578b663656821cc4e
BLAKE2b-256 29b9cafbaf966863f870704af4216a4fef12a486c64be24dddd127f89eaab8d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f105d317c7f9ac6640bc2c501a5707871e025e845a5fceb25485fa89e90d8ea
MD5 9c5367ff544fe3a5222f0860780ab141
BLAKE2b-256 4f7447fbe044b1daf3bec35f255f9dfe518d903e2889b584f504831bad10fc8e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.1b2-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/7.0.0 CPython/3.13.14

File hashes

Hashes for dhttpy-0.6.1b2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7699c70a9cf383cba8887730a990fb28eb1dd4f59c04dac5bdf735a473a9b967
MD5 769aba603cc21360c78fbf7a18090edd
BLAKE2b-256 fa97183bc3db28436d5c4b4a7b65173442b65b9adbcb368dd9185d36a9a1142d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 73e50a4eb852e77122ac6a6035bc19d16faa80587dc4fd8d0c51663e074e244d
MD5 b102bc647a54970e4f672181606a4195
BLAKE2b-256 e1200c36c55e20c53718fec6e0cbdee77589ff7fb52ee4632b7c72847d2b9390

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c1f5b71be2b4f260351918409aec55af5e1cf432bb4d46e4e49c0d5e320b0d91
MD5 14d78ff174d11971432bd40b49b1a245
BLAKE2b-256 d10311133ab731440927b404c6f22834abe999636da372abeb7ae55398d848b7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dhttpy-0.6.1b2-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/7.0.0 CPython/3.13.14

File hashes

Hashes for dhttpy-0.6.1b2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a55f52f945336745a953f675c1cb016710c56a9bc979226e5d4c58079638e0be
MD5 4361f816feef60a77a207955df050696
BLAKE2b-256 3051f014b7daa0a896855829869c4869433e54922aa95fa63077cf5592c6e888

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ae8fa648e2a03c3775fef1fc4df6b28f1f2a30a453bea1bca35de898067f4830
MD5 c2809aec99f20b5edcc711111c833093
BLAKE2b-256 f6d7d9c3e92dfbc668b1be60d2040032d7e0b7514e299b9fa050ec66e826d6aa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dhttpy-0.6.1b2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e7dca3ecd90fae41293517c3a593736f6d79d6f17a1b34eff7ac1591e2b6d801
MD5 73641ba11d33922eb74425ddc6c82850
BLAKE2b-256 6308078816c9ce86877cfac699366a031a017bd605bec3ee0162e57845ff3a6f

See more details on using hashes here.

Provenance

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