publicsafetyapi-sdk
Python SDK for publicsafetyapi.dev — the developer API for US public safety facility data.
Every police station, fire station, hospital, and EMS location in the United States — sourced from HIFLD (DHS/CISA) and CMS federal datasets — in a single clean REST API.
Installation
pip install publicsafetyapi-sdk
Quick Start
from publicsafetyapi import PublicSafetyAPI
client = PublicSafetyAPI(api_key="psk_live_...")
# Find the 5 nearest fire stations to any US address
stations = client.stations.nearby(
address="12865 Main St, Apple Valley, CA",
type="fire",
radius_miles=10
)
for s in stations:
print(f"{s.name} — {s.distance_miles:.1f} mi")
# Which police department has jurisdiction over an address?
result = client.jurisdiction(
address="12865 Main St, Apple Valley, CA",
type="police"
)
print(result.likely_agencies[0].name) # "Apple Valley Police Department"
# Look up any facility by ID
hospital = client.stations.get("hospital-hifld-112233")
print(hospital.trauma_level) # "Level II"
print(hospital.beds) # 212
print(hospital.cms_ccn) # "050317"
What's Covered
| Entity Type | Source | Records |
|---|---|---|
| Police stations | HIFLD (DHS/CISA) | 68,000+ |
| Fire stations | HIFLD (DHS/CISA) | 55,000+ |
| EMS stations | HIFLD (DHS/CISA) | 10,000+ |
| Hospitals | HIFLD + CMS | 7,500+ |
API Key
Get a free API key (500 calls/month) at publicsafetyapi.dev.
Full SDK
The full SDK implementation ships with v0.2.0 alongside the API launch.
Sign up at publicsafetyapi.dev for early access.
Related
- districtapi-sdk — US school districts
- libraryapi-sdk — US public libraries
License
MIT
Metadata
Release files for publicsafetyapi-sdk 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| publicsafetyapi_sdk-0.3.0.tar.gz | 7.7 kB | Without provenance | Details for publicsafetyapi_sdk-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| publicsafetyapi_sdk-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for publicsafetyapi_sdk-0.3.0-py3-none-any.whl |
Total release size: 18.3 kB
Release files / publicsafetyapi_sdk-0.3.0.tar.gz
| Download URL | publicsafetyapi_sdk-0.3.0.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68f1474941d7bcd4fd22aeca11772519498cff98c0bebb9a4ebf089cf047c5d6
|
|
BLAKE2b-256 checksum How to use checksums |
baae7ea1a7a3a384db046220c82eaef08053dac3395efd55fdc15bc5c08c5ec5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / publicsafetyapi_sdk-0.3.0-py3-none-any.whl
| Download URL | publicsafetyapi_sdk-0.3.0-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43e475ee0526cdcafa63d474e8b129e437cd32c5dbacd393c951efba32e6ecde
|
|
BLAKE2b-256 checksum How to use checksums |
e84b62724ba1e8e03903701f468dcef2db41288bb8675473121b74f084779554
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for publicsafetyapi-sdk 0.3.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.