CLI Usage
The LCRA CLI provides a simple command-line interface for extracting flood status data.
Basic Commands
Get Flood Operations Report
Extract the complete flood operations report:
Get Lake Levels
Extract current lake levels:
Get River Conditions
Extract current river conditions:
Get Floodgate Operations
Extract floodgate operations data:
Saving Output
Auto-named File (Timestamped)
Save output to a file with an auto-generated timestamp:
This creates a file like reports/report_2025-01-15T10-30-45.json.
Custom Filename
Save with a custom filename:
This creates reports/my_report.json.
Starting the API Server
Start the FastAPI server:
Options:
--host: Host to bind to (default:0.0.0.0)--port: Port to bind to (default:8080)
Once started, visit:
- API docs:
http://localhost:8080/docs - ReDoc:
http://localhost:8080/redoc
Command Reference
lcra get
Extract LCRA flood status data.
Options:
--report: Extract the full flood operations report--lake-levels: Extract current lake levels--river-conditions: Extract current river conditions--floodgate-operations: Extract floodgate operations--save: Save result as JSON with auto-generated timestamp filename--saveas <filename>: Store result as JSON inreports/<filename>.json
Examples:
# Print report to stdout
lcra get --report
# Save report with timestamp
lcra get --report --save
# Save with custom name
lcra get --lake-levels --saveas lake_data
# Multiple data types (uses first match)
lcra get --report --lake-levels
lcra serve
Serve the LCRA Flood Status API.
Options:
--host <host>: Host to serve on (default:0.0.0.0)--port <port>: Port to serve on (default:8080)
Examples: