Python SDK & CLI
The windborne package provides both a Python library and a CLI for interacting with the Data and Forecast APIs.
Installation
pip3 install windbornepip3 install windborne
Set Credentials
The SDK reads WB_CLIENT_ID and WB_API_KEY from environment variables.
macOS & Linux
# Add to your shell config (~/.bashrc, ~/.zshrc, etc.)# Add to your shell config (~/.bashrc, ~/.zshrc, etc.)
export WB_CLIENT_ID='your_client_id'export WB_CLIENT_ID='your_client_id'
export WB_API_KEY='your_api_key'export WB_API_KEY='your_api_key'
# Reload your shell or run:# Reload your shell or run:
source ~/.zshrcsource ~/.zshrc
Windows
- Press Win + X and select "System"
- Click "Advanced system settings" on the right
- Click "Environment Variables" at the bottom
- Under "User variables", click "New" and add:
| Variable Name | Variable Value |
|---|---|
| WB_CLIENT_ID | your_client_id |
| WB_API_KEY | your_api_key |
CLI Usage
After installation, the windborne command is available globally.
# Fetch observations# Fetch observations
windborne observations 2025-01-01T00:00:00Z csvwindborne observations 2025-01-01T00:00:00Z csv
# Get a point forecast# Get a point forecast
windborne interpolated_point_forecast 37.7749,-122.4194 -m wm-5c -t 2025-01-01T12:00:00Zwindborne interpolated_point_forecast 37.7749,-122.4194 -m wm-5c -t 2025-01-01T12:00:00Z
# List flying missions# List flying missions
windborne flying_missions output.jsonwindborne flying_missions output.json
Python Library
from windborne import get_observations, get_interpolated_point_forecastfrom windborne import get_observations, get_interpolated_point_forecast
# Fetch observations# Fetch observations
observations = get_observations(observations = get_observations(
start_time="2025-01-01T00:00:00Z", start_time="2025-01-01T00:00:00Z",
end_time="2025-01-01T06:00:00Z", end_time="2025-01-01T06:00:00Z",
output_file="observations.csv" output_file="observations.csv"
))
# Get a point forecast# Get a point forecast
forecast = get_interpolated_point_forecast(forecast = get_interpolated_point_forecast(
coordinates=(37.7749, -122.4194), coordinates=(37.7749, -122.4194),
model="wm-5c", model="wm-5c",
time="2025-01-01T12:00:00Z", time="2025-01-01T12:00:00Z",
print_response=True print_response=True
))
Each API endpoint page includes SDK and CLI examples specific to that endpoint. See Basic Auth for direct HTTP authentication without the SDK.