SchoolHolidayRecord#

class openstef_models.transforms.time_domain.school_holiday_features_adder.SchoolHolidayRecord(*, startDate: date, endDate: date, name: list[LocalizedText] = <factory>, nationwide: bool = False, subdivisions: list[Subdivision] = <factory>)[source]

Bases: BaseConfig

A school holiday as returned by the OpenHolidays /SchoolHolidays endpoint.

Only the fields the transform needs are kept. Other response fields are ignored.

Parameters:
  • startDate (date)

  • endDate (date)

  • name (list[LocalizedText])

  • nationwide (bool)

  • subdivisions (list[Subdivision])

model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'arbitrary_types_allowed': False, 'extra': 'ignore', 'populate_by_name': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

start_date: date
end_date: date
name: list[LocalizedText]
nationwide: bool
subdivisions: list[Subdivision]
to_period() → SchoolHolidayPeriod[source]

Convert to a period, using the English name when available.

Return type:

SchoolHolidayPeriod