Skip to main content

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.
  • 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.

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.2.4.tar.gz (2.6 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.2.4-py3-none-any.whl (44.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stochas-2.2.4.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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.2.4.tar.gz
Algorithm Hash digest
SHA256 8875cf26f6d4e7dd30221333553d6bc92cb10e29dcfec259446e44ad088edaca
MD5 224bb7054f34b21c1e3b3db3593be10c
BLAKE2b-256 e7be1b69f2f63b4521a1cb1d5523d769779ccc3ed953158e4f7df53e7a80c588

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stochas-2.2.4-py3-none-any.whl
  • Upload date:
  • Size: 44.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 25036d24187be4b36dfa2301d157225a27479db20038a3408e4cbb1e79ab2284
MD5 3803adb536ef19d6eb1f580773e89974
BLAKE2b-256 ce1e2e0f8abfa6e015e313bebda1d07ef802633636b606581cb365492fcaebec

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.2.4 This release

2 files

2.2.3

2 files

2.2.2

2 files

2.2.1

2 files

2.2.0

2 files

2.1.8

2 files

2.1.7

2 files

2.1.6

2 files

2.1.5

2 files

2.1.4

2 files

2.1.3

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

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