Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

is it better to create new DAVClients or reuse one DAVClient for long-term repeated syncing tasks?

Chiusa
#612 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
30/100
Tipo di issue
Documentazione
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
documentation

Direzione di ricerca

Start by reading the DAVClient usage guidance and the two lifecycle examples in the issue. Determine whether clients are intended to be reused or recreated for repeated syncs, then provide clear guidance or an example; done means the long-term usage question is answered.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
412
Fork
113
Merge medio
10h 29m
PR unite (30g)
57

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python-caldav/caldav

Tutte le issue di python-caldav/caldav

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.