Skip to main content

Core microsimulation engine enabling country-specific policy models.

Project description

PolicyEngine Core

codecov PyPI version Ruff

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.9 – 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

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

policyengine_core-3.27.0.tar.gz (484.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

policyengine_core-3.27.0-py3-none-any.whl (238.1 kB view details)

Uploaded Python 3

File details

Details for the file policyengine_core-3.27.0.tar.gz.

File metadata

  • Download URL: policyengine_core-3.27.0.tar.gz
  • Upload date:
  • Size: 484.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for policyengine_core-3.27.0.tar.gz
Algorithm Hash digest
SHA256 3b2aa2f563e0f560f1cea118a011067bfd50c3a25915bf7b4203524919cbb062
MD5 05de2b94db5a580394bbc7bfd518752e
BLAKE2b-256 f9c88fe846bb5c176ffbdb901171a0b8589057d22e108f0719596af5eda50ddd

See more details on using hashes here.

File details

Details for the file policyengine_core-3.27.0-py3-none-any.whl.

File metadata

File hashes

Hashes for policyengine_core-3.27.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9371c4cf18b85338513c7ce004b5a6a458347d4a5c791fb2a49cad29f4c9d699
MD5 ca758373032b5d2769b8a2bb2013ae5c
BLAKE2b-256 8e622318405e648688e826d310e12ff5d40e2aff9cd633dfe4697fcd7a20d51b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page