Mercurial > code > home > repos > gcalendarwatch
annotate localtypes.py @ 83:7f50e5bb30f5
ide
author | drewp@bigasterisk.com |
---|---|
date | Sat, 07 Sep 2024 16:12:15 -0700 |
parents | 7d9609edcf9c |
children | f75b3a109b66 |
rev | line source |
---|---|
28
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
1 import datetime |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
2 from typing import TypedDict |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
3 |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
4 |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
5 class MongoConf(TypedDict): |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
6 host: str |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
7 port: int |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
8 database: str |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
9 collection: str |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
10 |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
11 |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
12 class Conf(TypedDict): |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
13 event_uri_ns: str |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
14 minutes_between_polls: float |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
15 mongo: MongoConf |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
16 |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
17 |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
18 class Record(TypedDict): |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
19 uri: str |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
20 feed: str |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
21 title: str |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
22 start: int |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
23 startTime: datetime.datetime |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
24 startDate: int |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
25 end: int |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
26 endTime: datetime.datetime |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
27 endDate: int |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
28 endTimeUnspecified: bool |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
29 htmlLink: str |
e2209226b001
rewrite with starlette and background_loop
drewp@bigasterisk.com
parents:
diff
changeset
|
30 creatorEmail: str |
42
7d9609edcf9c
track calendar feed summary/description text and emit them in graphs
drewp@bigasterisk.com
parents:
28
diff
changeset
|
31 |
7d9609edcf9c
track calendar feed summary/description text and emit them in graphs
drewp@bigasterisk.com
parents:
28
diff
changeset
|
32 |
7d9609edcf9c
track calendar feed summary/description text and emit them in graphs
drewp@bigasterisk.com
parents:
28
diff
changeset
|
33 def feedFromCalId(conf: Conf, calId: str) -> str: |
7d9609edcf9c
track calendar feed summary/description text and emit them in graphs
drewp@bigasterisk.com
parents:
28
diff
changeset
|
34 return conf['event_uri_ns'] + 'feed/' + calId |