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.2

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.2
File Size Uploaded
scinumtools3-0.8.2.tar.gz 7.7 MB Details

Built distributions (wheels)

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

Total release size: 269.6 MB

Release files / scinumtools3-0.8.2.tar.gz

Download URL scinumtools3-0.8.2.tar.gz
Size 7.7 MB
Tags Source
SHA-256 checksum
How to use checksums
30b396f4ab76aeda179122c398456fac6b5746781f9714b9ac1f32da803ddda9
BLAKE2b-256 checksum
How to use checksums
d1469f2b830a0349d210062971a3c9f5950c199821e304c7758cb98fdbf174c4
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-cp313-cp313-win_amd64.whl
Size 35.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
31133bf82d9bcfaf50bb8f4448a1606926a512fabdda449d79483be8a1b55baa
BLAKE2b-256 checksum
How to use checksums
304d64ace6ff4c693efc0e56a50d3ac35067d5c1d90cb7d99c09b9aeabc1a149
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-cp313-cp313-manylinux_2_28_x86_64.whl
Size 15.8 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0136b5ac404f8975cb8a58a2b2f3371478963e1267f90b0deea9a38a9062457b
BLAKE2b-256 checksum
How to use checksums
b18d5a1b1348a68522e702dd9f2c2a6422a984966f414075d3784fee1ff1e7e4
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-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
38789f562036b9efbefabb30634be87b5f5bc531a69d45651045248d899f5abc
BLAKE2b-256 checksum
How to use checksums
d513f70c6e6a06245833ceb1cff66e942b04efcfe4b60c77d879fbf5f13c5b90
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-cp312-cp312-win_amd64.whl
Size 35.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
290595bd1b5fc68433dea5d2a76cd166f6051119a9a45a484a8a7988014bd431
BLAKE2b-256 checksum
How to use checksums
36653b58691cad5bc970c76bb8f0a58dc0c26848615995fe54ae742a99f8cd8e
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-cp312-cp312-manylinux_2_28_x86_64.whl
Size 15.8 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2e89ecf11e21eee56bff2abef8a28004e702ceee18e180fc8a68da4006c255f7
BLAKE2b-256 checksum
How to use checksums
8bed6aad8aa2e21ece293cb737d744175676b52353c2528640bc773b72c92509
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-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
315c6c47555899fe4ea06087460efd8f8270818561bd4fc672e26251fcff4952
BLAKE2b-256 checksum
How to use checksums
a50d4127e841a4463d9a5f78da7328ebccfa03740f153b1e3d3da2a1bdd6bc7f
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-cp311-cp311-win_amd64.whl
Size 35.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b65cc7ed081eb7b7bbb0b5ed494a8741f66a89fa48245109be4b8bc7c09dd1bc
BLAKE2b-256 checksum
How to use checksums
dea4418de1f5c7034ccfad8d0fcac502a3b0577ffe38075691201a2e350fa816
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-cp311-cp311-manylinux_2_28_x86_64.whl
Size 15.8 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d2b6db331ca8fa3052e91b1ff58097afe50dc92d59b95ce74f05a27d97f009ca
BLAKE2b-256 checksum
How to use checksums
088a79ba64fbff5db7c8c7c51ba1ecc2082b7397015c7f87c15772dbd26698bb
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-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
72aa4841990acb2ed269871eeb9f0669fc2051305f89f0e78ebe5a650bedbb57
BLAKE2b-256 checksum
How to use checksums
0d96177871e9df13ac812b29f8f098bc3a19bbe56620e0f65ef731121ec1dc26
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-cp310-cp310-win_amd64.whl
Size 35.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
885d9086c77050d5b1a44a240c22e40826ff6ab84bb69e3b9126290e8b0d7791
BLAKE2b-256 checksum
How to use checksums
2216b69485b8c465cca34109aaa60c06f9dafa26a89276fbb5b7785fd82d7cfb
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-cp310-cp310-manylinux_2_28_x86_64.whl
Size 15.8 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
90d184fa12a4a5487cabddcba8f57c9eaaee1d87081536c22e3dcd2d31cc154e
BLAKE2b-256 checksum
How to use checksums
ff5ed8527e8ec24ea07d682eceb86ad58c6b5697af23fa1798b6f6b84e00c0e3
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 22, 2026.

Transparency log

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

Download URL scinumtools3-0.8.2-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
c8ec0ecbd058d7b49c6b0028b64f13097b8a2949031b54470ff621b5feb96419
BLAKE2b-256 checksum
How to use checksums
7b4fb2664dd9ae0fa53ecf5d4ff829d7d4ca674fe35131a3819105cc68406f13
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 22, 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