notionary 0.2.1__tar.gz → 0.2.2__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.
Files changed (65) hide show
  1. {notionary-0.2.1 → notionary-0.2.2}/PKG-INFO +1 -1
  2. {notionary-0.2.1 → notionary-0.2.2}/notionary/models/notion_database_response.py +5 -10
  3. {notionary-0.2.1 → notionary-0.2.2}/notionary/notion_client.py +3 -3
  4. {notionary-0.2.1 → notionary-0.2.2}/notionary.egg-info/PKG-INFO +1 -1
  5. {notionary-0.2.1 → notionary-0.2.2}/setup.py +1 -1
  6. {notionary-0.2.1 → notionary-0.2.2}/LICENSE +0 -0
  7. {notionary-0.2.1 → notionary-0.2.2}/README.md +0 -0
  8. {notionary-0.2.1 → notionary-0.2.2}/notionary/__init__.py +0 -0
  9. {notionary-0.2.1 → notionary-0.2.2}/notionary/database/database_discovery.py +0 -0
  10. {notionary-0.2.1 → notionary-0.2.2}/notionary/database/models/page_result.py +0 -0
  11. {notionary-0.2.1 → notionary-0.2.2}/notionary/database/notion_database.py +0 -0
  12. {notionary-0.2.1 → notionary-0.2.2}/notionary/database/notion_database_factory.py +0 -0
  13. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/audio_element.py +0 -0
  14. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/bookmark_element.py +0 -0
  15. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/bulleted_list_element.py +0 -0
  16. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/callout_element.py +0 -0
  17. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/code_block_element.py +0 -0
  18. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/divider_element.py +0 -0
  19. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/embed_element.py +0 -0
  20. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/heading_element.py +0 -0
  21. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/image_element.py +0 -0
  22. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/mention_element.py +0 -0
  23. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/notion_block_element.py +0 -0
  24. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/numbered_list_element.py +0 -0
  25. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/paragraph_element.py +0 -0
  26. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/qoute_element.py +0 -0
  27. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/registry/block_registry.py +0 -0
  28. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/registry/block_registry_builder.py +0 -0
  29. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/table_element.py +0 -0
  30. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/text_inline_formatter.py +0 -0
  31. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/todo_element.py +0 -0
  32. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/toggle_element.py +0 -0
  33. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/toggleable_heading_element.py +0 -0
  34. {notionary-0.2.1 → notionary-0.2.2}/notionary/elements/video_element.py +0 -0
  35. {notionary-0.2.1 → notionary-0.2.2}/notionary/exceptions/database_exceptions.py +0 -0
  36. {notionary-0.2.1 → notionary-0.2.2}/notionary/exceptions/page_creation_exception.py +0 -0
  37. {notionary-0.2.1 → notionary-0.2.2}/notionary/models/notion_block_response.py +0 -0
  38. {notionary-0.2.1 → notionary-0.2.2}/notionary/models/notion_page_response.py +0 -0
  39. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/content/notion_page_content_chunker.py +0 -0
  40. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/content/page_content_retriever.py +0 -0
  41. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/content/page_content_writer.py +0 -0
  42. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/markdown_to_notion_converter.py +0 -0
  43. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/metadata/metadata_editor.py +0 -0
  44. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/metadata/notion_icon_manager.py +0 -0
  45. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/metadata/notion_page_cover_manager.py +0 -0
  46. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/notion_page.py +0 -0
  47. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/notion_page_factory.py +0 -0
  48. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/notion_to_markdown_converter.py +0 -0
  49. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/properites/database_property_service.py +0 -0
  50. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/properites/page_property_manager.py +0 -0
  51. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/properites/property_formatter.py +0 -0
  52. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/properites/property_value_extractor.py +0 -0
  53. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/relations/notion_page_relation_manager.py +0 -0
  54. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/relations/notion_page_title_resolver.py +0 -0
  55. {notionary-0.2.1 → notionary-0.2.2}/notionary/page/relations/page_database_relation.py +0 -0
  56. {notionary-0.2.1 → notionary-0.2.2}/notionary/prompting/element_prompt_content.py +0 -0
  57. {notionary-0.2.1 → notionary-0.2.2}/notionary/prompting/markdown_syntax_prompt_generator.py +0 -0
  58. {notionary-0.2.1 → notionary-0.2.2}/notionary/util/logging_mixin.py +0 -0
  59. {notionary-0.2.1 → notionary-0.2.2}/notionary/util/page_id_utils.py +0 -0
  60. {notionary-0.2.1 → notionary-0.2.2}/notionary/util/warn_direct_constructor_usage.py +0 -0
  61. {notionary-0.2.1 → notionary-0.2.2}/notionary.egg-info/SOURCES.txt +0 -0
  62. {notionary-0.2.1 → notionary-0.2.2}/notionary.egg-info/dependency_links.txt +0 -0
  63. {notionary-0.2.1 → notionary-0.2.2}/notionary.egg-info/requires.txt +0 -0
  64. {notionary-0.2.1 → notionary-0.2.2}/notionary.egg-info/top_level.txt +0 -0
  65. {notionary-0.2.1 → notionary-0.2.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: notionary
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A toolkit to convert between Markdown and Notion blocks
5
5
  Home-page: https://github.com/mathisarends/notionary
6
6
  Author: Mathis Arends
@@ -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
- @dataclass
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
@@ -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 NotionDatabaserResponse
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) -> NotionDatabaserResponse:
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 NotionDatabaserResponse.model_validate(
84
+ return NotionDatabaseResponse.model_validate(
85
85
  await self.get(f"databases/{database_id}")
86
86
  )
87
87
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: notionary
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A toolkit to convert between Markdown and Notion blocks
5
5
  Home-page: https://github.com/mathisarends/notionary
6
6
  Author: Mathis Arends
@@ -2,7 +2,7 @@ from setuptools import setup, find_namespace_packages
2
2
 
3
3
  setup(
4
4
  name="notionary",
5
- version="0.2.1",
5
+ version="0.2.2",
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