Skip to main content

Python bindings for the scinumtools3 C++ core

Project description

SciNumTools3 for Python

PyPI version Python License: MIT

Unit-safe quantities, runtime expressions, and validated scientific parameters for Python.

SciNumTools3 helps eliminate hidden assumptions in scientific software by providing:

  • ✅ Physical quantities with units
  • ✅ Automatic unit conversion
  • ✅ Runtime expression evaluation
  • ✅ Validated input parameters
  • ✅ Structured scientific configuration files
  • ✅ Consistent parameter handling across simulation and analysis workflows

Relationship to the C++ Core

scinumtools3 is the official Python binding for the SciNumTools3 C++ project.

The Python package exposes the same core concepts used by the C++ implementation, including:

  • Physical Units & Quantities (PUQ)
  • Dimensional Input Parameters (DIP)
  • Runtime expression evaluation
  • Unit-aware validation and conversion

This enables consistent parameter definitions and unit handling across Python analysis workflows and C++ simulation codebases.

C++ Project

The underlying C++ implementation is available on GitHub:

https://github.com/vrtulka23/scinumtools3

The C++ project serves as the reference implementation and provides high-performance support for scientific computing, numerical simulations, and HPC workflows.


Installation

Install directly from PyPI:

pip install scinumtools3

PyPI package:

https://pypi.org/project/scinumtools3/


Why SciNumTools3?

Scientific workflows frequently suffer from:

  • inconsistent unit handling
  • manual conversion mistakes
  • duplicated parameter definitions
  • missing validation
  • configuration drift between simulation and analysis code

SciNumTools3 provides a unified framework for defining, validating, and evaluating scientific parameters while preserving physical units throughout calculations.


Core Features

Physical Quantities

Create quantities with physical units and perform automatic conversions:

from scinumtools3.puq import Quantity

length = Quantity("1*m")
length = length.convert("km")

print(length)
# 1e-3*km

Unit-Aware Arithmetic

from scinumtools3.puq import Quantity

distance = Quantity("1000*m")
time = Quantity("100*s")

velocity = distance / time

print(velocity)
# 10*m*s-1

Validated Parameters (DIP)

Define scientific parameters with units, constraints, and dependencies.

from scinumtools3.dip import DIP

dip = DIP()

dip.add_string("temperature float = 300 K")
dip.add_string("pressure float = 1 atm")

env = dip.parse()

Example parameter specification:

simulation

  timestep float = 0.5 fs
    !condition ({?} > 0.0 fs)

  temperature float = 300 K
    !condition ({?} > 0 K)

  pressure float = 1 atm

  steps int = 1000000
    !condition ({?} > 1)

  duration float = ( {?simulation.timestep} * {?simulation.steps} )

  ensemble string = "NPT"
    !options ["NVE", "NVT", "NPT"]

Domain-Specific Languages

SciNumTools3 is built around two scientific DSLs.

PUEL — Physical Units Expression Language

A concise language for representing physical quantities, units, dimensions, uncertainties, and arrays.

Examples:

ESU_erg
m2*kg*s-2
kg2*ms3:2*cm
1.346591(30)e27*kg
[2,3,4,5]*km

PUEL powers:

  • quantity parsing
  • dimensional analysis
  • unit conversions
  • unit-aware calculations

DIPL — Dimensional Input Parameter Language

A declarative language for defining scientific parameters with:

  • types
  • units
  • constraints
  • dependencies
  • validation rules

This allows scientific applications to maintain a single source of truth for configuration and input validation.


Quick Example

from scinumtools3.puq import Quantity
from scinumtools3.dip import DIP

# Unit conversion
length = Quantity("1*m")
length = length.convert("km")

print(length)
# 1e-3*km

# Validated parameters
dip = DIP()

dip.add_string("foo int m")
dip.add_string("foo = 3 km")

env = dip.parse()

print(env.nodes[0])
# 3000 m

Documentation

Full documentation, API reference, language specifications, and examples:

https://vrtulka23.github.io/scinumtools3/

Documentation includes:

  • Python API reference
  • PUEL specification
  • DIPL specification
  • Tutorials and examples

Typical Use Cases

  • Scientific computing
  • Physics simulations
  • Engineering applications
  • Data analysis pipelines
  • Research software
  • Hybrid Python/C++ workflows
  • Unit-safe parameter management

Contributing

Contributions are welcome.

git clone https://github.com/vrtulka23/scinumtools3.git
cd scinumtools3

Please open an issue or pull request for bug fixes, improvements, or new features.


License

SciNumTools3 is released under the MIT License.

