groundx 2.0.20__tar.gz → 2.0.21__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 (84) hide show
  1. {groundx-2.0.20 → groundx-2.0.21}/PKG-INFO +14 -28
  2. {groundx-2.0.20 → groundx-2.0.21}/README.md +13 -27
  3. {groundx-2.0.20 → groundx-2.0.21}/pyproject.toml +1 -1
  4. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/__init__.py +4 -2
  5. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/client_wrapper.py +1 -1
  6. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/documents/client.py +270 -443
  7. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/__init__.py +4 -2
  8. groundx-2.0.21/src/groundx/types/document_local_ingest_request.py +6 -0
  9. groundx-2.0.21/src/groundx/types/ingest_local_document.py +25 -0
  10. groundx-2.0.20/src/groundx/types/document.py → groundx-2.0.21/src/groundx/types/ingest_local_document_metadata.py +6 -9
  11. groundx-2.0.20/src/groundx/types/ingest_local_document.py +0 -43
  12. {groundx-2.0.20 → groundx-2.0.21}/LICENSE +0 -0
  13. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/buckets/__init__.py +0 -0
  14. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/buckets/client.py +0 -0
  15. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/client.py +0 -0
  16. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/__init__.py +0 -0
  17. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/api_error.py +0 -0
  18. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/datetime_utils.py +0 -0
  19. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/file.py +0 -0
  20. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/http_client.py +0 -0
  21. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/jsonable_encoder.py +0 -0
  22. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/pydantic_utilities.py +0 -0
  23. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/query_encoder.py +0 -0
  24. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/remove_none_from_dict.py +0 -0
  25. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/request_options.py +0 -0
  26. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/core/serialization.py +0 -0
  27. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/customer/__init__.py +0 -0
  28. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/customer/client.py +0 -0
  29. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/documents/__init__.py +0 -0
  30. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/environment.py +0 -0
  31. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/errors/__init__.py +0 -0
  32. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/errors/bad_request_error.py +0 -0
  33. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/errors/unauthorized_error.py +0 -0
  34. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/groups/__init__.py +0 -0
  35. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/groups/client.py +0 -0
  36. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/health/__init__.py +0 -0
  37. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/health/client.py +0 -0
  38. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/py.typed +0 -0
  39. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/search/__init__.py +0 -0
  40. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/search/client.py +0 -0
  41. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/search/types/__init__.py +0 -0
  42. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/search/types/search_content_request_id.py +0 -0
  43. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/bounding_box_detail.py +0 -0
  44. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/bucket_detail.py +0 -0
  45. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/bucket_list_response.py +0 -0
  46. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/bucket_response.py +0 -0
  47. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/bucket_update_detail.py +0 -0
  48. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/bucket_update_response.py +0 -0
  49. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/customer_detail.py +0 -0
  50. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/customer_response.py +0 -0
  51. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/document_detail.py +0 -0
  52. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/document_list_response.py +0 -0
  53. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/document_lookup_response.py +0 -0
  54. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/document_response.py +0 -0
  55. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/document_type.py +0 -0
  56. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/group_detail.py +0 -0
  57. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/group_list_response.py +0 -0
  58. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/group_response.py +0 -0
  59. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/health_response.py +0 -0
  60. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/health_response_health.py +0 -0
  61. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/health_service.py +0 -0
  62. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/health_service_status.py +0 -0
  63. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/ingest_remote_document.py +0 -0
  64. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/ingest_response.py +0 -0
  65. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/ingest_response_ingest.py +0 -0
  66. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/message_response.py +0 -0
  67. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/meter_detail.py +0 -0
  68. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/process_status_response.py +0 -0
  69. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/process_status_response_ingest.py +0 -0
  70. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/process_status_response_ingest_progress.py +0 -0
  71. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/process_status_response_ingest_progress_cancelled.py +0 -0
  72. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/process_status_response_ingest_progress_complete.py +0 -0
  73. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/process_status_response_ingest_progress_errors.py +0 -0
  74. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/process_status_response_ingest_progress_processing.py +0 -0
  75. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/processing_status.py +0 -0
  76. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/search_response.py +0 -0
  77. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/search_response_search.py +0 -0
  78. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/search_result_item.py +0 -0
  79. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/sort.py +0 -0
  80. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/sort_order.py +0 -0
  81. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/subscription_detail.py +0 -0
  82. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/subscription_detail_meters.py +0 -0
  83. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/types/website_source.py +0 -0
  84. {groundx-2.0.20 → groundx-2.0.21}/src/groundx/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: groundx
