chunkr-ai 0.1.0__py3-none-any.whl → 0.1.0a2__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.
Files changed (57) hide show
  1. chunkr_ai/__init__.py +89 -2
  2. chunkr_ai/_base_client.py +1995 -0
  3. chunkr_ai/_client.py +403 -0
  4. chunkr_ai/_compat.py +219 -0
  5. chunkr_ai/_constants.py +14 -0
  6. chunkr_ai/_exceptions.py +108 -0
  7. chunkr_ai/_files.py +123 -0
  8. chunkr_ai/_models.py +829 -0
  9. chunkr_ai/_qs.py +150 -0
  10. chunkr_ai/_resource.py +43 -0
  11. chunkr_ai/_response.py +830 -0
  12. chunkr_ai/_streaming.py +333 -0
  13. chunkr_ai/_types.py +219 -0
  14. chunkr_ai/_utils/__init__.py +57 -0
  15. chunkr_ai/_utils/_logs.py +25 -0
  16. chunkr_ai/_utils/_proxy.py +65 -0
  17. chunkr_ai/_utils/_reflection.py +42 -0
  18. chunkr_ai/_utils/_resources_proxy.py +24 -0
  19. chunkr_ai/_utils/_streams.py +12 -0
  20. chunkr_ai/_utils/_sync.py +86 -0
  21. chunkr_ai/_utils/_transform.py +447 -0
  22. chunkr_ai/_utils/_typing.py +151 -0
  23. chunkr_ai/_utils/_utils.py +422 -0
  24. chunkr_ai/_version.py +4 -0
  25. chunkr_ai/lib/.keep +4 -0
  26. chunkr_ai/pagination.py +71 -0
  27. chunkr_ai/resources/__init__.py +33 -0
  28. chunkr_ai/resources/health.py +136 -0
  29. chunkr_ai/resources/task/__init__.py +33 -0
  30. chunkr_ai/resources/task/parse.py +616 -0
  31. chunkr_ai/resources/task/task.py +664 -0
  32. chunkr_ai/types/__init__.py +8 -0
  33. chunkr_ai/types/health_check_response.py +7 -0
  34. chunkr_ai/types/task/__init__.py +7 -0
  35. chunkr_ai/types/task/parse_create_params.py +806 -0
  36. chunkr_ai/types/task/parse_update_params.py +806 -0
  37. chunkr_ai/types/task/task.py +1186 -0
  38. chunkr_ai/types/task_get_params.py +18 -0
  39. chunkr_ai/types/task_list_params.py +37 -0
  40. chunkr_ai-0.1.0a2.dist-info/METADATA +504 -0
  41. chunkr_ai-0.1.0a2.dist-info/RECORD +44 -0
  42. {chunkr_ai-0.1.0.dist-info → chunkr_ai-0.1.0a2.dist-info}/WHEEL +1 -2
  43. chunkr_ai-0.1.0a2.dist-info/licenses/LICENSE +201 -0
  44. chunkr_ai/api/auth.py +0 -13
  45. chunkr_ai/api/chunkr.py +0 -103
  46. chunkr_ai/api/chunkr_base.py +0 -185
  47. chunkr_ai/api/configuration.py +0 -313
  48. chunkr_ai/api/decorators.py +0 -101
  49. chunkr_ai/api/misc.py +0 -139
  50. chunkr_ai/api/protocol.py +0 -14
  51. chunkr_ai/api/task_response.py +0 -208
  52. chunkr_ai/models.py +0 -55
  53. chunkr_ai-0.1.0.dist-info/METADATA +0 -268
  54. chunkr_ai-0.1.0.dist-info/RECORD +0 -16
  55. chunkr_ai-0.1.0.dist-info/licenses/LICENSE +0 -21
  56. chunkr_ai-0.1.0.dist-info/top_level.txt +0 -1
  57. /chunkr_ai/{api/__init__.py → py.typed} +0 -0
