pyiem.nws.products.dsm module#

Parser of the Daily Summary Message (DSM).

pyiem.nws.products.dsm.process(text)[source]#

Emit DSMProduct object for what we can parse.

pyiem.nws.products.dsm.compute_time(date, timestamp)[source]#

Make a valid timestamp.

class pyiem.nws.products.dsm.DSMProduct(groupdict)[source]#

Bases: object

Represents a single DSM.

tzlocalize(tzinfo)[source]#

Localize the timestamps, tricky.

compute_times(utcnow)[source]#

Figure out when this DSM is valid for.

sql(txn, product_id=None)[source]#

Persist to database given the transaction object.

Parameters:

product_id (str)

class pyiem.nws.products.dsm.DSMCollective(text, utcnow=None, ugc_provider=None, nwsli_provider=None)[source]#

Bases: WMOProduct

A collective representing a NOAAPort Text Product with many DSMs.

tzlocalize(tzprovider)[source]#

Localize our currently stored timestamps.

sql(txn)[source]#

Do databasing.

Return type:

list[bool]

pyiem.nws.products.dsm.parser(text, utcnow=None, ugc_provider=None, nwsli_provider=None)[source]#

Provide back DSM objects based on the parsing of this text