colour_datasets.loaders.AbstractDatasetLoader#

class colour_datasets.loaders.AbstractDatasetLoader(record: Record)[source]#

Bases: ABC

Define the base class for a dataset loader.

This is an ABCMeta abstract class that must be inherited by sub-classes.

The sub-classes are expected to implement the colour_datasets.loaders.AbstractDatasetLoader.load() method that handles the syncing, parsing, conversion and return of the dataset content as a Python object.

Attributes

Methods

Parameters:

record (Record) – Dataset record.

ID: str = 'Undefined'#

Dataset record id, i.e. the Zenodo record number.

property record: Record#

Getter property for the dataset record.

Returns:

Dataset record.

Return type:

colour_datasets.Record

property id: str#

Getter property for the dataset id.

Returns:

Dataset id.

Return type:

str

property content: Any#

Getter property for the dataset content.

Returns:

Dataset content.

Return type:

object

abstract load() Any[source]#

Sync, parse, convert and return the dataset content as a Python object.

Returns:

Dataset content as a Python object.

Return type:

object

Notes

sync()[source]#

Sync the dataset content, i.e. checks whether it is synced and pulls it if required.