https://github.com/techwithty/flood_score
Flood score integration for parcel-level flood risk assessment.
https://github.com/techwithty/flood_score
api climate flood-risk insurance python real-estate
Last synced: 6 months ago
JSON representation
Flood score integration for parcel-level flood risk assessment.
- Host: GitHub
- URL: https://github.com/techwithty/flood_score
- Owner: TechWithTy
- Created: 2025-08-31T11:55:12.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-08-31T12:48:03.000Z (7 months ago)
- Last Synced: 2025-08-31T13:26:45.253Z (7 months ago)
- Topics: api, climate, flood-risk, insurance, python, real-estate
- Language: Python
- Homepage: https://www.cybershoptech.com
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flood Score (Provider-agnostic)
SDK and FastAPI proxy for a Flood Score provider, aligned with other integrations.
## Environment Variables
- FLOOD_SCORE_BASE_URL (required)
- FLOOD_SCORE_API_KEY (optional, if provider requires)
- FLOOD_SCORE_TIMEOUT (default: 15)
Example .env:
FLOOD_SCORE_BASE_URL=https://www.fema.gov/flood-maps/products-tools/hazus
FLOOD_SCORE_API_KEY=your_api_key_if_required
FLOOD_SCORE_TIMEOUT=15
## Endpoints
- GET /flood-score/health
- Returns: { healthy, base_url, has_api_key }
- GET /flood-score/{path}
- Proxies a GET to {FLOOD_SCORE_BASE_URL}/{path}
- Query string is forwarded as-is
Examples:
curl "http://localhost:8000/flood-score/health"
# Example: score-by-address (if provider supports)
# Sends GET to {FLOOD_SCORE_BASE_URL}/score and forwards params
curl "http://localhost:8000/flood-score/score?address=123+Main+St&city=Austin&state=TX&postalCode=78701"
## Internal Structure
- client.py: FloodScoreClient resolving env/config; headers, GET, health.
- api/proxy.py: Routes (`/flood-score/health`, passthrough `/{path:path}`).
- api/routes.py: Aggregates flood_score sub-routers.
- api/_base.py: FloodAPIBase with shared requests session.
- api/_requests.py: ListParams, ScoreByAddressParams.
- api/_enums.py, api/_responses.py, api/_exceptions.py: helpers.