Skip to main content

ZMQRuntime

Generic ZeroMQ transport, lifecycle, progress, cancellation, viewer-control, and execution-projection primitives.

Important boundary

ZMQServer and ZMQClient are abstract application integration points. They cannot be instantiated directly:

  • a server implements handle_control_message and handle_data_message;
  • a client implements _spawn_server_process and send_data.

The package does not provide a generic send_request API or define an application's execution payload. Applications subclass the bases and map their typed domain requests onto the transport.

Transport configuration

from zmqruntime import TransportMode, ZMQConfig
from zmqruntime.transport import get_zmq_transport_url

config = ZMQConfig(control_port_offset=1000)
data_url = get_zmq_transport_url(
    7777,
    host="localhost",
    mode=TransportMode.TCP,
    config=config,
)

Application subclasses can use serve_forever, readiness probes, control port helpers, progress records, cancellation messages, lifecycle engines, and projection adapters without duplicating socket or process machinery.

Execution completion

Execution clients with a registered progress subscription wake on the server's terminal ExecutionStatusSnapshot. The existing callback sequence barrier still waits for every admitted progress callback. Registration replays the latest progress and terminal record; a missing terminal notification recovers through STATUS using the configured wait interval. Clients without progress registration continue to use STATUS.

Applications that enrich successful results override ExecutionServer.finalize_execution_record(record). This record-only hook runs under the lifecycle lock after task completion and before STATUS or terminal publication can observe the record. It must not publish progress or acquire transport resources. The task's recorded end time retains its existing boundary. Already admitted progress is published before the terminal record; new progress admissions after a terminal transition are discarded.

Installation

python -m pip install zmqruntime

Documentation: zmqruntime.readthedocs.io.

For local development, install the documentation dependencies and run a clean, warning-fatal build:

python -m pip install -e ".[dev,docs]"
python -m sphinx -E -W --keep-going -b html docs/source docs/_build/html

Repository: OpenHCSDev/ZMQRuntime.

Metadata

Release files for zmqruntime 0.6.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zmqruntime 0.6.3
File Size Uploaded
zmqruntime-0.6.3.tar.gz 727.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zmqruntime 0.6.3
File Interpreter ABI Platform
zmqruntime-0.6.3-py3-none-any.whl Python 3 none any Details

Total release size: 826.1 kB

Release files / zmqruntime-0.6.3.tar.gz

Download URL zmqruntime-0.6.3.tar.gz
Size 727.1 kB
Tags Source
SHA-256 checksum
How to use checksums
50939ecb7bdb59a8834e1f067367c81c6c91cc5ac8faa40583644be66e5e1661
BLAKE2b-256 checksum
How to use checksums
6e5be0c4ab8a7673d21f06fccc208c5a6e20990ca25f79d4968eb741b131940e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / zmqruntime-0.6.3-py3-none-any.whl

Download URL zmqruntime-0.6.3-py3-none-any.whl
Size 99.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6a3128998f58f14cecc4faa5b18c68d1677819b4e3c02eb8dff88ee89c97cf9
BLAKE2b-256 checksum
How to use checksums
1bfa73ba057fcf9dbb3f9d39c75c556bcf6458b98cac8acf59a0e93c60af46f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

0.6.3 This release

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.2.24

2 release files

0.2.23

2 release files

0.2.22

2 release files

0.2.21

2 release files

0.2.19

2 release files

0.2.18

2 release files

0.2.17

2 release files

0.2.16

2 release files

0.2.15

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.0

2 release 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