juniper-recurrence-client
HTTP client for the juniper-recurrence service — the FastAPI app wrapping the Δt-native LMU
recurrence model and its cross-validation API. A lean requests-based client mirroring
juniper-data-client and
juniper-cascor-client, so consumers
(notably juniper-canopy's recurrence backend adapter) drive every Juniper backend the same way.
Install
pip install juniper-recurrence-client # once published
pip install -e ".[test]" # local development
Names and source layout. Unlike its two sibling clients, this package is published from the
juniper-recurrence-client/subdirectory of thepcalnon/juniper-recurrencemonorepo — there is no standalonejuniper-recurrence-clientrepository. Three names are in play and all three differ:
What Value Install (distribution name) pip install juniper-recurrence-clientImport (module name) import juniper_recurrence_clientSource (repository) pcalnon/juniper-recurrence, pathjuniper-recurrence-client/So if
import juniper_recurrence_clientraisesModuleNotFoundError, the distribution to install isjuniper-recurrence-client; and issues or PRs for this client belong on thejuniper-recurrencerepository.
requests-only at the core; pip install juniper-recurrence-client[observability] adds the
optional juniper-observability integration (X-Request-ID propagation + the on_request hook).
Port:
8211is the juniper-recurrence service's default host port; under Docker it maps to the container's8210(see the app README). Point the client at whicheverhost:portthe service is published on.
Quick start
from juniper_recurrence_client import JuniperRecurrenceClient
client = JuniperRecurrenceClient("http://localhost:8211", api_key="…")
# Train the LMU regressor on a dataset (by id / name / generator)
client.train(name="equities", d=16)
# Predict — inline X with Δt, or a dataset reference
client.predict(dataset_id="ds-1")
# Walk-forward cross-validation over the whole dataset (the `full` split — the artifact's
# own *_full arrays when present, otherwise rebuilt from train | val | test)
result = client.crossval(name="equities", n_folds=4, scheme="expanding", embargo=2)
print(result["eval_aggregate"])
# Inspect
client.get_model() # topology + metrics
client.training_status() # state + events
client.is_ready() # readiness probe
API surface
| Method | Endpoint |
|---|---|
train(*, dataset_id / name / generator, params, split, d, theta, ridge, readout, rff_*, mlp_*) |
POST /v1/train |
training_status() |
GET /v1/training/status |
predict(*, X / dt / target_dt / seq_lengths, or a dataset ref) |
POST /v1/predict |
crossval(*, n_folds, scheme, embargo, min_train, dataset ref, d, theta, ridge, readout, rff_*, mlp_*) |
POST /v1/crossval |
crossval_status() |
GET /v1/crossval/status |
get_model() |
GET /v1/model |
get_dataset() |
GET /v1/dataset |
health_check() / is_ready() / wait_for_ready() |
GET /v1/health[/ready] |
Authentication
Pass api_key=…, or set JUNIPER_RECURRENCE_API_KEY (or the Docker-secret
JUNIPER_RECURRENCE_API_KEY_FILE, a path whose stripped contents are the key). The key is sent
as the X-API-Key header. Note the asymmetry: the server reads the plural
JUNIPER_RECURRENCE_API_KEYS (its accepted set); the client sends one key under the
singular env var.
Errors
All errors derive from JuniperRecurrenceClientError: JuniperRecurrenceConnectionError,
JuniperRecurrenceTimeoutError, JuniperRecurrenceNotFoundError (404),
JuniperRecurrenceConflictError (409 — a run already in progress, or no trained model yet),
JuniperRecurrenceValidationError (400/422), JuniperRecurrenceConfigurationError.
License
MIT — see LICENSE.
Metadata
Release files for juniper-recurrence-client 0.3.0
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 | Actions |
|---|---|---|---|---|
| juniper_recurrence_client-0.3.0.tar.gz | 25.6 kB | With provenance | Details for juniper_recurrence_client-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| juniper_recurrence_client-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for juniper_recurrence_client-0.3.0-py3-none-any.whl |
Total release size: 42.0 kB
Release files / juniper_recurrence_client-0.3.0.tar.gz
| Download URL | juniper_recurrence_client-0.3.0.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5550994eb8995fc578c1abd92496e68d5b7fc301d5a396582d557d8ae73a9fb
|
|
BLAKE2b-256 checksum How to use checksums |
8da85537f64fbe9fc9872c0308deb847a1c9633c10006a93cde0b83e4eda4a51
|
| 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 10, 2026.
Transparency logRelease files / juniper_recurrence_client-0.3.0-py3-none-any.whl
| Download URL | juniper_recurrence_client-0.3.0-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04bb3ee2378c3b85cd9acf0626ca128f1ed37d1436eb021ae42860c5fde731e8
|
|
BLAKE2b-256 checksum How to use checksums |
e85dcf2ed3c8b17327706b477b9019bddd40ace861ee2e8466a93945273b8141
|
| 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 10, 2026.
Transparency logSecurity for juniper-recurrence-client 0.3.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for juniper_recurrence_client-0.3.0.tar.gz
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 10, 2026.
Transparency logA 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.