3
- Version: 2.0.20
3
+ Version: 2.0.21
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.8,<4.0
@@ -52,26 +52,19 @@ A full reference for this library is available [here](./reference.md).
52
52
  Instantiate and use the client with the following:
53
53
 
54
54
  ```python
55
- from groundx import Document, GroundX
55
+ from groundx import GroundX, IngestRemoteDocument
56
56
 
57
57
  client = GroundX(
58
58
  api_key="YOUR_API_KEY",
59
59
  )
60
- client.documents.ingest(
60
+ client.documents.ingest_remote(
61
61
  documents=[
62
- Document(
62
+ IngestRemoteDocument(
63
63
  bucket_id=1234,
64
64
  file_name="my_file1.txt",
65
- file_path="https://my.source.url.com/file1.txt",
66
65
  file_type="txt",
67
- search_data={"key": "value"},
68
- ),
69
- Document(
70
- bucket_id=1234,
71
- file_name="my_file2.pdf",
72
- file_path="/local/path/file2.pdf",
73
- file_type="pdf",
74
- ),
66
+ source_url="https://my.source.url.com/file1.txt",
67
+ )
75
68
  ],
76
69
  )
77
70
  ```
@@ -83,7 +76,7 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
83
76
  ```python
84
77
  import asyncio
85
78
 
86
- from groundx import AsyncGroundX, Document
79
+ from groundx import AsyncGroundX, IngestRemoteDocument
87
80
 
88
81
  client = AsyncGroundX(
89
82
  api_key="YOUR_API_KEY",
@@ -91,21 +84,14 @@ client = AsyncGroundX(
91
84
 
92
85
 
93
86
  async def main() -> None:
94
- await client.documents.ingest(
87
+ await client.documents.ingest_remote(
95
88
  documents=[
96
- Document(
89
+ IngestRemoteDocument(
97
90
  bucket_id=1234,
98
91
  file_name="my_file1.txt",
99
- file_path="https://my.source.url.com/file1.txt",
100
92
  file_type="txt",
101
- search_data={"key": "value"},
102
- ),
103
- Document(
104
- bucket_id=1234,
105
- file_name="my_file2.pdf",
106
- file_path="/local/path/file2.pdf",
107
- file_type="pdf",
108
- ),
93
+ source_url="https://my.source.url.com/file1.txt",
94
+ )
109
95
  ],
110
96
  )
111
97
 
@@ -122,7 +108,7 @@ will be thrown.
122
108
  from groundx.core.api_error import ApiError
123
109
 
124
110
  try:
125
- client.documents.ingest(...)
111
+ client.documents.ingest_remote(...)
126
112
  except ApiError as e:
127
113
  print(e.status_code)
128
114
  print(e.body)
@@ -145,7 +131,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
145
131
  Use the `max_retries` request option to configure this behavior.
146
132
 
147
133
  ```python
