Skip to main content

SciNumTools3 for Python

PyPI version Python License: MIT

SciNumTools3 provides unit-aware quantities and validated scientific configuration for Python. Use it to convert physical units, perform dimension-aware calculations, and load typed parameters whose units and constraints are checked at runtime.

The package includes:

  • scinumtools3.puq for quantities, uncertainties, unit systems, and conversions
  • scinumtools3.dip for typed, validated configuration files
  • scinumtools3.api for formatted, command-style evaluation
  • NumPy interoperability for array values

Installation

SciNumTools3 requires Python 3.9 or later and depends on NumPy.

pip install scinumtools3

Quick start

from scinumtools3.puq import Quantity

distance = Quantity(1.5, "km")
time = Quantity("2*min")

speed = (distance / time).convert("m*s-1")
print(speed)  # 12.5*m*s-1

Incompatible dimensions are rejected instead of being combined silently.

Quantities and units

Quantity accepts strings, Python numbers and sequences, and NumPy arrays. It supports unit-aware arithmetic, comparisons, uncertainties, and conversion between compatible units and unit systems.

PUEL (Physical Units Expression Language) expressions may contain scalar or array values, uncertainties, dimensions, constants, and units. For example:

from scinumtools3.puq import Quantity

lengths = Quantity("[2,3,4]*km")
measurement = Quantity("1.346591(30)e27*kg")

For conversions between unit systems, pass the target system and, when the dimensions are ambiguous between systems, the physical-quantity context:

from scinumtools3.puq import Quantity
from scinumtools3.puq.systems import ESU

current = Quantity("23*A").convert("statA", ESU, "I")

Input parameters

DIP parses DIPL (Dimensional Input Parameter Language) definitions from strings or files. DIPL provides typed parameters, units, constraints, dependencies, groups, lists, maps, and references.

Given parameters.dip:

simulation
  timestep float = 0.5 fs
    !condition ({.} > 0 fs)
  steps int = 1000000
    !condition ({.} > 1)
  duration float = ( {?simulation.timestep} * {?simulation.steps} ) fs

Parse it and access evaluated values through the environment cursor:

from pathlib import Path
from scinumtools3.dip import DIP

dip = DIP()
dip.add_file(Path("parameters.dip"))
env = dip.parse()

duration = env["simulation.duration"]
print(duration.value, duration.units)

You can also add definitions directly:

dip = DIP()
dip.add_string("length float = 2.5 dm")
dip.add_string("count int = 42")
env = dip.parse()

Cursor values are ordinary Python values: bool, int, float, str, or nested lists. Use cursor.to_numpy() to obtain a NumPy array. A cursor also exposes its units, shape, and child traversal methods. To convert a unit-bearing DIPL result, construct a quantity from its value and the string representation of its units:

from scinumtools3.puq import Quantity

length = env["length"]
length_cm = Quantity(length.value, length.units.to_string()).convert("cm")
print(length_cm)  # 25*cm

Command-style API helpers

The scinumtools3.api.puq and scinumtools3.api.dip modules expose the same application-oriented operations as the snt command-line interface:

from scinumtools3.api.puq import PUQEval

command = PUQEval("1*cm + 2*dm")
print(command.execute())  # 21*cm

Use Quantity and DIP when you need typed Python objects; use the API helpers when you want formatted command-style output without starting a subprocess.

Documentation

License

SciNumTools3 is distributed under the MIT License.

Metadata

Release files for scinumtools3 0.8.1

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

Source distribution (sdist)

Source distribution for scinumtools3 0.8.1
File Size Uploaded
scinumtools3-0.8.1.tar.gz 2.6 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for scinumtools3 0.8.1
File
scinumtools3-0.8.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
scinumtools3-0.8.1-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
scinumtools3-0.8.1-cp313-cp313-macosx_14_0_arm64.whl CPython 3.13 CPython 3.13 macOS 14.0+ ARM64 Details
scinumtools3-0.8.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
scinumtools3-0.8.1-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
scinumtools3-0.8.1-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details
scinumtools3-0.8.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
scinumtools3-0.8.1-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
scinumtools3-0.8.1-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details
scinumtools3-0.8.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
scinumtools3-0.8.1-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
scinumtools3-0.8.1-cp310-cp310-macosx_14_0_arm64.whl CPython 3.10 CPython 3.10 macOS 14.0+ ARM64 Details

Total release size: 263.1 MB

Release files / scinumtools3-0.8.1.tar.gz

Download URL scinumtools3-0.8.1.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
19ef2f6f0f29b28550c2450d1161f4d1a27402d9f7d5bfdbe679dd466aecedfd
BLAKE2b-256 checksum
How to use checksums
96a0ce46f080a67d269a5544a3b591f0e96b2a629b82f0b9a2032923f55f97f7
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp313-cp313-win_amd64.whl

