Module buildstock_query.db_schema.db_schema_model

Expand source code
from pydantic import BaseModel


class TableSuffix(BaseModel):
    baseline: str
    timeseries: str
    upgrades: str


class ColumnPrefix(BaseModel):
    characteristics: str
    output: str


class ColumnNames(BaseModel):
    building_id: str
    sample_weight: str
    sqft: str
    timestamp: str
    completed_status: str
    unmet_hours_cooling_hr: str
    unmet_hours_heating_hr: str
    fuel_totals: list[str]


class CompletionValues(BaseModel):
    success: str
    fail: str
    unapplicable: str


class Structure(BaseModel):
    # whether the baseline timeseries is copied for unapplicable buildings in an upgrade
    unapplicables_have_ts: bool


class DBSchema(BaseModel):
    table_suffix: TableSuffix
    column_prefix: ColumnPrefix
    column_names: ColumnNames
    completion_values: CompletionValues
    structure: Structure

Classes

class ColumnNames (**data: Any)

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.

Expand source code
class ColumnNames(BaseModel):
    building_id: str
    sample_weight: str
    sqft: str
    timestamp: str
    completed_status: str
    unmet_hours_cooling_hr: str
    unmet_hours_heating_hr: str
    fuel_totals: list[str]

Ancestors

  • pydantic.main.BaseModel
  • pydantic.utils.Representation

Class variables

var building_id : str
var completed_status : str
var fuel_totals : list[str]
var sample_weight : str
var sqft : str
var timestamp : str
var unmet_hours_cooling_hr : str
var unmet_hours_heating_hr : str
class ColumnPrefix (**data: Any)

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.

Expand source code
class ColumnPrefix(BaseModel):
    characteristics: str
    output: str

Ancestors

  • pydantic.main.BaseModel
  • pydantic.utils.Representation

Class variables

var characteristics : str
var output : str
class CompletionValues (**data: Any)

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.

Expand source code
class CompletionValues(BaseModel):
    success: str
    fail: str
    unapplicable: str

Ancestors

  • pydantic.main.BaseModel
  • pydantic.utils.Representation

Class variables

var fail : str
var success : str
var unapplicable : str
class DBSchema (**data: Any)

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.

Expand source code
class DBSchema(BaseModel):
    table_suffix: TableSuffix
    column_prefix: ColumnPrefix
    column_names: ColumnNames
    completion_values: CompletionValues
    structure: Structure

Ancestors

  • pydantic.main.BaseModel
  • pydantic.utils.Representation

Class variables

var column_namesColumnNames
var column_prefixColumnPrefix
var completion_valuesCompletionValues
var structureStructure
var table_suffixTableSuffix
class Structure (**data: Any)

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.

Expand source code
class Structure(BaseModel):
    # whether the baseline timeseries is copied for unapplicable buildings in an upgrade
    unapplicables_have_ts: bool

Ancestors

  • pydantic.main.BaseModel
  • pydantic.utils.Representation

Class variables

var unapplicables_have_ts : bool
class TableSuffix (**data: Any)

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.

Expand source code
class TableSuffix(BaseModel):
    baseline: str
    timeseries: str
    upgrades: str

Ancestors

  • pydantic.main.BaseModel
  • pydantic.utils.Representation

Class variables

var baseline : str
var timeseries : str
var upgrades : str