Mercurial > code > home > repos > gcalendarwatch
view localtypes.py @ 66:629d9ad289fe
doc & refactor
author | drewp@bigasterisk.com |
---|---|
date | Fri, 06 Sep 2024 17:26:11 -0700 |
parents | 7d9609edcf9c |
children | f75b3a109b66 |
line wrap: on
line source
import datetime from typing import TypedDict class MongoConf(TypedDict): host: str port: int database: str collection: str class Conf(TypedDict): event_uri_ns: str minutes_between_polls: float mongo: MongoConf class Record(TypedDict): uri: str feed: str title: str start: int startTime: datetime.datetime startDate: int end: int endTime: datetime.datetime endDate: int endTimeUnspecified: bool htmlLink: str creatorEmail: str def feedFromCalId(conf: Conf, calId: str) -> str: return conf['event_uri_ns'] + 'feed/' + calId