Skip to main content

juniper-cascor-client

PyPI Python 3.12+ License: MIT

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:  # origin only; not /v1
    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

License

MIT — see LICENSE.

Metadata

Release files for juniper-cascor-client 0.8.0

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

Source distribution (sdist)

Source distribution for juniper-cascor-client 0.8.0
File Size Uploaded
juniper_cascor_client-0.8.0.tar.gz 114.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for juniper-cascor-client 0.8.0
File Interpreter ABI Platform
juniper_cascor_client-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 173.4 kB

Release files / juniper_cascor_client-0.8.0.tar.gz

Download URL juniper_cascor_client-0.8.0.tar.gz
Size 114.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d8f9abefda0e660df4f71faec15d34dc2d1e834a58f9439a64b9c16be658a436
BLAKE2b-256 checksum
How to use checksums
8ee25562fbf0fcf94a8b14e7f2ac0f81193b1b23ed0a859dbd483b1c0325c845
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / juniper_cascor_client-0.8.0-py3-none-any.whl

Download URL juniper_cascor_client-0.8.0-py3-none-any.whl
Size 59.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1333cd4984df7637c0e5983f5e76733ab41e78b8c69fb6efa2d57ed5e99fb194
BLAKE2b-256 checksum
How to use checksums
7454a75173934e048b6504082a0b5961d3f873dbcc8b9111d228e32806d0a991
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

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