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.4.9.tar.gz (269.9 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.4.9-cp313-cp313-musllinux_1_2_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

scinumtools3-0.4.9-cp313-cp313-musllinux_1_2_i686.whl (15.2 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ i686

scinumtools3-0.4.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

scinumtools3-0.4.9-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl (11.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ i686

scinumtools3-0.4.9-cp313-cp313-macosx_11_0_arm64.whl (11.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

scinumtools3-0.4.9-cp312-cp312-musllinux_1_2_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

scinumtools3-0.4.9-cp312-cp312-musllinux_1_2_i686.whl (15.2 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ i686

scinumtools3-0.4.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

scinumtools3-0.4.9-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (11.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686

scinumtools3-0.4.9-cp312-cp312-macosx_11_0_arm64.whl (11.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

scinumtools3-0.4.9-cp311-cp311-musllinux_1_2_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

scinumtools3-0.4.9-cp311-cp311-musllinux_1_2_i686.whl (15.2 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ i686

scinumtools3-0.4.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

scinumtools3-0.4.9-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (11.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686

scinumtools3-0.4.9-cp311-cp311-macosx_11_0_arm64.whl (11.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for scinumtools3-0.4.9.tar.gz
Algorithm Hash digest
SHA256 537bd6ec36029feda8eede51b44e1efe2a2e31af2e8026e50d39306ecfa6570e
MD5 9a60e2e7f9e8e0bebd07e09d88f66474
BLAKE2b-256 2243473674d5d27f2d73fd4a3e0bb73fc051d134ae9dda085055e00543497163

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9.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.4.9-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 590fe08caacb432771fcac7aa8173cf263c97b0ff31a956c84bebbd25c38f5a0
MD5 1e0d7f45470c40aac8283c0299150258
BLAKE2b-256 afd5756e81df2e279b2aa9f2fbdb468d1a2a72dbfabac60c03bb4f433c9f709f

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp313-cp313-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 4d94b29723ff750425a0e5a65bf7ced1eaf56ae9f7203c4866bb7d26af96e542
MD5 16dfa48fa8ba421b204ca27512ffe066
BLAKE2b-256 bb13bfa3b43445dc5ef9ddcc1d673834aea6f74b79a49adf09df778d4aedfc71

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7e68c5002c42fed337f3b9790f84a76b21783d7265b16e9ea536a85df72744f2
MD5 8301392de97a57d1a4eb0619d0887cba
BLAKE2b-256 4dbc6f7ca90283c69858e78820a91c398a8b5d2a7f9aaa25286be57dd3ef5e7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 ea6914c9ff6275f979f5d78517b599c057f3aca13301b544d1b7e52d6e5be239
MD5 d38274fadfb5861d212f321eedbe9263
BLAKE2b-256 702528084c9f1c5a499fee12a05d011f568d113c6f644c43e818bfcddc8fdee0

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e481c3cf1a51ca8d725b8cdd2144c3919a417a975a81a3855003e8bc6a618cae
MD5 7fb3f7190af6a6c844c95c84729a8bda
BLAKE2b-256 4601d2721438fe315937c87da03e91fc0aca263a1931db6770b416da053b6209

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 35f95b7573ea9976789b586bd404df64a452d4be68f477c7a43869b91c7d97fc
MD5 1ad0e9519baa9af2500655ac9adf9460
BLAKE2b-256 c167fe268f918546317d676b86ff8905fcf3a5b42cf6f50d939bd6e2137ceb82

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 493c1655ae966f0c934e98a6d2ac942914a964851cb4735805e9512a0241861f
MD5 f7059cf6cbd6ca38cbcd39f3ab7b24e5
BLAKE2b-256 1e32e9e2b618bf9f8185158fb9e5b52536b4daf691d26f83b614f40c6b8bd372

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 18e03c0f46e36d31b614d64dea9ee362e91696b5ad87e6f5b35ba3d8e2f10c77
MD5 903ed1514124a7eb163f670cc5620c32
BLAKE2b-256 eb4c5c643b0813113bb872a4c14366994d393a9a1102d727f6b7a49543d8c79b

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e450870788d73d59a5985da00b1e7c8e64f4a047fffcaa43963fbe8bf9cb068c
MD5 dc74d844a515c40ffb12c3df7b36ed63
BLAKE2b-256 4501d1631bddb8cd286cc1fce2f26c94ff1dbbb03b13581f10cae0d9a8373906

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3d04b14fcec114f95c4ee54fed69640b0ef739d9ef6e79d82a8c959269f5b4b
MD5 67e92bc6658a3f6b55e4b77b3caa8ec5
BLAKE2b-256 90cc8ebb1c58991809765f6693a65bdbd5ffddf12c880609c7152cc77de096a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 35221fd26d8933ab96306e33dbf40c52b9631227cfd4b9e44fa42bdcae07cf7f
MD5 efbc8b1608c9ef8fab68bdc9161ac327
BLAKE2b-256 b6e3fb3fd307da798ee86c4ce958f83e0535282328fc620d1ae19a5743ccecce

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 f1ff16d07f67725dc06a5b0bf3cb212db8ce3ea83350e324ba836a5f653f0c6d
MD5 7c9a8655e2494ce28041908ddf6f025b
BLAKE2b-256 20239309dad61e20d29b3dca4d17e662ea3b076f5de7ae562db119a5970b64e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85a164f7dec5060dfb06493ccb1f2ded9f6eba03a2dbc6768255c47a1876c5ee
MD5 ae0f96952321343156642b277a7ca2c3
BLAKE2b-256 e15ffc0f98dc527ba512fd079f678500d3f75f7db70af6ec14aa2284d401a8cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 abbfa9544c0b692f87fc01bfd31b82da49e3ac25f73de26f7285306b3824a75a
MD5 e871e10c3219e63bb50c29cdb3d5ca75
BLAKE2b-256 5413e32b7d0da2c0381336dbcf931f68ed654c692106eb663cdcb14ee61ec75e

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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.4.9-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scinumtools3-0.4.9-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 98ff12bb54b7dcf1fc5493577fc67da27c52449a9ac4734b2443efe39c9f9f24
MD5 ed1fa388eee07ddf6bb260fbc10eb83f
BLAKE2b-256 11200b1f0aabd54e3ffc90deb679036cd14d8bb814a1ebfbf1b58eaaef0a27e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for scinumtools3-0.4.9-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