Skip to main content

Dimvexa

dimvexa (Python)

Python binding for Dimvexa: Exact factors. Loud failures. Zero guessing. A thin PyO3 layer; all conversion logic is in the Rust core.

import dimvexa

dimvexa.convert(10.0, "m/s", "km/h")  # 36.0
c = dimvexa.conversion("m", "km")  # parse once ...
c(numpy_array)  # ... apply to float64 arrays, lists or floats

try:
    dimvexa.convert(1.0, "gal", "L")
except dimvexa.DimvexaError as e:
    e.code, e.candidates  # 'ambiguous_symbol', ['gal_us', 'gal_imp']

Configs, densities and constants work as in the CLI (dimvexa-config does the loading):

dimvexa.convert("4pi", "rad", "deg")  # 720.0: a string is an exact value (pi, * / ^, parentheses)
dimvexa.convert("pi/2", "rad", "deg"), dimvexa.quantity("2*pi rad").to("deg")  # 90.0, 360 deg
dimvexa.convert(1.0, "ton", "kg", configs=["us"])  # 907.18474; a name or a file path
dimvexa.convert(1.0, "L", "kg", density="998.2067kg/m3")  # never assumed, only when asked
dimvexa.convert(1.0, "L", "kg", configs=["water"], density="water_25C")
dimvexa.constants(config_texts=[toml_text])  # pi, h_P, e, k_B, N_A, then your own
dimvexa.quantity("1 L", density="998.2067kg/m3").to("kg")  # exact; quantity() takes the same options
dimvexa.units(configs=["us"]), dimvexa.unit_info("bbl_oil", config_texts=[toml_text])  # config units too

Every refusal is a DimvexaError (a ValueError) with a stable code, suggestions and candidates. exact=True routes through the exact rational path, rounded once. A string value is always exact; 1/2pi is refused as ambiguous (ambiguous_expression), write pi/2 or 1/(2*pi).

Build and test

This crate is its own workspace (it needs PyO3 and NumPy from the registry; the main workspace is std-only and offline). It is not part of cargo xtask ci.

cd bindings/python
python -m venv .venv && . .venv/bin/activate
pip install maturin pytest numpy
maturin develop
pytest

Wheels are abi3 (Python 3.9+). No performance claim is made until a dated benchmark run exists (docs/benchmarking.md).

Metadata

Release files for dimvexa 0.8.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 dimvexa 0.8.0
File Size Uploaded Provenance Actions
dimvexa-0.8.0.tar.gz 13.4 kB With provenance Details for dimvexa-0.8.0.tar.gz

Built distributions (wheels)

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

Total release size: 2.1 MB

Release files / dimvexa-0.8.0.tar.gz

Download URL dimvexa-0.8.0.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
824bf6abd6f67178401478df04cbf02428f6787a2aa04ddfc7e9556c9079597f
BLAKE2b-256 checksum
How to use checksums
9e08287ac28883224f682d82e9202a50386d9074231168952b095414ecd1a698
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 15, 2026.

Transparency log

Release files / dimvexa-0.8.0-cp39-abi3-win_amd64.whl

Download URL dimvexa-0.8.0-cp39-abi3-win_amd64.whl
Size 347.6 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e01a2d1d15da341888851b9a00bd508bfbe823415f25507d1e20c15ca703d88b
BLAKE2b-256 checksum
How to use checksums
dae8c11dd2bb47b53a6c44ac15a26990904dd4715c0c03a0da999f9686c02cf7
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 15, 2026.

Transparency log

Release files / dimvexa-0.8.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL dimvexa-0.8.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 430.0 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
a6674843499ca8359a341ef6b80d94ef037d0892bbbc5aa83cc75d6d2109ba49
BLAKE2b-256 checksum
How to use checksums
a8e82d121a86fc8fc854acf632bc993f675908115ce350543806f416f72735e5
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 15, 2026.

Transparency log

Release files / dimvexa-0.8.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL dimvexa-0.8.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 412.2 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
f7f01570bc7e0b0fbdd1cb7c7e5aceac6510019f52c0ffeeaff8655ea29733f1
BLAKE2b-256 checksum
How to use checksums
541eb0d6235e86a067a786922b5e4aa7aefad618d6406e879e1953a4e33de44a
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 15, 2026.

Transparency log

Release files / dimvexa-0.8.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL dimvexa-0.8.0-cp39-abi3-macosx_11_0_arm64.whl
Size 423.2 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6df44ca3b390a359537421b1f5e60f195ccd87a38db094868571762d0431988b
BLAKE2b-256 checksum
How to use checksums
1e70f555861835e91a4fff93cb60cb4b48236c7269855dbc3ff9a61027edb149
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 15, 2026.

Transparency log

Release files / dimvexa-0.8.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL dimvexa-0.8.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 433.7 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
01025cd3b22e0b5a5bd68e3af5aab5e373fdad300ab91940205dc984bbf21acd
BLAKE2b-256 checksum
How to use checksums
46c46a9a13b4408cf1c4ae29a2104b7077901b84dc5ebf3096a9468af7a459b4
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 15, 2026.

Transparency log

Security for dimvexa 0.8.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

Attestation for dimvexa-0.8.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 15, 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