pfc-client
pfc-client is the lightweight Python SDK for customers integrating with the PFC API.
Install
pip install pfc-client
For local development from this repository:
pip install ./sdk/python
Quickstart
from pfc_client import PFCClient, guarded_tool
client = PFCClient(
api_url="https://pfc-api.fly.dev",
api_key="YOUR_API_KEY",
)
decision = client.evaluate(
action="deploy_production",
subject={"type": "agent", "id": "website-backend"},
resource={"type": "service", "id": "checkout-api"},
)
print(decision)
Base URL Configuration
By default the client points to the hosted PFC API:
client = PFCClient()
To use a different environment:
client = PFCClient(api_url="https://your-pfc-host.example.com")
API Key Usage
Pass your website customer API key when creating the client:
client = PFCClient(
api_url="https://pfc-api.fly.dev",
api_key="pfc_live_your_api_key",
)
The SDK sends the key as the x-api-key header on evaluate requests.
Check Your Usage
Use your API key to view your request usage:
curl https://pfc-api.fly.dev/v1/usage/me \
-H "x-api-key: YOUR_PFC_API_KEY"
This returns your customer-specific usage totals based on the same API key used for requests.
Guarded Tool Example
from pfc_client import PFCClient, guarded_tool
client = PFCClient(api_key="pfc_live_your_api_key")
@guarded_tool(client)
def deploy():
print("Deploying to production")
deploy()
Supported Operations
client.evaluate(...)submits an action for policy and authority evaluationclient.verify(...)verifies an artifact against a public key via the API
Metadata
Release files for pfc-client 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pfc_client-0.1.5.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pfc_client-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / pfc_client-0.1.5.tar.gz
| Download URL | pfc_client-0.1.5.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06fd6f9af8cda97a73f66fa81c43ec9ef8fabadeaa93505319a9aef8b1125d9a
|
|
BLAKE2b-256 checksum How to use checksums |
24fd4cc25ea6bb2ed5704c8f0b9555f6dc73a2f30cc6c105ad82367e3b409cbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 20, 2026.
Transparency logRelease files / pfc_client-0.1.5-py3-none-any.whl
| Download URL | pfc_client-0.1.5-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd43af3a2141858507685b7313cf0730010b0da0302ba4a5159c6790fb377cc7
|
|
BLAKE2b-256 checksum How to use checksums |
1130680ae2a612e760922af08c4108d5bc55fff36512d70010f004102b2dbfb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 20, 2026.
Transparency log