stanio
Utilities for preparing Stan inputs and processing Stan outputs
Decision gist · record as of 2026-08-14
Yes, if you use Stan or cmdstanpy in Python. The package has low install friction, no known vulnerabilities, permissive licensing, and active maintenance. It solves a specific but essential problem for Stan workflows. Not relevant for projects that don't use Stan.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; numpy must be installed as a runtime dependency.
- Low friction install with a single runtime dependency (numpy).
- Actively maintained with recent commits; Beta status indicates ongoing development but stable enough for use.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause permissive license allows commercial and private use with minimal restrictions beyond attribution and liability disclaimer.
last release 2024-07-08 (767 days) · last repo commit 2026-08-01 · 3 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,998,007 downloads/mo, #1,991 on PyPI
Alternatives
Verify before relying
pip install stanio
import stanio
import numpy
# Convert Python dict to Stan JSON
data = {'x': [1, 2, 3]}
stanio.write_stan_json('input.json', data)
# Read Stan CSV output into numpy array
draws = stanio.read_stan_csv('output.csv')- Whether ujson integration (mentioned as optional) is automatically available or requires separate installation
- Performance characteristics when handling large Stan output files or high-dimensional parameter arrays
What it is and what it does
StanIO is a data-wrangling utility for the Stan probabilistic programming language, handling the format conversions needed between Python and Stan. It writes Python dictionaries to Stan-compatible JSON and reads Stan's CSV output format back into numpy arrays, automatically reshaping parameters according to their declared dimensions in Stan programs.
The package is primarily designed as a supporting library for cmdstanpy, the Python interface to Stan. It solves the practical problem of moving data in and out of Stan workflows without manual format handling. With numpy as its only runtime dependency and Python 3.8+ support, it integrates cleanly into existing scientific Python stacks.
Use it for
- Prepare input data dictionaries for Stan models by converting them to Stan-compatible JSON format
- Parse Stan CSV output files into numpy arrays with automatic parameter reshaping based on Stan declarations
- Extract multi-dimensional parameters from Stan output with correct shape inference
- Integrate Stan probabilistic models into Python data analysis pipelines
- Serialize Python data structures for use in Stan programs without manual JSON construction
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use Stan or cmdstanpy in Python.
The package has low install friction, no known vulnerabilities, permissive licensing, and active maintenance. It solves a specific but essential problem for Stan workflows. Not relevant for projects that don't use Stan.
Install
stanio on PyPI
Before you install
Low friction install with a single runtime dependency (numpy). Actively maintained with recent commits; Beta status indicates ongoing development but stable enough for use.
Requires Python 3.8 or later; numpy must be installed as a runtime dependency.
License in practice
BSD-3-Clause permissive license allows commercial and private use with minimal restrictions beyond attribution and liability disclaimer.
Quickstart
pip install stanio
import stanio
import numpy
# Convert Python dict to Stan JSON
data = {'x': [1, 2, 3]}
stanio.write_stan_json('input.json', data)
# Read Stan CSV output into numpy array
draws = stanio.read_stan_csv('output.csv')
Verify before relying
- Whether ujson integration (mentioned as optional) is automatically available or requires separate installation
- Performance characteristics when handling large Stan output files or high-dimensional parameter arrays
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 767 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,998,007 / month, #1,991 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: stanio-0.5.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “stan data format conversion”
- stanioStanIO converts Python dictionaries to Stan-compatible JSON and reads…
- cmdstanpyCmdStanPy provides a pure-Python interface to the Stan probabilistic…
- pystanPyStan provides a Python interface to Stan for Bayesian statistical…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also cmdstanpy · pystan · php2json · numpyencoder · msgpack-numpy · jsonpickle · json-tricks · json-numpy · httpstan · msgpack-numpy-opentensor