Schedules¶
pyfamilysafety.schedule.AllottedInterval ¶
AllottedInterval(begin, end)
A time window when device use is permitted.
Times use HH:MM:SS strings, or pass :class:datetime.time objects via
:meth:from_time.
Source code in pyfamilysafety/schedule.py
19 20 21 | |
from_time
classmethod
¶
from_time(begin, end)
Build an interval from time objects.
Source code in pyfamilysafety/schedule.py
23 24 25 26 27 28 29 | |
to_dict ¶
to_dict()
Convert to the API request format.
Source code in pyfamilysafety/schedule.py
31 32 33 34 35 36 | |
pyfamilysafety.schedule.DailyRestriction ¶
DailyRestriction(allowance, allotted_intervals=None)
Screen time limits for a single day.
allowance is the total permitted screen time in milliseconds.
allotted_intervals optionally restricts use to specific time windows.
Source code in pyfamilysafety/schedule.py
46 47 48 49 50 51 | |
from_minutes
classmethod
¶
from_minutes(allowance_minutes, allotted_intervals=None)
Build a restriction using an allowance in minutes.
Source code in pyfamilysafety/schedule.py
53 54 55 56 57 58 59 60 61 62 | |
to_dict ¶
to_dict()
Convert to the API request format.
Source code in pyfamilysafety/schedule.py
64 65 66 67 68 69 70 71 | |
pyfamilysafety.schedule.DeviceLimitsSchedule ¶
DeviceLimitsSchedule(platform, daily_restrictions, mode=DeviceLimitsMode.PER_DEVICE_TYPE, culture='en-GB')
Device screen time limits for a platform.
Serialize with :meth:to_dict before sending to the API. Pass an instance
directly to :meth:pyfamilysafety.account.Account.set_device_limits.
Source code in pyfamilysafety/schedule.py
81 82 83 84 85 86 87 88 89 90 | |
to_dict ¶
to_dict()
Convert to the API request format.
Source code in pyfamilysafety/schedule.py
92 93 94 95 96 97 98 99 100 101 102 | |