Skip to main content

commonmeta-rs (Python bindings)

PyO3 bindings exposing commonmeta-rs's list-command batch functions to Python: pidbox daily-dump fetch with local caching, lossless Parquet read/write, and batched archive rendering. Records cross the FFI boundary as plain JSON-shaped dicts — the same shape commonmeta-py's own readers and writers already produce and consume.

Install

uv pip install commonmeta-rs

Requires CPython 3.14 or newer. The wheels are built against the stable ABI (abi3-py314), so one wheel per platform also covers later 3.x releases. commonmeta-py itself keeps a 3.9 floor; only this backend needs 3.14.

Development

The interpreter must be 3.14+, matching requires-python; an older venv fails to build rather than falling back.

uv venv --python 3.14 .venv
uv pip install --python .venv/bin/python maturin pytest
source .venv/bin/activate
maturin develop
pytest tests/

Release

Releases are published by hand. PyPI trusted publishing only issues OIDC identities to GitHub, GitLab, Google Cloud and ActiveState, and this repo lives on Codeberg, so CI cannot authenticate to PyPI — the workflow builds and tests wheels only.

The version comes from [workspace.package] in the root Cargo.toml and is shared with the commonmeta crate, so a wheel names the release it wraps. Bump it there, not here.

Build one wheel per platform plus the sdist, then publish. Both wheels build on the host — no Docker. The macOS wheel is a native build; the Linux manylinux wheel cross-compiles with zig as the C cross-linker (maturin --zig). All commands are run from python/.

rm -rf dist

# One-time: the Linux cross target and zig (a pip package, no system install).
rustup target add x86_64-unknown-linux-gnu
uv pip install --python .venv/bin/python ziglang

# macOS (native — arm64 on Apple silicon)
maturin build --release --out dist

# Linux (manylinux2014 x86_64), cross-compiled with zig — no Docker, no emulation.
maturin build --release --out dist --target x86_64-unknown-linux-gnu --zig

# Source distribution (lets other platforms build from source as a fallback)
maturin sdist --out dist

uv publish --token "$PYPI_TOKEN" dist/*

Publishing from one machine uploads only the wheels present in dist/; any platform without a wheel falls back to building from the sdist. To ship binaries for more platforms (Windows, Intel macOS, Linux aarch64), add the matching maturin build --target … invocations or collect the wheels-* artifacts from the CI workflow into dist/ first.

API

  • fetch_pidbox(source, date, input_path=None, limit=None, offset=0, cache_ttl_days=30) -> list[dict] Fetch records from a pidbox daily dump (source is "crossref" or "datacite"). With input_path, reads a local SQLite file directly (no network); otherwise downloads {source}-{date}.sqlite3.zst from metadata.vraix.org, caching it locally for cache_ttl_days.
  • write_parquet(records: list[dict]) -> bytes Write records as a single lossless Parquet file.
  • read_parquet(data: bytes) -> list[dict] Read records back from Parquet bytes written by write_parquet.
  • write_archive(records: list[dict], to: str, base_name: str, batch_size=100_000) -> list[tuple[str, bytes]] Render records to to format, split into batches of at most batch_size records, returned as (entry_name, bytes) pairs ready to pack into a zip/tar archive.
  • convert(from_: str, to: str, input: str) -> bytes Convert a single record between formats.

Metadata

Release files for commonmeta-rs 0.12.13

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

Source distribution (sdist)

Source distribution for commonmeta-rs 0.12.13
File Size Uploaded Provenance Actions
commonmeta_rs-0.12.13.tar.gz 1.3 MB Without provenance Details for commonmeta_rs-0.12.13.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for commonmeta-rs 0.12.13
File Interpreter ABI Platform Actions
commonmeta_rs-0.12.13-cp314-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.14 abi3 Linux glibc 2.17+ x86-64 Details for commonmeta_rs-0.12.13-cp314-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
commonmeta_rs-0.12.13-cp314-abi3-macosx_11_0_arm64.whl CPython 3.14 abi3 macOS 11.0+ ARM64 Details for commonmeta_rs-0.12.13-cp314-abi3-macosx_11_0_arm64.whl

Total release size: 34.8 MB

Release files / commonmeta_rs-0.12.13.tar.gz

Download URL commonmeta_rs-0.12.13.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
fd97866a9921b17f9f10934c7dad60ab4b49d2c8ed98a3307aa6b85554671269
BLAKE2b-256 checksum
How to use checksums
5bca805ba0b4c99dae5fe4be123baf320551109330a148304b52591f17523032
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / commonmeta_rs-0.12.13-cp314-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL commonmeta_rs-0.12.13-cp314-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 16.8 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
e6f91c12319d750caa84e31777b5f9fa75d806cfd815c1140b6b19f3f0856202
BLAKE2b-256 checksum
How to use checksums
10be668fc810a568578dae736c7abd9dcf0421e451f2d7ba6afcbb259e8182ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / commonmeta_rs-0.12.13-cp314-abi3-macosx_11_0_arm64.whl

Download URL commonmeta_rs-0.12.13-cp314-abi3-macosx_11_0_arm64.whl
Size 16.7 MB
Tags CPython 3.14 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f5d08a1993b669955e7483d85b6b7edc11052f6fe9ceae790fef368844cd4eac
BLAKE2b-256 checksum
How to use checksums
6faae32641a01684c65caad78638185f8ecb7169e4400bcc078ad054a2c27cd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for commonmeta-rs 0.12.13

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

3 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