hi,
thanks for this package. i am working on a calendar syncing app using the DAVClient. as i did not find an example on that topic, how is it supposed to be used for long-term usage with repeated syncing tasks? either closing and creating a new DAVClient for every syncing run or should it be only one DAVClient being used all the time?
e.g. pseudo code
cal_primary = "..."
while True:
client = caldav.DAVClient(cal_primary, username="...", password="...")
principal = client.principal()
calendars = self.principal.calendars()
# do something with the calendars
client.close()
time.sleep(60)
or
cal_primary = "..."
client = caldav.DAVClient(cal_primary, username="...", password="...")
principal = client.principal()
while True:
calendars = self.principal.calendars()
# do something with the calendars
time.sleep(60)
in my use case i use the APScheduler package [1]
[1] https://github.com/agronholm/apscheduler