Skip to main content

Stochas

stochas: Smart Data Orchestration

PyPI version Python versions Tests & Release Status Coverage uv Ruff ty Pydantic v2 License Documentation GitHub Discussions PyPI Downloads

stochas is a Python framework built to handle the complexity of Monte Carlo simulations, parametric studies, and probabilistic modeling.

It provides a robust bridge between abstract statistical rules and concrete simulation data, ensuring your experiments are repeatable, traceable, and easy to manage.


Installation

Install the package via your preferred manager:

uv add stochas

or with pip:

pip install stochas

Core Features

  • Salted Seeding: Combines Global Seeds, Parameter Names, and Trial Numbers for unique but deterministic draws.
  • Numeric Mixins: Use your data containers directly in math operations (container * 5.0) without manually extracting values.
  • Nominal Support: Easily toggle between "Perfect World" (Trial 0) and "Probabilistic World" (Monte Carlo) results.
  • Pydantic Foundation: Every component is a Pydantic model, providing out-of-the-box validation and effortless JSON serialization.
  • Unit System: Declare SI, IPS, FPS, or a custom unit system once and tag distributions with unit=u.inch, sampling paths convert values automatically so your input data stays in familiar units while the simulation receives physically consistent numbers.

Why use stochas?

Managing hundreds of simulation trials can quickly become a mess of manual seeds and inconsistent data. stochas solves this by providing:

  • Repeatable Randomness: Our "Salted Seed" logic ensures that any specific trial can be perfectly recreated, even years later, by tying randomness to simple to set and store values.
  • Smart Containers: NamedValue objects behave like numbers or arrays but protect your data from accidental overwrites using a state-machine logic.
  • Physics-Ready Distributions: A wide range of built-in distributions (Normal, Truncated Normal, Log-Normal, etc.) that handle their own random number generators internally.
  • Automatic Unit Conversion: Attach a UnitDescriptor to any distribution or design variable and let StochasBase multiply the conversion factor at sampling time (without manual scaling in generator code).
  • Serialized Registries: Automatically track exactly which "rules" (Distributions) and "results" (NamedValues) were used in every trial for easy export to JSON or databases.

Metadata

Release files for stochas 2.3.0

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

Source distribution (sdist)

Source distribution for stochas 2.3.0
File Size Uploaded Provenance Actions
stochas-2.3.0.tar.gz 2.6 MB Without provenance Details for stochas-2.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stochas 2.3.0
File Interpreter ABI Platform Actions
stochas-2.3.0-py3-none-any.whl Python 3 none any Details for stochas-2.3.0-py3-none-any.whl

Total release size: 2.7 MB

Release files / stochas-2.3.0.tar.gz

Download URL stochas-2.3.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
c852e7094c34589c818c5f92adcf367c890dae35f3ef79298c0f61a59e85db6b
BLAKE2b-256 checksum
How to use checksums
4348f49ced401a7a14a1e263b688dd2376b328b049d055f1d049582ccf77c0ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / stochas-2.3.0-py3-none-any.whl

Download URL stochas-2.3.0-py3-none-any.whl
Size 50.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88272fb9a462d5ac8bc0a6a63c05b24660114e9d5fe974843136d605b5d286f4
BLAKE2b-256 checksum
How to use checksums
45bcd81aefb60530c4a61d56e0423d5265d23801323c5ea2f89ad5a821b4dafa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for stochas 2.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

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