Skip to content

vbl_base_model

VBLBaseModel

Bases: BaseModel

Base model for all VBL models.

Configured to use PascalCase for field names.

Source code in src/vbl_aquarium/utils/vbl_base_model.py
class VBLBaseModel(BaseModel):
    """Base model for all VBL models.

    Configured to use PascalCase for field names.
    """

    # noinspection PyDataclass
    model_config = ConfigDict(alias_generator=to_pascal, populate_by_name=True)  # pyright: ignore [reportUnannotatedClassAttribute]

    def to_json_string(self) -> str:
        return self.model_dump_json(by_alias=True)