Skip to main content

brokk-anvil-client

Native asynchronous Python bindings for Anvil's standalone LLM client. Install with uv add brokk-anvil-client. Binary wheels require no Rust toolchain and do not download or launch the Anvil executable.

import asyncio
from anvil_client import Client

async def main():
    async with Client() as client:
        result = await client.infer(
            model="deepseek::deepseek-v4-flash",
            messages=[{"role": "user", "content": "Return a short greeting."}],
            schema={"type": "object", "properties": {"greeting": {"type": "string"}},
                    "required": ["greeting"], "additionalProperties": False},
        )
        print(result.output, result.usage)

asyncio.run(main())

Models require an explicit codex::, meta::, kimi::, grok::, or deepseek:: prefix. Credentials and provider behavior are shared with anvil infer. DeepSeek uses DEEPSEEK_API_KEY or Anvil's stored DeepSeek credentials. The client supplies no tools and creates no agent sessions.

Client.infer accepts system/user messages, a JSON Schema, its schema_name, optional reasoning_effort and service_tier, total timeout (120 seconds), first-progress idle_timeout (60), inter-progress stall_timeout (30), and validation_retries (one additional attempt). Results expose validated output, usage, and effective request settings. All timeouts must be finite and positive.

InferenceError.kind classifies errors; specialized subclasses include AuthenticationError, RateLimitError, StructuredOutputError, and InferenceTimeoutError. Asyncio cancellation cancels the native future. close() cancels active requests and makes the client unusable; it is idempotent. Connections and lazily loaded credentials are reused for the client's lifetime. Create a new client after changing credentials. Standard CPython 3.11+ is supported; free-threaded CPython wheels are not currently published.

From a source checkout, run uvx maturin develop --manifest-path crates/anvil-client-python/Cargo.toml in an activated virtual environment. Binding builds depend only on anvil-client, not Anvil's agent or Wasm runtime.

Before building release wheels, run python scripts/prepare-python-client.py from the repository root to stage generated third-party license notices.

Metadata

Release files for brokk-anvil-client 0.28.4

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

Built distributions (wheels)

Table of built distributions (wheels) for brokk-anvil-client 0.28.4
File Actions
brokk_anvil_client-0.28.4-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for brokk_anvil_client-0.28.4-cp311-abi3-win_amd64.whl
brokk_anvil_client-0.28.4-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for brokk_anvil_client-0.28.4-cp311-abi3-manylinux_2_28_x86_64.whl
brokk_anvil_client-0.28.4-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for brokk_anvil_client-0.28.4-cp311-abi3-manylinux_2_28_aarch64.whl
brokk_anvil_client-0.28.4-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for brokk_anvil_client-0.28.4-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 22.3 MB

Release files / brokk_anvil_client-0.28.4-cp311-abi3-win_amd64.whl

Download URL brokk_anvil_client-0.28.4-cp311-abi3-win_amd64.whl
Size 5.0 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f2c5147b262e6376255dccd284127ffbc7404c0f9822f1f8a89455a3bc8d0633
BLAKE2b-256 checksum
How to use checksums
bf0e83e5a02ada69f780418ae96bef6f5090c4af798d32778b69dcf0bafc35e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / brokk_anvil_client-0.28.4-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL brokk_anvil_client-0.28.4-cp311-abi3-manylinux_2_28_x86_64.whl
Size 6.0 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
f2a4fc663879fa17b9fdee0f9a42108948204c49267d1061dfa42186b35f8dd3
BLAKE2b-256 checksum
How to use checksums
d0d8cd767cbfa856c4da300bc1a686e45a64ff18a357f107f7eb0e67e0fdd1fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / brokk_anvil_client-0.28.4-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL brokk_anvil_client-0.28.4-cp311-abi3-manylinux_2_28_aarch64.whl
Size 6.0 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
37f3c5bcd5b5d98e5ae0dfa2771fd40c8ae6fda2427b1e3b2727a51be97b7637
BLAKE2b-256 checksum
How to use checksums
086b235af41430a3c76f0167dffb9aec32d1d60ca53221babc95e1d92f7a8d11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / brokk_anvil_client-0.28.4-cp311-abi3-macosx_11_0_arm64.whl

Download URL brokk_anvil_client-0.28.4-cp311-abi3-macosx_11_0_arm64.whl
Size 5.4 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
11fbd0b1b145e6ca64d04ed7a4390460d8beaf6db0eb5eca0b5d5f4018b96044
BLAKE2b-256 checksum
How to use checksums
d723f20b0b98d1a501388d33555e4b05c4d80e8ea4dd3bc5ea15b8a24581f477
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for brokk-anvil-client 0.28.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

0.28.4 This release

4 release files No provenance

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