How to use the ulmo.cuahsi.wof.get_values function in ulmo

To help you get started, we’ve selected a few ulmo 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 WikiWatershed / model-my-watershed / src / mmw / apps / bigcz / clients / cuahsi / details.py View on Github external
if not to_date:
        # Set to default value of today
        to_date = date.today().strftime(DATE_FORMAT)

    if not from_date:
        # Set to default value of one week ago
        from_date = (date.today() -
                     timedelta(days=7)).strftime(DATE_FORMAT)

    if not wsdl.upper().endswith('?WSDL'):
        wsdl += '?WSDL'

    from ulmo.cuahsi import wof
    try:
        return wof.get_values(wsdl, site, variable, from_date, to_date, None,
                              timeout=settings.BIGCZ_CLIENT_TIMEOUT)
    except timeout:
        raise ValuesTimedOutError()