## lamindb.integrations.notion

Sync Notion pages to LaminDB records.

lamindb.integrations.notion.sync_objects_from_notion(*, notion_uuid, token=None, apply=False, depth=0, workspace=None, space=None)

 Sync a Notion page to LaminDB records.

 Parameters:
 * **notion_uuid** ("str") -- Notion page or database id.

| * **token** ("str" | "None", default: "None") -- Notion API |
 token. Defaults to the "NOTION_TOKEN" environment variable.

 * **apply** ("bool", default: "False") -- Write to LaminDB. By
 default this is a dry run.

 * **depth** ("int", default: "0") -- How many levels of child
 pages and databases to walk. "0" syncs only this page. A
 database id syncs its record type, and "1" on a database also
 syncs its pages. Databases nested inside those pages need
 another level. On a page, a positive depth walks that many
 levels of child pages. A child database is one level for its
 page and schema; its rows are the next level, so "1" on a
 parent page does not sync database content.

| * **workspace** ("str" | "None", default: "None") -- Notion |
 workspace slug used in page URLs, for example "laminlabs" when
 the current database is "laminlabs/lamindata". Defaults to the
 account handle of the current database.

| * **space** ("str" | "None", default: "None") -- LaminDB space |
 name or uid for records created by this sync. Defaults to the
 current space. Passed through to "ln.track" by "@ln.flow",
 which publishes it on the global run context.

 Return type:
 "SyncReport"

class lamindb.integrations.notion.SyncReport(apply=False, message=None, discovered_pages=0, discovered=0, created=0, updated=0, unchanged=0, pending_relations=0, failed=0, errors=<factory>, databases=<factory>, created_record_types=<factory>, create_record_types=<factory>, updated_record_types=<factory>, update_record_types=<factory>, created_feature_types=<factory>, create_feature_types=<factory>, created_ulabel_types=<factory>, create_ulabel_types=<factory>, created_ulabels=<factory>, create_ulabels=<factory>, created_schemas=<factory>, create_schemas=<factory>, updated_schemas=<factory>, update_schemas=<factory>, created_features=<factory>, create_features=<factory>, updated_features=<factory>, update_features=<factory>, created_artifacts=<factory>, create_artifacts=<factory>, created_relation_stubs=<factory>, create_relation_stubs=<factory>, relation_value_links=<factory>, mapped_project_record_relations=<factory>, created_projects=0, updated_projects=0, unchanged_projects=0, unmapped_properties=<factory>)

 apply: "bool" = False

| message: "str" | "None" = None |

 discovered_pages: "int" = 0

 discovered: "int" = 0

 created: "int" = 0

 updated: "int" = 0

 unchanged: "int" = 0

 pending_relations: "int" = 0

 failed: "int" = 0

 created_projects: "int" = 0

 updated_projects: "int" = 0

 unchanged_projects: "int" = 0

 to_pretty_text()

 Render a concise human-readable sync report.

 Return type:
 "str"