Python SDK for publicsafetyapi.dev — US police stations, fire stations, hospitals, and EMS locations. Install: pip install publicsafetyapi-sdk · Import: from publicsafetyapi import PublicSafetyAPI
Project description
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
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 publicsafetyapi_sdk-0.1.0.tar.gz.
File metadata
- Download URL: publicsafetyapi_sdk-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96bf82bed310b99c2cfb7b6ccef1f28203033c804b5b2dbf151269a434705206
|
|
| MD5 |
2102096488a97d13b4a3728b0710f0df
|
|
| BLAKE2b-256 |
5aecd0def8b1139c9e1f6c98e3ebdaef593f54237e3d4a9b8725392dfaab0170
|
File details
Details for the file publicsafetyapi_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: publicsafetyapi_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
484bd66c86c86f2a7be1eee17860c56fb018c28ceb8da41d15c7f97eebd67c0f
|
|
| MD5 |
66b71dbca0a3ee73626c6e030d4b3af8
|
|
| BLAKE2b-256 |
d2e13bd49e05abe5598a349dcaf313cc410f7d94bbc753dc40f8474862878270
|