xarray_schema.DatasetSchema

class xarray_schema.DatasetSchema(data_vars=None, coords=None, attrs=None, checks=None)

A light-weight xarray.Dataset validator

Parameters:
  • data_vars (mapping of variable names and DataArraySchemas, optional) – Per-variable DataArraySchema’s, by default None

  • checks (Iterable[Callable], optional) – Dataset wide checks, by default None

__init__(data_vars=None, coords=None, attrs=None, checks=None)

Methods

__init__([data_vars, coords, attrs, checks])

from_json(obj)

to_json(**dumps_kws)

Generate a JSON string representation of this schema

validate(ds)

Check if the Dataset complies with the Schema.

Attributes

attrs

coords

data_vars

json