nourish.schema.BaseSchemata

class nourish.schema.BaseSchemata(url_or_path, *, tls_verification=True)

Bases: abc.ABC

Abstract class that provides functionality to load and export the contents of a schemata file.

Parameters
  • url_or_path – URL or path to a schemata file.

  • tls_verification – When set to True, verify the remote link is https and whether the TLS certificate is valid. When set to a path to a file, use this file as a CA bundle file. When set to False, allow http links and do not verify any TLS certificates. Ignored if url_or_path is a local path.

Raises
  • ValueError – An error occurred when parsing url_or_path as either a URL or path.

  • InsecureConnectionError – The connection is insecure. See tls_verification for more details.

Methods

export_schema(*keys)

Returns a copy of a loaded schemata.

Attributes

retrieved_url_or_path

The URL or path from which the schemata was retrieved.