See the LICENSE file for details.


Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scinumtools3-0.5.0.tar.gz (273.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

scinumtools3-0.5.0-cp313-cp313-musllinux_1_2_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

scinumtools3-0.5.0-cp313-cp313-musllinux_1_2_i686.whl (15.3 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ i686

scinumtools3-0.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

scinumtools3-0.5.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl (11.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ i686

scinumtools3-0.5.0-cp313-cp313-macosx_11_0_arm64.whl (11.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

scinumtools3-0.5.0-cp312-cp312-musllinux_1_2_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

scinumtools3-0.5.0-cp312-cp312-musllinux_1_2_i686.whl (15.3 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ i686

scinumtools3-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

scinumtools3-0.5.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (11.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686

scinumtools3-0.5.0-cp312-cp312-macosx_11_0_arm64.whl (11.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

scinumtools3-0.5.0-cp311-cp311-musllinux_1_2_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

scinumtools3-0.5.0-cp311-cp311-musllinux_1_2_i686.whl (15.3 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ i686

scinumtools3-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

scinumtools3-0.5.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (11.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686

scinumtools3-0.5.0-cp311-cp311-macosx_11_0_arm64.whl (11.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file scinumtools3-0.5.0.tar.gz.

File metadata

  • Download URL: scinumtools3-0.5.0.tar.gz
  • Upload date:
  • Size: 273.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scinumtools3-0.5.0.tar.gz
Algorithm Hash digest
SHA256 1cc7ad592434cce1488a4815ed009b677bc359e3b1c38aecba76a1a0c8805fc8
MD5 b85d4d6ac6e820eb430b02669485f295
BLAKE2b-256 e45cfc14594555b184562a022d9df7891f1676f2a746440ac50d639a23408e17

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0.tar.gz:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b15995f1ae311ce0d39917ea4abd1c5762c0bff10e5f4e0c9a27258b82b3013d
MD5 70fde0ed46886089f3b73fe2a73b6129
BLAKE2b-256 23588db7749d020cd188761e0557944368a3ce9ca0d1e844ab5e0568f926ec8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp313-cp313-musllinux_1_2_x86_64.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp313-cp313-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 dc8ed62446d9f4ca9c4453d6ebda39824c205c2c7734c0d3ec90a963a229407c
MD5 4c4d2bcab834830fa417587bbb079357
BLAKE2b-256 04c6c75488f9596cd25bda83b4a42e12e342fdd8f9bce716bce378b23f9d87df

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp313-cp313-musllinux_1_2_i686.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 def085e87887a4567ec1ea878c6d803f7922f090e8de69eb0851c5139418bab4
MD5 eab6a05f82b56f537d565da4500222b1
BLAKE2b-256 ce8d6264308114a8754a051e54c4c84aee97213497e237fc95c392d35575d3fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 361b75cfd41fb7ca5be2cb045cae41f81133e293176e3eb2bed351581b102aed
MD5 0e3f76a000918a4d0f80d57fd311470b
BLAKE2b-256 553e5363b646376be7aaf4eb64963914570ea2c5e4d9815e7fed1566074ba015

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c15ebd50b7970228390a0b479b81609a5facb1342284855494c8e31c86938435
MD5 1c76539b167c1f362a3289658e7ce534
BLAKE2b-256 a6794d61e894472cc196b8a1cb85602d8edcaa0ef6d36676099e37aab95265d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 07361c87a5f33259f19d66b5824d36c9ecf250f7e48e2d9e9f60264778c99731
MD5 25b0ace71b3643a05743722afcb9a1cb
BLAKE2b-256 a1f9f3538f981a461fe13283da03ced362febfce0757a48681804fa57a8f1b95

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 21e8401b93fef6494a6b9195405ab46ecb27733eab88050e967caf3423e680c7
MD5 b163d092df601d62d4e01c4d2e921e1d
BLAKE2b-256 50391a4197cd9b832a825928cdc8edfd16ec328c8451b9e752074b2d5d154263

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp312-cp312-musllinux_1_2_i686.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 223feee654f65d33d58a1ddfc99f72d1c9f160515be11d9b25387b8184099df4
MD5 034b43f3471eb26035aae99823e2bb6b
BLAKE2b-256 188fab28911f2ae35b9d1e64919a57643e4a5ee639cd206d69863e691870974d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b2494b3a71539acf1afc8c829ae052a74d5f3f797ac3d7b17a4641ff116a08cd
MD5 fed27005295c5fae57e01ba605eef02f
BLAKE2b-256 ed71339a769fe6df2b4b5e9799fb02a819090cf57ef91319c68bf2ad6f012bc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0bc5dbf33a30bf4ab67f18a653f38e0bbe8b2a5bf1c1b7d86471dd4806bbda2
MD5 5f263869bf8a2739766fa5fecdc8abea
BLAKE2b-256 88074c8e67093040956063b788fc8efbb0b3e8e08a3f5c2499c5425a32bd984d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 116446488d8534a9783b1fb86d2a805030f3f849c9ac2465648bec06a7fd37de
MD5 e9fb2fc9d9f4fc71bb47ebbd2d6937b1
BLAKE2b-256 a7d9803dcb8574dc56a5277e59e4cb0049698390d7918e77dba834c6616ebef1

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 ce4f6e0bd545ecc3144a62cddd08657886a704877ea88b9d82ed6eaa9a196287
MD5 852d3b40fd7ad9aafd8603c1cebe1af8
BLAKE2b-256 8b6a3ead317669d8149f3623dfdde598376861066d18801ce7d18fa5f24a2944

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp311-cp311-musllinux_1_2_i686.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 da799daa542886e7cfd9cf5126484b21d55eebde1dc55a85821bd59c429e5835
MD5 d95a8c000085f77b4ccd7161ad701dd5
BLAKE2b-256 5c8f2cb39d4ef468f463c609f4a9a12c0d10e8b6b087fe4b28f1a0f0425bb0b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 4fd6f4fd3cd4d8c924a20231cf7b5b6f514f60d937df2d150f460f4ea37abdb5
MD5 94421084f105c77eb01b032861a0f2ac
BLAKE2b-256 e660ebb5e256e2b1d68bb38c5540cdf55bb7e2a6c7e73c6e1b70bc6446060746

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scinumtools3-0.5.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.5.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b506331e14980abec7ab01ed7310a3f2d46b6b9c4f5ec4bbb95b977ee18ae7c5
MD5 e328dbe3263992d87abc70502f4428a0
BLAKE2b-256 4a6bee4ae5eeb97216cbc4c0b4efc8d536b07d3dad615b41f9a4c1048134a925

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.5.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: pypi-wheels.yml on vrtulka23/scinumtools3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page