src.data_sources.model_points.ModelPointsBase

class src.data_sources.model_points.ModelPointsBase(path: str, model_point_type: Type[ModelPoint])

Data source collection that holds model points.

Inheritance Diagram

Inheritance diagram of ModelPointsBase

Variables & Properties

items

A list of all the items in this collection, as a set of key-value pairs.

keys

A list of all the keys in this collection.

Methods

__init__(path, model_point_type)

Constructor method.

Details

__init__(path: str, model_point_type: Type[ModelPoint])

Constructor method. Reads data from a JSON file and instantiates model points of a specified type, organized by model point ID.

Parameters:
  • path – Path to a model point file.

  • model_point_type – Class definition of model point data source to instantiate.

cache: DataFrame

Internal cache, populated at runtime.

property items: List[Tuple[K, V]]

A list of all the items in this collection, as a set of key-value pairs.

Returns:

List of key-value pairs.

property keys: List[K]

A list of all the keys in this collection.

Returns:

List of keys.