mmo-runtime
Runtime library for MMO gRPC tools.
Worker execution
stream_in_worker(workflow, request, ctx, *, pool=None, timeout=None) yields
ProgressEvent objects in order, then one ResultEnvelope or ErrorEnvelope.
Even without a supplied pool the workflow runs on a worker thread, so progress
is available before completion. Progress is buffered up to 64 events; slow
consumers apply backpressure rather than dropping events or growing memory
without bound. Close abandoned iterators to release blocked producers.
Timeout is measured from the first iterator advance and includes queue time.
None disables the deadline; zero (or a negative value) expires immediately.
Cancellation, timeout, and iterator closure signal ctx.cancel and cancel jobs
which have not started. Running workflows must cooperatively check the token
and bound their own blocking I/O. Python threads are not forcibly terminated;
an uncooperative job can retain its worker slot and delay process exit.
run_in_worker retains its legacy (terminal, progress_list) API, including
inline execution without a pool and pooled cancellation/admission exceptions.
Its accumulated progress list is intentionally not memory-bounded; use the
streaming API for long-running jobs. WorkerPool.shutdown(cancel_futures=True)
cancels waiting jobs; it does not interrupt running jobs.
Transport and lifecycle
ToolClient.channel is public for constructing service stubs. Unary and stream
calls accept deadline (including zero) and keyword-only metadata, a sequence
of (key, value) pairs. Unknown error-envelope codes normalize to INTERNAL.
Unavailable transports map to retryable PROVIDER_ERROR; resource exhaustion,
invalid requests, cancellation, and expired deadlines retain their error codes.
Health polling limits each probe and sleep to the remaining polling budget.
Plain Unix socket paths, explicit unix:// targets, TCP host:port (including
IPv6), and resolver targets are normalized without duplicate Unix prefixes.
The default on Windows is 127.0.0.1:50051; choose explicit per-tool ports to
avoid collisions. Unix keeps /tmp/tool.sock as its default.
The server tracks the full handler lifetime of unary and streaming application
RPCs. Health probes do not keep an otherwise idle server alive. The idle period
restarts after the last active handler exits. Shutdown is one-shot, marks
health not-serving, signals the server cancellation token, waits for gRPC's
graceful stop, then cleans up transport resources and invokes on_stop once.
Signal handlers are installed only on the Unix main thread and restored on exit.
An instance is single-use; create a new instance to restart.
The server cancellation token is available for embedded workflows; generated
servicers use their own per-RPC token and gRPC cancellation callback. Graceful
shutdown therefore lets existing generated RPCs finish until grace expires.
Neither job_timeout_sec nor the server token is automatically injected into
arbitrary registered handlers: pass explicit worker deadlines and cancellation
tokens when implementing custom handlers.
Metadata
Release files for mmo-runtime 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mmo_runtime-0.1.3.tar.gz | 26.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mmo_runtime-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.0 kB
Release files / mmo_runtime-0.1.3.tar.gz
| Download URL | mmo_runtime-0.1.3.tar.gz |
|---|---|
| Size | 26.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8d65a44125b9272d9056b500b97458e260761e7ba4acc9613af8424ac386c98
|
|
BLAKE2b-256 checksum How to use checksums |
da07a87cf7144c9e3de118ec785013aefd0468afe1afd0be5b436231b25817c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / mmo_runtime-0.1.3-py3-none-any.whl
| Download URL | mmo_runtime-0.1.3-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
529f535688ca51c00bc69fc9df3d7329d3f747bd68231f1f7691710b9f54869b
|
|
BLAKE2b-256 checksum How to use checksums |
a995b28370f65f79abaa655fd8ddae5bdaaf8ab047414a36a3bea8a690cf536c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Security for mmo-runtime 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.