Skip to main content

oxyz

test PyPI Documentation Python 3.12+ SPEC 0

Fast, schema-aware extxyz reading and writing for atomistic simulation and machine learning. A Rust parser behind a typed Python API, with NumPy arrays as the native numeric output.

  • Array-native frames and batches: stored file keys, atom-major concatenation, source frame indices and streaming batch budgets.
  • Observed and declared schemas: inspect field/type drift, validate a contract, or project selected fields with explicit fills.
  • Typed records and unions: named fields, dense batches, presence masks and concrete member types for heterogeneous datasets.
  • Optional scientific targets: ASE, metatomic and torch-sim converters; local compressed files and remote object-storage/Hub reads.
  • Measured performance: serial/parallel and reference-reader comparisons, with workloads and environment recorded in the benchmark results.

Install

pip install oxyz
pip install "oxyz[ase]"
pip install "oxyz[metatomic]"
pip install "oxyz[torch-sim]"
pip install "oxyz[s3]"

The base runtime requires Python ≥3.12, NumPy ≥2 and PyYAML ≥6. Extras add ase.Atoms, metatomic.torch.System, torch_sim.SimState, or remote reads (including HuggingFace) respectively; optional libraries are imported when used. Wheels cover Linux, macOS and Windows. The support window follows SPEC 0.

Installing also provides oxyz scan, oxyz check and oxyz freeze. uvx oxyz scan PATH runs the released CLI without a persistent installation. For checkout setup and uv-driven Rust rebuilds, see development.

Read, inspect and write

This example creates its input in a temporary directory and verifies the values after writing. It needs no downloaded dataset or optional library.

from pathlib import Path
from tempfile import TemporaryDirectory

import oxyz

with TemporaryDirectory() as directory:
    source = Path(directory) / "sample.extxyz"
    source.write_text(
        "1\nProperties=species:S:1:pos:R:3 energy=-1.5\nH 0.25 0 0\n"
        "1\nProperties=species:S:1:pos:R:3 energy=-2.5\nHe 1.25 0 0\n"
    )
    frames = oxyz.read(source)
    assert [frame.n_atoms for frame in frames] == [1, 1]
    assert frames[0].columns["species"] == ["H"]
    assert frames[0].positions.tolist() == [[0.25, 0.0, 0.0]]

    batch = oxyz.read_batch(source)
    assert batch.ptr.tolist() == [0, 1, 2]
    assert batch.frame_indices.tolist() == [0, 1]
    assert batch.metadata["energy"].tolist() == [-1.5, -2.5]
    assert oxyz.infer_schema(source).is_consistent

    output = Path(directory) / "roundtrip.extxyz.gz"
    oxyz.write(output, frames)
    restored = oxyz.read(output)
    assert restored == frames
    assert restored[1].positions.tolist() == [[1.25, 0.0, 0.0]]
    assert restored[1].metadata["energy"] == -2.5

read(path, 0) returns one frame; the default returns a list. Use iread for frame iteration and iread_batch for bounded batches. Plain batches require compatible fields; projection or typed record batches handle optional data under explicit contracts. Writing has codec and value-representation limits: check the writing guide before replacing source data.

Documentation

The development documentation tracks main. The guides below link to repository Markdown. Local preview instructions are in the contributor guide.

Task Guide
First read/inspect/write workflow Getting started
Index grammar, partial reads and iteration Reading and selecting
Dense layout, budgets and provenance Batching and streaming
Encoding, incremental output and restrictions Writing
Infer, validate, project, omit and freeze Schemas and projection
Field declarations, binding and typing limits Typed records
Optional fields, unions, presence and tags Mixed datasets
Compression, archive members, S3 and HuggingFace Compressed and remote
ASE, metatomic and torch-sim conventions Converters
Inspect, check and freeze from the shell Command line

For lookup, see the API reference, data model, schema concepts and storage model. Format, ASE compatibility and errors describe grammar, deliberate divergences and failure context. Self-contained scripts and bundled inputs live in examples/.

Performance and development

The saved results contain timings, scaling figures, fixture definitions and environment details. Memory measurements are recorded separately. These are workload-specific results, not universal speed-up or memory guarantees; real-dataset rows require the dataset. The benchmark entry point and performance guide explain reproduction and comparison limits.

The architecture map routes changes across Rust core, PyO3 binding and Python policy. Testing covers parser properties, serial/parallel parity, converter golden tests and isolated wheel environments. Documentation authoring explains executable examples and local preview.

