Skip to main content

hgraph-web

C++-first HTTP/S and WebSocket transports for hgraph, implementing the contract in hgraph RFC 0024. The extension covers all four transports — HTTP(S) server, HTTP(S) client, WebSocket server, and WebSocket client — and exposes the same service model to native C++ and Python graphs.

One path-bound, multi-interface service_impl owns the sockets, TLS contexts, and worker threads for a configuration. Serving a route and connecting a WebSocket are subscription services keyed by the immutable route or connection key; responding, sending frames, and calling a remote endpoint are request/reply services; events and statistics are reference services. Graph output reaches the transport through the implementation's sink inputs, and requests, frames, delivery reports, events, and stats re-enter the root graph through bounded push sources. Listeners and clients are created on graph start and stopped with the graph; there is no user-held server or client object.

Routing lives in the transport rather than the graph. The route key set arrives as TSS deltas, is compiled into a native route table, and requests are delivered already keyed by route. Duplicate and ordered headers, multi-value query parameters, and binary bodies are preserved end to end.

The server speaks HTTP/1.1 and WebSocket over Asio/Beast; the client speaks HTTP/1.1, HTTP/2, and WebSocket over libcurl. The server ships the complete HTTP/2 seam — the ALPN callback, protocol dispatch, and configuration placeholders — and rejects h2 in server ALPN until the nghttp2 session lands in a v1.x release. TLS termination, mTLS, SNI, and ALPN use OpenSSL on every platform.

The core hgraph wheel owns a guarded compatibility shim at hgraph.adaptors.web which delegates to this extension when it is installed. The released hgraph.adaptors.tornado package is unchanged; whether it is later re-pointed or deprecated is a separate migration decision. The extension wheel installs only hgraph_web; it never contributes files to the core hgraph package.

Status

The HTTP/1.1, HTTP/2 client, and WebSocket service implementations, schemas, service interfaces, endpoint decorators, and codec helpers are available. Runnable HTTP server/client and WebSocket loopback examples are in python/examples.

Build and test

This is a first-party extension in the hgraph monorepo. It remains a separate CMake package and Python distribution: the top-level core package does not link curl, Boost, nghttp2, or OpenSSL, and does not install these modules.

For an in-tree native development build from the repository root:

cmake -S . -B build-web \
  -DHGRAPH_BUILD_WEB_EXTENSION=ON \
  -DBUILD_TESTING=ON
cmake --build build-web --parallel
ctest --test-dir build-web --output-on-failure

The extension can still be configured independently against an installed hgraph SDK:

cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/hgraph/install
cmake --build build --parallel
ctest --test-dir build --output-on-failure

Each third-party dependency arrives with the translation unit that links it, resolved with find_package(... CONFIG QUIET) first and falling back to a pinned static FetchContent build. The skeleton links only hgraph::core.

Build its separately deployable ABI3 wheel from the repository root after making the matching hgraph SDK discoverable through CMAKE_PREFIX_PATH:

CMAKE_PREFIX_PATH=/path/to/hgraph/sdk \
  uv build --wheel --package hgraph-web --python 3.12

The deterministic suite runs against the extension's fake transport, which exercises routing, pacing, reservation, and lifecycle without sockets. A live loopback subset acts as the transport oracle.

Wheel builds require the SDK installed by a stable-ABI hgraph wheel. The extension rejects an SDK that links Python::Python, because that would pin the nominal ABI3 module to the build interpreter.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hgraph_web-0.8.21.tar.gz (202.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

hgraph_web-0.8.21-cp312-abi3-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12+Windows x86-64

hgraph_web-0.8.21-cp312-abi3-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ x86-64

hgraph_web-0.8.21-cp312-abi3-macosx_15_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.12+macOS 15.0+ ARM64

File details

Details for the file hgraph_web-0.8.21.tar.gz.

File metadata

  • Download URL: hgraph_web-0.8.21.tar.gz
  • Upload date:
  • Size: 202.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hgraph_web-0.8.21.tar.gz
Algorithm Hash digest
SHA256 83c2fd0634b3739dbc9fc85e387aa89396f1dda5e93d3209dc64385bb3a8d3c8
MD5 0dcf693266e88cdf21fc42d03170cb49
BLAKE2b-256 6796c4bba7eaa877be05f9aa754341dfbf8646ba6cfd0a9d04e41e6687898878

See more details on using hashes here.

Provenance

The following attestation bundles were made for hgraph_web-0.8.21.tar.gz:

Publisher: release-wheels.yml on hhenson/hgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hgraph_web-0.8.21-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: hgraph_web-0.8.21-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.6 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 hgraph_web-0.8.21-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4c1a215788f3b7e6a8c78f73f0bbfb8b72f7ec478c3cfb80dc43c5684f8734f0
MD5 2daae29c6cd461176523ca022bbcb56e
BLAKE2b-256 c4f93bf710f9c5d4075a049c1f4971484e815e814af5597c92991540907c93dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for hgraph_web-0.8.21-cp312-abi3-win_amd64.whl:

Publisher: release-wheels.yml on hhenson/hgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hgraph_web-0.8.21-cp312-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hgraph_web-0.8.21-cp312-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dbce50f4d928905fa14ca310cb12c13d2ffc3c9d0ba0d89e94f6629f6213944c
MD5 aff28dd821990ff5315f3bf6cf2dbc51
BLAKE2b-256 f4b74a9e8368afaa71f83e33c840d0918a44a009d466eba7a95b01b59a021781

See more details on using hashes here.

Provenance

The following attestation bundles were made for hgraph_web-0.8.21-cp312-abi3-manylinux_2_28_x86_64.whl:

Publisher: release-wheels.yml on hhenson/hgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hgraph_web-0.8.21-cp312-abi3-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for hgraph_web-0.8.21-cp312-abi3-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 515cd1f4ce702d978190fdbec9cc290dff11cffac2eab2c1deded135be780014
MD5 89e2140b49c937d28f0fbb8027f8ceaf
BLAKE2b-256 f53334951c9e42750ec44446c88aad3da0b9fe29a2cd99eb4a56afbbe0eda580

See more details on using hashes here.

Provenance

The following attestation bundles were made for hgraph_web-0.8.21-cp312-abi3-macosx_15_0_arm64.whl:

Publisher: release-wheels.yml on hhenson/hgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.8.22

4 files

This release

0.8.21 This release

4 files

0.8.20

4 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page