Alert Endpoint Reference
Alerts
Every Alert object contains at least 3 methods:
to_dfto_dictto_pint
If the method is not implemented (that is, nothing happens when you call it), it will be explicitly marked as “Not implmented for this endpoint”.
Most of the Alert objects contain IndividualAlert objects, which
is documented below this section.
- class nwsapy.endpoints.alerts.Alerts
- to_df()
Returns the values of the alerts in a pandas dataframe structure.
- Returns
Dataframe of the values of the alerts.
- Return type
pandas.DataFrame
- to_dict()
Returns the alerts in a dictionary format, where the keys are numbers which map to an individual alert.
- Returns
Dictionary containing the values of the active alerts.
- Return type
dict
- to_pint()
Not implemented for this endpoint.
- class nwsapy.endpoints.alerts.ActiveAlerts
- to_df()
Returns the values of the alerts in a pandas dataframe structure.
- Returns
Dataframe of the values of the alerts.
- Return type
pandas.DataFrame
- to_dict()
Returns the alerts in a dictionary format, where the keys are numbers which map to an individual alert.
- Returns
Dictionary containing the values of the active alerts.
- Return type
dict
- to_pint()
Not implemented for this endpoint.
- class nwsapy.endpoints.alerts.AlertById
- to_df()
Returns the values of the alerts in a pandas dataframe structure.
- Returns
Dataframe of the values of the alerts.
- Return type
pandas.DataFrame
- to_dict()
Returns the alerts in a dictionary format, where the keys are numbers which map to an individual alert.
- Returns
Dictionary containing the values of the active alerts.
- Return type
dict
- to_pint()
Not implemented for this endpoint.
- class nwsapy.endpoints.alerts.AlertByArea
- to_df()
Returns the values of the alerts in a pandas dataframe structure.
- Returns
Dataframe of the values of the alerts.
- Return type
pandas.DataFrame
- to_dict()
Returns the alerts in a dictionary format, where the keys are numbers which map to an individual alert.
- Returns
Dictionary containing the values of the active alerts.
- Return type
dict
- to_pint()
Not implemented for this endpoint.
- class nwsapy.endpoints.alerts.AlertByZone
- to_df()
Returns the values of the alerts in a pandas dataframe structure.
- Returns
Dataframe of the values of the alerts.
- Return type
pandas.DataFrame
- to_dict()
Returns the alerts in a dictionary format, where the keys are numbers which map to an individual alert.
- Returns
Dictionary containing the values of the active alerts.
- Return type
dict
- to_pint()
Not implemented for this endpoint.
- class nwsapy.endpoints.alerts.AlertByMarineRegion
- to_df()
Returns the values of the alerts in a pandas dataframe structure.
- Returns
Dataframe of the values of the alerts.
- Return type
pandas.DataFrame
- to_dict()
Returns the alerts in a dictionary format, where the keys are numbers which map to an individual alert.
- Returns
Dictionary containing the values of the active alerts.
- Return type
dict
- to_pint()
Not implemented for this endpoint.
Individual Alerts
Individual Alert objects are the backbone to most Alert objects. Each
indivieual Alert object contains attributes.
- class nwsapy.endpoints.alerts.IndividualAlert(alert_list)
- effective_after(other)
Method to compare effective times. All times are compared in UTC.
- Parameters
other (alerts.IndividualAlert) – Another individual alert object.
- Returns
True if the alert was effective after
other.- Return type
bool
- effective_before(other)
Method to compare effective times. All times are compared in UTC.
- Parameters
other (alerts.IndividualAlert) – Another individual alert object.
- Returns
True if the alert was effective before
other.- Return type
bool
- ends_after(other)
Method to compare end times. All times are compared in UTC.
- Parameters
other (alerts.IndividualAlert) – Another individual alert object.
- Returns
True if the alert ends after
other.- Return type
bool
- ends_before(other)
Method to compare end times. All times are compared in UTC.
- Parameters
other (alerts.IndividualAlert) – Another individual alert object.
- Returns
True if the alert ends before
other.- Return type
bool
- expires_after(other)
Method to compare expire times. All times are compared in UTC.
- Parameters
other (alerts.IndividualAlert) – Another individual alert object.
- Returns
True if the alert expires before
other.- Return type
bool
- expires_before(other)
Method to compare expire times. All times are compared in UTC.
- Parameters
other (alerts.IndividualAlert) – Another individual alert object.
- Returns
True if the alert expires before
other.- Return type
bool
- onset_after(other)
Method to compare onset times. All times are compared in UTC.
- Parameters
other (alerts.IndividualAlert) – Another individual alert object.
- Returns
True if the alert was onset after
other.- Return type
bool
- onset_before(other)
Method to compare onset times. All times are compared in UTC.
- Parameters
other (alerts.IndividualAlert) – Another individual alert object.
- Returns
True if the alert was onset before
other.- Return type
bool
- sent_after(other)
Method to compare sent times. All times are compared in UTC.
- Parameters
other (alerts.IndividualAlert) – Another individual alert object.
- Returns
True if the alert was after before
other.- Return type
bool
- sent_before(other)
Method to compare sent times. All times are compared in UTC.
- Parameters
other (alerts.IndividualAlert) – Another individual alert object.
- Returns
True if the alert was sent before
other.- Return type
bool
- to_dict()
Converts all of the attributes to a dictionary.
- Returns
A dictionary containing all of the attributes of the object.
- Return type
dict