notionary 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl
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/models/notion_database_response.py +5 -10
- notionary/notion_client.py +3 -3
- {notionary-0.2.1.dist-info → notionary-0.2.2.dist-info}/METADATA +1 -1
- {notionary-0.2.1.dist-info → notionary-0.2.2.dist-info}/RECORD +7 -7
- {notionary-0.2.1.dist-info → notionary-0.2.2.dist-info}/WHEEL +0 -0
- {notionary-0.2.1.dist-info → notionary-0.2.2.dist-info}/licenses/LICENSE +0 -0
- {notionary-0.2.1.dist-info → notionary-0.2.2.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
from pydantic import BaseModel
|
2
3
|
from dataclasses import dataclass
|
3
4
|
from typing import Optional, List, Dict, Any, Literal
|
@@ -5,12 +6,6 @@ from typing import Optional, List, Dict, Any, Literal
|
|
5
6
|
from notionary.models.notion_page_response import Icon
|
6
7
|
|
7
8
|
|
8
|
-
@dataclass
|
9
|
-
class TextContent:
|
10
|
-
content: str
|
11
|
-
link: Optional[str] = None
|
12
|
-
|
13
|
-
|
14
9
|
@dataclass
|
15
10
|
class TextContent:
|
16
11
|
content: str
|
@@ -33,12 +28,12 @@ class User:
|
|
33
28
|
|
34
29
|
@dataclass
|
35
30
|
class Parent:
|
36
|
-
type: Literal["page_id", "workspace"]
|
31
|
+
type: Literal["page_id", "workspace", "block_id"]
|
37
32
|
page_id: Optional[str] = None
|
33
|
+
block_id: Optional[str] = None # Added block_id field
|
38
34
|
|
39
35
|
|
40
|
-
|
41
|
-
class NotionDatabaserResponse(BaseModel):
|
36
|
+
class NotionDatabaseResponse(BaseModel):
|
42
37
|
"""
|
43
38
|
Represents the response from the Notion API when retrieving a database.
|
44
39
|
"""
|
@@ -60,4 +55,4 @@ class NotionDatabaserResponse(BaseModel):
|
|
60
55
|
public_url: Optional[str]
|
61
56
|
archived: bool
|
62
57
|
in_trash: bool
|
63
|
-
request_id: Optional[str] = None
|
58
|
+
request_id: Optional[str] = None
|
notionary/notion_client.py
CHANGED
@@ -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
|
|
@@ -71,7 +71,7 @@ class NotionClient(LoggingMixin):
|
|
71
71
|
|
72
72
|
# TODO: Get Blocks implementeren und Patch Blcoks hierfür das Typing finden:
|
73
73
|
|
74
|
-
async def get_database(self, database_id: str) ->
|
74
|
+
async def get_database(self, database_id: str) -> NotionDatabaseResponse:
|
75
75
|
"""
|
76
76
|
Ruft die Metadaten einer Notion-Datenbank anhand ihrer ID ab und gibt sie als NotionPageResponse zurück.
|
77
77
|
|
@@ -81,7 +81,7 @@ class NotionClient(LoggingMixin):
|
|
81
81
|
Returns:
|
82
82
|
Ein NotionPageResponse-Objekt mit den Datenbankmetadaten.
|
83
83
|
"""
|
84
|
-
return
|
84
|
+
return NotionDatabaseResponse.model_validate(
|
85
85
|
await self.get(f"databases/{database_id}")
|
86
86
|
)
|
87
87
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
notionary/__init__.py,sha256=hPvZ-iqt5R_dAs9KaRBhC5eXzuQ5uvt-9EaU2O_7bZw,691
|
2
|
-
notionary/notion_client.py,sha256=
|
2
|
+
notionary/notion_client.py,sha256=1TfXiEg9ixE_ZT9iL6zSs7WphOoNlEQmTsaJAt6P3hA,7410
|
3
3
|
notionary/database/database_discovery.py,sha256=qDGFhXG9s-_6CXdRg8tMiwX4dvX7jLjgAUFPSNlYtlI,4506
|
4
4
|
notionary/database/notion_database.py,sha256=zbHPejETr101pprd7kewZ555d_TONN_wJi7b9Eyfoyg,7634
|
5
5
|
notionary/database/notion_database_factory.py,sha256=FmijGYz6A4mCWVionOg9sxgFXfb9he52xdgNswJw24k,6584
|
@@ -29,7 +29,7 @@ notionary/elements/registry/block_registry_builder.py,sha256=5dQhWiJ7jsyKUin1y7r
|
|
29
29
|
notionary/exceptions/database_exceptions.py,sha256=I-Tx6bYRLpi5pjGPtbT-Mqxvz3BFgYTiuZxknJeLxtI,2638
|
30
30
|
notionary/exceptions/page_creation_exception.py,sha256=4v7IuZD6GsQLrqhDLriGjuG3ML638gAO53zDCrLePuU,281
|
31
31
|
notionary/models/notion_block_response.py,sha256=gzL4C6K9QPcaMS6NbAZaRceSEnMbNwYBVVzxysza5VU,6002
|
32
|
-
notionary/models/notion_database_response.py,sha256=
|
32
|
+
notionary/models/notion_database_response.py,sha256=k-IRInJPN63vAWpg3MKO6Oc7594V5vG6ljjOKvSMxp8,1213
|
33
33
|
notionary/models/notion_page_response.py,sha256=r4fwMwwDocj92JdbSmyrzIqBKsnEaz4aDUiPabrg9BM,1762
|
34
34
|
notionary/page/markdown_to_notion_converter.py,sha256=EuqUGNv2HZu67INOnGheeJkt7WHTWGuLnhEG72_Wv5Y,15833
|
35
35
|
notionary/page/notion_page.py,sha256=NDxAJaNk4tlKUrenhKBdnuvjlVgnxC0Z6fprf2LyNeE,18046
|
@@ -53,8 +53,8 @@ notionary/prompting/markdown_syntax_prompt_generator.py,sha256=xKzTF62SFKzadyC7F
|
|
53
53
|
notionary/util/logging_mixin.py,sha256=b6wHj0IoVSWXbHh0yynfJlwvIR33G2qmaGNzrqyb7Gs,1825
|
54
54
|
notionary/util/page_id_utils.py,sha256=EYNMxgf-7ghzL5K8lKZBZfW7g5CsdY0Xuj4IYmU8RPk,1381
|
55
55
|
notionary/util/warn_direct_constructor_usage.py,sha256=vyJR73F95XVSRWIbyij-82IGOpAne9SBPM25eDpZfSU,1715
|
56
|
-
notionary-0.2.
|
57
|
-
notionary-0.2.
|
58
|
-
notionary-0.2.
|
59
|
-
notionary-0.2.
|
60
|
-
notionary-0.2.
|
56
|
+
notionary-0.2.2.dist-info/licenses/LICENSE,sha256=zOm3cRT1qD49eg7vgw95MI79rpUAZa1kRBFwL2FkAr8,1120
|
57
|
+
notionary-0.2.2.dist-info/METADATA,sha256=O_A1Bnrg57G52QbqcILdspn6hi-juDA2_qaw9oavQ9g,8374
|
58
|
+
notionary-0.2.2.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
59
|
+
notionary-0.2.2.dist-info/top_level.txt,sha256=fhONa6BMHQXqthx5PanWGbPL0b8rdFqhrJKVLf_adSs,10
|
60
|
+
notionary-0.2.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|