DeepMap AI Python SDK
Python SDK for the DeepMap AI API -- multi-physics geospatial intelligence for insurance underwriting, climate risk, natural hazard disclosure, and infrastructure monitoring.
Installation
pip install deepmap-ai
Quick Start
from deepmap_ai import DeepMapClient
client = DeepMapClient(api_key="your-api-key")
# GeoRisk composite score (insurance underwriting)
risk = client.georisk(lat=40.76, lon=-111.89)
print(risk["composite_score"], risk["risk_level"])
# Search for a company (SEC/EDGAR)
results = client.entity.search("Apple Inc")
# Get company financials
financials = client.entity.financials("0000320193")
Product Endpoints
GeoRisk Score (Flagship)
8-component composite risk score for any lat/lon -- earthquake, volcano, tsunami, seismic site, sinkhole, weather, flood, and landslide.
# Basic score
risk = client.georisk(lat=34.05, lon=-118.24)
# Filter to specific components
risk = client.georisk(lat=34.05, lon=-118.24, components=["earthquake", "wildfire"])
Entity (SEC/EDGAR)
client.entity.search("Tesla")
client.entity.profile("0001318605")
client.entity.filings("0001318605", form_type="10-Q")
client.entity.financials("0001318605")
client.entity.risk("0001318605")
client.entity.demo() # No API key required
client.entity.health()
Economic (FRED)
client.economic.series("GDP", limit=50)
client.economic.series("UNRATE", start="2020-01-01", end="2024-01-01")
client.economic.snapshot()
client.economic.forecast("GDP", horizon=12)
client.economic.list_series()
client.economic.health()
Weather (NWS/NOAA)
client.weather.current("KJFK")
client.weather.forecast(lat=40.7128, lon=-74.0060)
client.weather.alerts("TX")
client.weather.historical("KJFK")
client.weather.analysis(station_id="KJFK")
client.weather.analysis(lat=40.7128, lon=-74.0060)
client.weather.stations()
client.weather.health()
Environmental (EPA)
client.environmental.search_facilities("chemical plant Texas")
client.environmental.facility("110000000001")
client.environmental.compliance("110000000001")
client.environmental.releases("110000000001")
client.environmental.risk("110000000001")
client.environmental.health()
Cross-Connector Query
result = client.query(
"What is Apple's revenue compared to GDP growth?",
connectors=["entity", "economic"]
)
Utility Methods
client.connectors() # List available connectors
client.pricing() # View pricing table
client.health() # Overall API health
Async Usage
Every method has an async counterpart prefixed with a:
import asyncio
from deepmap_ai import DeepMapClient
async def main():
async with DeepMapClient(api_key="your-api-key") as client:
risk = await client.ageorisk(lat=40.76, lon=-111.89)
results = await client.entity.asearch("Microsoft")
snapshot = await client.economic.asnapshot()
weather = await client.weather.acurrent("KJFK")
print(risk, results)
asyncio.run(main())
Error Handling
from deepmap_ai import (
DeepMapClient,
DeepMapAPIError,
AuthenticationError,
RateLimitError,
QuotaExceededError,
NotFoundError,
)
client = DeepMapClient(api_key="your-api-key")
try:
result = client.georisk(lat=40.76, lon=-111.89)
except AuthenticationError:
print("Invalid or missing API key")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after} seconds")
except QuotaExceededError:
print("Monthly quota exhausted -- upgrade your plan")
except NotFoundError:
print("Resource not found")
except DeepMapAPIError as e:
print(f"API error {e.status_code}: {e.message}")
Backward Compatibility
If you are migrating from publicdata-oracle, the old import names still work:
# Old style (still supported)
from publicdata_oracle import OracleClient
client = OracleClient(api_key="your-key")
# New style (recommended)
from deepmap_ai import DeepMapClient
client = DeepMapClient(api_key="your-key")
OracleClient is an alias for DeepMapClient -- they are the same class.
Configuration
client = DeepMapClient(
api_key="your-api-key",
base_url="https://custom-endpoint.example.com", # Custom API endpoint
timeout=60.0, # Request timeout in seconds
)
License
MIT
Metadata
Release files for deepmap-ai 0.2.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 |
|---|---|---|---|---|
| deepmap_ai-0.2.0.tar.gz | 15.2 kB | Without provenance | Details for deepmap_ai-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deepmap_ai-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for deepmap_ai-0.2.0-py3-none-any.whl |
Total release size: 28.0 kB
Release files / deepmap_ai-0.2.0.tar.gz
| Download URL | deepmap_ai-0.2.0.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8746c0c79c9d466003ceee7aef05ae8302a4ff99c1a489df0b383b21f675c02f
|
|
BLAKE2b-256 checksum How to use checksums |
2f0b5baaeebfbe34160d1fba1ddd95b8640bc1ab1a64a5a288274977a63e7f72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / deepmap_ai-0.2.0-py3-none-any.whl
| Download URL | deepmap_ai-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19d5cc834a09677289444d9a5c5388817290ba75af5efa712299837a29f319fb
|
|
BLAKE2b-256 checksum How to use checksums |
f88c4363c39bcf7934aef58eebc60a60aa813407406515d4847b422638addc66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for deepmap-ai 0.2.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.