File: v1_1.py

package info (click to toggle)
python-ulmo 0.8.8%2Bdfsg1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,064 kB
  • sloc: python: 6,135; makefile: 144; sh: 5
file content (26 lines) | stat: -rw-r--r-- 1,019 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from ulmo.waterml import common

WATERML_V1_1_NAMESPACE = "{http://www.cuahsi.org/waterML/1.1/}"


def parse_site_infos(content_io):
    """parses site_infos out of a waterml file; content_io should be a file-like object"""
    return common.parse_site_infos(
        content_io, WATERML_V1_1_NAMESPACE, site_info_names=['siteInfo', 'sourceInfo'])


def parse_site_values(content_io, query_isodate=None, methods=None):
    """parses values out of a waterml file; content_io should be a file-like object"""
    return common.parse_site_values(
        content_io, WATERML_V1_1_NAMESPACE, query_isodate=query_isodate,
        methods=methods)


def parse_sites(content_io):
    """parses sites out of a waterml file; content_io should be a file-like object"""
    return common.parse_sites(content_io, WATERML_V1_1_NAMESPACE)


def parse_variables(content_io):
    """parses variables out of a waterml file; content_io should be a file-like object"""
    return common.parse_variables(content_io, WATERML_V1_1_NAMESPACE)