Metadata-Version: 2.4
Name: o41-checkpoint
Version: 0.1.9
Requires-Dist: pytest>=9.2.0 ; extra == 'dev'
Requires-Dist: ruff>=0.17.3 ; extra == 'dev'
Requires-Dist: ty>=0.0.95 ; extra == 'dev'
Provides-Extra: dev
License-File: LICENSE
Summary: Python bindings for 041's Rust checkpoint engine
License-Expression: Apache-2.0
Requires-Python: >=3.14, <3.15
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# 041 Checkpoint for Python

Save, resume, and fork training checkpoints in a directory, cloud bucket, or
[041 Artifacts](https://artifacts.041.io/). Rust handles transfers and retries;
blocking calls release the GIL.

```sh
uv add o41-checkpoint
```

Requires Python 3.14. Wheels support Linux x86-64, Linux arm64, and macOS arm64.
Set `O41_ARTIFACTS_API_KEY` for `o41://` storage.

```python
from o41_checkpoint import Checkpoints, step_name

checkpoints = Checkpoints("o41://experiments/run-1")
writer = checkpoints.resume()
if writer.resumed is not None:
    writer.resumed.download("./restored")
writer.save(step_name(600), {"state.json": b'{"step": 600}'})
```

Names must increase in byte order. Another writer taking over an `o41://`
artifact fences the old writer; stop the run on `Superseded`.

See the [checkpoint API](https://artifacts.041.io/docs/o41-checkpoint) for
reads, forks, storage options, limits, and errors.

