schema_salad.validate
Attributes
Functions
|
|
|
Produce an avro friendly short name. |
|
Turn a URL into an Avro-safe name. |
|
Format an Avro schema into a pretty-printed representation. |
|
Truncate a pretty-printed representation of a Python object to 160 characters. |
|
Determine if a python datum is an instance of a schema. |
Module Contents
- schema_salad.validate.validate(expected_schema, datum, identifiers=None, strict=False, foreign_properties=None, vocab=None)
- Parameters:
expected_schema (schema_salad.avro.schema.Schema)
datum (Any)
strict (bool)
vocab (Optional[collections.abc.Mapping[str, str]])
- Return type:
- schema_salad.validate.INT_MIN_VALUE = -2147483648
- schema_salad.validate.INT_MAX_VALUE = 2147483647
- schema_salad.validate.LONG_MIN_VALUE = -9223372036854775808
- schema_salad.validate.LONG_MAX_VALUE = 9223372036854775807
- schema_salad.validate.avro_shortname(name)
Produce an avro friendly short name.
- schema_salad.validate.saladp = 'https://w3id.org/cwl/salad#'
- schema_salad.validate.primitives
- schema_salad.validate.avro_type_name(url)
Turn a URL into an Avro-safe name.
If the URL has no fragment, return this plain URL.
Extract either the last part of the URL fragment past the slash, otherwise the whole fragment.
- schema_salad.validate.friendly(v)
Format an Avro schema into a pretty-printed representation.
- Parameters:
v (Any)
- Return type:
Any
- schema_salad.validate.vpformat(datum)
Truncate a pretty-printed representation of a Python object to 160 characters.
- Parameters:
datum (Any)
- Return type:
- schema_salad.validate.validate_ex(expected_schema, datum, identifiers=None, strict=False, foreign_properties=None, raise_ex=True, strict_foreign_properties=False, logger=_logger, skip_foreign_properties=False, vocab=None)
Determine if a python datum is an instance of a schema.
- Parameters:
expected_schema (schema_salad.avro.schema.Schema)
datum (Any)
strict (bool)
raise_ex (bool)
strict_foreign_properties (bool)
logger (logging.Logger)
skip_foreign_properties (bool)
vocab (Optional[collections.abc.Mapping[str, str]])
- Return type: