King County, WA civic data tools for pydantic-ai agents — no API keys required
Project description
pydantic-ai-king-county
King County, WA civic data tools for pydantic-ai agents. No API keys required.
pip install pydantic-ai-king-county
Tools
| Factory | Source | What it does |
|---|---|---|
address_to_parcel_tool() |
King County ArcGIS geocoder | Street address → 10-digit parcel PIN |
contractor_license_tool() |
WA L&I Verify portal | Contractor license status + violations |
Quick start
from pydantic_ai import Agent
from pydantic_ai_king_county import address_to_parcel_tool, contractor_license_tool
agent = Agent(
"anthropic:claude-sonnet-4-5",
toolsets=[address_to_parcel_tool(), contractor_license_tool()],
)
result = agent.run_sync(
"Is there an active contractor license for 'Acme Plumbing' in WA, "
"and what is the parcel number for 1817 Morris Ave S, Renton WA?"
)
print(result.output)
Tool reference
address_to_parcel_tool(*, max_locations=5)
Converts a King County, WA street address to its 10-digit parcel number (PIN) using the King County ArcGIS geocoder.
Input: address: str — street address, city optional but recommended. Also accepts a bare 10-digit PIN as pass-through.
Returns: ParcelResult TypedDict:
| Field | Type | Description |
|---|---|---|
action |
"use" | "pick" | "refine" | "reject" |
use = consume parcel_number; pick = show candidates; refine = try different input; reject = bad input |
parcel_number |
str | None |
10-digit PIN when action is "use" or "pick" |
matched_address |
str | None |
Geocoder's canonical address |
score |
float | None |
Match confidence 0–100. ≥90 is reliable |
candidates |
list[ParcelCandidate] |
Ranked alternatives when action is "pick" |
message |
str |
Human-readable explanation |
contractor_license_tool(*, page_size=25)
Verifies Washington State contractor registration and license status via the WA L&I Verify portal.
Input: query: str — business name, license ID (e.g. MORTESL763NR), or 9-digit UBI number.
Returns: ContractorResult TypedDict:
| Field | Type | Description |
|---|---|---|
action |
"found" | "pick" | "none" | "reject" |
found = license verified; pick = multiple matches; none = not in L&I; reject = bad input |
total_found |
int |
Total records in L&I database (may exceed len(results)) |
results |
list[ContractorRecord] |
Up to 25 matching records |
message |
str |
Human-readable summary |
Each ContractorRecord: license_id, business_name, contractor_type, contractor_group, status (Active/Expired/Inactive), city, state, ubi, violations (list of "safety" / "contractor"), detail_url.
Coverage
Address to parcel: All King County, WA addresses. Returns the 10-digit parcel number used by county systems.
Contractor license: All WA-licensed contractor types — construction contractors, electricians, plumbers, HVAC, roofers, and more.
Related tools
Also available as standalone CLI tools with --pipe, --schema, and tool.json:
License
MIT
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 pydantic_ai_king_county-0.1.0.tar.gz.
File metadata
- Download URL: pydantic_ai_king_county-0.1.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
981c9ca6b3907efcae6b28126d20acfec2d3e527a33b0e493177549c9842ca03
|
|
| MD5 |
95cc1cb7496b741b000544b20fccc728
|
|
| BLAKE2b-256 |
e887293d7ea35888c3de13816f4267f02f2cda7af67c6c953caa6a56eeeae253
|
File details
Details for the file pydantic_ai_king_county-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pydantic_ai_king_county-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6d7ec5506f07bd33f2f71da054ce336f2ea57d9f89505d5fcecf2ed92be5a8a
|
|
| MD5 |
74acbd7b098bdf5e469c2ed89c65fb33
|
|
| BLAKE2b-256 |
0e09b8193b9cb0875ef5fcf0cc770483f392da553a7c8525ae7b681dafddecc0
|