chunkr-ai 0.0.20__tar.gz → 0.0.22__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. chunkr_ai-0.0.22/LICENSE +21 -0
  2. {chunkr_ai-0.0.20/src/chunkr_ai.egg-info → chunkr_ai-0.0.22}/PKG-INFO +23 -2
  3. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/pyproject.toml +2 -2
  4. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/api/chunkr.py +1 -1
  5. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/api/decorators.py +3 -3
  6. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/api/task_response.py +6 -6
  7. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/models.py +1 -0
  8. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22/src/chunkr_ai.egg-info}/PKG-INFO +23 -2
  9. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/tests/test_chunkr.py +2 -2
  10. chunkr_ai-0.0.20/LICENSE +0 -0
  11. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/README.md +0 -0
  12. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/setup.cfg +0 -0
  13. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/__init__.py +0 -0
  14. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/api/__init__.py +0 -0
  15. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/api/api.py +0 -0
  16. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/api/auth.py +0 -0
  17. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/api/chunkr_base.py +0 -0
  18. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/api/config.py +0 -0
  19. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/api/misc.py +0 -0
  20. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai/api/protocol.py +0 -0
  21. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai.egg-info/SOURCES.txt +0 -0
  22. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai.egg-info/dependency_links.txt +0 -0
  23. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai.egg-info/requires.txt +1 -1
  24. {chunkr_ai-0.0.20 → chunkr_ai-0.0.22}/src/chunkr_ai.egg-info/top_level.txt +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Lumina AI INC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
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
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
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
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 THE
21
+ SOFTWARE.
@@ -1,19 +1,40 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: chunkr-ai
3
- Version: 0.0.20
3
+ Version: 0.0.22
4
4
  Summary: Python client for Chunkr: open source document intelligence
5
5
  Author-email: Ishaan Kapoor <ishaan@lumina.sh>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Lumina AI INC
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
6
27
  Project-URL: Homepage, https://chunkr.ai
7
28
  Description-Content-Type: text/markdown
8
29
  License-File: LICENSE
9
30
  Requires-Dist: httpx>=0.25.0
10
31
  Requires-Dist: pillow>=10.0.0
11
32
  Requires-Dist: pydantic>=2.0.0
12
- Requires-Dist: pytest-asyncio>=0.21.0
13
33
  Requires-Dist: python-dotenv>=0.19.0
14
34
  Provides-Extra: test
15
35
  Requires-Dist: pytest>=7.0.0; extra == "test"
16
36
  Requires-Dist: pytest-xdist>=3.0.0; extra == "test"
37
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
17
38
 
18
39
  # Chunkr Python Client
19
40
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "chunkr-ai"
7
- version = "0.0.20"
7
+ version = "0.0.22"
8
8
  authors = [{"name" = "Ishaan Kapoor", "email" = "ishaan@lumina.sh"}]
9
9
  description = "Python client for Chunkr: open source document intelligence"
10
10
  readme = "README.md"
@@ -14,7 +14,6 @@ dependencies = [
14
14
  "httpx>=0.25.0",
15
15
  "pillow>=10.0.0",
16
16
  "pydantic>=2.0.0",
17
- "pytest-asyncio>=0.21.0",
18
17
  "python-dotenv>=0.19.0",
19
18
  ]
20
19
 
@@ -22,5 +21,6 @@ dependencies = [
22
21
  test = [
23
22
  "pytest>=7.0.0",
24
23
  "pytest-xdist>=3.0.0",
24
+ "pytest-asyncio>=0.21.0",
25
25
  ]
26
26
 
@@ -70,8 +70,8 @@ class Chunkr(ChunkrBase):
70
70
  )
71
71
  r.raise_for_status()
72
72
 
73
- @ensure_client()
74
73
  @anywhere()
74
+ @ensure_client()
75
75
  async def cancel_task(self, task_id: str) -> None:
