policyengine-python-client

Run PolicyEngine simulations and calculate tax outcomes via Python client or REST API.

31|6|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/PolicyEngine/policyengine-claude --skill policyengine-python-client
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: policyengine-python-client
Source: https://github.com/PolicyEngine/policyengine-claude/tree/main/skills/policyengine-python-client-skill
Command: npx skills add https://github.com/PolicyEngine/policyengine-claude --skill policyengine-python-client

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires policyengine, policyengine-us.

What problem does it solve?

While the web app is great for interactive exploration, it's limited for batch analysis, automation, and custom visualizations. This Skill provides programmatic access to PolicyEngine's powerful simulation engine, enabling advanced analytical workflows.

Core Features & Use Cases

  • Batch Analysis: Analyze thousands of households in a single run, far beyond web app capabilities.
  • Automated Workflows: Automate repetitive policy analyses and integrate with other data sources.
  • Custom Visualizations: Create bespoke charts and reports using Python's rich ecosystem.
  • Use Case: Analyze a proposed policy reform (e.g., increasing the Child Tax Credit to $5,000) across 10,000 households to understand its precise distributional impact.

Quick Start

Use the policyengine-python-client skill to calculate the income tax for a single person earning $50,000 in California for 2024.

Frequently Asked Questions about policyengine-python-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run batch policy analysis across thousands of households programmatically?

Batch policy analysis is enabled through PolicyEngine's Python client by constructing multiple Simulation objects with different household situations and country_id, then invoking calculate to retrieve metrics like income_tax, state_income_tax, ctc, and eitc across all households in a single workflow, scaling far beyond web app capacity.

Can I automate policy reform comparisons and what data do I need?

Yes. Automate reform comparisons by constructing Simulations with a baseline situation and country_id, then running the same simulation with optional reform parameters to calculate and compare outcomes like tax liabilities and credits across scenarios without manual web app steps.

What's the difference between using PolicyEngine's web app versus the Python client?

The web app suits interactive exploration; the Python client enables batch analysis, automated workflows, custom visualizations, and integration with external data sources—critical for analyzing thousands of households and repeating analyses programmatically.

Do I need to install additional dependencies beyond the policyengine Python package?

The policyengine Python package is the primary dependency; policyengine-us is also required for U.S. policy analysis. Both must be installed to construct Simulations and access the simulation engine's calculation capabilities.

How do I calculate specific tax outcomes like the Child Tax Credit or EITC for a household?

Create a Simulation with the household's situation (income, family composition) and country_id, optionally add a reform, then call calculate to retrieve specific metrics including ctc (Child Tax Credit) and eitc (Earned Income Tax Credit) outcomes.

Can I use this for custom policy visualizations beyond standard reports?

Yes. Extract calculation results from Simulations and use Python's rich visualization ecosystem to create bespoke charts, dashboards, and reports tailored to your policy analysis needs and distribution analysis requirements.