eogrow.core.base

Base object from which all configurable eo-grow objects inherit.

class eogrow.core.base.EOGrowObject(config)[source]

Bases: object

A base object in eo-grow framework

Parameters:

config (Schema) –

pydantic model Schema[source]

Bases: BaseModel

A pydantic parsing/validation schema describing the shape of input parameters.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

config: Schema
classmethod from_raw_config(config, *args, **kwargs)[source]

Creates an object from a dictionary by constructing a validated config and use it to create the object.

Parameters:
  • config (RawConfig) –

  • args (Any) –

  • kwargs (Any) –

Return type:

Self

classmethod from_path(path, *args, **kwargs)[source]

Creates an object by loading and validating a config from a JSON file.

Parameters:
  • path (str) –

  • args (Any) –

  • kwargs (Any) –

Return type:

Self