notionary 0.2.27__tar.gz → 0.2.28__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- notionary-0.2.28/.gitignore +94 -0
- {notionary-0.2.27 → notionary-0.2.28}/LICENSE +9 -9
- {notionary-0.2.27 → notionary-0.2.28}/PKG-INFO +54 -49
- {notionary-0.2.27 → notionary-0.2.28}/README.md +44 -30
- notionary-0.2.28/notionary/__init__.py +7 -0
- notionary-0.2.28/notionary/blocks/client.py +128 -0
- notionary-0.2.28/notionary/blocks/enums.py +167 -0
- notionary-0.2.28/notionary/blocks/rich_text/markdown_rich_text_converter.py +266 -0
- notionary-0.2.28/notionary/blocks/rich_text/models.py +164 -0
- notionary-0.2.28/notionary/blocks/rich_text/name_id_resolver/__init__.py +11 -0
- notionary-0.2.28/notionary/blocks/rich_text/name_id_resolver/database.py +31 -0
- notionary-0.2.28/notionary/blocks/rich_text/name_id_resolver/page.py +34 -0
- notionary-0.2.28/notionary/blocks/rich_text/name_id_resolver/person.py +37 -0
- notionary-0.2.28/notionary/blocks/rich_text/name_id_resolver/port.py +11 -0
- notionary-0.2.28/notionary/blocks/rich_text/rich_text_markdown_converter.py +132 -0
- notionary-0.2.28/notionary/blocks/rich_text/rich_text_patterns.py +39 -0
- notionary-0.2.28/notionary/blocks/schemas.py +746 -0
- notionary-0.2.28/notionary/comments/client.py +76 -0
- notionary-0.2.28/notionary/comments/factory.py +40 -0
- notionary-0.2.28/notionary/comments/models.py +7 -0
- notionary-0.2.28/notionary/comments/schemas.py +240 -0
- notionary-0.2.28/notionary/comments/service.py +34 -0
- notionary-0.2.28/notionary/data_source/http/client.py +11 -0
- notionary-0.2.28/notionary/data_source/http/data_source_instance_client.py +94 -0
- notionary-0.2.28/notionary/data_source/properties/models.py +406 -0
- notionary-0.2.28/notionary/data_source/query/builder.py +429 -0
- notionary-0.2.28/notionary/data_source/query/resolver.py +114 -0
- notionary-0.2.28/notionary/data_source/query/schema.py +304 -0
- notionary-0.2.28/notionary/data_source/query/validator.py +73 -0
- notionary-0.2.28/notionary/data_source/schemas.py +27 -0
- notionary-0.2.28/notionary/data_source/service.py +353 -0
- notionary-0.2.28/notionary/database/client.py +43 -0
- notionary-0.2.28/notionary/database/database_metadata_update_client.py +19 -0
- notionary-0.2.28/notionary/database/schemas.py +29 -0
- notionary-0.2.28/notionary/database/service.py +169 -0
- notionary-0.2.28/notionary/exceptions/__init__.py +33 -0
- notionary-0.2.28/notionary/exceptions/api.py +41 -0
- notionary-0.2.28/notionary/exceptions/base.py +2 -0
- notionary-0.2.28/notionary/exceptions/block_parsing.py +16 -0
- notionary-0.2.28/notionary/exceptions/data_source/__init__.py +6 -0
- notionary-0.2.28/notionary/exceptions/data_source/builder.py +182 -0
- notionary-0.2.28/notionary/exceptions/data_source/properties.py +34 -0
- notionary-0.2.28/notionary/exceptions/properties.py +58 -0
- notionary-0.2.28/notionary/exceptions/search.py +33 -0
- {notionary-0.2.27 → notionary-0.2.28}/notionary/file_upload/client.py +18 -30
- {notionary-0.2.27 → notionary-0.2.28}/notionary/file_upload/models.py +7 -8
- notionary-0.2.27/notionary/file_upload/notion_file_upload.py → notionary-0.2.28/notionary/file_upload/service.py +29 -64
- notionary-0.2.28/notionary/http/client.py +205 -0
- notionary-0.2.28/notionary/http/models.py +49 -0
- notionary-0.2.28/notionary/page/blocks/client.py +1 -0
- notionary-0.2.28/notionary/page/content/factory.py +68 -0
- notionary-0.2.28/notionary/page/content/markdown/__init__.py +5 -0
- notionary-0.2.28/notionary/page/content/markdown/builder.py +304 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/__init__.py +54 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/audio.py +23 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/base.py +12 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/bookmark.py +25 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/breadcrumb.py +14 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/bulleted_list.py +18 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/callout.py +32 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/code.py +30 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/columns.py +51 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/divider.py +14 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/embed.py +23 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/equation.py +19 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/file.py +23 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/heading.py +16 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/image.py +23 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/mixins/caption.py +12 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/numbered_list.py +15 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/paragraph.py +14 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/pdf.py +23 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/quote.py +15 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/space.py +14 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/table.py +45 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/table_of_contents.py +14 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/todo.py +22 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/toggle.py +28 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/toggleable_heading.py +35 -0
- notionary-0.2.28/notionary/page/content/markdown/nodes/video.py +23 -0
- notionary-0.2.28/notionary/page/content/parser/context.py +49 -0
- notionary-0.2.28/notionary/page/content/parser/factory.py +219 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/__init__.py +60 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/audio.py +40 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/base.py +30 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/bookmark.py +33 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/breadcrumb.py +33 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/bulleted_list.py +41 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/callout.py +129 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/caption.py +55 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/code.py +81 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/column.py +117 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/column_list.py +81 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/divider.py +33 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/embed.py +33 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/equation.py +65 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/file.py +42 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/heading.py +58 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/image.py +42 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/numbered_list.py +45 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/paragraph.py +36 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/pdf.py +42 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/quote.py +65 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/space.py +35 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/table.py +144 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/table_of_contents.py +32 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/todo.py +58 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/toggle.py +127 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/toggleable_heading.py +150 -0
- notionary-0.2.28/notionary/page/content/parser/parsers/video.py +42 -0
- notionary-0.2.28/notionary/page/content/parser/post_processing/handlers/__init__.py +5 -0
- notionary-0.2.28/notionary/page/content/parser/post_processing/handlers/rich_text_length.py +93 -0
- notionary-0.2.28/notionary/page/content/parser/post_processing/handlers/rich_text_length_truncation.py +93 -0
- notionary-0.2.28/notionary/page/content/parser/post_processing/port.py +9 -0
- notionary-0.2.28/notionary/page/content/parser/post_processing/service.py +16 -0
- notionary-0.2.28/notionary/page/content/parser/pre_processsing/handlers/__init__.py +9 -0
- notionary-0.2.28/notionary/page/content/parser/pre_processsing/handlers/column_syntax.py +80 -0
- notionary-0.2.28/notionary/page/content/parser/pre_processsing/handlers/port.py +7 -0
- notionary-0.2.28/notionary/page/content/parser/pre_processsing/handlers/whitespace.py +68 -0
- notionary-0.2.28/notionary/page/content/parser/pre_processsing/service.py +15 -0
- notionary-0.2.28/notionary/page/content/parser/service.py +69 -0
- notionary-0.2.28/notionary/page/content/renderer/context.py +48 -0
- notionary-0.2.28/notionary/page/content/renderer/factory.py +240 -0
- notionary-0.2.28/notionary/page/content/renderer/post_processing/handlers/__init__.py +5 -0
- notionary-0.2.28/notionary/page/content/renderer/post_processing/handlers/numbered_list_placeholdere.py +62 -0
- notionary-0.2.28/notionary/page/content/renderer/post_processing/port.py +7 -0
- notionary-0.2.28/notionary/page/content/renderer/post_processing/service.py +15 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/__init__.py +57 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/audio.py +31 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/base.py +31 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/bookmark.py +25 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/breadcrumb.py +21 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/bulleted_list.py +48 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/callout.py +65 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/captioned_block.py +58 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/code.py +34 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/column.py +44 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/column_list.py +31 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/divider.py +22 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/embed.py +25 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/equation.py +37 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/fallback.py +24 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/file.py +40 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/heading.py +69 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/image.py +31 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/numbered_list.py +41 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/paragraph.py +40 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/pdf.py +31 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/quote.py +49 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/table.py +115 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/table_of_contents.py +26 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/table_row.py +17 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/todo.py +56 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/toggle.py +53 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/toggleable_heading.py +78 -0
- notionary-0.2.28/notionary/page/content/renderer/renderers/video.py +31 -0
- notionary-0.2.28/notionary/page/content/renderer/service.py +50 -0
- notionary-0.2.28/notionary/page/content/service.py +65 -0
- notionary-0.2.28/notionary/page/content/syntax/models.py +68 -0
- notionary-0.2.28/notionary/page/content/syntax/service.py +453 -0
- {notionary-0.2.27 → notionary-0.2.28}/notionary/page/page_context.py +7 -16
- notionary-0.2.28/notionary/page/page_http_client.py +15 -0
- notionary-0.2.28/notionary/page/page_metadata_update_client.py +19 -0
- notionary-0.2.28/notionary/page/properties/client.py +144 -0
- notionary-0.2.28/notionary/page/properties/factory.py +26 -0
- notionary-0.2.28/notionary/page/properties/models.py +307 -0
- notionary-0.2.28/notionary/page/properties/service.py +257 -0
- notionary-0.2.28/notionary/page/schemas.py +13 -0
- notionary-0.2.28/notionary/page/service.py +222 -0
- notionary-0.2.28/notionary/shared/entity/client.py +29 -0
- notionary-0.2.28/notionary/shared/entity/dto_parsers.py +53 -0
- notionary-0.2.28/notionary/shared/entity/entity_metadata_update_client.py +41 -0
- notionary-0.2.28/notionary/shared/entity/schemas.py +45 -0
- notionary-0.2.28/notionary/shared/entity/service.py +171 -0
- notionary-0.2.28/notionary/shared/models/cover.py +20 -0
- notionary-0.2.28/notionary/shared/models/file.py +21 -0
- notionary-0.2.28/notionary/shared/models/icon.py +28 -0
- notionary-0.2.28/notionary/shared/models/parent.py +41 -0
- notionary-0.2.28/notionary/shared/properties/type.py +30 -0
- notionary-0.2.28/notionary/user/__init__.py +7 -0
- notionary-0.2.28/notionary/user/base.py +89 -0
- notionary-0.2.28/notionary/user/bot.py +70 -0
- notionary-0.2.28/notionary/user/client.py +39 -0
- notionary-0.2.28/notionary/user/person.py +41 -0
- notionary-0.2.28/notionary/user/schemas.py +67 -0
- notionary-0.2.28/notionary/user/service.py +65 -0
- notionary-0.2.28/notionary/utils/async_retry.py +39 -0
- notionary-0.2.28/notionary/utils/date.py +51 -0
- notionary-0.2.28/notionary/utils/fuzzy.py +56 -0
- notionary-0.2.27/notionary/util/logging_mixin.py → notionary-0.2.28/notionary/utils/mixins/logging.py +4 -16
- notionary-0.2.28/notionary/utils/pagination.py +50 -0
- notionary-0.2.28/notionary/utils/singleton.py +13 -0
- notionary-0.2.28/notionary/utils/uuid_utils.py +20 -0
- notionary-0.2.28/notionary/workspace/__init__.py +3 -0
- notionary-0.2.28/notionary/workspace/client.py +62 -0
- notionary-0.2.28/notionary/workspace/query/builder.py +60 -0
- notionary-0.2.28/notionary/workspace/query/models.py +60 -0
- notionary-0.2.28/notionary/workspace/query/service.py +93 -0
- notionary-0.2.28/notionary/workspace/schemas.py +21 -0
- notionary-0.2.28/notionary/workspace/service.py +116 -0
- notionary-0.2.28/pyproject.toml +72 -0
- notionary-0.2.27/notionary/__init__.py +0 -22
- notionary-0.2.27/notionary/base_notion_client.py +0 -219
- notionary-0.2.27/notionary/blocks/__init__.py +0 -5
- notionary-0.2.27/notionary/blocks/_bootstrap.py +0 -271
- notionary-0.2.27/notionary/blocks/audio/__init__.py +0 -11
- notionary-0.2.27/notionary/blocks/audio/audio_element.py +0 -158
- notionary-0.2.27/notionary/blocks/audio/audio_markdown_node.py +0 -24
- notionary-0.2.27/notionary/blocks/audio/audio_models.py +0 -10
- notionary-0.2.27/notionary/blocks/base_block_element.py +0 -42
- notionary-0.2.27/notionary/blocks/bookmark/__init__.py +0 -12
- notionary-0.2.27/notionary/blocks/bookmark/bookmark_element.py +0 -83
- notionary-0.2.27/notionary/blocks/bookmark/bookmark_markdown_node.py +0 -28
- notionary-0.2.27/notionary/blocks/bookmark/bookmark_models.py +0 -15
- notionary-0.2.27/notionary/blocks/breadcrumbs/__init__.py +0 -15
- notionary-0.2.27/notionary/blocks/breadcrumbs/breadcrumb_element.py +0 -39
- notionary-0.2.27/notionary/blocks/breadcrumbs/breadcrumb_markdown_node.py +0 -13
- notionary-0.2.27/notionary/blocks/breadcrumbs/breadcrumb_models.py +0 -12
- notionary-0.2.27/notionary/blocks/bulleted_list/__init__.py +0 -15
- notionary-0.2.27/notionary/blocks/bulleted_list/bulleted_list_element.py +0 -74
- notionary-0.2.27/notionary/blocks/bulleted_list/bulleted_list_markdown_node.py +0 -20
- notionary-0.2.27/notionary/blocks/bulleted_list/bulleted_list_models.py +0 -17
- notionary-0.2.27/notionary/blocks/callout/__init__.py +0 -12
- notionary-0.2.27/notionary/blocks/callout/callout_element.py +0 -99
- notionary-0.2.27/notionary/blocks/callout/callout_markdown_node.py +0 -19
- notionary-0.2.27/notionary/blocks/callout/callout_models.py +0 -33
- notionary-0.2.27/notionary/blocks/child_database/__init__.py +0 -14
- notionary-0.2.27/notionary/blocks/child_database/child_database_element.py +0 -59
- notionary-0.2.27/notionary/blocks/child_database/child_database_models.py +0 -12
- notionary-0.2.27/notionary/blocks/child_page/__init__.py +0 -9
- notionary-0.2.27/notionary/blocks/child_page/child_page_element.py +0 -94
- notionary-0.2.27/notionary/blocks/child_page/child_page_models.py +0 -12
- notionary-0.2.27/notionary/blocks/client.py +0 -256
- notionary-0.2.27/notionary/blocks/code/__init__.py +0 -11
- notionary-0.2.27/notionary/blocks/code/code_element.py +0 -149
- notionary-0.2.27/notionary/blocks/code/code_markdown_node.py +0 -80
- notionary-0.2.27/notionary/blocks/code/code_models.py +0 -94
- notionary-0.2.27/notionary/blocks/column/__init__.py +0 -25
- notionary-0.2.27/notionary/blocks/column/column_element.py +0 -65
- notionary-0.2.27/notionary/blocks/column/column_list_element.py +0 -52
- notionary-0.2.27/notionary/blocks/column/column_list_markdown_node.py +0 -34
- notionary-0.2.27/notionary/blocks/column/column_markdown_node.py +0 -42
- notionary-0.2.27/notionary/blocks/column/column_models.py +0 -26
- notionary-0.2.27/notionary/blocks/divider/__init__.py +0 -12
- notionary-0.2.27/notionary/blocks/divider/divider_element.py +0 -41
- notionary-0.2.27/notionary/blocks/divider/divider_markdown_node.py +0 -11
- notionary-0.2.27/notionary/blocks/divider/divider_models.py +0 -12
- notionary-0.2.27/notionary/blocks/embed/__init__.py +0 -12
- notionary-0.2.27/notionary/blocks/embed/embed_element.py +0 -98
- notionary-0.2.27/notionary/blocks/embed/embed_markdown_node.py +0 -19
- notionary-0.2.27/notionary/blocks/embed/embed_models.py +0 -14
- notionary-0.2.27/notionary/blocks/equation/__init__.py +0 -13
- notionary-0.2.27/notionary/blocks/equation/equation_element.py +0 -133
- notionary-0.2.27/notionary/blocks/equation/equation_element_markdown_node.py +0 -23
- notionary-0.2.27/notionary/blocks/equation/equation_models.py +0 -11
- notionary-0.2.27/notionary/blocks/file/__init__.py +0 -23
- notionary-0.2.27/notionary/blocks/file/file_element.py +0 -133
- notionary-0.2.27/notionary/blocks/file/file_element_markdown_node.py +0 -24
- notionary-0.2.27/notionary/blocks/file/file_element_models.py +0 -39
- notionary-0.2.27/notionary/blocks/heading/__init__.py +0 -19
- notionary-0.2.27/notionary/blocks/heading/heading_element.py +0 -112
- notionary-0.2.27/notionary/blocks/heading/heading_markdown_node.py +0 -16
- notionary-0.2.27/notionary/blocks/heading/heading_models.py +0 -29
- notionary-0.2.27/notionary/blocks/image_block/__init__.py +0 -11
- notionary-0.2.27/notionary/blocks/image_block/image_element.py +0 -130
- notionary-0.2.27/notionary/blocks/image_block/image_markdown_node.py +0 -25
- notionary-0.2.27/notionary/blocks/image_block/image_models.py +0 -10
- notionary-0.2.27/notionary/blocks/markdown/markdown_builder.py +0 -525
- notionary-0.2.27/notionary/blocks/markdown/markdown_document_model.py +0 -0
- notionary-0.2.27/notionary/blocks/markdown/markdown_node.py +0 -25
- notionary-0.2.27/notionary/blocks/mixins/captions/__init__.py +0 -4
- notionary-0.2.27/notionary/blocks/mixins/captions/caption_markdown_node_mixin.py +0 -31
- notionary-0.2.27/notionary/blocks/mixins/captions/caption_mixin.py +0 -92
- notionary-0.2.27/notionary/blocks/mixins/file_upload/__init__.py +0 -3
- notionary-0.2.27/notionary/blocks/mixins/file_upload/file_upload_mixin.py +0 -320
- notionary-0.2.27/notionary/blocks/models.py +0 -174
- notionary-0.2.27/notionary/blocks/numbered_list/__init__.py +0 -16
- notionary-0.2.27/notionary/blocks/numbered_list/numbered_list_element.py +0 -65
- notionary-0.2.27/notionary/blocks/numbered_list/numbered_list_markdown_node.py +0 -17
- notionary-0.2.27/notionary/blocks/numbered_list/numbered_list_models.py +0 -17
- notionary-0.2.27/notionary/blocks/paragraph/__init__.py +0 -15
- notionary-0.2.27/notionary/blocks/paragraph/paragraph_element.py +0 -58
- notionary-0.2.27/notionary/blocks/paragraph/paragraph_markdown_node.py +0 -16
- notionary-0.2.27/notionary/blocks/paragraph/paragraph_models.py +0 -16
- notionary-0.2.27/notionary/blocks/pdf/__init__.py +0 -11
- notionary-0.2.27/notionary/blocks/pdf/pdf_element.py +0 -146
- notionary-0.2.27/notionary/blocks/pdf/pdf_markdown_node.py +0 -24
- notionary-0.2.27/notionary/blocks/pdf/pdf_models.py +0 -11
- notionary-0.2.27/notionary/blocks/quote/__init__.py +0 -14
- notionary-0.2.27/notionary/blocks/quote/quote_element.py +0 -75
- notionary-0.2.27/notionary/blocks/quote/quote_markdown_node.py +0 -16
- notionary-0.2.27/notionary/blocks/quote/quote_models.py +0 -18
- notionary-0.2.27/notionary/blocks/registry/__init__.py +0 -3
- notionary-0.2.27/notionary/blocks/registry/block_registry.py +0 -150
- notionary-0.2.27/notionary/blocks/rich_text/__init__.py +0 -33
- notionary-0.2.27/notionary/blocks/rich_text/rich_text_models.py +0 -221
- notionary-0.2.27/notionary/blocks/rich_text/text_inline_formatter.py +0 -456
- notionary-0.2.27/notionary/blocks/syntax_prompt_builder.py +0 -137
- notionary-0.2.27/notionary/blocks/table/__init__.py +0 -19
- notionary-0.2.27/notionary/blocks/table/table_element.py +0 -225
- notionary-0.2.27/notionary/blocks/table/table_markdown_node.py +0 -42
- notionary-0.2.27/notionary/blocks/table/table_models.py +0 -28
- notionary-0.2.27/notionary/blocks/table_of_contents/__init__.py +0 -17
- notionary-0.2.27/notionary/blocks/table_of_contents/table_of_contents_element.py +0 -80
- notionary-0.2.27/notionary/blocks/table_of_contents/table_of_contents_markdown_node.py +0 -21
- notionary-0.2.27/notionary/blocks/table_of_contents/table_of_contents_models.py +0 -18
- notionary-0.2.27/notionary/blocks/todo/__init__.py +0 -12
- notionary-0.2.27/notionary/blocks/todo/todo_element.py +0 -81
- notionary-0.2.27/notionary/blocks/todo/todo_markdown_node.py +0 -21
- notionary-0.2.27/notionary/blocks/todo/todo_models.py +0 -18
- notionary-0.2.27/notionary/blocks/toggle/__init__.py +0 -12
- notionary-0.2.27/notionary/blocks/toggle/toggle_element.py +0 -112
- notionary-0.2.27/notionary/blocks/toggle/toggle_markdown_node.py +0 -31
- notionary-0.2.27/notionary/blocks/toggle/toggle_models.py +0 -17
- notionary-0.2.27/notionary/blocks/toggleable_heading/__init__.py +0 -11
- notionary-0.2.27/notionary/blocks/toggleable_heading/toggleable_heading_element.py +0 -115
- notionary-0.2.27/notionary/blocks/toggleable_heading/toggleable_heading_markdown_node.py +0 -34
- notionary-0.2.27/notionary/blocks/types.py +0 -130
- notionary-0.2.27/notionary/blocks/video/__init__.py +0 -11
- notionary-0.2.27/notionary/blocks/video/video_element.py +0 -187
- notionary-0.2.27/notionary/blocks/video/video_element_models.py +0 -10
- notionary-0.2.27/notionary/blocks/video/video_markdown_node.py +0 -26
- notionary-0.2.27/notionary/comments/__init__.py +0 -26
- notionary-0.2.27/notionary/comments/client.py +0 -211
- notionary-0.2.27/notionary/comments/models.py +0 -129
- notionary-0.2.27/notionary/database/__init__.py +0 -4
- notionary-0.2.27/notionary/database/client.py +0 -148
- notionary-0.2.27/notionary/database/database.py +0 -480
- notionary-0.2.27/notionary/database/database_filter_builder.py +0 -173
- notionary-0.2.27/notionary/database/database_provider.py +0 -227
- notionary-0.2.27/notionary/database/exceptions.py +0 -13
- notionary-0.2.27/notionary/database/factory.py +0 -0
- notionary-0.2.27/notionary/database/models.py +0 -337
- notionary-0.2.27/notionary/database/notion_database.py +0 -487
- notionary-0.2.27/notionary/file_upload/__init__.py +0 -7
- notionary-0.2.27/notionary/page/client.py +0 -124
- notionary-0.2.27/notionary/page/markdown_whitespace_processor.py +0 -129
- notionary-0.2.27/notionary/page/models.py +0 -322
- notionary-0.2.27/notionary/page/notion_page.py +0 -712
- notionary-0.2.27/notionary/page/page_content_deleting_service.py +0 -117
- notionary-0.2.27/notionary/page/page_content_writer.py +0 -80
- notionary-0.2.27/notionary/page/property_formatter.py +0 -99
- notionary-0.2.27/notionary/page/reader/handler/__init__.py +0 -19
- notionary-0.2.27/notionary/page/reader/handler/base_block_renderer.py +0 -44
- notionary-0.2.27/notionary/page/reader/handler/block_processing_context.py +0 -35
- notionary-0.2.27/notionary/page/reader/handler/block_rendering_context.py +0 -48
- notionary-0.2.27/notionary/page/reader/handler/column_list_renderer.py +0 -51
- notionary-0.2.27/notionary/page/reader/handler/column_renderer.py +0 -60
- notionary-0.2.27/notionary/page/reader/handler/equation_renderer.py +0 -0
- notionary-0.2.27/notionary/page/reader/handler/line_renderer.py +0 -73
- notionary-0.2.27/notionary/page/reader/handler/numbered_list_renderer.py +0 -85
- notionary-0.2.27/notionary/page/reader/handler/toggle_renderer.py +0 -69
- notionary-0.2.27/notionary/page/reader/handler/toggleable_heading_renderer.py +0 -89
- notionary-0.2.27/notionary/page/reader/page_content_retriever.py +0 -81
- notionary-0.2.27/notionary/page/search_filter_builder.py +0 -132
- notionary-0.2.27/notionary/page/utils.py +0 -60
- notionary-0.2.27/notionary/page/writer/handler/__init__.py +0 -24
- notionary-0.2.27/notionary/page/writer/handler/code_handler.py +0 -72
- notionary-0.2.27/notionary/page/writer/handler/column_handler.py +0 -141
- notionary-0.2.27/notionary/page/writer/handler/column_list_handler.py +0 -139
- notionary-0.2.27/notionary/page/writer/handler/equation_handler.py +0 -74
- notionary-0.2.27/notionary/page/writer/handler/line_handler.py +0 -35
- notionary-0.2.27/notionary/page/writer/handler/line_processing_context.py +0 -54
- notionary-0.2.27/notionary/page/writer/handler/regular_line_handler.py +0 -86
- notionary-0.2.27/notionary/page/writer/handler/table_handler.py +0 -66
- notionary-0.2.27/notionary/page/writer/handler/toggle_handler.py +0 -159
- notionary-0.2.27/notionary/page/writer/handler/toggleable_heading_handler.py +0 -174
- notionary-0.2.27/notionary/page/writer/markdown_to_notion_converter.py +0 -139
- notionary-0.2.27/notionary/page/writer/markdown_to_notion_converter_context.py +0 -30
- notionary-0.2.27/notionary/page/writer/markdown_to_notion_text_length_post_processor.py +0 -0
- notionary-0.2.27/notionary/page/writer/notion_text_length_processor.py +0 -150
- notionary-0.2.27/notionary/schemas/__init__.py +0 -3
- notionary-0.2.27/notionary/schemas/base.py +0 -73
- notionary-0.2.27/notionary/shared/__init__.py +0 -3
- notionary-0.2.27/notionary/shared/name_to_id_resolver.py +0 -203
- notionary-0.2.27/notionary/telemetry/__init__.py +0 -19
- notionary-0.2.27/notionary/telemetry/service.py +0 -136
- notionary-0.2.27/notionary/telemetry/views.py +0 -73
- notionary-0.2.27/notionary/user/__init__.py +0 -11
- notionary-0.2.27/notionary/user/base_notion_user.py +0 -53
- notionary-0.2.27/notionary/user/client.py +0 -128
- notionary-0.2.27/notionary/user/models.py +0 -84
- notionary-0.2.27/notionary/user/notion_bot_user.py +0 -226
- notionary-0.2.27/notionary/user/notion_user.py +0 -255
- notionary-0.2.27/notionary/user/notion_user_manager.py +0 -101
- notionary-0.2.27/notionary/util/__init__.py +0 -15
- notionary-0.2.27/notionary/util/concurrency_limiter.py +0 -0
- notionary-0.2.27/notionary/util/factory_decorator.py +0 -0
- notionary-0.2.27/notionary/util/factory_only.py +0 -37
- notionary-0.2.27/notionary/util/fuzzy.py +0 -75
- notionary-0.2.27/notionary/util/page_id_utils.py +0 -27
- notionary-0.2.27/notionary/util/singleton.py +0 -18
- notionary-0.2.27/notionary/util/singleton_metaclass.py +0 -22
- notionary-0.2.27/notionary/workspace.py +0 -105
- notionary-0.2.27/pyproject.toml +0 -35
@@ -0,0 +1,94 @@
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
2
|
+
__pycache__/
|
3
|
+
*.py[cod]
|
4
|
+
*$py.class
|
5
|
+
|
6
|
+
temp/
|
7
|
+
|
8
|
+
# Virtual environments
|
9
|
+
venv/
|
10
|
+
env/
|
11
|
+
.venv/
|
12
|
+
.env/
|
13
|
+
|
14
|
+
# Mkdocs
|
15
|
+
site/
|
16
|
+
|
17
|
+
# Distribution / packaging
|
18
|
+
build/
|
19
|
+
develop-eggs/
|
20
|
+
dist/
|
21
|
+
downloads/
|
22
|
+
eggs/
|
23
|
+
.eggs/
|
24
|
+
lib/
|
25
|
+
lib64/
|
26
|
+
parts/
|
27
|
+
sdist/
|
28
|
+
var/
|
29
|
+
*.egg-info/
|
30
|
+
.installed.cfg
|
31
|
+
*.egg
|
32
|
+
|
33
|
+
# PyInstaller
|
34
|
+
*.manifest
|
35
|
+
*.spec
|
36
|
+
|
37
|
+
# Installer logs
|
38
|
+
pip-log.txt
|
39
|
+
pip-delete-this-directory.txt
|
40
|
+
|
41
|
+
# Unit test / coverage reports
|
42
|
+
htmlcov/
|
43
|
+
.tox/
|
44
|
+
.nox/
|
45
|
+
.coverage
|
46
|
+
.coverage.*
|
47
|
+
.cache
|
48
|
+
nosetests.xml
|
49
|
+
coverage.xml
|
50
|
+
*.cover
|
51
|
+
.hypothesis/
|
52
|
+
.pytest_cache/
|
53
|
+
|
54
|
+
# Jupyter Notebook checkpoints
|
55
|
+
.ipynb_checkpoints
|
56
|
+
|
57
|
+
# pyenv
|
58
|
+
.python-version
|
59
|
+
|
60
|
+
# mypy
|
61
|
+
.mypy_cache/
|
62
|
+
.dmypy.json
|
63
|
+
dmypy.json
|
64
|
+
|
65
|
+
# Pyre
|
66
|
+
.pyre/
|
67
|
+
|
68
|
+
# Pytype
|
69
|
+
.pytype/
|
70
|
+
|
71
|
+
# Cython debug symbols
|
72
|
+
cython_debug/
|
73
|
+
|
74
|
+
# VS Code
|
75
|
+
.vscode/
|
76
|
+
|
77
|
+
# JetBrains IDEs (PyCharm, etc.)
|
78
|
+
.idea/
|
79
|
+
|
80
|
+
# MacOS
|
81
|
+
.DS_Store
|
82
|
+
|
83
|
+
# Windows
|
84
|
+
Thumbs.db
|
85
|
+
ehthumbs.db
|
86
|
+
desktop.ini
|
87
|
+
|
88
|
+
# dotenv files
|
89
|
+
.env
|
90
|
+
|
91
|
+
docs/node_modules/
|
92
|
+
|
93
|
+
.ruff_cache/
|
94
|
+
bandit-report.json
|
@@ -4,18 +4,18 @@ Copyright (c) 2025 Mathis Kristoffer Arends
|
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
10
|
furnished to do so, subject to the following conditions:
|
11
11
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
13
|
all copies or substantial portions of the Software.
|
14
14
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
21
|
THE SOFTWARE.
|
@@ -1,24 +1,16 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: notionary
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.28
|
4
4
|
Summary: Python library for programmatic Notion workspace management - databases, pages, and content with advanced Markdown support
|
5
|
-
License: MIT
|
6
|
-
Author: Mathis Arends
|
7
|
-
Author-email: mathisarends27@gmail.com
|
8
|
-
Requires-Python: >=3.9
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
11
|
-
Classifier: Programming Language :: Python :: 3.9
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
15
|
-
Classifier: Programming Language :: Python :: 3.13
|
16
|
-
Requires-Dist: aiofiles (>=24.1.0,<25.0.0)
|
17
|
-
Requires-Dist: httpx (>=0.28.0)
|
18
|
-
Requires-Dist: posthog (>=6.3.1,<7.0.0)
|
19
|
-
Requires-Dist: pydantic (>=2.11.4)
|
20
|
-
Requires-Dist: python-dotenv (>=1.1.0)
|
21
5
|
Project-URL: Homepage, https://github.com/mathisarends/notionary
|
6
|
+
Author-email: Mathis Arends <mathisarends27@gmail.com>
|
7
|
+
License: MIT
|
8
|
+
License-File: LICENSE
|
9
|
+
Requires-Python: >=3.11
|
10
|
+
Requires-Dist: aiofiles<25.0.0,>=24.1.0
|
11
|
+
Requires-Dist: httpx>=0.28.0
|
12
|
+
Requires-Dist: pydantic>=2.11.4
|
13
|
+
Requires-Dist: python-dotenv<2.0.0,>=1.0.1
|
22
14
|
Description-Content-Type: text/markdown
|
23
15
|
|
24
16
|
<picture>
|
@@ -35,7 +27,7 @@ Description-Content-Type: text/markdown
|
|
35
27
|
[](LICENSE)
|
36
28
|
[](https://mathisarends.github.io/notionary/)
|
37
29
|
|
38
|
-
**Transform complex Notion API interactions into simple, Pythonic code.**
|
30
|
+
**Transform complex Notion API interactions into simple, Pythonic code.**
|
39
31
|
Perfect for developers building AI agents, automation workflows, and dynamic content systems.
|
40
32
|
|
41
33
|
</div>
|
@@ -73,13 +65,13 @@ export NOTION_SECRET=your_integration_key
|
|
73
65
|
|
74
66
|
https://github.com/user-attachments/assets/da8b4691-bee4-4b0f-801e-dccacb630398
|
75
67
|
|
76
|
-
|
68
|
+
_Create styled project pages with properties, content, and rich formatting_
|
77
69
|
|
78
70
|
### Local File Uploads (Videos & Images)
|
79
71
|
|
80
72
|
https://github.com/user-attachments/assets/a079ec01-bb56-4c65-8260-7b1fca42ac68
|
81
73
|
|
82
|
-
|
74
|
+
_Upload videos and images using simple markdown syntax - files are automatically uploaded to Notion_
|
83
75
|
|
84
76
|
---
|
85
77
|
|
@@ -93,33 +85,33 @@ from notionary import NotionPage, NotionDatabase
|
|
93
85
|
|
94
86
|
async def main():
|
95
87
|
# Find pages by name - fuzzy matching included!
|
96
|
-
page = await NotionPage.
|
97
|
-
|
88
|
+
page = await NotionPage.from_title("Meeting Notes")
|
89
|
+
|
98
90
|
# Option 1: Direct Extended Markdown
|
99
91
|
await page.append_markdown("""
|
100
92
|
## Action Items
|
101
93
|
- [x] Review project proposal
|
102
|
-
- [ ] Schedule team meeting
|
94
|
+
- [ ] Schedule team meeting
|
103
95
|
- [ ] Update documentation
|
104
96
|
|
105
97
|
[callout](Meeting decisions require follow-up "💡")
|
106
|
-
|
98
|
+
|
107
99
|
+++ Details
|
108
100
|
Additional context and next steps...
|
109
101
|
+++
|
110
102
|
""")
|
111
|
-
|
103
|
+
|
112
104
|
# Option 2: Type-Safe Builder (maps to same markdown internally)
|
113
105
|
await page.append_markdown(lambda builder: (
|
114
106
|
builder
|
115
|
-
.h2("Project Status")
|
107
|
+
.h2("Project Status")
|
116
108
|
.callout("Milestone reached!", "🎉")
|
117
109
|
.columns(
|
118
110
|
lambda col: col.h3("Completed").bulleted_list([
|
119
111
|
"API design", "Database setup", "Authentication"
|
120
112
|
]),
|
121
113
|
lambda col: col.h3("In Progress").bulleted_list([
|
122
|
-
"Frontend UI", "Testing", "Documentation"
|
114
|
+
"Frontend UI", "Testing", "Documentation"
|
123
115
|
]),
|
124
116
|
width_ratios=[0.6, 0.4]
|
125
117
|
)
|
@@ -138,33 +130,36 @@ asyncio.run(main())
|
|
138
130
|
|
139
131
|
Every Notion block type with extended syntax:
|
140
132
|
|
141
|
-
| Block Type
|
142
|
-
|
143
|
-
| **Callouts**
|
144
|
-
| **Toggles**
|
145
|
-
| **Columns**
|
146
|
-
| **Tables**
|
147
|
-
| **Media**
|
148
|
-
| **Code**
|
149
|
-
| **Equations** | `$LaTeX$`
|
150
|
-
| **TOC**
|
133
|
+
| Block Type | Markdown Syntax | Use Case |
|
134
|
+
| ------------- | -------------------------------------------- | ---------------------------- |
|
135
|
+
| **Callouts** | `[callout](Text "🔥")` | Highlighting key information |
|
136
|
+
| **Toggles** | `+++ Title\nContent\n+++` | Collapsible sections |
|
137
|
+
| **Columns** | `::: columns\n::: column\nContent\n:::\n:::` | Side-by-side layouts |
|
138
|
+
| **Tables** | Standard markdown tables | Structured data |
|
139
|
+
| **Media** | `[video](./file.mp4)(caption:Description)` | Auto-uploading files |
|
140
|
+
| **Code** | Standard code fences with captions | Code snippets |
|
141
|
+
| **Equations** | `$LaTeX$` | Mathematical expressions |
|
142
|
+
| **TOC** | `[toc](blue_background)` | Auto-generated navigation |
|
151
143
|
|
152
144
|
---
|
153
145
|
|
154
146
|
## What You Can Build 💡
|
155
147
|
|
156
148
|
### **AI Content Systems**
|
149
|
+
|
157
150
|
- **Report Generation**: AI agents that create structured reports, documentation, and analysis
|
158
151
|
- **Content Pipelines**: Automated workflows that process data and generate Notion pages
|
159
152
|
- **Knowledge Management**: AI-powered documentation systems with smart categorization
|
160
153
|
|
161
|
-
### **Workflow Automation**
|
154
|
+
### **Workflow Automation**
|
155
|
+
|
162
156
|
- **Project Management**: Sync project status, update timelines, generate progress reports
|
163
157
|
- **Data Integration**: Connect external APIs and databases to Notion workspaces
|
164
158
|
- **Template Systems**: Dynamic page generation from templates and data sources
|
165
159
|
|
166
160
|
### **Content Management**
|
167
|
-
|
161
|
+
|
162
|
+
- **Bulk Operations**: Mass page updates, content migration, and database management
|
168
163
|
- **Media Handling**: Automated image/video uploads with proper organization
|
169
164
|
- **Cross-Platform**: Sync content between Notion and other platforms
|
170
165
|
|
@@ -177,34 +172,40 @@ Every Notion block type with extended syntax:
|
|
177
172
|
<td width="50%">
|
178
173
|
|
179
174
|
### Smart Discovery
|
175
|
+
|
180
176
|
- Find pages/databases by name
|
181
|
-
- Fuzzy matching for approximate searches
|
177
|
+
- Fuzzy matching for approximate searches
|
182
178
|
- No more hunting for IDs or URLs
|
183
179
|
|
184
180
|
### Extended Markdown
|
181
|
+
|
185
182
|
- Rich syntax beyond standard markdown
|
186
183
|
- Callouts, toggles, columns, media uploads
|
187
184
|
- Schema provided for AI agent integration
|
188
185
|
|
189
|
-
### Modern Python
|
186
|
+
### Modern Python
|
187
|
+
|
190
188
|
- Full async/await support
|
191
|
-
- Type hints throughout
|
189
|
+
- Type hints throughout
|
192
190
|
- High-performance batch operations
|
193
191
|
|
194
192
|
</td>
|
195
193
|
<td width="50%">
|
196
194
|
|
197
195
|
### Round-Trip Editing
|
196
|
+
|
198
197
|
- Read existing content as markdown
|
199
198
|
- Edit and modify preserving formatting
|
200
199
|
- Write back to Notion seamlessly
|
201
200
|
|
202
201
|
### AI-Ready Architecture
|
202
|
+
|
203
203
|
- Schema-driven syntax for LLM prompts
|
204
204
|
- Perfect for AI content generation
|
205
205
|
- Handles complex nested structures
|
206
206
|
|
207
207
|
### Complete Coverage
|
208
|
+
|
208
209
|
- Every Notion block type supported
|
209
210
|
- File uploads with automatic handling
|
210
211
|
- Database operations and properties
|
@@ -218,24 +219,28 @@ Every Notion block type with extended syntax:
|
|
218
219
|
## Examples & Documentation
|
219
220
|
|
220
221
|
### Full Documentation
|
222
|
+
|
221
223
|
[**mathisarends.github.io/notionary**](https://mathisarends.github.io/notionary/) - Complete API reference, guides, and tutorials
|
222
224
|
|
223
225
|
### Quick Links
|
226
|
+
|
224
227
|
- [**Getting Started**](https://mathisarends.github.io/notionary/get-started/) - Setup and first steps
|
225
|
-
- [**Page Management**](https://mathisarends.github.io/notionary/page/) - Content and properties
|
228
|
+
- [**Page Management**](https://mathisarends.github.io/notionary/page/) - Content and properties
|
226
229
|
- [**Database Operations**](https://mathisarends.github.io/notionary/database/) - Queries and management
|
227
230
|
- [**Block Types Reference**](https://mathisarends.github.io/notionary/blocks/) - Complete syntax guide
|
228
231
|
|
229
232
|
### Hands-On Examples
|
230
233
|
|
231
234
|
**Core Functionality:**
|
235
|
+
|
232
236
|
- [Page Management](examples/page_example.py) - Create, update, and manage pages
|
233
|
-
- [Database Operations](examples/database.py) - Connect and query databases
|
237
|
+
- [Database Operations](examples/database.py) - Connect and query databases
|
234
238
|
- [Workspace Discovery](examples/workspace_discovery.py) - Explore your workspace
|
235
239
|
|
236
240
|
**Extended Markdown:**
|
241
|
+
|
237
242
|
- [Basic Formatting](examples/markdown/basic.py) - Text, lists, and links
|
238
|
-
- [Callouts & Highlights](examples/markdown/callout.py) - Information boxes
|
243
|
+
- [Callouts & Highlights](examples/markdown/callout.py) - Information boxes
|
239
244
|
- [Toggle Sections](examples/markdown/toggle.py) - Collapsible content
|
240
245
|
- [Multi-Column Layouts](examples/markdown/columns.py) - Side-by-side design
|
241
246
|
- [Tables & Data](examples/markdown/table.py) - Structured presentations
|
@@ -245,8 +250,9 @@ Every Notion block type with extended syntax:
|
|
245
250
|
## Contributing
|
246
251
|
|
247
252
|
We welcome contributions from the community! Whether you're:
|
253
|
+
|
248
254
|
- **Fixing bugs** - Help improve stability and reliability
|
249
|
-
- **Adding features** - Extend functionality for new use cases
|
255
|
+
- **Adding features** - Extend functionality for new use cases
|
250
256
|
- **Improving docs** - Make the library more accessible
|
251
257
|
- **Sharing examples** - Show creative applications and patterns
|
252
258
|
|
@@ -260,11 +266,10 @@ Check our [**Contributing Guide**](https://mathisarends.github.io/notionary/cont
|
|
260
266
|
|
261
267
|
[📖 **Read the Docs**](https://mathisarends.github.io/notionary/) • [🚀 **Getting Started**](https://mathisarends.github.io/notionary/get-started/) • [💻 **Browse Examples**](examples/)
|
262
268
|
|
263
|
-
|
269
|
+
_Built with ❤️ for Python developers and AI agents_
|
264
270
|
|
265
271
|
---
|
266
272
|
|
267
273
|
**Transform complex Notion API interactions into simple, powerful code.**
|
268
274
|
|
269
275
|
</div>
|
270
|
-
|
@@ -12,7 +12,7 @@
|
|
12
12
|
[](LICENSE)
|
13
13
|
[](https://mathisarends.github.io/notionary/)
|
14
14
|
|
15
|
-
**Transform complex Notion API interactions into simple, Pythonic code.**
|
15
|
+
**Transform complex Notion API interactions into simple, Pythonic code.**
|
16
16
|
Perfect for developers building AI agents, automation workflows, and dynamic content systems.
|
17
17
|
|
18
18
|
</div>
|
@@ -50,13 +50,13 @@ export NOTION_SECRET=your_integration_key
|
|
50
50
|
|
51
51
|
https://github.com/user-attachments/assets/da8b4691-bee4-4b0f-801e-dccacb630398
|
52
52
|
|
53
|
-
|
53
|
+
_Create styled project pages with properties, content, and rich formatting_
|
54
54
|
|
55
55
|
### Local File Uploads (Videos & Images)
|
56
56
|
|
57
57
|
https://github.com/user-attachments/assets/a079ec01-bb56-4c65-8260-7b1fca42ac68
|
58
58
|
|
59
|
-
|
59
|
+
_Upload videos and images using simple markdown syntax - files are automatically uploaded to Notion_
|
60
60
|
|
61
61
|
---
|
62
62
|
|
@@ -70,33 +70,33 @@ from notionary import NotionPage, NotionDatabase
|
|
70
70
|
|
71
71
|
async def main():
|
72
72
|
# Find pages by name - fuzzy matching included!
|
73
|
-
page = await NotionPage.
|
74
|
-
|
73
|
+
page = await NotionPage.from_title("Meeting Notes")
|
74
|
+
|
75
75
|
# Option 1: Direct Extended Markdown
|
76
76
|
await page.append_markdown("""
|
77
77
|
## Action Items
|
78
78
|
- [x] Review project proposal
|
79
|
-
- [ ] Schedule team meeting
|
79
|
+
- [ ] Schedule team meeting
|
80
80
|
- [ ] Update documentation
|
81
81
|
|
82
82
|
[callout](Meeting decisions require follow-up "💡")
|
83
|
-
|
83
|
+
|
84
84
|
+++ Details
|
85
85
|
Additional context and next steps...
|
86
86
|
+++
|
87
87
|
""")
|
88
|
-
|
88
|
+
|
89
89
|
# Option 2: Type-Safe Builder (maps to same markdown internally)
|
90
90
|
await page.append_markdown(lambda builder: (
|
91
91
|
builder
|
92
|
-
.h2("Project Status")
|
92
|
+
.h2("Project Status")
|
93
93
|
.callout("Milestone reached!", "🎉")
|
94
94
|
.columns(
|
95
95
|
lambda col: col.h3("Completed").bulleted_list([
|
96
96
|
"API design", "Database setup", "Authentication"
|
97
97
|
]),
|
98
98
|
lambda col: col.h3("In Progress").bulleted_list([
|
99
|
-
"Frontend UI", "Testing", "Documentation"
|
99
|
+
"Frontend UI", "Testing", "Documentation"
|
100
100
|
]),
|
101
101
|
width_ratios=[0.6, 0.4]
|
102
102
|
)
|
@@ -115,33 +115,36 @@ asyncio.run(main())
|
|
115
115
|
|
116
116
|
Every Notion block type with extended syntax:
|
117
117
|
|
118
|
-
| Block Type
|
119
|
-
|
120
|
-
| **Callouts**
|
121
|
-
| **Toggles**
|
122
|
-
| **Columns**
|
123
|
-
| **Tables**
|
124
|
-
| **Media**
|
125
|
-
| **Code**
|
126
|
-
| **Equations** | `$LaTeX$`
|
127
|
-
| **TOC**
|
118
|
+
| Block Type | Markdown Syntax | Use Case |
|
119
|
+
| ------------- | -------------------------------------------- | ---------------------------- |
|
120
|
+
| **Callouts** | `[callout](Text "🔥")` | Highlighting key information |
|
121
|
+
| **Toggles** | `+++ Title\nContent\n+++` | Collapsible sections |
|
122
|
+
| **Columns** | `::: columns\n::: column\nContent\n:::\n:::` | Side-by-side layouts |
|
123
|
+
| **Tables** | Standard markdown tables | Structured data |
|
124
|
+
| **Media** | `[video](./file.mp4)(caption:Description)` | Auto-uploading files |
|
125
|
+
| **Code** | Standard code fences with captions | Code snippets |
|
126
|
+
| **Equations** | `$LaTeX$` | Mathematical expressions |
|
127
|
+
| **TOC** | `[toc](blue_background)` | Auto-generated navigation |
|
128
128
|
|
129
129
|
---
|
130
130
|
|
131
131
|
## What You Can Build 💡
|
132
132
|
|
133
133
|
### **AI Content Systems**
|
134
|
+
|
134
135
|
- **Report Generation**: AI agents that create structured reports, documentation, and analysis
|
135
136
|
- **Content Pipelines**: Automated workflows that process data and generate Notion pages
|
136
137
|
- **Knowledge Management**: AI-powered documentation systems with smart categorization
|
137
138
|
|
138
|
-
### **Workflow Automation**
|
139
|
+
### **Workflow Automation**
|
140
|
+
|
139
141
|
- **Project Management**: Sync project status, update timelines, generate progress reports
|
140
142
|
- **Data Integration**: Connect external APIs and databases to Notion workspaces
|
141
143
|
- **Template Systems**: Dynamic page generation from templates and data sources
|
142
144
|
|
143
145
|
### **Content Management**
|
144
|
-
|
146
|
+
|
147
|
+
- **Bulk Operations**: Mass page updates, content migration, and database management
|
145
148
|
- **Media Handling**: Automated image/video uploads with proper organization
|
146
149
|
- **Cross-Platform**: Sync content between Notion and other platforms
|
147
150
|
|
@@ -154,34 +157,40 @@ Every Notion block type with extended syntax:
|
|
154
157
|
<td width="50%">
|
155
158
|
|
156
159
|
### Smart Discovery
|
160
|
+
|
157
161
|
- Find pages/databases by name
|
158
|
-
- Fuzzy matching for approximate searches
|
162
|
+
- Fuzzy matching for approximate searches
|
159
163
|
- No more hunting for IDs or URLs
|
160
164
|
|
161
165
|
### Extended Markdown
|
166
|
+
|
162
167
|
- Rich syntax beyond standard markdown
|
163
168
|
- Callouts, toggles, columns, media uploads
|
164
169
|
- Schema provided for AI agent integration
|
165
170
|
|
166
|
-
### Modern Python
|
171
|
+
### Modern Python
|
172
|
+
|
167
173
|
- Full async/await support
|
168
|
-
- Type hints throughout
|
174
|
+
- Type hints throughout
|
169
175
|
- High-performance batch operations
|
170
176
|
|
171
177
|
</td>
|
172
178
|
<td width="50%">
|
173
179
|
|
174
180
|
### Round-Trip Editing
|
181
|
+
|
175
182
|
- Read existing content as markdown
|
176
183
|
- Edit and modify preserving formatting
|
177
184
|
- Write back to Notion seamlessly
|
178
185
|
|
179
186
|
### AI-Ready Architecture
|
187
|
+
|
180
188
|
- Schema-driven syntax for LLM prompts
|
181
189
|
- Perfect for AI content generation
|
182
190
|
- Handles complex nested structures
|
183
191
|
|
184
192
|
### Complete Coverage
|
193
|
+
|
185
194
|
- Every Notion block type supported
|
186
195
|
- File uploads with automatic handling
|
187
196
|
- Database operations and properties
|
@@ -195,24 +204,28 @@ Every Notion block type with extended syntax:
|
|
195
204
|
## Examples & Documentation
|
196
205
|
|
197
206
|
### Full Documentation
|
207
|
+
|
198
208
|
[**mathisarends.github.io/notionary**](https://mathisarends.github.io/notionary/) - Complete API reference, guides, and tutorials
|
199
209
|
|
200
210
|
### Quick Links
|
211
|
+
|
201
212
|
- [**Getting Started**](https://mathisarends.github.io/notionary/get-started/) - Setup and first steps
|
202
|
-
- [**Page Management**](https://mathisarends.github.io/notionary/page/) - Content and properties
|
213
|
+
- [**Page Management**](https://mathisarends.github.io/notionary/page/) - Content and properties
|
203
214
|
- [**Database Operations**](https://mathisarends.github.io/notionary/database/) - Queries and management
|
204
215
|
- [**Block Types Reference**](https://mathisarends.github.io/notionary/blocks/) - Complete syntax guide
|
205
216
|
|
206
217
|
### Hands-On Examples
|
207
218
|
|
208
219
|
**Core Functionality:**
|
220
|
+
|
209
221
|
- [Page Management](examples/page_example.py) - Create, update, and manage pages
|
210
|
-
- [Database Operations](examples/database.py) - Connect and query databases
|
222
|
+
- [Database Operations](examples/database.py) - Connect and query databases
|
211
223
|
- [Workspace Discovery](examples/workspace_discovery.py) - Explore your workspace
|
212
224
|
|
213
225
|
**Extended Markdown:**
|
226
|
+
|
214
227
|
- [Basic Formatting](examples/markdown/basic.py) - Text, lists, and links
|
215
|
-
- [Callouts & Highlights](examples/markdown/callout.py) - Information boxes
|
228
|
+
- [Callouts & Highlights](examples/markdown/callout.py) - Information boxes
|
216
229
|
- [Toggle Sections](examples/markdown/toggle.py) - Collapsible content
|
217
230
|
- [Multi-Column Layouts](examples/markdown/columns.py) - Side-by-side design
|
218
231
|
- [Tables & Data](examples/markdown/table.py) - Structured presentations
|
@@ -222,8 +235,9 @@ Every Notion block type with extended syntax:
|
|
222
235
|
## Contributing
|
223
236
|
|
224
237
|
We welcome contributions from the community! Whether you're:
|
238
|
+
|
225
239
|
- **Fixing bugs** - Help improve stability and reliability
|
226
|
-
- **Adding features** - Extend functionality for new use cases
|
240
|
+
- **Adding features** - Extend functionality for new use cases
|
227
241
|
- **Improving docs** - Make the library more accessible
|
228
242
|
- **Sharing examples** - Show creative applications and patterns
|
229
243
|
|
@@ -237,7 +251,7 @@ Check our [**Contributing Guide**](https://mathisarends.github.io/notionary/cont
|
|
237
251
|
|
238
252
|
[📖 **Read the Docs**](https://mathisarends.github.io/notionary/) • [🚀 **Getting Started**](https://mathisarends.github.io/notionary/get-started/) • [💻 **Browse Examples**](examples/)
|
239
253
|
|
240
|
-
|
254
|
+
_Built with ❤️ for Python developers and AI agents_
|
241
255
|
|
242
256
|
---
|
243
257
|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
from .data_source.service import NotionDataSource
|
2
|
+
from .database.service import NotionDatabase
|
3
|
+
from .page.content.markdown.builder import MarkdownBuilder
|
4
|
+
from .page.service import NotionPage
|
5
|
+
from .workspace import NotionWorkspace
|
6
|
+
|
7
|
+
__all__ = ["MarkdownBuilder", "NotionDataSource", "NotionDatabase", "NotionPage", "NotionWorkspace", "NotionWorkspace"]
|