Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
A class to read information out of an NWS Public Alert in CAP form
Instances are usually created by NWS_CAP.CAP_Feed.

src/n/w/nws_cap-0.0.1/nws_cap/CAP_Feed.py   nws_cap(Download)
import itertools
from lxml import objectify
from CAP_Alert import CAP_Alert
 
class CAP_Feed:
        for entry in xml_doc.entry:
            if entry['title'] != 'There are no active watches, warnings or advisories':
                alerts.append(CAP_Alert(entry, xml_doc.nsmap))
 
        return cls(alerts)