148
- client.documents.ingest(..., request_options={
134
+ client.documents.ingest_remote(..., request_options={
149
135
  "max_retries": 1
150
136
  })
151
137
  ```
@@ -165,7 +151,7 @@ client = GroundX(
165
151
 
166
152
 
167
153
  # Override timeout for a specific method
168
- client.documents.ingest(..., request_options={
154
+ client.documents.ingest_remote(..., request_options={
169
155
  "timeout_in_seconds": 1
170
156
  })
171
157
  ```
@@ -24,26 +24,19 @@ A full reference for this library is available [here](./reference.md).
24
24
  Instantiate and use the client with the following:
25
25
 
26
26
  ```python
27
- from groundx import Document, GroundX
27
+ from groundx import GroundX, IngestRemoteDocument
28
28
 
29
29
  client = GroundX(
30
30
  api_key="YOUR_API_KEY",
31
31
  )
32
- client.documents.ingest(
32
+ client.documents.ingest_remote(
33
33
  documents=[
34
- Document(
34
+ IngestRemoteDocument(
35
35
  bucket_id=1234,
36
36
  file_name="my_file1.txt",
37
- file_path="https://my.source.url.com/file1.txt",
38
37
  file_type="txt",
39
- search_data={"key": "value"},
40
- ),
41
- Document(
42
- bucket_id=1234,
43
- file_name="my_file2.pdf",
44
- file_path="/local/path/file2.pdf",
45
- file_type="pdf",
46
- ),
38
+ source_url="https://my.source.url.com/file1.txt",
39
+ )
47
40
  ],
48
41
  )
49
42
  ```
@@ -55,7 +48,7 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
55
48
  ```python
56
49
  import asyncio
57
50
 
58
- from groundx import AsyncGroundX, Document
51
+ from groundx import AsyncGroundX, IngestRemoteDocument
59
52
 
60
53
  client = AsyncGroundX(
61
54
  api_key="YOUR_API_KEY",
@@ -63,21 +56,14 @@ client = AsyncGroundX(
63
56
 
64
57
 
65
58
  async def main() -> None:
66
- await client.documents.ingest(
59
+ await client.documents.ingest_remote(
67
60
  documents=[
68
- Document(
61
+ IngestRemoteDocument(
69
62
  bucket_id=1234,
70
63
  file_name="my_file1.txt",
71
- file_path="https://my.source.url.com/file1.txt",
72
64
  file_type="txt",
73
- search_data={"key": "value"},
74
- ),
75
- Document(
76
- bucket_id=1234,
77
- file_name="my_file2.pdf",
78
- file_path="/local/path/file2.pdf",
79
- file_type="pdf",
80
- ),
65
+ source_url="https://my.source.url.com/file1.txt",
66
+ )
81
67
  ],
82
68
  )
83
69
 
@@ -94,7 +80,7 @@ will be thrown.
94
80
  from groundx.core.api_error import ApiError
95
81
 
96
82
  try:
97
- client.documents.ingest(...)
83
+ client.documents.ingest_remote(...)
98
84
  except ApiError as e:
99
85
  print(e.status_code)
100
86
  print(e.body)
@@ -117,7 +103,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
117
103
  Use the `max_retries` request option to configure this behavior.
118
104
 
119
105
  ```python
120
- client.documents.ingest(..., request_options={
106
+ client.documents.ingest_remote(..., request_options={
121
107
  "max_retries": 1
122
108
  })
123
109
  ```
@@ -137,7 +123,7 @@ client = GroundX(
137
123
 
138
124
 
139
125
  # Override timeout for a specific method
140
- client.documents.ingest(..., request_options={
126
+ client.documents.ingest_remote(..., request_options={
141
127
  "timeout_in_seconds": 1
142
128
  })
143
129
  ```
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "groundx"
3
- version = "2.0.20"
3
+ version = "2.0.21"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  authors = []
@@ -9,9 +9,9 @@ from .types import (
9
9
  BucketUpdateResponse,
10
10
  CustomerDetail,
11
11
  CustomerResponse,
12
- Document,
13
12
  DocumentDetail,
14
13
  DocumentListResponse,
14
+ DocumentLocalIngestRequest,
15
15
  DocumentLookupResponse,
16
16
  DocumentResponse,
17
17
  DocumentType,
@@ -23,6 +23,7 @@ from .types import (
23
23
  HealthService,
24
24
  HealthServiceStatus,
25
25
  IngestLocalDocument,
26
+ IngestLocalDocumentMetadata,
26
27
  IngestRemoteDocument,
27
28
  IngestResponse,
28
29
  IngestResponseIngest,
@@ -63,9 +64,9 @@ __all__ = [
63
64
  "BucketUpdateResponse",
64
65
  "CustomerDetail",
65
66
  "CustomerResponse",
66
- "Document",
67
67
  "DocumentDetail",
68
68
  "DocumentListResponse",
69
+ "DocumentLocalIngestRequest",
69
70
  "DocumentLookupResponse",
70
71
  "DocumentResponse",
71
72
  "DocumentType",
@@ -79,6 +80,7 @@ __all__ = [
79
80
  "HealthService",
80
81
  "HealthServiceStatus",
81
82
  "IngestLocalDocument",
83
+ "IngestLocalDocumentMetadata",
82
84
  "IngestRemoteDocument",
83
85
  "IngestResponse",
84
86
  "IngestResponseIngest",
@@ -16,7 +16,7 @@ class BaseClientWrapper:
16
16
  headers: typing.Dict[str, str] = {
17
17
  "X-Fern-Language": "Python",
18
18
  "X-Fern-SDK-Name": "groundx",
19
- "X-Fern-SDK-Version": "2.0.20",
19
+ "X-Fern-SDK-Version": "2.0.21",
20
20
  }
21
21
  headers["X-API-Key"] = self.api_key
22
22
  return headers