How to use the siphon.http_util.parse_iso_date function in siphon

To help you get started, we’ve selected a few siphon examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Unidata / siphon / siphon / ncss.py View on Github external
                         converters={'date': lambda s: parse_iso_date(s.decode('utf-8'))})
    d = {}
github Unidata / siphon / siphon / ncss.py View on Github external
def parse_xml_point(elem):
    """Parse an XML point tag."""
    point = {}
    units = {}
    for data in elem.findall('data'):
        name = data.get('name')
        unit = data.get('units')
        point[name] = float(data.text) if name != 'date' else parse_iso_date(data.text)
        if unit:
            units[name] = unit
    return point, units