Skip to main content

mistralai-blokhus

Typed async Python client for Blokhus, Mistral AI's microVM sandbox platform. Commands use HTTP/SSE, files use streamed HTTP, and terminals and port forwarding use WebSockets. Requires Python 3.12 or later.

Install

uv add mistralai-blokhus

The import package is blokhus.

Configure

Set MISTRAL_API_KEY, or pass a ClientConfig to override the key or the endpoint. The key is sent as Authorization: Bearer <key>.

from blokhus import ClientConfig, Sandbox

config = ClientConfig(base_url="https://example.com/v1/blokhus", api_key="...")
async with await Sandbox.create(image="python:3.12-slim", config=config) as sandbox:
    print((await sandbox.commands.exec("printf hello")).stdout)

Run a command

import asyncio

from blokhus import Sandbox


async def main() -> None:
    async with await Sandbox.create(image="python:3.12-slim") as sandbox:
        result = await sandbox.commands.exec("printf hello")
        print(result.stdout)
        await sandbox.files.write("/tmp/example.txt", "hello")
        print(await sandbox.files.read("/tmp/example.txt"))


asyncio.run(main())

Metadata

Release files for mistralai-blokhus 0.214.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 mistralai-blokhus 0.214.0
File Size Uploaded Provenance Actions
mistralai_blokhus-0.214.0.tar.gz 87.2 kB With provenance Details for mistralai_blokhus-0.214.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mistralai-blokhus 0.214.0
File Interpreter ABI Platform Actions
mistralai_blokhus-0.214.0-py3-none-any.whl Python 3 none any Details for mistralai_blokhus-0.214.0-py3-none-any.whl

Total release size: 188.9 kB

Release files / mistralai_blokhus-0.214.0.tar.gz

Download URL mistralai_blokhus-0.214.0.tar.gz
Size 87.2 kB
Tags Source
SHA-256 checksum
How to use checksums
14a2896b5e27301a17a48e1644fdc31b63aea036ce28ccd5e5e420d5f5a40c40
BLAKE2b-256 checksum
How to use checksums
914c018b3895e2c071c1f9099a114cce3099522af939533d3880dac580ae9451
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 Nov 6, 2026.

Transparency log

Release files / mistralai_blokhus-0.214.0-py3-none-any.whl

Download URL mistralai_blokhus-0.214.0-py3-none-any.whl
Size 101.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5f5a2141e43d91d362e0074dd6a2dc82d324044933d9b6e5d0d3fba66afdc6f
BLAKE2b-256 checksum
How to use checksums
68192a8bec4a9fef20b117fe4867c4c8a313122e6d5873ee00968240842ea1a8
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 Nov 6, 2026.

Transparency log

Security for mistralai-blokhus 0.214.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mistralai_blokhus-0.214.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 Nov 6, 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