Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

InferCrane Python SDK

Typed Python client for the InferCrane control API and OpenAI-compatible inference gateway. The package has no runtime dependencies and supports Python 3.10 or newer.

Install

For the public beta:

python -m pip install 'infercrane==1.0.0rc1'

Use the SDK version from the same InferCrane release as the control plane. Stable 1.0.0 remains reserved for the stable release.

Configure

export INFERCRANE_CONTROL_URL=https://infercrane.internal
export INFERCRANE_API_KEY=YOUR_CONTROL_API_KEY
from infercrane import InferCrane

infercrane = InferCrane()

Pass base_url, gateway_url, or api_key to the constructor when environment configuration is not appropriate. Use ca_file, cert_file, and key_file for a private CA or mutual TLS. Keep control-plane credentials in trusted server processes.

Deploy and wait

operation = infercrane.deploy(
    model="Qwen/Qwen3-8B",
    name="support-production",
    endpoint_name="support-production",
    cloud="runpod",
    gpu="L40S",
    min_replicas=1,
    max_replicas=2,
)

completed = infercrane.wait(operation.id, timeout=900)
print(completed.status)
print(completed.result.get("endpoint_name"))

name identifies the deployment operation. endpoint_name is the stable model alias used by the application and defaults to name.

wait observes durable server-side work. A timeout or process exit does not cancel the operation. Call cancel(operation.id) only when cancellation is intentional.

Stream inference

for event in infercrane.stream_chat(
    "support-production",
    [{"role": "user", "content": "Summarize the incident."}],
):
    print(event, flush=True)

AsyncInferCrane provides the same common workflows for async applications.

Set an objective and request evidence

infercrane.set_slo_policy(
    "support-production",
    max_ttft_p95_ms=250,
    max_error_rate=0.01,
)

recommendation = infercrane.recommend("support-production")

Recommendations preserve unavailable evidence instead of inventing a metric or price.

Errors and full API access

from infercrane import APIError, OperationFailed, OperationTimeout

try:
    infercrane.wait(operation.id, timeout=30)
except OperationTimeout:
    print("The operation is still running.")
except OperationFailed as error:
    print(error.operation)
except APIError as error:
    print(error.code, error.remediation)

The ergonomic methods cover common deployment and inference workflows. infercrane.api exposes the complete generated control API with the same authentication and error contract.

See the Python SDK guide, control API, and security guidance.

License

Apache-2.0

Metadata

Release files for infercrane 1.0.0rc1

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

Built distribution (wheel)

Table of built distributions (wheels) for infercrane 1.0.0rc1
File Interpreter ABI Platform Actions
infercrane-1.0.0rc1-py3-none-any.whl Python 3 none any Details for infercrane-1.0.0rc1-py3-none-any.whl

Release files / infercrane-1.0.0rc1-py3-none-any.whl

Download URL infercrane-1.0.0rc1-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7484c87034dd88d15ff3f41e31cf38c7f3771a948d3b72fd2ef7b949f4e07a3f
BLAKE2b-256 checksum
How to use checksums
53d21187c9d02dd87fef5520b2e93dfbb9525a576e288412bbe0e623dcf0be14
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 Aug 27, 2026.

Transparency log

Security for infercrane 1.0.0rc1

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 1 file in this release has been uploaded with provenance metadata.

Attestation for infercrane-1.0.0rc1-py3-none-any.whl

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 Aug 27, 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.

Release history Release notifications | RSS feed

This release
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