chunkr-ai 0.0.26__py3-none-any.whl → 0.0.27__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.
@@ -3,6 +3,7 @@ from typing import TypeVar, Optional, Generic
3
3
  from pydantic import BaseModel, PrivateAttr
4
4
  import asyncio
5
5
  import json
6
+ import os
6
7
 
7
8
  from .configuration import Configuration, OutputConfiguration, OutputResponse, Status
8
9
  from .protocol import ChunkrClientProtocol
@@ -110,6 +111,7 @@ class TaskResponse(BaseModel, Generic[T]):
110
111
  """
111
112
  content = self._get_content("html")
112
113
  if output_file:
114
+ os.makedirs(os.path.dirname(output_file), exist_ok=True)
113
115
  with open(output_file, "w", encoding="utf-8") as f:
114
116
  f.write(content)
115
117
  return content
@@ -122,6 +124,7 @@ class TaskResponse(BaseModel, Generic[T]):
122
124
  """
123
125
  content = self._get_content("markdown")
124
126
  if output_file:
127
+ os.makedirs(os.path.dirname(output_file), exist_ok=True)
125
128
  with open(output_file, "w", encoding="utf-8") as f:
126
129
  f.write(content)
127
130
  return content
@@ -134,6 +137,7 @@ class TaskResponse(BaseModel, Generic[T]):
134
137
  """
135
138
  content = self._get_content("content")
136
139
  if output_file:
140
+ os.makedirs(os.path.dirname(output_file), exist_ok=True)
137
141
  with open(output_file, "w", encoding="utf-8") as f:
138
142
  f.write(content)
139
143
  return content
@@ -152,6 +156,7 @@ class TaskResponse(BaseModel, Generic[T]):
152
156
 
153
157
  data = self.model_dump()
154
158
  if output_file:
159
+ os.makedirs(os.path.dirname(output_file), exist_ok=True)
155
160
  with open(output_file, "w", encoding="utf-8") as f:
156
161
  json.dump(data, f, cls=DateTimeEncoder, indent=2)
157
162
  return data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: chunkr-ai
3
- Version: 0.0.26
3
+ Version: 0.0.27
4
4
  Summary: Python client for Chunkr: open source document intelligence
5
5
  Author-email: Ishaan Kapoor <ishaan@lumina.sh>
6
6
  License: MIT License
@@ -8,9 +8,9 @@ chunkr_ai/api/configuration.py,sha256=0wnrKlUIO7opvV963Gr_S8tlAjpo_IkNmbTi1_FwEu
8
8
  chunkr_ai/api/decorators.py,sha256=HSq3vcxOeUJkaWaf7HOvCyg9dWkVo8cG5BrU-jhbhmc,4053
9
9
  chunkr_ai/api/misc.py,sha256=5PBI6pvOXr0x-3WieSKLrC8MA0iGPa-IG-5FEZ3vnr0,5724
10
10
  chunkr_ai/api/protocol.py,sha256=LjPrYSq52m1afIlAo0yVGXlGZxPRh8J6g7S4PAit3Zo,388
11
- chunkr_ai/api/task_response.py,sha256=lYzR3Oa6HwLmW5Plo5AF4Ky3UMXHU9zcUMRYOHb7Gwg,5805
12
- chunkr_ai-0.0.26.dist-info/LICENSE,sha256=w3R12yNDyZpMiy2lxy_hvNbsldC75ww79sF0u11rkho,1069
13
- chunkr_ai-0.0.26.dist-info/METADATA,sha256=LcIn-LIE_RsPawnkh26NyU2EGicKOQ1Qf1KsAu0dPuw,6996
14
- chunkr_ai-0.0.26.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
15
- chunkr_ai-0.0.26.dist-info/top_level.txt,sha256=0IZY7PZIiS8bw5r4NUQRUQ-ATi-L_3vLQVq3ZLouOW8,10
16
- chunkr_ai-0.0.26.dist-info/RECORD,,
11
+ chunkr_ai/api/task_response.py,sha256=uvM5uNIImDnivsgujjOh2kxRYuUoqKDhLE1nOH2dJjo,6091
12
+ chunkr_ai-0.0.27.dist-info/LICENSE,sha256=w3R12yNDyZpMiy2lxy_hvNbsldC75ww79sF0u11rkho,1069
13
+ chunkr_ai-0.0.27.dist-info/METADATA,sha256=JveCsruUSPzQmP7EwO6LwcilW8rH9XMR0X1jhszxVsY,6996
14
+ chunkr_ai-0.0.27.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
15
+ chunkr_ai-0.0.27.dist-info/top_level.txt,sha256=0IZY7PZIiS8bw5r4NUQRUQ-ATi-L_3vLQVq3ZLouOW8,10
16
+ chunkr_ai-0.0.27.dist-info/RECORD,,