Public names and documented command-line options follow Semantic Versioning under the release policy. Underscore-prefixed modules are implementation details.

Licence

MIT or Apache-2.0, at your option.

Metadata

Release files for oxyz 1.4.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 oxyz 1.4.0
File Size Uploaded Provenance Actions
oxyz-1.4.0.tar.gz 208.4 kB With provenance Details for oxyz-1.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for oxyz 1.4.0
File Actions
oxyz-1.4.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for oxyz-1.4.0-cp312-abi3-win_amd64.whl
oxyz-1.4.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for oxyz-1.4.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
oxyz-1.4.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details for oxyz-1.4.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
oxyz-1.4.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for oxyz-1.4.0-cp312-abi3-macosx_11_0_arm64.whl
oxyz-1.4.0-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details for oxyz-1.4.0-cp312-abi3-macosx_10_12_x86_64.whl

Total release size: 12.3 MB

Release files / oxyz-1.4.0.tar.gz

Download URL oxyz-1.4.0.tar.gz
Size 208.4 kB
Tags Source
SHA-256 checksum
How to use checksums
35067f3290e415863047fcdb84755570ea480fb0648415c13b5eec8598e37b8b
BLAKE2b-256 checksum
How to use checksums
775f825c5fce9905b8c27007f6c1c25dad29a024fbf93a7c8422ff5b8add3684
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 Nov 18, 2026.

Transparency log

SLSA Build Provenance Attestation

PyPI verified that this artifact, at this checksum, originated from the builder listed below.

Built by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / oxyz-1.4.0-cp312-abi3-win_amd64.whl

Download URL oxyz-1.4.0-cp312-abi3-win_amd64.whl
Size 1.1 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
068615076c5e623fb6f2ec5dc9dc35b4ca389d39d2449060a2ea69d163c4341d
BLAKE2b-256 checksum
How to use checksums
b9dc9fac9279d3f2312d7600352875896f8fd60101c8b9c8d8503c26170a590e
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 Nov 18, 2026.

Transparency log

SLSA Build Provenance Attestation

PyPI verified that this artifact, at this checksum, originated from the builder listed below.

Built by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / oxyz-1.4.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL oxyz-1.4.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 4.5 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
c8bb1d84dec13fde486437ba38dd61bda314caf4939faf6cc6e8e031cffb0827
BLAKE2b-256 checksum
How to use checksums
b9f05eae425257cecfe094c638f63fc6fe49428e7cd962da7a4fe64c43312e6f
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 Nov 18, 2026.

Transparency log

SLSA Build Provenance Attestation

PyPI verified that this artifact, at this checksum, originated from the builder listed below.

Built by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / oxyz-1.4.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL oxyz-1.4.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 4.1 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
ad3d11bf94fb1cbec0a1f0ffd6d9ca7675b7d184a7a2259866a1a03c1ebb725c
BLAKE2b-256 checksum
How to use checksums
f14bda16465bde7d32bf16162881602a8e090cc745e71118fa247726710295a8
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 Nov 18, 2026.

Transparency log

SLSA Build Provenance Attestation

PyPI verified that this artifact, at this checksum, originated from the builder listed below.

Built by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / oxyz-1.4.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL oxyz-1.4.0-cp312-abi3-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4a01f1eed2695f726664eeaacd1aba451caa17d701dd68d7142e6721f21371a9
BLAKE2b-256 checksum
How to use checksums
4a4402cbda0092b57179a157421929376900fbc7050089539b5bb40bb4ccbe7b
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 Nov 18, 2026.

Transparency log

SLSA Build Provenance Attestation

PyPI verified that this artifact, at this checksum, originated from the builder listed below.

Built by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / oxyz-1.4.0-cp312-abi3-macosx_10_12_x86_64.whl

Download URL oxyz-1.4.0-cp312-abi3-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6266077c1dd7921cf304a36e1f182dcda8b9a2316a9b817e84a823f40fcb01ff
BLAKE2b-256 checksum
How to use checksums
123c98363e741bd2a2eac8d574591c70c74e5ed6d4dcae419398a6008b5d2a91
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 Nov 18, 2026.

Transparency log

SLSA Build Provenance Attestation

PyPI verified that this artifact, at this checksum, originated from the builder listed below.

Built by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for oxyz 1.4.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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestations for oxyz-1.4.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 18, 2026.

Transparency log

SLSA Build Provenance Attestation

PyPI verified that this artifact, at this checksum, originated from the builder listed below.

Built by GitHub Actions, verified by PyPI on Nov 18, 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