@@ -0,0 +1,136 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import httpx
6
+
7
+ from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
8
+ from .._compat import cached_property
9
+ from .._resource import SyncAPIResource, AsyncAPIResource
10
+ from .._response import (
11
+ to_raw_response_wrapper,
12
+ to_streamed_response_wrapper,
13
+ async_to_raw_response_wrapper,
14
+ async_to_streamed_response_wrapper,
15
+ )
16
+ from .._base_client import make_request_options
17
+
18
+ __all__ = ["HealthResource", "AsyncHealthResource"]
19
+
20
+
21
+ class HealthResource(SyncAPIResource):
22
+ @cached_property
23
+ def with_raw_response(self) -> HealthResourceWithRawResponse:
24
+ """
25
+ This property can be used as a prefix for any HTTP method call to return
26
+ the raw response object instead of the parsed content.
27
+
28
+ For more information, see https://www.github.com/lumina-ai-inc/chunkr-python#accessing-raw-response-data-eg-headers
29
+ """
30
+ return HealthResourceWithRawResponse(self)
31
+
32
+ @cached_property
33
+ def with_streaming_response(self) -> HealthResourceWithStreamingResponse:
34
+ """
35
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
36
+
37
+ For more information, see https://www.github.com/lumina-ai-inc/chunkr-python#with_streaming_response
38
+ """
39
+ return HealthResourceWithStreamingResponse(self)
40
+
41
+ def check(
42
+ self,
43
+ *,
44
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
45
+ # The extra values given here take precedence over values defined on the client or passed to this method.
46
+ extra_headers: Headers | None = None,
47
+ extra_query: Query | None = None,
48
+ extra_body: Body | None = None,
49
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
50
+ ) -> str:
51
+ """Confirmation that the service can respond to requests"""
52
+ extra_headers = {"Accept": "text/plain", **(extra_headers or {})}
53
+ return self._get(
54
+ "/health",
55
+ options=make_request_options(
56
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
57
+ ),
58
+ cast_to=str,
59
+ )
60
+
61
+
62
+ class AsyncHealthResource(AsyncAPIResource):
63
+ @cached_property
64
+ def with_raw_response(self) -> AsyncHealthResourceWithRawResponse:
65
+ """
66
+ This property can be used as a prefix for any HTTP method call to return
67
+ the raw response object instead of the parsed content.
68
+
69
+ For more information, see https://www.github.com/lumina-ai-inc/chunkr-python#accessing-raw-response-data-eg-headers
70
+ """
71
+ return AsyncHealthResourceWithRawResponse(self)
72
+
73
+ @cached_property
74
+ def with_streaming_response(self) -> AsyncHealthResourceWithStreamingResponse:
75
+ """
76
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
77
+
78
+ For more information, see https://www.github.com/lumina-ai-inc/chunkr-python#with_streaming_response
79
+ """
80
+ return AsyncHealthResourceWithStreamingResponse(self)
81
+
82
+ async def check(
83
+ self,
84
+ *,
85
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
86
+ # The extra values given here take precedence over values defined on the client or passed to this method.
87
+ extra_headers: Headers | None = None,
88
+ extra_query: Query | None = None,
89
+ extra_body: Body | None = None,
90
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
91
+ ) -> str:
92
+ """Confirmation that the service can respond to requests"""
93
+ extra_headers = {"Accept": "text/plain", **(extra_headers or {})}
94
+ return await self._get(
95
+ "/health",
96
+ options=make_request_options(
97
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
98
+ ),
99
+ cast_to=str,
100
+ )
101
+
102
+
103
+ class HealthResourceWithRawResponse:
104
+ def __init__(self, health: HealthResource) -> None:
105
+ self._health = health
106
+
107
+ self.check = to_raw_response_wrapper(
108
+ health.check,
109
+ )
110
+
111
+
112
+ class AsyncHealthResourceWithRawResponse:
113
+ def __init__(self, health: AsyncHealthResource) -> None:
114
+ self._health = health
115
+
116
+ self.check = async_to_raw_response_wrapper(
117
+ health.check,
118
+ )
119
+
120
+
121
+ class HealthResourceWithStreamingResponse:
122
+ def __init__(self, health: HealthResource) -> None:
123
+ self._health = health
124
+
125
+ self.check = to_streamed_response_wrapper(
126
+ health.check,
127
+ )
128
+
129
+
130
+ class AsyncHealthResourceWithStreamingResponse:
131
+ def __init__(self, health: AsyncHealthResource) -> None:
132
+ self._health = health
133
+
134
+ self.check = async_to_streamed_response_wrapper(
135
+ health.check,
136
+ )
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .task import (
4
+ TaskResource,
5
+ AsyncTaskResource,
6
+ TaskResourceWithRawResponse,
7
+ AsyncTaskResourceWithRawResponse,
8
+ TaskResourceWithStreamingResponse,
9
+ AsyncTaskResourceWithStreamingResponse,
10
+ )
11
+ from .parse import (
12
+ ParseResource,
13
+ AsyncParseResource,
14
+ ParseResourceWithRawResponse,
15
+ AsyncParseResourceWithRawResponse,
16
+ ParseResourceWithStreamingResponse,
17
+ AsyncParseResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "ParseResource",
22
+ "AsyncParseResource",
23
+ "ParseResourceWithRawResponse",
24
+ "AsyncParseResourceWithRawResponse",
25
+ "ParseResourceWithStreamingResponse",
26
+ "AsyncParseResourceWithStreamingResponse",
27
+ "TaskResource",
28
+ "AsyncTaskResource",
29
+ "TaskResourceWithRawResponse",
30
+ "AsyncTaskResourceWithRawResponse",
31
+ "TaskResourceWithStreamingResponse",
32
+ "AsyncTaskResourceWithStreamingResponse",
33
+ ]