Skip to main content

warmwinter (Python SDK)

The smallest wrapper around an AI/agent call that asks the one question the Warm Winter gate exists to answer: is this cheap answer trustworthy enough to act on — or should we escalate, or abstain? You keep executing; we only judge. Zero dependencies (stdlib urllib).

pip install warmwinter
from warmwinter import WarmWinter

ww = WarmWinter(api_key="ww_...")          # mint at /api/v1/gate/keys

# one call gates, runs the chosen path, and auto-reports the outcome
answer = ww.guard(
    domain="compute", decision_type="model_route", stated_confidence=0.82,
    cheap=lambda: small_model(prompt),
    escalate=lambda: big_model(prompt),
    verify=lambda out: out is not None,     # your success test
)

Every decision prints a prompt-blind verdict line:

[warmwinter] ACT | compute/model_route | verified | medium stakes

Only decision coordinates and gate metadata are logged—never prompts, context, candidate actions, or outputs. Pass log_verdicts=False to silence it, or logger=my_logger.info to use your application logger.

Or drive the two halves yourself with decide(...) and outcome(...). See the module docstring for the full surface.

Seamless alternative: point your existing OpenAI/Anthropic client's base_url at the gateway and change nothing else — see https://warmwinter.io/gate.

Native computational consultation

Requires SDK 0.3.0 or the current source checkout; published 0.2.0 does not include these helpers. For source verification, run from python/. Registry availability follows the separately accepted release, not a source merge.

Use a consultation-only key explicitly granted by a signed-in human through the existing key-management flow (scopes: "consultation" with host_type and host_ref). Existing Gate/observer keys do not gain consultation access. Keep the key in your environment; these helpers do not mint grants or enable automatic consultation.

import os
from warmwinter import WarmWinter

ww = WarmWinter(api_key=os.environ["WARMWINTER_CONSULTATION_KEY"])
capabilities = ww.consultation_capabilities()
reading = ww.consult_queue(
    arrival_rate=8.0, service_capacity=10.0, rate_unit="tasks/minute",
    source_ref="my-task:rates", usefulness_confidence=0.6,
    # task_ref="my-task:capacity", run_id="existing-owned-run-id",
)
# Only after actually assessing this reading's usefulness:
# ww.consultation_feedback(reading["consultation_id"], "useful")

Units are tasks/second, tasks/minute or tasks/hour. Optional task/run references are preserved; creating or authenticating a run remains a separate host flow. usefulness_confidence forecasts usefulness, not input certainty or authority. Feedback accepts useful, already_known, incorrect or missing_context; it remains self-reported and does not verify a task outcome.

Responses retain the complete server envelope: assumptions, units, provenance, unknown uncertainty, limits, advisory status and pending independent outcome. Overload pressure can be None with an explicit nonfinite_values marker; do not interpret it as zero. Server denials (including revocation, missing scope, invalid input and exhausted limits) raise the existing WarmWinterError; helpers do not retry or fall back to ordinary Gate decisions. A revoked key blocks subsequent requests but does not cancel an admitted request or erase retained evidence.

Offline verification: python -m unittest discover -v from python/.

Metadata

Release files for warmwinter 0.3.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 warmwinter 0.3.0
File Size Uploaded Provenance
warmwinter-0.3.0.tar.gz 7.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for warmwinter 0.3.0
File Interpreter ABI Platform
warmwinter-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / warmwinter-0.3.0.tar.gz

Download URL warmwinter-0.3.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
316a1daeffe8ec31a8ff6c6fd875d8ba50753da5574463e985f4d670ada8a537
BLAKE2b-256 checksum
How to use checksums
8e383c910f75ff68b2bb930d549ad6ec58eee7de226fb826261b64b8db4f501f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 25, 2026.

Transparency log

Release files / warmwinter-0.3.0-py3-none-any.whl

Download URL warmwinter-0.3.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e677bf12ee8dccca9e33c867b895d00964269994ab45ff16a7e628786e20eb3b
BLAKE2b-256 checksum
How to use checksums
174d311eb0f736761fb101568d4d753ed462aca2f65b8b7f6761f1287c0b07e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 25, 2026.

Transparency log

Security for warmwinter 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.

Select from 2 files

Attestation for warmwinter-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 Oct 25, 2026.

Transparency log

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.

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