$npx skillfedfor your agent

cmdstanpy

Python interface to CmdStan

Worth itPyPI Information AnalysisReleased Oct 20257.0M downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — cmdstanpy-1.3.0-py3-none-any.whl
v1.3.0 · released 2025-10-20 · Python >=3.9 · 4 runtime deps: pandas, numpy, tqdm, stanio

Yes. CmdStanPy is actively maintained, has no known vulnerabilities, minimal dependencies, and a permissive license. Install it if you need to run Stan models from Python for Bayesian inference, statistical modeling, or probabilistic programming. The low friction and modular design make it a solid choice for both research and production use.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later; CmdStan itself (the underlying C++ compiler and inference engine) must be installed separately or will be downloaded on first use.
  • Low friction: pure-Python wheel distribution with only four runtime dependencies (pandas, numpy, tqdm, stanio).
  • Actively maintained with a recent release and ongoing repository activity.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; you must include the license text in distributions.

last release 2025-10-20 (298 days) · last repo commit 2026-08-03 · 199 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,992,043 downloads/mo, #1,800 on PyPI

Verify before relying

pip install cmdstanpy

from cmdstanpy import CmdStanModel
model = CmdStanModel(stan_file='model.stan')
fit = model.sample(chains=4, data=data_file)
  • Whether CmdStan binaries are automatically downloaded and installed on first use, or if manual setup is required.
  • Memory and disk footprint of compiled Stan models and posterior samples for typical use cases.
Same gist for agents: .md · .json

What it is and what it does

CmdStanPy is a lightweight wrapper around CmdStan, the command-line interface to the Stan probabilistic programming language. It lets you write statistical models in Stan's modeling language, compile them to executables, and run Bayesian inference—MCMC sampling, variational inference, and optimization—all from Python. The package handles model compilation, data passing, and result parsing, while keeping memory overhead low by default and storing output on a temporary filesystem during development.

The interface is designed for both iterative model development and production workflows. It depends on numpy and pandas for numerical operations and data handling, plus tqdm for progress tracking and stanio for I/O. Because it calls compiled Stan executables rather than embedding C++ directly, installation is straightforward and the package remains modular—you use CmdStanPy to generate posterior samples, then use other tools for analysis and visualization.

Use it for

  • Fit Bayesian hierarchical models to experimental or observational data and extract posterior samples for inference.
  • Develop and test Stan models iteratively during research, with automatic compilation and temporary output storage.
  • Run multiple inference jobs across machines or clusters by scripting CmdStanPy to distribute analysis reproducibly.
  • Compare inference algorithms (MCMC, variational, optimization) on the same model without rewriting code.
  • Integrate Bayesian inference into Python data pipelines alongside pandas and numpy workflows.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

CmdStanPy is actively maintained, has no known vulnerabilities, minimal dependencies, and a permissive license. Install it if you need to run Stan models from Python for Bayesian inference, statistical modeling, or probabilistic programming. The low friction and modular design make it a solid choice for both research and production use.

Install

cmdstanpy on PyPI

Before you install

Low friction: pure-Python wheel distribution with only four runtime dependencies (pandas, numpy, tqdm, stanio). Actively maintained with a recent release and ongoing repository activity.

Requires Python 3.9 or later; CmdStan itself (the underlying C++ compiler and inference engine) must be installed separately or will be downloaded on first use.

License in practice

BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; you must include the license text in distributions.

Quickstart

pip install cmdstanpy

from cmdstanpy import CmdStanModel
model = CmdStanModel(stan_file='model.stan')
fit = model.sample(chains=4, data=data_file)

Verify before relying

  • Whether CmdStan binaries are automatically downloaded and installed on first use, or if manual setup is required.
  • Memory and disk footprint of compiled Stan models and posterior samples for typical use cases.

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
4 packages
pandasnumpytqdmstanio
MaintenanceActively maintained 298 days since the last release
Last repo commit
First released
Downloads6,992,043 / month, #1,800 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: Information Analysis

Evidence: cmdstanpy-1.3.0-py3-none-any.whl

Tags

Capabilities
bayesian inference pythonstan interface cmdstanprobabilistic programmingmcmc sampling pythonposterior sampling stanbayesian modelingstatistical inference cmdstan
Topics
bayesian-inferenceprobabilistic-programmingmcmc

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 interface cmdstan”

  • cmdstanpyCmdStanPy provides a pure-Python interface to the Stan probabilistic…
  • httpstanhttpstan provides an HTTP REST interface to the Stan C++ library for…
  • stanioStanIO converts Python dictionaries to Stan-compatible JSON and reads…

Give your agent the search over MCP, or paste the wish link into any chat.

More Information Analysis packages

regex Worth it
PyPI · Python Modules · released Jul 2026

A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.

Apache-2.0 AND CNRI-Pythoncompiled wheel · 3.10+
437.7Mdownloads / mo
pyarrow Worth it
PyPI · Information Analysis · released Aug 2026

pyarrow provides Python bindings to Apache Arrow's C++ libraries for efficient columnar data processing, serialization, and interoperability with pandas, NumPy, and other Python ecosystem tools.

Apache-2.0compiled wheel · 3.10+
432.9Mdownloads / mo
networkx Worth it
PyPI · Python Modules · released Dec 2025

NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.

BSD-3-Clausepure Python
290.9Mdownloads / mo
snowflake-connector-python Worth it
PyPI · Software Development · released Aug 2026

Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.

Apache-2.0compiled wheel · 3.10+
193.6Mdownloads / mo
contourpy Worth it
PyPI · Information Analysis · released Jul 2025

ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.

BSD-3-Clausecompiled wheel · 3.11+
191.2Mdownloads / mo
snowflake-snowpark-python Worth it
PyPI · Software Development · released Jul 2026

Snowpark Python provides APIs to query and process data directly in Snowflake without moving data to your local system, with support for both native Snowpark and pandas-compatible interfaces.

Install it if you use Snowflake and want to process data without moving it to your application layer.

Apache-2.0pure Python
100.7Mdownloads / mo

See also pystan · stanio · httpstan · pymc3 · nutpie · pymc · numpyro · tensorflow-probability · emcee · pgmpy