xarray_schema.AttrsSchema

class xarray_schema.AttrsSchema(attrs, require_all_keys=True, allow_extra_keys=True)

Attributes schema

Parameters:
  • attrs (str or iterable of str) – Attributes definition

  • require_all_keys (bool) – Whether require to all coordinates included in attrs

  • allow_extra_keys (bool) – Whether to allow coordinates not included in attrs dict

Raises:

SchemaError

__init__(attrs, require_all_keys=True, allow_extra_keys=True)

Methods

__init__(attrs[, require_all_keys, ...])

from_json(obj)

to_json(**dumps_kws)

Generate a JSON string representation of this schema

validate(attrs)

Validate attrs

Attributes

json