Download URL scinumtools3-0.8.1-cp313-cp313-win_amd64.whl
Size 35.5 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
9ab87ab66490973d1210f5c51a5e9af8c9a510523cac0a312ef229da3b7b79d1
BLAKE2b-256 checksum
How to use checksums
b72cdc04c2c83a3bb3400d73380bd5113dafaef8c5cffd9f604ad38997babfb3
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL scinumtools3-0.8.1-cp313-cp313-manylinux_2_28_x86_64.whl
Size 15.6 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
eca13705472d4fbe8d1e5fd006ff8fb978e12a605ad4b7d2c2334a04d73e7e0e
BLAKE2b-256 checksum
How to use checksums
e2c5d636ea52c548d10507c709b225bf86d2a99f175420d61e6e3ff893cff10c
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp313-cp313-macosx_14_0_arm64.whl

Download URL scinumtools3-0.8.1-cp313-cp313-macosx_14_0_arm64.whl
Size 14.0 MB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
c5d31a56b5b1834e0490dfb72f551d25820caa46ddb11ef8b450ac919ab7d437
BLAKE2b-256 checksum
How to use checksums
6dd91f8d95322cad6ec9ce9d58aff0e1bf35cdab3ba672ca741f2a0aee875982
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp312-cp312-win_amd64.whl

Download URL scinumtools3-0.8.1-cp312-cp312-win_amd64.whl
Size 35.5 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
8b2ca5ba3debb47ff106092fcb0b3af2746e85b14451e59abf24c3e7955d4321
BLAKE2b-256 checksum
How to use checksums
a3638c5db5cef3d4dc381f7510283ccdb98ef6a273d199d6664fa255ef19c738
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL scinumtools3-0.8.1-cp312-cp312-manylinux_2_28_x86_64.whl
Size 15.6 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
798bb9d4b67fc935882ba1e454dc8311ec03b8a494362338516782ee70cc6dfd
BLAKE2b-256 checksum
How to use checksums
d15e62ff5308bb1e7f83d41f01cd6b2eaf8ebb93370a964bc5b404c40f333f7b
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp312-cp312-macosx_14_0_arm64.whl

Download URL scinumtools3-0.8.1-cp312-cp312-macosx_14_0_arm64.whl
Size 14.0 MB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
9e398c5bf6457b1471f5eaebc4ac7bf906db365d0f247b12a6b91f8461e596c6
BLAKE2b-256 checksum
How to use checksums
f31062c0e4555e20b5bf6c762f9d82919d23591e47c47503013b4fa4c2a32478
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp311-cp311-win_amd64.whl

Download URL scinumtools3-0.8.1-cp311-cp311-win_amd64.whl
Size 35.5 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
28256abac199e6de5481fdc11d726acb412b0371f7e073261b2f755bcd2d4d61
BLAKE2b-256 checksum
How to use checksums
0ff9230d7b7b1beb644e06a62ef00dbfa6e6e1cdc57ab25b38166f90e3a9e107
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL scinumtools3-0.8.1-cp311-cp311-manylinux_2_28_x86_64.whl
Size 15.6 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2ac372c4d667f7cf81d2360128429a028a7c2605769d753bf6a36749464730c5
BLAKE2b-256 checksum
How to use checksums
0bf4f5ad2e87dada420227d3b6454c578a06ad23365cb1c0f5a2701a5b8ce381
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp311-cp311-macosx_14_0_arm64.whl

Download URL scinumtools3-0.8.1-cp311-cp311-macosx_14_0_arm64.whl
Size 14.0 MB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
d14bd1497acaf2a6031debde0f3f3e86b9fe7dd20a844ea46d4975cc0f1dfb58
BLAKE2b-256 checksum
How to use checksums
f5f86336a79a6d41e82dd572e1bf3ba5fc58ad42584de9181b60e36ae58315a0
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp310-cp310-win_amd64.whl

Download URL scinumtools3-0.8.1-cp310-cp310-win_amd64.whl
Size 35.5 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
20003cc109025b965ada738074a1128cc10675d0a9c7da88ef04b2e5031d43a0
BLAKE2b-256 checksum
How to use checksums
c30036305c604711e946ac4fa4d7d44d114aacaaa287f7d3815072273658d250
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL scinumtools3-0.8.1-cp310-cp310-manylinux_2_28_x86_64.whl
Size 15.6 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
fbdd0f680240204376130162e911f6bf666efc73369e321e607aa9afdef4aa99
BLAKE2b-256 checksum
How to use checksums
3f41eda7c4541db5bcedb79a2fed9e40fa0424d40d5e7a0d4fef38e3f5869a39
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 Sep 19, 2026.

Transparency log

Release files / scinumtools3-0.8.1-cp310-cp310-macosx_14_0_arm64.whl

Download URL scinumtools3-0.8.1-cp310-cp310-macosx_14_0_arm64.whl
Size 14.0 MB
Tags CPython 3.10 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
4618330e5827b1e9669b955f3e44bef1807825ebe75748b682f09dc1c257abb8
BLAKE2b-256 checksum
How to use checksums
9e20c3ab9729a27df3e7c5d2bf9e20ee4508565d0e4ed5283f9849f8dc9666fc
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 Sep 19, 2026.

Transparency log
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