76
76
  r = await self._client.get(
77
77
  f"{self.url}/api/v1/task/{task_id}/cancel", headers=self._headers()
@@ -22,12 +22,12 @@ def anywhere():
22
22
  def wrapper(*args: P.args, **kwargs: P.kwargs) -> Union[Awaitable[T], T]:
23
23
  global _sync_loop
24
24
  try:
25
- loop = asyncio.get_running_loop()
26
- return async_func(*args, **kwargs)
25
+ asyncio.get_running_loop()
26
+ return async_func(*args, **kwargs)
27
27
  except RuntimeError:
28
28
  if _sync_loop is None:
29
29
  _sync_loop = asyncio.new_event_loop()
30
- asyncio.set_event_loop(_sync_loop)
30
+ asyncio.set_event_loop(_sync_loop)
31
31
  try:
32
32
  return _sync_loop.run_until_complete(async_func(*args, **kwargs))
33
33
  finally:
@@ -13,14 +13,14 @@ T = TypeVar("T", bound="TaskResponse")
13
13
  class TaskResponse(BaseModel, Generic[T]):
14
14
  configuration: OutputConfiguration
15
15
  created_at: datetime
16
- expires_at: Optional[datetime]
17
- finished_at: Optional[datetime]
18
- message: str
19
- output: Optional[OutputResponse]
20
- started_at: Optional[datetime]
16
+ expires_at: Optional[datetime] = None
17
+ finished_at: Optional[datetime] = None
18
+ message: Optional[str] = None
19
+ output: Optional[OutputResponse] = None
20
+ started_at: Optional[datetime] = None
21
21
  status: Status
22
22
  task_id: str
23
- task_url: Optional[str]
23
+ task_url: Optional[str] = None
24
24
  _client: Optional[ChunkrClientProtocol] = PrivateAttr(default=None)
25
25
 
26
26
  def with_client(self, client: ChunkrClientProtocol) -> T:
@@ -39,3 +39,4 @@ __all__ = [
39
39
  "TaskResponse",
40
40
  "Pipeline",
41
41
  ]
42
+
@@ -1,19 +1,40 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: chunkr-ai
3
- Version: 0.0.20
3
+ Version: 0.0.22
4
4
  Summary: Python client for Chunkr: open source document intelligence
5
5
  Author-email: Ishaan Kapoor <ishaan@lumina.sh>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Lumina AI INC
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
6
27
  Project-URL: Homepage, https://chunkr.ai
7
28
  Description-Content-Type: text/markdown
8
29
  License-File: LICENSE
9
30
  Requires-Dist: httpx>=0.25.0
10
31
  Requires-Dist: pillow>=10.0.0
11
32
  Requires-Dist: pydantic>=2.0.0
12
- Requires-Dist: pytest-asyncio>=0.21.0
13
33
  Requires-Dist: python-dotenv>=0.19.0
14
34
  Provides-Extra: test
15
35
  Requires-Dist: pytest>=7.0.0; extra == "test"
16
36
  Requires-Dist: pytest-xdist>=3.0.0; extra == "test"
37
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
17
38
 
18
39
  # Chunkr Python Client
19
40
 
@@ -70,9 +70,9 @@ async def test_expires_in(client, sample_path):
70
70
  assert response.task_id is not None
71
71
  assert response.status == "Succeeded"
72
72
  assert response.output is not None
73
- await asyncio.sleep(10)
73
+ await asyncio.sleep(11)
74
74
  try:
75
- task = await client.get_task(response.task_id)
75
+ await client.get_task(response.task_id)
76
76
  assert False
77
77
  except Exception as e:
78
78
  print(e)
chunkr_ai-0.0.20/LICENSE DELETED
File without changes
File without changes
File without changes
@@ -1,9 +1,9 @@
1
1
  httpx>=0.25.0
2
2
  pillow>=10.0.0
3
3
  pydantic>=2.0.0
4
- pytest-asyncio>=0.21.0
5
4
  python-dotenv>=0.19.0
6
5
 
7
6
  [test]
8
7
  pytest>=7.0.0
9
8
  pytest-xdist>=3.0.0
9
+ pytest-asyncio>=0.21.0