coakka-runtime-python
Your work. Your language. Connected.
Use coakka-runtime-python for new projects. Existing applications can keep
coakka-v2-connector. Both install names use the coakka_v2_connector import.
Contents
- Overview
- Install and quickstart
- Compatibility and versions
- Upgrade or migrate
- Features and guides
- Deployment
- Samples, benchmarks and support
- Sponsorship
- License
Overview
Register a Python handler under a named target and call it from a local process or from services in other languages. CoAkka Runtime Core owns admission, routing, delivery and terminal outcomes. The Python connector exposes those contracts through Python values and context managers.
CoAkka is a polyglot, cross-platform ecosystem. Each product has its own packages, supported hosts and lifecycle. An application can use one product or combine them.
CoAkka Runtime is an embedded runtime for service-to-service and local application work across languages and hosts. The application owns its handlers and business logic. Core handles delivery.
- Named targets route request/reply and one-way events to local or peer handlers. Envelopes carry the payload and delivery metadata. Core matches replies and enforces request deadlines.
- Bounded queues limit admitted work. Core reports refusals, timeouts and structured deadletters when delivery fails.
- Versioned route snapshots let supported hosts update routing live. Peer connections use multiplexed TCP by default and can use TLS or mutual TLS.
- Health, pressure counters and optional monitoring expose delivery behavior. File Lane transfers bulk data and Stream Lane carries framed streams.
Runtime guides · Messages and routing
CoAkka HTTP Runtime is a full HTTP server and client for browser frontends, HTTP APIs and upstream services. Select a standalone HTTP/1.1, HTTP/2 or HTTP/3 listener, or serve buffered requests and replies across all three on one HTTPS port with the MultiProtocol profile. MultiProtocol serves buffered exchanges. Use a standalone listener for streaming, SSE or WebSocket. The standalone feature set includes:
- Bounded admission and backpressure limit active exchanges and resource use. Typed outcomes identify overload and resource refusals.
- Static frontend assets, single-page application fallback, file downloads and byte ranges, plus optional compression for buffered responses.
- Streaming uploads and responses, Server-Sent Events (SSE), and WebSocket sessions over HTTP/1.1.
- Outbound HTTP calls with deadlines and cancellation, TLS and mutual TLS where supported by the listener profile, and graceful shutdown.
- Health and effective-configuration inspection, optional monitoring, and live route or handler updates on supported profiles.
HTTP Runtime features and protocol support · Serve a frontend and backend · HTTP Runtime for Python
CoAkka Logger provides application logging with bounded storage, explicit admission and delivery outcomes, and observable backpressure. Logger guide
Optional integrations include Runtime Addons for tasks such as acquiring files before File Lane delivery, and HTTP Runtime Inspect for route inspection and OpenAPI export when a service enables inspection. Runtime Addons · HTTP Runtime Inspect
For example, a checkout service can serve the browser over HTTP and call a Python pricing handler by target through CoAkka Runtime. The application owns the handler and pricing logic. Run the web demo · Explore the ecosystem
Install and quickstart
Use GIL-enabled CPython 3.11 or later. Create a virtual environment and install the connector from PyPI.
python -m venv .venv
.venv/bin/python -m pip install --only-binary=:all: coakka-runtime-python==3.3.2
On Windows, use .venv\Scripts\python.exe in place of .venv/bin/python.
Save this example as first_run.py. Run it with .venv/bin/python first_run.py
or .venv\Scripts\python.exe first_run.py on Windows.
from coakka_v2_connector import ConnectorStartSpec, RuntimeHost, local_route
def accept_name(payload: bytes) -> bytes:
return b"accepted-" + payload
target = "customers.accept"
start_spec = ConnectorStartSpec(
system_name="customer-app",
node_id="customer-app-1",
routes=(local_route(target),),
)
with RuntimeHost.start(start_spec=start_spec) as runtime:
runtime.register_payload_handler(target, accept_name)
reply = runtime.ask_payload(
source="customer-api",
target=target,
payload=b"Ada Lovelace",
timeout_ms=2000,
)
print(reply.decode("utf-8"))
The handler returns accepted-Ada Lovelace. Exiting the with block closes
Runtime. Python first-run sample
Compatibility and versions
Read a connector version as MAJOR.MINOR.REVISION. The first two numbers
identify the Core generation. The last number identifies the connector
revision within that generation.
Version 3.3.2
3.3.2 is revision 2 on Core generation 3.3.
coakka-runtime-python==3.3.2 is a metadata-only package that requires
exactly coakka-v2-connector==3.3.2. Each platform wheel includes Core 3.3,
build 16bdd692faf918d1a959c073ad20318392659f4b, ABI 1, and its Python adapter.
| Requirement | Supported wheel floor |
|---|---|
| App host | GIL-enabled CPython 3.11 or later, cp311-abi3 |
| macOS | ARM64, macOS 13 or later |
| Linux | ARM64 and x86-64, glibc 2.36 or later |
| Windows | ARM64 and x86-64 |
Pip selects the platform wheel. The connector verifies the installed native images against its package receipt before loading them. Python package on PyPI · Compatibility matrix · Package and platform evidence
Upgrade or migrate
CoAkka uses <product>-<language> for recommended connector names.
coakka-runtime-python follows that convention. Choose either upgrade path.
Keep the legacy name
python -m pip install --upgrade --only-binary=:all: coakka-v2-connector==3.3.2
Keep your coakka_v2_connector imports and update the version in your
requirements and lockfile.
Switch to the recommended name
python -m pip install --upgrade --only-binary=:all: coakka-runtime-python==3.3.2
Replace the direct dependency in requirements.txt or pyproject.toml and
regenerate your lockfile. Keep your coakka_v2_connector imports. Pip still
installs coakka-v2-connector==3.3.2 as the exact implementation dependency.
For a 2.x application, follow the API migration introduced in 3.0.0.
Runtime changelog
Features and guides
Request and reply
Use RuntimeHost.start(...) to own one active runtime per Python process.
ConnectorOrchestrator.start(...) remains available for existing callers.
Use ask_payload(...) and register_payload_handler(...) for bytes or
ask_json(...) for typed JSON. Use submit_request_raw(...),
submit_request_json(...) or submit_request_typed(...) with
terminal_events(...) to consume responses and deadletters asynchronously.
Core owns request matching, deadlines and terminal status. Bytes-first handlers run synchronously on the request reader. Keep them short to allow the reader to serve other requests. Runtime integration guide
Connection strategy
Omit connection_strategy at startup to use Core's persistent multiplexing.
Concurrent exchanges to the same endpoint can share one TCP connection.
In the default multiplexing mode, Core 3.3 supports up to 8 remote calls per
batch and up to 16 in-flight exchanges per connection. Read the accepted mode from
runtime.tcp_connection_config().mode and the remote batch limit from
runtime.runtime_startup_config()["delivery"]["remoteBatchMaxCalls"].
To choose explicitly, pass a RuntimeTcpConnectionStrategySpec as
connection_strategy in ConnectorStartSpec. Use
RuntimeTcpConnectionMode.MULTIPLEXING for multiplexing or
RuntimeTcpConnectionMode.PER_EXCHANGE for one connection per exchange.
Create a new runtime to change the strategy after startup.
Python transport configuration ·
Connection strategy configuration
TCP and credentials
Core 3.3 supports TCP plaintext, TLS and mutual TLS. Startup defaults to
plaintext. Pass a RuntimeTcpSecuritySpec as security to choose a secure
mode and supply its credentials. Read the loaded capabilities with
RuntimeHost.read_runtime_capabilities() and the active mode with
runtime.tcp_security_info().
TLS and mutual TLS
Monitoring
Optional monitor collection is off by default. Set enable_monitor=True in
ConnectorStartSpec to enable it. Read the accepted setting at
runtime.runtime_startup_config()["monitor"]["enabled"] and collected data
through runtime.monitor_snapshot(). Basic health and pressure counters are
available with the default setting.
Monitoring guide
Hot reload
Apply a newer route snapshot with runtime.apply_snapshot(...). In TLS or
mutual TLS mode, reload credentials with runtime.apply_tcp_security(...)
under the configured reload policy. Check the returned status and active
configuration. Use a new runtime instance to change startup settings such as
the connection strategy, security mode or monitor enablement.
Route snapshot generations ·
Python credential reload
Shutdown
Use with RuntimeHost.start(...) to close Runtime when the block exits.
For an explicitly managed host, call close() from its application owner.
Cancel or join application work that still uses resources you own.
Troubleshooting
File Lane
Use FileLane.open(...) for bulk file transfer. Handle pause, cancellation
and completion using the lane's reported status. For replica delivery,
FileLane.open_owned(...).prepare_receive_grant(...) returns a grant
whose to_send_spec(...) method preserves the selected owner endpoint.
File transfer guide ·
Owner and replica grants
Stream Lane
Use StreamLane.open(...) for framed streams. With an owned lane,
prepare_publish_grant(...) returns a grant with a to_subscribe_spec(...)
helper. Callback buffers are borrowed for the callback. Copy bytes inside the
callback when the application needs to keep them.
Streaming guide
AI-Assisted Integration
Use the exact package version and a runnable example when generating Python integration code. AI-assisted integration guide
Deployment
Run the connector inside your application. Choose a matching CPython interpreter and platform wheel for each deployment.
| Environment | Where to start |
|---|---|
| LAN | Connect processes over TCP using reachable endpoints. Configure TLS or mutual TLS when the deployment requires authenticated peers. Cluster routing |
| Containers and Kubernetes | Set runtime identity and routes at startup. Use your service DNS and normal rollout process. Container and Kubernetes guide |
| Bare-metal hosts and VMs | Install the package for the supported OS, architecture and app-host version. Follow the platform and lifecycle checks for your service. Production readiness |
| Edge and IoT gateways | Use a compatible host, such as a Raspberry Pi 5 running Linux ARM64. Check the native package and app-host floors first. Edge and IoT guide |
Samples, benchmarks and support
- CoAkka Samples for runnable examples across the ecosystem.
- CoAkka Publish for releases, archives, checksums and platform evidence.
- Runtime benchmarks and the benchmark quickstart.
- CoAkka documentation and the AI-assisted integration guide. Use the exact package and runnable sample when generating application code.
Email support@coakka.io for technical help and contact@coakka.io for general inquiries. Contact and support
Sponsorship
Sponsorship helps maintain CoAkka's connector testing, documentation and releases. Sponsor CoAkka on GitHub. For sponsorship and licensing inquiries, email contact@coakka.io.
License
Free for application use, including commercial and production use.
Connector source, types, samples and documentation use the Apache License 2.0. Bundled native files use the CoAkka Native Artifact License 1.2. The native terms permit ordinary application, commercial and SaaS use. Offering CoAkka itself as a managed runtime or infrastructure requires a separate agreement. Each package includes offline license and notice files. Package licensing
Metadata
Release files for coakka-runtime-python 3.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| coakka_runtime_python-3.3.2-py3-none-any.whl | Python 3 | none | any | Details for coakka_runtime_python-3.3.2-py3-none-any.whl |
Release files / coakka_runtime_python-3.3.2-py3-none-any.whl
| Download URL | coakka_runtime_python-3.3.2-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1bc909d8da32a0b0163de6a2c0b8caa6c632323467236494b7b797a17c03d95
|
|
BLAKE2b-256 checksum How to use checksums |
29b4e23766baa1f5fa937ccd131cf5f450fca3e54bf2603972efd3a992ff3b48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Security for coakka-runtime-python 3.3.2
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.