pyro-api
Generic API for dispatch to Pyro backends.
What it is and what it does
Pyro API is a thin abstraction layer for probabilistic programming that lets you write models and inference code once and dispatch them to different Pyro backends—such as funsor or numpyro—without rewriting. It defines a generic interface for handlers, distributions, and other core components, then routes calls to whichever backend you register at runtime.
The package itself has no runtime dependencies and is designed primarily for testing backend implementations. You register a backend using a context manager, then run your models and tests against it. This is useful if you're building a new Pyro backend or need to validate that your models work across multiple inference engines, but it's a library for framework developers rather than end users.
Use it for:
- Test a new Pyro backend implementation against a standard suite of models in pyro_api.testing
- Write probabilistic models that can switch between backends (e.g., funsor and numpyro) at runtime
- Validate backend compatibility by running the same inference code against multiple Pyro implementations
- Build a wrapper around a custom Pyro backend and expose it through the standard pyro_api interface
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a generic dispatch API for probabilistic programming backends, allowing code to run against different Pyro implementations without modification.
No—unless you are actively developing or maintaining a Pyro backend. The package is abandoned (last commit 2022-02-13), has no runtime dependencies so it's not a burden to remove, but offers no value to users of existing backends. If you need probabilistic programming, install a specific backend (funsor, numpyro) directly.
Install
pyro-api on PyPI
pip
pip install pyro-apiuv
uv add pyro-apipoetry
poetry add pyro-apiInstalling pyro-api
Before you install
Installation is frictionless with no runtime dependencies. However, the package is abandoned—last release was 2020-05-15 and last commit 2022-02-13—so expect no maintenance, bug fixes, or updates.
License in practice
Licensed under Apache License 2.0 (permissive), so you can use, modify, and distribute the package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pyro-api
from pyro_api.dispatch import pyro_backend
from pyro_api.testing import MODELS
with pyro_backend(handlers='my_backend.handlers', distributions='my_backend.distributions'):
for model_name in MODELS:
f = MODELS[model_name]()
model, model_args = f['model'], f.get('model_args', ())
model(*model_args)
Requires a registered Pyro backend (e.g., funsor or numpyro) to be installed and importable; the package itself provides only the dispatch interface.
Verify before relying
- Whether the package remains compatible with modern Pyro backends (funsor, numpyro) given its abandonment since 2022
- Whether Python 3.6 support claim is current or whether the package works on modern Python versions
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,282 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,223,131/month — #4,199 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyro_api-0.1.2-py3-none-any.whl
Keywords: probabilistic, machine, learning, bayesian, statistics
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
pyro-pplPyro is a deep probabilistic programming…
permissive · top 5,000 on PyPI
numpyroNumPyro is a probabilistic programming library…
permissive · top 15,000 on PyPI
tensorflow-probabilityTensorFlow Probability provides probabilistic…
permissive · top 5,000 on PyPI
pymc3PyMC3 is a Python package for Bayesian…
permissive · top 15,000 on PyPI
botorchBoTorch provides a modular, PyTorch-based…
permissive · top 5,000 on PyPI
pymcPyMC is a Python package for Bayesian…
permissive · top 5,000 on PyPI
Pyro4Pyro4 enables Python objects to communicate…
permissive · top 15,000 on PyPI
cmdstanpyCmdStanPy provides a pure-Python interface to…
permissive · top 5,000 on PyPI
problogProbLog is a probabilistic logic programming…
permissive · top 15,000 on PyPI
Pyro5Pyro5 enables remote method calls on Python…
permissive · top 15,000 on PyPI