policyengine-core
Core microsimulation engine enabling country-specific policy models.
What it is and what it does
PolicyEngine Core is a microsimulation engine forked from OpenFisca-Core that provides the foundational machinery for policy modeling. It includes a simulation engine, parameter tree, variable system, and reform framework that country-specific policy packages (such as policyengine-uk, policyengine-us, policyengine-canada, policyengine-il, policyengine-ng) build on top of. The package is designed to calculate tax and benefit outcomes across populations under different policy scenarios.
Most developers encounter this package transitively through a country model rather than installing it directly. Direct installation is appropriate when building a new country model, writing custom reforms, or extending the core simulation engine itself. The package depends on scientific Python libraries (numpy, pandas, numexpr, h5py) for numerical computation and data handling, plus visualization (plotly, pyvis) and utility libraries. It is actively maintained, supports modern Python versions (3.9–3.14), and carries no known security vulnerabilities.
Use it for:
- Building a new country-specific policy model by extending the core simulation and variable framework.
- Writing custom tax or benefit reforms to model policy changes and calculate fiscal impacts.
- Running population-level microsimulations to evaluate policy outcomes under different scenarios.
- Integrating policy modeling into downstream applications or APIs that need to compute tax and benefit calculations.
- Extending or modifying the core engine when the standard country models do not cover your jurisdiction or use case.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PolicyEngine Core provides a microsimulation engine and policy reform framework that powers country-specific tax and benefit models, enabling users to run policy scenarios and calculate outcomes across populations.
Yes, if you are building a country policy model, writing custom reforms, or integrating policy simulation into an application. No, if you simply need to run policy scenarios—install a country model instead (policyengine-uk, policyengine-us, etc.), which brings this as a dependency. The AGPL license requires derivative works to be open-source, which is appropriate for public-interest policy tools but may conflict with proprietary use.
Install
policyengine-core on PyPI
pip
pip install policyengine-coreuv
uv add policyengine-corepoetry
poetry add policyengine-coreInstalling policyengine-core
Before you install
Low friction installation with a pure Python wheel. Actively maintained with a release on 2026-08-14 and no known vulnerabilities. Supports Python 3.9 through 3.14, covering current and recent Python versions.
License in practice
Distributed under AGPL v3, which requires that any modifications or derivative works be shared under the same license. This is a copyleft obligation suitable for open-source policy tools but may constrain proprietary use.
Quickstart
pip install policyengine-core
from policyengine_core.simulations import Simulation
from policyengine_core.reforms import Reform
# Use Simulation and Reform classes to model policy scenarios
Requires Python 3.9 or later. Most users should install via a country model (policyengine-uk, policyengine-us, etc.) rather than directly.
Verify before relying
- Whether the package's 16 runtime dependencies (including h5py, plotly, pyvis) are all necessary for typical use cases or if many are optional.
- Performance characteristics and scalability limits for large population simulations.
- Compatibility guarantees between policyengine-core versions and downstream country model packages.
Package facts
| License | not declared (agpl) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 16 — dpath, h5py, huggingface-hub, ipython, microdf-python, numexpr, numpy, pandas, plotly, psutil, pytest, pyvis, requests, sortedcontainers, standard-imghdr, wheel |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 131,083/month — #11,610 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: policyengine_core-3.31.0-py3-none-any.whl
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
policyengine-usPolicyEngine US models the US federal and state…
agpl · top 15,000 on PyPI
oslo.policyoslo.policy enforces role-based access control…
permissive · top 15,000 on PyPI
openbb-economyProvides access to global macroeconomic data…
agpl · top 15,000 on PyPI
langwatch-scenarioLangwatch-scenario is an agent testing…
permissive · top 15,000 on PyPI
django-localflavorProvides country-specific form fields,…
permissive · top 5,000 on PyPI
google-meridianMeridian is a Bayesian marketing mix modeling…
unclear · top 15,000 on PyPI
openbb-oecdIntegrates OECD statistical data into the…
agpl · top 15,000 on PyPI
python-codicefiscaleEncodes and decodes Italian fiscal codes…
permissive · top 15,000 on PyPI
data-designer-engineExecution engine for the NeMo Data Designer…
permissive · top 15,000 on PyPI
promptflow-coreExecutes prompt flow workflows with minimal…
permissive · top 15,000 on PyPI