fews_py_wrapper.utils#
Functions
|
Format a datetime object to a string suitable for FEWS web services. |
Convert FEWS NetCDF content to xarray datasets. |
|
|
Format a list of datetime arguments to strings suitable for web services. |
|
Get the argument names of a function. |
- fews_py_wrapper.utils.format_datetime(dt, time_format='%Y-%m-%dT%H:%M:%SZ')[source]#
Format a datetime object to a string suitable for FEWS web services.
- Parameters:
dt (datetime)
time_format (str)
- Return type:
str
- fews_py_wrapper.utils.convert_netcdf_zip_response_to_xarray(response_content)[source]#
Convert FEWS NetCDF content to xarray datasets.
ZIP responses are returned as one loaded dataset per NetCDF member, in the same order as the ZIP archive. The original ZIP member filename without the file extension is preserved in each dataset’s
fews_zip_member_filenameattribute. Single-file NetCDF responses are returned as a one-item list.- Parameters:
response_content (bytes)
- Return type:
list[Dataset]