PolicyEngine Household API
Project description
PolicyEngine Household API
A version of the PolicyEngine API that runs the calculate endpoint over household object. To debug locally, run make debug.
Quick self-hosted run
If you want to try the API without requesting hosted credentials, run the published Docker image:
docker run --rm -p 8080:8080 ghcr.io/policyengine/policyengine-household-api:latest
The image can take a little time to initialize on first start and is best run on a machine with roughly 4 GB of RAM available.
Then inspect the service metadata:
curl http://localhost:8080/
and send calculations to:
http://localhost:8080/us/calculate
Hosted API docs live at https://www.policyengine.org/us/api.
Local development with Docker Compose
To run this app locally via Docker Compose:
% make docker-build
% make docker-run
and point your browser at http://localhost:8080 to access the API.
To develop the code locally, you will want to instead start only the Redis docker container and a one-off API container, with your local filesystem mounted into the running docker container.
% make services-start
% make docker-console
Then inside the container, start the Flask service:
policyapi@[your-docker-id]:/code$ make debug
and point your browser at http://localhost:8080 to access the API.
Running with other PolicyEngine services
If you're running this alongside other PolicyEngine services (e.g., the main API) and need containers to communicate across projects, use the external network mode:
% make docker-network-create # Create shared network (once)
% make docker-run-external # Run with external network
This connects the household API to a shared policyengine-api_default network that other
PolicyEngine docker-compose projects can also join.
For development with external networking:
% make docker-network-create
% make services-start-external
% make docker-console
Development rules
- Every endpoint should return a JSON object with at least a "status" and "message" field.
Please note that we do not support branched operations at this time.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file policyengine_household_api-0.14.3.tar.gz.
File metadata
- Download URL: policyengine_household_api-0.14.3.tar.gz
- Upload date:
- Size: 271.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72be23255eba5f12c829ebf4ed802e2749bbc561483b3e41af48f76c10f445b2
|
|
| MD5 |
2137901599f6aca34002aa896b6b8384
|
|
| BLAKE2b-256 |
4a63de608039af4a914afaf304d18cd6ed26b07580541d1011174c5287cdaca0
|
Provenance
The following attestation bundles were made for policyengine_household_api-0.14.3.tar.gz:
Publisher:
deploy-staged.yml on PolicyEngine/policyengine-household-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
policyengine_household_api-0.14.3.tar.gz -
Subject digest:
72be23255eba5f12c829ebf4ed802e2749bbc561483b3e41af48f76c10f445b2 - Sigstore transparency entry: 1397519412
- Sigstore integration time:
-
Permalink:
PolicyEngine/policyengine-household-api@4449725a54e410bbcac939ceb202b413b87b9895 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PolicyEngine
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-staged.yml@4449725a54e410bbcac939ceb202b413b87b9895 -
Trigger Event:
push
-
Statement type:
File details
Details for the file policyengine_household_api-0.14.3-py3-none-any.whl.
File metadata
- Download URL: policyengine_household_api-0.14.3-py3-none-any.whl
- Upload date:
- Size: 47.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23876fb81b6d6835ab0af60cd93d3363b203a15c6b2992e710b1d120a0776595
|
|
| MD5 |
7eb63241b87ee19d923f3e0ebc1264a7
|
|
| BLAKE2b-256 |
65859d19a55c671870f77a7ea74662a1420b5f624c3e108d16ef5041452ce197
|
Provenance
The following attestation bundles were made for policyengine_household_api-0.14.3-py3-none-any.whl:
Publisher:
deploy-staged.yml on PolicyEngine/policyengine-household-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
policyengine_household_api-0.14.3-py3-none-any.whl -
Subject digest:
23876fb81b6d6835ab0af60cd93d3363b203a15c6b2992e710b1d120a0776595 - Sigstore transparency entry: 1397519419
- Sigstore integration time:
-
Permalink:
PolicyEngine/policyengine-household-api@4449725a54e410bbcac939ceb202b413b87b9895 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PolicyEngine
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-staged.yml@4449725a54e410bbcac939ceb202b413b87b9895 -
Trigger Event:
push
-
Statement type: