notionary 0.2.1__tar.gz → 0.2.3__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.1 → notionary-0.2.3}/PKG-INFO +1 -1
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/registry/block_registry_builder.py +1 -1
- {notionary-0.2.1 → notionary-0.2.3}/notionary/models/notion_database_response.py +3 -9
- {notionary-0.2.1 → notionary-0.2.3}/notionary/notion_client.py +3 -5
- {notionary-0.2.1 → notionary-0.2.3}/notionary/prompting/markdown_syntax_prompt_generator.py +9 -4
- {notionary-0.2.1 → notionary-0.2.3}/notionary.egg-info/PKG-INFO +1 -1
- {notionary-0.2.1 → notionary-0.2.3}/setup.py +1 -1
- {notionary-0.2.1 → notionary-0.2.3}/LICENSE +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/README.md +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/__init__.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/database/database_discovery.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/database/models/page_result.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/database/notion_database.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/database/notion_database_factory.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/audio_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/bookmark_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/bulleted_list_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/callout_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/code_block_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/divider_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/embed_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/heading_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/image_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/mention_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/notion_block_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/numbered_list_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/paragraph_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/qoute_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/registry/block_registry.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/table_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/text_inline_formatter.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/todo_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/toggle_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/toggleable_heading_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/elements/video_element.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/exceptions/database_exceptions.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/exceptions/page_creation_exception.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/models/notion_block_response.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/models/notion_page_response.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/content/notion_page_content_chunker.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/content/page_content_retriever.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/content/page_content_writer.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/markdown_to_notion_converter.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/metadata/metadata_editor.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/metadata/notion_icon_manager.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/metadata/notion_page_cover_manager.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/notion_page.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/notion_page_factory.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/notion_to_markdown_converter.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/properites/database_property_service.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/properites/page_property_manager.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/properites/property_formatter.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/properites/property_value_extractor.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/relations/notion_page_relation_manager.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/relations/notion_page_title_resolver.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/page/relations/page_database_relation.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/prompting/element_prompt_content.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/util/logging_mixin.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/util/page_id_utils.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary/util/warn_direct_constructor_usage.py +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary.egg-info/SOURCES.txt +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary.egg-info/dependency_links.txt +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary.egg-info/requires.txt +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/notionary.egg-info/top_level.txt +0 -0
- {notionary-0.2.1 → notionary-0.2.3}/setup.cfg +0 -0
@@ -5,12 +5,6 @@ from typing import Optional, List, Dict, Any, Literal
|
|
5
5
|
from notionary.models.notion_page_response import Icon
|
6
6
|
|
7
7
|
|
8
|
-
@dataclass
|
9
|
-
class TextContent:
|
10
|
-
content: str
|
11
|
-
link: Optional[str] = None
|
12
|
-
|
13
|
-
|
14
8
|
@dataclass
|
15
9
|
class TextContent:
|
16
10
|
content: str
|
@@ -33,12 +27,12 @@ class User:
|
|
33
27
|
|
34
28
|
@dataclass
|
35
29
|
class Parent:
|
36
|
-
type: Literal["page_id", "workspace"]
|
30
|
+
type: Literal["page_id", "workspace", "block_id"]
|
37
31
|
page_id: Optional[str] = None
|
32
|
+
block_id: Optional[str] = None # Added block_id field
|
38
33
|
|
39
34
|
|
40
|
-
|
41
|
-
class NotionDatabaserResponse(BaseModel):
|
35
|
+
class NotionDatabaseResponse(BaseModel):
|
42
36
|
"""
|
43
37
|
Represents the response from the Notion API when retrieving a database.
|
44
38
|
"""
|
@@ -5,7 +5,7 @@ from enum import Enum
|
|
5
5
|
from typing import Dict, Any, Optional, Union
|
6
6
|
import httpx
|
7
7
|
from dotenv import load_dotenv
|
8
|
-
from notionary.models.notion_database_response import
|
8
|
+
from notionary.models.notion_database_response import NotionDatabaseResponse
|
9
9
|
from notionary.models.notion_page_response import NotionPageResponse
|
10
10
|
from notionary.util.logging_mixin import LoggingMixin
|
11
11
|
|
@@ -69,9 +69,7 @@ class NotionClient(LoggingMixin):
|
|
69
69
|
"""
|
70
70
|
return await self._make_request(HttpMethod.GET, endpoint)
|
71
71
|
|
72
|
-
|
73
|
-
|
74
|
-
async def get_database(self, database_id: str) -> NotionDatabaserResponse:
|
72
|
+
async def get_database(self, database_id: str) -> NotionDatabaseResponse:
|
75
73
|
"""
|
76
74
|
Ruft die Metadaten einer Notion-Datenbank anhand ihrer ID ab und gibt sie als NotionPageResponse zurück.
|
77
75
|
|
@@ -81,7 +79,7 @@ class NotionClient(LoggingMixin):
|
|
81
79
|
Returns:
|
82
80
|
Ein NotionPageResponse-Objekt mit den Datenbankmetadaten.
|
83
81
|
"""
|
84
|
-
return
|
82
|
+
return NotionDatabaseResponse.model_validate(
|
85
83
|
await self.get(f"databases/{database_id}")
|
86
84
|
)
|
87
85
|
|
@@ -20,14 +20,19 @@ class MarkdownSyntaxPromptGenerator:
|
|
20
20
|
"""
|
21
21
|
Lädt das Prompt-Template aus der Markdown-Datei.
|
22
22
|
"""
|
23
|
-
|
24
|
-
|
23
|
+
current_file = Path(__file__).resolve()
|
24
|
+
current_dir = current_file.parent
|
25
|
+
template_path = current_dir / "res" / "notion_syntax_prompt.md"
|
25
26
|
|
26
27
|
try:
|
27
28
|
with open(template_path, "r", encoding="utf-8") as file:
|
28
29
|
return file.read()
|
29
30
|
except FileNotFoundError:
|
30
|
-
raise FileNotFoundError(
|
31
|
+
raise FileNotFoundError(
|
32
|
+
f"Template file not found at {template_path}\n"
|
33
|
+
f"Current working directory: {os.getcwd()}\n"
|
34
|
+
f"Script location: {current_file}"
|
35
|
+
)
|
31
36
|
except Exception as e:
|
32
37
|
raise RuntimeError(f"Error loading template file: {e}")
|
33
38
|
|
@@ -89,4 +94,4 @@ class MarkdownSyntaxPromptGenerator:
|
|
89
94
|
# Erstelle eine Instanz, um das Template zu laden
|
90
95
|
instance = cls()
|
91
96
|
element_docs = cls.generate_element_docs(element_classes)
|
92
|
-
return instance.SYSTEM_PROMPT_TEMPLATE.format(element_docs=element_docs)
|
97
|
+
return instance.SYSTEM_PROMPT_TEMPLATE.format(element_docs=element_docs)
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_namespace_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name="notionary",
|
5
|
-
version="0.2.
|
5
|
+
version="0.2.3",
|
6
6
|
packages=find_namespace_packages(include=["notionary*"]),
|
7
7
|
install_requires=["httpx>=0.28.0", "python-dotenv>=1.1.0", "pydantic>=2.11.4"],
|
8
8
|
author="Mathis Arends",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.1 → notionary-0.2.3}/notionary/page/relations/notion_page_relation_manager.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|