archetypal.template.schedule.YearSchedulePart

class archetypal.template.schedule.YearSchedulePart(FromDay=None, FromMonth=None, ToDay=None, ToMonth=None, Schedule=None, **kwargs)[source]

Helper Class for YearSchedules defined with FromDay FromMonth ToDay ToMonth.

Initialize YearSchedulePart.

Parameters
  • FromDay (int) – This numeric field is the starting day for the schedule time period.

  • FromMonth (int) – This numeric field is the starting month for the schedule time period.

  • ToDay (int) – This numeric field is the ending day for the schedule time period.

  • ToMonth (int) – This numeric field is the ending month for the schedule time period.

  • Schedule (UmiSchedule) – The associated UmiSchedule related to this object.

  • kwargs (dict) – Other Keyword arguments.

property FromDay

Get or set the start day-of-month number [int].

property FromMonth

Get or set the start month-number [int].

property ToDay

Get or set the end day-of-month number [int].

property ToMonth

Get or set the end month-number [int].

property Schedule

Get or set the WeekSchedule object.

classmethod from_dict(data, schedules, **kwargs)[source]

Create a YearSchedulePart object from a dictionary.

Parameters
  • data (dict) – The python dictionary.

  • schedules (dict) – A dictionary of WeekSchedules with their id as keys.

  • **kwargs – keywords passed to parent constructor.

data = {
    'FromDay': 1,
    'FromMonth': 1,
    'ToDay': 31,
    'ToMonth': 12,
    'Schedule': {'$ref': '140622440042800'}
}
to_dict()[source]

Return YearSchedulePart dictionary representation.

mapping()[source]

Get a dict based on the object properties, useful for dict repr.

get_unique()[source]

Return the first of all the created objects that is equivalent to self.