You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to add a formatter that will automatically create the dictionaries in their correct format based on the property. I think this will help make the code just more readable since without it there are just extremely large dictionaries and a whole bunch of curly braces. I personally use this formatter for my own scripts that I use to automate some things on Notion.
# this is needed because `formatter.multi_select` takes a dictionary
# as the input
multi_select_options = {
"option one": "default",
"option two": "color"
}
# the same dictionary, but using the formatter
create_details = {
"parent": DB_ID,
"properties": {
"some date property": formatter.date("start date", "end date"),
"some multi select property": formatter.multi_select(multi_select_options),
"some select property": formatter.select("option name", "option color")
}
}
The text was updated successfully, but these errors were encountered:
I would like to add a formatter that will automatically create the dictionaries in their correct format based on the property. I think this will help make the code just more readable since without it there are just extremely large dictionaries and a whole bunch of curly braces. I personally use this formatter for my own scripts that I use to automate some things on Notion.
For example:
Before using a formatter:
After using a formatter:
The text was updated successfully, but these errors were encountered: