PolicyEngine Core
A fork of OpenFisca-Core that powers PolicyEngine country models (policyengine-uk, policyengine-us, policyengine-canada, policyengine-il, policyengine-ng) and the downstream apps and APIs. Provides the simulation engine, parameter tree, variable system, and reform machinery that each country package builds on top of.
Install
pip install policyengine-core
Supports Python 3.11–3.14.
Usage
Most users reach this package transitively through a country model. Import directly if you're building a new country model, writing a reform, or extending the core:
from policyengine_core.simulations import Simulation
from policyengine_core.reforms import Reform
See the documentation for API reference and tutorials.
Development
# Install dev dependencies (uses uv)
make install
# Run the full test suite
make test
# Run a single test
uv run pytest tests/core/test_file.py::test_name -v
# Format before committing (CI enforces)
make format
# Lint GitHub Actions workflows after editing .github/, from the repo root
# (CI enforces; install shellcheck and pyflakes so actionlint also checks
# run: scripts)
uvx --from actionlint-py==1.7.12.25 actionlint
Always use uv run for Python commands; bare python / pytest / pip may pick up the wrong environment.
Contributions: see CONTRIBUTING.md for branching, PR conventions, and the towncrier changelog.d/ workflow. Default branch is master.
License
Distributed under the AGPL License. See LICENSE for details.
Acknowledgements
- Forked from OpenFisca-Core.
- README template adapted from Othneil Drew's Best-README-Template.
Metadata
Release files for policyengine-core 3.32.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| policyengine_core-3.32.21.tar.gz | 542.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| policyengine_core-3.32.21-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 812.5 kB
Release files / policyengine_core-3.32.21.tar.gz
| Download URL | policyengine_core-3.32.21.tar.gz |
|---|---|
| Size | 542.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df70e9ba3403b6a8b0692acee35a7965aec3c5dda480cb42a6ed853c7f3acb4e
|
|
BLAKE2b-256 checksum How to use checksums |
22ba602b70178d0c4cd549caafa0cad34d5c30bcfab9699185859d09c96cfa7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / policyengine_core-3.32.21-py3-none-any.whl
| Download URL | policyengine_core-3.32.21-py3-none-any.whl |
|---|---|
| Size | 270.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b53224a67294f219bc270505c7717ca2fb9cc6b4e3baaed51e2ca97c53ba4ba
|
|
BLAKE2b-256 checksum How to use checksums |
35f742f622ff63607791344e03013764824359dc763c77c7bdb7e279e9347ae4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|