Skip to main content

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

Project description

Stochas

stochas: Smart Data Orchestration

PyPI version Python versions Tests & Release Status Ruff 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.

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.
  • Serialized Registries: Automatically track exactly which "rules" (Distributions) and "results" (NamedValues) were used in every trial for easy export to JSON or databases.

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

stochas-2.0.4.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

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

stochas-2.0.4-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file stochas-2.0.4.tar.gz.

File metadata

  • Download URL: stochas-2.0.4.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for stochas-2.0.4.tar.gz
Algorithm Hash digest
SHA256 f4ac256cd84135bc819b3e8776da93bd2782268b6b2eec491be301e8921c5c91
MD5 6a743ceb01592b818404e36787baf0b9
BLAKE2b-256 7c21aad1ddbf192032aac3bab7345a42ade084aa961f6b202f5771ca0ddcb679

See more details on using hashes here.

File details

Details for the file stochas-2.0.4-py3-none-any.whl.

File metadata

  • Download URL: stochas-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for stochas-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 14066d02e522de98ca738425ec4ea0da191a040e18fa572987bb0328fc200f71
MD5 c6d912b1672a5acd61e9e1b85b9b8982
BLAKE2b-256 c947d72245b9cb45360bfb107e82c5c1944bcd0ab10a79862cbbe8f19ad3e0a2

See more details on using hashes here.

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