Metadata-Version: 2.4
Name: emergency-plumbing-triage
Version: 0.2.0
Summary: Zero-dependency triage, dispatch and cost-estimation helpers for 24/7 home-service calls
Author: Emergency Triage Contributors
License: MIT
Project-URL: Homepage, https://24hourplumberusa.com/
Project-URL: Documentation, https://24hourplumberusa.com/plumbing-services.html
Project-URL: Plumbing Services, https://24hourplumberusa.com/plumbing-services.html
Project-URL: Emergency Plumbing Guide, https://24hourplumberusa.com/emergency-plumbing.html
Project-URL: Service Coverage, https://24hourplumberusa.com/locations
Keywords: emergency-plumbing,plumbing,triage,dispatch,on-call,home-services
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Scheduling
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# emergency-plumbing-triage

Zero-dependency Python helpers for 24/7 home-service dispatch: issue triage,
first-5-minute checklists, after-hours cost estimates (2026 US benchmarks),
US ZIP/phone validation, and a tiny CLI.

Field-tested against a real-world [emergency plumbing](https://24hourplumberusa.com/emergency-plumbing.html)
dispatch workflow — burst pipes, sewage backup, gas risk, and no-water calls —
so the defaults match how live 24/7 shops actually triage at 2 a.m.

- Live dispatch operation: [24hourplumberusa](https://24hourplumberusa.com/) — 24/7 call flow and first-5-minute checklist
- Service catalog reference: [plumbing services](https://24hourplumberusa.com/plumbing-services.html) — full repair, replacement, and installation list
- Emergency guide: [emergency plumbing](https://24hourplumberusa.com/emergency-plumbing.html) costs, shut-off steps, and what counts as an emergency vs. morning job
- Live coverage map: [service coverage](https://24hourplumberusa.com/locations) — 4,942 cities & towns across 50 states with live ETAs

## Install

```bash
pip install emergency-plumbing-triage
```

## Quick use

```python
from emergency_plumbing_triage import classify_issue, get_checklist, estimate_cost

result = classify_issue("burst pipe with active flow I cannot stop")
print(result["level"])   # EMERGENCY
print(result["reason"])
print(get_checklist())   # first-5-minute steps

print(estimate_cost("overnight", hours=2.0))
# {'window': 'overnight', 'dispatch': (150, 350), 'hourly': (125, 400), 'total_low': 400, 'total_high': 1150}
```

Validate a dispatch request:

```python
from emergency_plumbing_triage import validate_dispatch_request

validate_dispatch_request(zip_code="90210", phone="(888) 217-6399", psi=55)
```

## CLI

```bash
python -m emergency_plumbing_triage --issue "sewage backing into tub" --window overnight --hours 2
python -m emergency_plumbing_triage --issue "slow drip in bucket, valve holds" --checklist
```

## API

- `classify_issue(text) -> {level, reason, checklist}` — `EMERGENCY` (active flow,
  sewage indoors, gas smell, no water), `SAME_DAY`, or `ROUTINE`.
- `get_checklist() -> [str]` — shut main clockwise, kill power risk, drain
  pressure, contain + clear, document + call.
- `estimate_cost(window, hours)` — windows: `business`, `evening`,
  `overnight` (also weekend), `holiday`. 2026 US benchmarks.
- `is_valid_zip(code)`, `normalize_phone(us_phone)`, `is_normal_pressure(psi)`,
  `validate_dispatch_request(...)`.
- `get_service_coverage()`, `get_coverage_examples()` — nationwide footprint
  from the live [service coverage](https://24hourplumberusa.com/locations)
  hub (4,942 cities, 50 states).

## Live coverage examples

Dispatch windows vary by market — the [service coverage](https://24hourplumberusa.com/locations)
hub lists every state page with its largest cities, and each city page
breaks out emergency plumber, drain cleaning, and water heater repair
with local costs and response notes:

- Texas — Houston · San Antonio · Dallas
- California — Los Angeles · San Diego · San Jose
- Florida — Jacksonville · Miami · Tampa
- New York — New York · Buffalo · Yonkers

```python
from emergency_plumbing_triage import get_service_coverage

print(get_service_coverage())
# {'cities': 4942, 'states': 50, 'url': 'https://24hourplumberusa.com/locations', 'examples': [...]}
```

See the field guides that informed the defaults:
[24hourplumberusa](https://24hourplumberusa.com/),
[plumbing services](https://24hourplumberusa.com/plumbing-services.html), and
[emergency plumbing](https://24hourplumberusa.com/emergency-plumbing.html).

## Why this exists

Small dispatch teams and indie hackers keep re-implementing the same
keyword triage + fee-table math. This packages the boring part so a
side-project IVR, SMS bot, orinternal dashboard can triage consistently.

Built from public [plumbing services](https://24hourplumberusa.com/plumbing-services.html)
and [emergency plumbing](https://24hourplumberusa.com/emergency-plumbing.html)
triage notes; no affiliation required to use the code (MIT).
