juniper-cascor-client
Python HTTP and WebSocket client for the juniper-cascor training service.
juniper-cascor-client is the REST and async-WebSocket client for juniper-cascor, the
Cascade-Correlation training service. The synchronous JuniperCascorClient covers network lifecycle,
training control, snapshots, metrics, and distributed-worker monitoring; two async WebSocket streams
cover live monitoring (/ws/training, inbound events) and runtime control (/ws/control, outbound
commands). It's the same client juniper-canopy uses to drive and observe a cascor backend.
Part of the Juniper platform. juniper-cascor-client is the HTTP/WebSocket client for the juniper-cascor training service in Juniper — a multi-package ML research platform built around constructive (Cascade-Correlation) and recurrent neural networks.
Install
pip install juniper-cascor-client
Optional extras: [observability] adds Prometheus counters for WebSocket frame validation; [test]
and [dev] install the test and lint/type-check toolchains.
Quick start
REST:
from juniper_cascor_client import JuniperCascorClient
with JuniperCascorClient("http://localhost:8200") as client:
client.create_network(input_size=2, output_size=2)
client.start_training(
dataset={"source": "inline"},
inline_data={"train_x": [[0, 0], [1, 0], [0, 1], [1, 1]],
"train_y": [[1, 0], [0, 1], [0, 1], [1, 0]]},
epochs=100,
)
print(client.get_training_status()["data"]["training_active"])
Live training stream (async):
import asyncio
from juniper_cascor_client import CascorTrainingStream
async def monitor():
async with CascorTrainingStream("ws://localhost:8200") as stream:
async for msg in stream:
if msg["type"] == "metrics":
print(msg["data"]["epoch"], msg["data"]["train_loss"])
asyncio.run(monitor())
Control stream (async): CascorControlStream(...).command("start", {"epochs": 200}).
API
JuniperCascorClient (synchronous REST): health_check / is_alive / is_ready /
wait_for_ready; create_network / get_network / delete_network / get_topology /
get_statistics; start_training / stop_training / pause_training / resume_training /
reset_training; get_training_status / get_training_params / update_params; get_metrics /
get_metrics_history; get_dataset / get_dataset_data / get_decision_boundary; list_snapshots
/ get_snapshot / save_snapshot / load_snapshot; list_workers / get_worker /
get_worker_stats.
CascorTrainingStream (async, /ws/training): yields inbound JSON frames; raw iteration
(async for) or callbacks (on_metrics, on_state, on_topology, on_cascade_add,
on_candidate_progress, on_event, on_disconnect).
CascorControlStream (async, /ws/control): command(command, params) / set_params(params)
with per-request correlation.
Status
Live on PyPI. The current version is shown by the badge above; see CHANGELOG.md.
The WebSocket streams do not auto-reconnect — wrap reconnection logic around the stream context
manager for long-running consumers.
Documentation
docs/QUICK_START.md— installation and verification guidedocs/REFERENCE.md— full API reference, error model, and WebSocket frame cataloguedocs/DEVELOPER_CHEATSHEET.md— development quick-reference
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file juniper_cascor_client-0.6.0.tar.gz.
File metadata
- Download URL: juniper_cascor_client-0.6.0.tar.gz
- Upload date:
- Size: 75.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f140c9c5543a45e5d2f4977123057666f264b08f50e6ada6a1680753dda61d0c
|
|
| MD5 |
beb749b7f86ea6222056f1527e653fbc
|
|
| BLAKE2b-256 |
fa3509e1d67a2760742fe604ead6691350d21ffd069d36ae10e0e24778bc0af5
|
Provenance
The following attestation bundles were made for juniper_cascor_client-0.6.0.tar.gz:
Publisher:
publish.yml on pcalnon/juniper-cascor-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
juniper_cascor_client-0.6.0.tar.gz -
Subject digest:
f140c9c5543a45e5d2f4977123057666f264b08f50e6ada6a1680753dda61d0c - Sigstore transparency entry: 2144348392
- Sigstore integration time:
-
Permalink:
pcalnon/juniper-cascor-client@292c520c90823689851a9cfce0cb7d559ff11896 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/pcalnon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@292c520c90823689851a9cfce0cb7d559ff11896 -
Trigger Event:
release
-
Statement type:
File details
Details for the file juniper_cascor_client-0.6.0-py3-none-any.whl.
File metadata
- Download URL: juniper_cascor_client-0.6.0-py3-none-any.whl
- Upload date:
- Size: 44.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f322eb5335efd239685810774408c88a4a164c9cd4ccfb83eefe610561258fca
|
|
| MD5 |
d612cf88f77ffa54120db0a18b20467f
|
|
| BLAKE2b-256 |
1e2ed146a97bd619b367c729994fe552ba7c7088432525d8152a4a84ca537c0b
|
Provenance
The following attestation bundles were made for juniper_cascor_client-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on pcalnon/juniper-cascor-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
juniper_cascor_client-0.6.0-py3-none-any.whl -
Subject digest:
f322eb5335efd239685810774408c88a4a164c9cd4ccfb83eefe610561258fca - Sigstore transparency entry: 2144348487
- Sigstore integration time:
-
Permalink:
pcalnon/juniper-cascor-client@292c520c90823689851a9cfce0cb7d559ff11896 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/pcalnon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@292c520c90823689851a9cfce0cb7d559ff11896 -
Trigger Event:
release
-
Statement type: