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 Coverage 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.1.2.tar.gz (850.8 kB view details)

Uploaded Source

Built Distribution

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

stochas-2.1.2-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stochas-2.1.2.tar.gz
  • Upload date:
  • Size: 850.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.1.2.tar.gz
Algorithm Hash digest
SHA256 a6c0cf5be81142d09e03bc44bbab99dfb7417b4b91027638edaafc9b244515c6
MD5 9821b6306413f7e007c3bd402ee57a6a
BLAKE2b-256 3a8ec5b78be8b919faa36b85ed9f03f0bd02073c6a041a99ab34843398ac1a8f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stochas-2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 11de546cb41a6ddec4847e89dba00474d1f0d46cf6b43b9a158c1bf93b76915f
MD5 5886752e7e79dcbfe71441c41973c30f
BLAKE2b-256 441e3efc1968410ef74b74b7fc3142ea9357f25d20086d2ecf6bf625087008cd

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