-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathcatalog.py
More file actions
30 lines (23 loc) · 976 Bytes
/
catalog.py
File metadata and controls
30 lines (23 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""Models for the notion service catalog https://www.notion.so/localstack/3c0f615e7ffc4ae2a034f1ed9c444bd2"""
from notion_client import Client as NotionClient
from notion_objects import (
Page,
TitlePlainText,
Status,
Database,
Checkbox,
PeopleProperty,
Text
)
DEFAULT_CATALOG_DATABASE_ID = "3c0f615e7ffc4ae2a034f1ed9c444bd2"
class PersistenceServiceItem(Page):
name = TitlePlainText("Name")
status = Status("Persistence")
has_test = Checkbox("Persistence Tests")
primary_owner = PeopleProperty("Primary Owner")
secondary_owner = PeopleProperty("Secondary Owner(s)")
limitations = Text("Limitations (synced with docs)")
exclude = Checkbox("Exclude from docs")
class PersistenceCatalog(Database[PersistenceServiceItem]):
def __init__(self, notion_client: NotionClient, database_id: str | None = None):
super().__init__(PersistenceServiceItem, database_id or DEFAULT_CATALOG_DATABASE_ID, notion_client)