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

Evaluated DIP environments can generate reports in TeX, PDF, Markdown, reStructuredText, HTML, Typst, plain text, or Brief++ document JSON with Environment.generate_report(ReportFormat.HTML, "report.html") (or another ReportFormat). See the Python guide.

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 into an environment:

from pathlib import Path
from scinumtools3.dip import DIP

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

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()

Accessing nodes

There are two main ways to access nodes in an environment:

  • Cursor: use env["path"] to inspect a known path or traverse groups and collections.
  • Select: use env.select(...) to discover value nodes by path and tags and inspect snapshots of the results.

Cursor: inspect a known path

cursor = env["length"]
print(cursor.value, cursor.units, cursor.metadata.description)

A cursor accesses a path in the environment. Use cursor.elements() to traverse list elements and cursor.items() to traverse named items in a map. 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

Select: discover and inspect nodes

Use select() to discover values and inspect their tags and metadata directly:

dip = DIP()
dip.add_string('''physics
  speed float = 2 m/s
    !tags ["export", "runtime", "hydro"]
    ?descr "Flow speed"
''')
env = dip.parse()
for node in env.select(
    "?physics.",
    tags_all=["export", "runtime"],
    tags_any=["hydro", "gravity"],
    tags_none=["internal", "deprecated"],
):
    print(node.name, node.value, node.tags, node.metadata.description)

The three filters combine with AND; omitted or empty filters impose no restriction. Only explicitly assigned tags match: children do not inherit their parent's tags. ? selects the whole environment, ?physics. selects a subtree including its value-bearing root and collection members, and ?physics.speed selects an exact node. Results retain fully qualified paths in environment order, with each node returned once. No matches returns an empty list.

Selected nodes are independent snapshots; selection does not modify the environment. Tags are returned as a separate Python list, and metadata remains valid while its Python wrapper is alive.

Additional request helpers remain available in the Python API reference.

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

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.9.7
File Size Uploaded Provenance
scinumtools3-0.9.7.tar.gz 32.5 MB With provenance Details

Built distributions (wheels)

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

Total release size: 350.0 MB

Release files / scinumtools3-0.9.7.tar.gz

Download URL scinumtools3-0.9.7.tar.gz
Size 32.5 MB
Tags Source
SHA-256 checksum
How to use checksums
985af4702f7a003c7818631d83c324850ee91148b12e7d61f3ba40daba35c4c1
BLAKE2b-256 checksum
How to use checksums
0cecc7b8c7e230bbaf86e05cf6a241933c059870ce0c40d568a08ff3b05b7422
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp313-cp313-win_amd64.whl
Size 44.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
858ce3c8e9d4bc195fe6b0f62d7e78ebb79c1dadae8744b0909a0b030ad2c5b9
BLAKE2b-256 checksum
How to use checksums
1956dd7f580fc5d7c7c6ff0e8bd0d823e1f933a354cd9ac80ff53396a57d6a3f
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp313-cp313-manylinux_2_28_x86_64.whl
Size 18.7 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4dc487badabbcabc238fe302157aa3443c6d38b76415a7a564a4178e8d6514e7
BLAKE2b-256 checksum
How to use checksums
226ac8c0850c6296bf9ab2c6b8321e581087cee617ebc2f9f3e3def856106776
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp313-cp313-macosx_14_0_arm64.whl
Size 16.6 MB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
e6271dd8be7bf9554551bd0de274b73c068b6797168f0530696439db4703b556
BLAKE2b-256 checksum
How to use checksums
539634f8c6776a5527bff806660bf30a71b51ef03c5296de31ffa409da1e6761
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp312-cp312-win_amd64.whl
Size 44.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
1089b2409ac51bbd85ed609123531dcc9b7930ab6b367a45d655004d4c38bc26
BLAKE2b-256 checksum
How to use checksums
2e3c80b43382e3df1e53d0de9ffe6d78ff63fc14d2bff6dc7d632cfcf22570ee
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp312-cp312-manylinux_2_28_x86_64.whl
Size 18.7 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f661e988220c64d326b3a0f5f38f623c63248d39fbcc9b8bbbe072142082909f
BLAKE2b-256 checksum
How to use checksums
33dfa8760ebbc7d2787f88ed536eb2ca3b5ed0f0539609bd93e558e163e91927
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp312-cp312-macosx_14_0_arm64.whl
Size 16.6 MB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
088b467906cefaafc5eb6199dff09bac857eb01bfc5d0393b23a06a36a099db5
BLAKE2b-256 checksum
How to use checksums
60ff919a5e369d86e795f8deaee888c03a2c3bb8516e80131a4bf3b4590f31c4
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp311-cp311-win_amd64.whl
Size 44.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
c936373246f892f0997e8283a60f8806c58186e7ca51e5855370cfdc571cf2bf
BLAKE2b-256 checksum
How to use checksums
2cfae93e7198c5583c5b9d7881c67e772f8669f210dbe9c70400795edb32387e
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp311-cp311-manylinux_2_28_x86_64.whl
Size 18.7 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
13d5ea21790b99cb75f7c7e470cfbdbbda71529b0938f65f7a7e89e0262a0696
BLAKE2b-256 checksum
How to use checksums
4e8a6192e2f9ad50617dc8bbdc709ec2f0aa0d58eb6a5a9a55cb523e0e4de928
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp311-cp311-macosx_14_0_arm64.whl
Size 16.6 MB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
fea927439a6e44bd6b4bce3e3b14990c93a5a76104aff92763c810b19472bbbf
BLAKE2b-256 checksum
How to use checksums
c1fab061181763b78ac0ea23d8d7458681640839e43cfae09e136df8dbba083e
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp310-cp310-win_amd64.whl
Size 44.1 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
aaf96c915100234bcb5760f24700fc4334b1689faeef335f7b1667864d2a50ea
BLAKE2b-256 checksum
How to use checksums
10776ea3d3880570b51bede29c5efbb1d50d93195c72d11bcc7cfa230d81a571
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp310-cp310-manylinux_2_28_x86_64.whl
Size 18.7 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c8c089a5d3866404bd32836022d22feb5e5ab05d8ba1687202cb0cea205681c0
BLAKE2b-256 checksum
How to use checksums
d538ffef4b53b306b6d3144c7de2b4067a6d221db3aa949ca0de48c61910ed3c
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 Oct 22, 2026.

Transparency log

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

Download URL scinumtools3-0.9.7-cp310-cp310-macosx_14_0_arm64.whl
Size 16.6 MB
Tags CPython 3.10 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
2d0a24945f6f49a3ff126f6da883f66d04f48a41586a41ed64eb6cb738f34940
BLAKE2b-256 checksum
How to use checksums
5a9978053fe6b7066abde83ccb369c8b04a0e85afc076f6bdbec9098b61636a2
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 Oct 22, 2026.

Transparency log

Security for scinumtools3 0.9.7

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 13 files in this release have been uploaded with provenance metadata.

Select from 13 files

Attestation for scinumtools3-0.9.7.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 Oct 22, 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