groundx 2.0.18__py3-none-any.whl → 2.0.20__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.
- groundx/__init__.py +4 -4
- groundx/core/client_wrapper.py +1 -1
- groundx/documents/client.py +48 -62
- groundx/types/__init__.py +4 -4
- groundx/types/{ingest_document.py → document.py} +1 -1
- groundx/types/{crawl_website_source.py → website_source.py} +1 -1
- {groundx-2.0.18.dist-info → groundx-2.0.20.dist-info}/METADATA +28 -16
- {groundx-2.0.18.dist-info → groundx-2.0.20.dist-info}/RECORD +10 -10
- {groundx-2.0.18.dist-info → groundx-2.0.20.dist-info}/LICENSE +0 -0
- {groundx-2.0.18.dist-info → groundx-2.0.20.dist-info}/WHEEL +0 -0
groundx/__init__.py
CHANGED
@@ -7,9 +7,9 @@ from .types import (
|
|
7
7
|
BucketResponse,
|
8
8
|
BucketUpdateDetail,
|
9
9
|
BucketUpdateResponse,
|
10
|
-
CrawlWebsiteSource,
|
11
10
|
CustomerDetail,
|
12
11
|
CustomerResponse,
|
12
|
+
Document,
|
13
13
|
DocumentDetail,
|
14
14
|
DocumentListResponse,
|
15
15
|
DocumentLookupResponse,
|
@@ -22,7 +22,6 @@ from .types import (
|
|
22
22
|
HealthResponseHealth,
|
23
23
|
HealthService,
|
24
24
|
HealthServiceStatus,
|
25
|
-
IngestDocument,
|
26
25
|
IngestLocalDocument,
|
27
26
|
IngestRemoteDocument,
|
28
27
|
IngestResponse,
|
@@ -44,6 +43,7 @@ from .types import (
|
|
44
43
|
SortOrder,
|
45
44
|
SubscriptionDetail,
|
46
45
|
SubscriptionDetailMeters,
|
46
|
+
WebsiteSource,
|
47
47
|
)
|
48
48
|
from .errors import BadRequestError, UnauthorizedError
|
49
49
|
from . import buckets, customer, documents, groups, health, search
|
@@ -61,9 +61,9 @@ __all__ = [
|
|
61
61
|
"BucketResponse",
|
62
62
|
"BucketUpdateDetail",
|
63
63
|
"BucketUpdateResponse",
|
64
|
-
"CrawlWebsiteSource",
|
65
64
|
"CustomerDetail",
|
66
65
|
"CustomerResponse",
|
66
|
+
"Document",
|
67
67
|
"DocumentDetail",
|
68
68
|
"DocumentListResponse",
|
69
69
|
"DocumentLookupResponse",
|
@@ -78,7 +78,6 @@ __all__ = [
|
|
78
78
|
"HealthResponseHealth",
|
79
79
|
"HealthService",
|
80
80
|
"HealthServiceStatus",
|
81
|
-
"IngestDocument",
|
82
81
|
"IngestLocalDocument",
|
83
82
|
"IngestRemoteDocument",
|
84
83
|
"IngestResponse",
|
@@ -102,6 +101,7 @@ __all__ = [
|
|
102
101
|
"SubscriptionDetail",
|
103
102
|
"SubscriptionDetailMeters",
|
104
103
|
"UnauthorizedError",
|
104
|
+
"WebsiteSource",
|
105
105
|
"__version__",
|
106
106
|
"buckets",
|
107
107
|
"customer",
|
groundx/core/client_wrapper.py
CHANGED
groundx/documents/client.py
CHANGED
@@ -10,14 +10,14 @@ from ..types.document_list_response import DocumentListResponse
|
|
10
10
|
from ..core.pydantic_utilities import parse_obj_as
|
11
11
|
from json.decoder import JSONDecodeError
|
12
12
|
from ..core.api_error import ApiError
|
13
|
-
from ..types.
|
13
|
+
from ..types.document import Document
|
14
14
|
from ..types.ingest_response import IngestResponse
|
15
15
|
from ..core.serialization import convert_and_respect_annotation_metadata
|
16
16
|
from ..errors.bad_request_error import BadRequestError
|
17
17
|
from ..errors.unauthorized_error import UnauthorizedError
|
18
18
|
from ..types.ingest_remote_document import IngestRemoteDocument
|
19
19
|
from ..types.ingest_local_document import IngestLocalDocument
|
20
|
-
from ..types.
|
20
|
+
from ..types.website_source import WebsiteSource
|
21
21
|
from ..types.process_status_response import ProcessStatusResponse
|
22
22
|
from ..core.jsonable_encoder import jsonable_encoder
|
23
23
|
from ..types.document_lookup_response import DocumentLookupResponse
|
@@ -112,8 +112,8 @@ class DocumentsClient:
|
|
112
112
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
113
113
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
114
114
|
|
115
|
-
def
|
116
|
-
self, *, documents: typing.Sequence[
|
115
|
+
def ingest(
|
116
|
+
self, *, documents: typing.Sequence[Document], request_options: typing.Optional[RequestOptions] = None
|
117
117
|
) -> IngestResponse:
|
118
118
|
"""
|
119
119
|
Ingest documents hosted on public URLs or a local file system for ingestion into a GroundX bucket.
|
@@ -122,7 +122,7 @@ class DocumentsClient:
|
|
122
122
|
|
123
123
|
Parameters
|
124
124
|
----------
|
125
|
-
documents : typing.Sequence[
|
125
|
+
documents : typing.Sequence[Document]
|
126
126
|
|
127
127
|
request_options : typing.Optional[RequestOptions]
|
128
128
|
Request-specific configuration.
|
@@ -134,20 +134,26 @@ class DocumentsClient:
|
|
134
134
|
|
135
135
|
Examples
|
136
136
|
--------
|
137
|
-
from groundx import
|
137
|
+
from groundx import Document, GroundX
|
138
138
|
|
139
139
|
client = GroundX(
|
140
140
|
api_key="YOUR_API_KEY",
|
141
141
|
)
|
142
|
-
client.documents.
|
142
|
+
client.documents.ingest(
|
143
143
|
documents=[
|
144
|
-
|
144
|
+
Document(
|
145
145
|
bucket_id=1234,
|
146
|
-
file_name="
|
147
|
-
file_path="https://my.source.url.com/
|
146
|
+
file_name="my_file1.txt",
|
147
|
+
file_path="https://my.source.url.com/file1.txt",
|
148
148
|
file_type="txt",
|
149
149
|
search_data={"key": "value"},
|
150
|
-
)
|
150
|
+
),
|
151
|
+
Document(
|
152
|
+
bucket_id=1234,
|
153
|
+
file_name="my_file2.pdf",
|
154
|
+
file_path="/local/path/file2.pdf",
|
155
|
+
file_type="pdf",
|
156
|
+
),
|
151
157
|
],
|
152
158
|
)
|
153
159
|
"""
|
@@ -156,7 +162,7 @@ class DocumentsClient:
|
|
156
162
|
method="POST",
|
157
163
|
json={
|
158
164
|
"documents": convert_and_respect_annotation_metadata(
|
159
|
-
object_=documents, annotation=typing.Sequence[
|
165
|
+
object_=documents, annotation=typing.Sequence[Document], direction="write"
|
160
166
|
),
|
161
167
|
},
|
162
168
|
headers={
|
@@ -308,9 +314,6 @@ class DocumentsClient:
|
|
308
314
|
documents=[
|
309
315
|
IngestRemoteDocument(
|
310
316
|
bucket_id=1234,
|
311
|
-
file_name="my_file.txt",
|
312
|
-
file_type="txt",
|
313
|
-
search_data={"key": "value"},
|
314
317
|
source_url="https://my.source.url.com/file.txt",
|
315
318
|
)
|
316
319
|
],
|
@@ -389,22 +392,12 @@ class DocumentsClient:
|
|
389
392
|
|
390
393
|
Examples
|
391
394
|
--------
|
392
|
-
from groundx import GroundX
|
395
|
+
from groundx import GroundX
|
393
396
|
|
394
397
|
client = GroundX(
|
395
398
|
api_key="YOUR_API_KEY",
|
396
399
|
)
|
397
|
-
client.documents.ingest_local(
|
398
|
-
documents=[
|
399
|
-
IngestLocalDocument(
|
400
|
-
bucket_id=1234,
|
401
|
-
file_data="binary data",
|
402
|
-
file_name="my_file.txt",
|
403
|
-
file_type="txt",
|
404
|
-
search_data={"key": "value"},
|
405
|
-
)
|
406
|
-
],
|
407
|
-
)
|
400
|
+
client.documents.ingest_local()
|
408
401
|
"""
|
409
402
|
_response = self._client_wrapper.httpx_client.request(
|
410
403
|
"v1/ingest/documents/local",
|
@@ -451,7 +444,7 @@ class DocumentsClient:
|
|
451
444
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
452
445
|
|
453
446
|
def crawl_website(
|
454
|
-
self, *, websites: typing.Sequence[
|
447
|
+
self, *, websites: typing.Sequence[WebsiteSource], request_options: typing.Optional[RequestOptions] = None
|
455
448
|
) -> IngestResponse:
|
456
449
|
"""
|
457
450
|
Upload the content of a publicly accessible website for ingestion into a GroundX bucket. This is done by following links within a specified URL, recursively, up to a specified depth or number of pages.
|
@@ -460,7 +453,7 @@ class DocumentsClient:
|
|
460
453
|
|
461
454
|
Parameters
|
462
455
|
----------
|
463
|
-
websites : typing.Sequence[
|
456
|
+
websites : typing.Sequence[WebsiteSource]
|
464
457
|
|
465
458
|
request_options : typing.Optional[RequestOptions]
|
466
459
|
Request-specific configuration.
|
@@ -472,14 +465,14 @@ class DocumentsClient:
|
|
472
465
|
|
473
466
|
Examples
|
474
467
|
--------
|
475
|
-
from groundx import
|
468
|
+
from groundx import GroundX, WebsiteSource
|
476
469
|
|
477
470
|
client = GroundX(
|
478
471
|
api_key="YOUR_API_KEY",
|
479
472
|
)
|
480
473
|
client.documents.crawl_website(
|
481
474
|
websites=[
|
482
|
-
|
475
|
+
WebsiteSource(
|
483
476
|
bucket_id=1234,
|
484
477
|
cap=100,
|
485
478
|
depth=3,
|
@@ -494,7 +487,7 @@ class DocumentsClient:
|
|
494
487
|
method="POST",
|
495
488
|
json={
|
496
489
|
"websites": convert_and_respect_annotation_metadata(
|
497
|
-
object_=websites, annotation=typing.Sequence[
|
490
|
+
object_=websites, annotation=typing.Sequence[WebsiteSource], direction="write"
|
498
491
|
),
|
499
492
|
},
|
500
493
|
headers={
|
@@ -947,8 +940,8 @@ class AsyncDocumentsClient:
|
|
947
940
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
948
941
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
949
942
|
|
950
|
-
async def
|
951
|
-
self, *, documents: typing.Sequence[
|
943
|
+
async def ingest(
|
944
|
+
self, *, documents: typing.Sequence[Document], request_options: typing.Optional[RequestOptions] = None
|
952
945
|
) -> IngestResponse:
|
953
946
|
"""
|
954
947
|
Ingest documents hosted on public URLs or a local file system for ingestion into a GroundX bucket.
|
@@ -957,7 +950,7 @@ class AsyncDocumentsClient:
|
|
957
950
|
|
958
951
|
Parameters
|
959
952
|
----------
|
960
|
-
documents : typing.Sequence[
|
953
|
+
documents : typing.Sequence[Document]
|
961
954
|
|
962
955
|
request_options : typing.Optional[RequestOptions]
|
963
956
|
Request-specific configuration.
|
@@ -971,7 +964,7 @@ class AsyncDocumentsClient:
|
|
971
964
|
--------
|
972
965
|
import asyncio
|
973
966
|
|
974
|
-
from groundx import AsyncGroundX,
|
967
|
+
from groundx import AsyncGroundX, Document
|
975
968
|
|
976
969
|
client = AsyncGroundX(
|
977
970
|
api_key="YOUR_API_KEY",
|
@@ -979,15 +972,21 @@ class AsyncDocumentsClient:
|
|
979
972
|
|
980
973
|
|
981
974
|
async def main() -> None:
|
982
|
-
await client.documents.
|
975
|
+
await client.documents.ingest(
|
983
976
|
documents=[
|
984
|
-
|
977
|
+
Document(
|
985
978
|
bucket_id=1234,
|
986
|
-
file_name="
|
987
|
-
file_path="https://my.source.url.com/
|
979
|
+
file_name="my_file1.txt",
|
980
|
+
file_path="https://my.source.url.com/file1.txt",
|
988
981
|
file_type="txt",
|
989
982
|
search_data={"key": "value"},
|
990
|
-
)
|
983
|
+
),
|
984
|
+
Document(
|
985
|
+
bucket_id=1234,
|
986
|
+
file_name="my_file2.pdf",
|
987
|
+
file_path="/local/path/file2.pdf",
|
988
|
+
file_type="pdf",
|
989
|
+
),
|
991
990
|
],
|
992
991
|
)
|
993
992
|
|
@@ -999,7 +998,7 @@ class AsyncDocumentsClient:
|
|
999
998
|
method="POST",
|
1000
999
|
json={
|
1001
1000
|
"documents": convert_and_respect_annotation_metadata(
|
1002
|
-
object_=documents, annotation=typing.Sequence[
|
1001
|
+
object_=documents, annotation=typing.Sequence[Document], direction="write"
|
1003
1002
|
),
|
1004
1003
|
},
|
1005
1004
|
headers={
|
@@ -1164,9 +1163,6 @@ class AsyncDocumentsClient:
|
|
1164
1163
|
documents=[
|
1165
1164
|
IngestRemoteDocument(
|
1166
1165
|
bucket_id=1234,
|
1167
|
-
file_name="my_file.txt",
|
1168
|
-
file_type="txt",
|
1169
|
-
search_data={"key": "value"},
|
1170
1166
|
source_url="https://my.source.url.com/file.txt",
|
1171
1167
|
)
|
1172
1168
|
],
|
@@ -1250,7 +1246,7 @@ class AsyncDocumentsClient:
|
|
1250
1246
|
--------
|
1251
1247
|
import asyncio
|
1252
1248
|
|
1253
|
-
from groundx import AsyncGroundX
|
1249
|
+
from groundx import AsyncGroundX
|
1254
1250
|
|
1255
1251
|
client = AsyncGroundX(
|
1256
1252
|
api_key="YOUR_API_KEY",
|
@@ -1258,17 +1254,7 @@ class AsyncDocumentsClient:
|
|
1258
1254
|
|
1259
1255
|
|
1260
1256
|
async def main() -> None:
|
1261
|
-
await client.documents.ingest_local(
|
1262
|
-
documents=[
|
1263
|
-
IngestLocalDocument(
|
1264
|
-
bucket_id=1234,
|
1265
|
-
file_data="binary data",
|
1266
|
-
file_name="my_file.txt",
|
1267
|
-
file_type="txt",
|
1268
|
-
search_data={"key": "value"},
|
1269
|
-
)
|
1270
|
-
],
|
1271
|
-
)
|
1257
|
+
await client.documents.ingest_local()
|
1272
1258
|
|
1273
1259
|
|
1274
1260
|
asyncio.run(main())
|
@@ -1318,7 +1304,7 @@ class AsyncDocumentsClient:
|
|
1318
1304
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1319
1305
|
|
1320
1306
|
async def crawl_website(
|
1321
|
-
self, *, websites: typing.Sequence[
|
1307
|
+
self, *, websites: typing.Sequence[WebsiteSource], request_options: typing.Optional[RequestOptions] = None
|
1322
1308
|
) -> IngestResponse:
|
1323
1309
|
"""
|
1324
1310
|
Upload the content of a publicly accessible website for ingestion into a GroundX bucket. This is done by following links within a specified URL, recursively, up to a specified depth or number of pages.
|
@@ -1327,7 +1313,7 @@ class AsyncDocumentsClient:
|
|
1327
1313
|
|
1328
1314
|
Parameters
|
1329
1315
|
----------
|
1330
|
-
websites : typing.Sequence[
|
1316
|
+
websites : typing.Sequence[WebsiteSource]
|
1331
1317
|
|
1332
1318
|
request_options : typing.Optional[RequestOptions]
|
1333
1319
|
Request-specific configuration.
|
@@ -1341,7 +1327,7 @@ class AsyncDocumentsClient:
|
|
1341
1327
|
--------
|
1342
1328
|
import asyncio
|
1343
1329
|
|
1344
|
-
from groundx import AsyncGroundX,
|
1330
|
+
from groundx import AsyncGroundX, WebsiteSource
|
1345
1331
|
|
1346
1332
|
client = AsyncGroundX(
|
1347
1333
|
api_key="YOUR_API_KEY",
|
@@ -1351,7 +1337,7 @@ class AsyncDocumentsClient:
|
|
1351
1337
|
async def main() -> None:
|
1352
1338
|
await client.documents.crawl_website(
|
1353
1339
|
websites=[
|
1354
|
-
|
1340
|
+
WebsiteSource(
|
1355
1341
|
bucket_id=1234,
|
1356
1342
|
cap=100,
|
1357
1343
|
depth=3,
|
@@ -1369,7 +1355,7 @@ class AsyncDocumentsClient:
|
|
1369
1355
|
method="POST",
|
1370
1356
|
json={
|
1371
1357
|
"websites": convert_and_respect_annotation_metadata(
|
1372
|
-
object_=websites, annotation=typing.Sequence[
|
1358
|
+
object_=websites, annotation=typing.Sequence[WebsiteSource], direction="write"
|
1373
1359
|
),
|
1374
1360
|
},
|
1375
1361
|
headers={
|
groundx/types/__init__.py
CHANGED
@@ -6,9 +6,9 @@ from .bucket_list_response import BucketListResponse
|
|
6
6
|
from .bucket_response import BucketResponse
|
7
7
|
from .bucket_update_detail import BucketUpdateDetail
|
8
8
|
from .bucket_update_response import BucketUpdateResponse
|
9
|
-
from .crawl_website_source import CrawlWebsiteSource
|
10
9
|
from .customer_detail import CustomerDetail
|
11
10
|
from .customer_response import CustomerResponse
|
11
|
+
from .document import Document
|
12
12
|
from .document_detail import DocumentDetail
|
13
13
|
from .document_list_response import DocumentListResponse
|
14
14
|
from .document_lookup_response import DocumentLookupResponse
|
@@ -21,7 +21,6 @@ from .health_response import HealthResponse
|
|
21
21
|
from .health_response_health import HealthResponseHealth
|
22
22
|
from .health_service import HealthService
|
23
23
|
from .health_service_status import HealthServiceStatus
|
24
|
-
from .ingest_document import IngestDocument
|
25
24
|
from .ingest_local_document import IngestLocalDocument
|
26
25
|
from .ingest_remote_document import IngestRemoteDocument
|
27
26
|
from .ingest_response import IngestResponse
|
@@ -43,6 +42,7 @@ from .sort import Sort
|
|
43
42
|
from .sort_order import SortOrder
|
44
43
|
from .subscription_detail import SubscriptionDetail
|
45
44
|
from .subscription_detail_meters import SubscriptionDetailMeters
|
45
|
+
from .website_source import WebsiteSource
|
46
46
|
|
47
47
|
__all__ = [
|
48
48
|
"BoundingBoxDetail",
|
@@ -51,9 +51,9 @@ __all__ = [
|
|
51
51
|
"BucketResponse",
|
52
52
|
"BucketUpdateDetail",
|
53
53
|
"BucketUpdateResponse",
|
54
|
-
"CrawlWebsiteSource",
|
55
54
|
"CustomerDetail",
|
56
55
|
"CustomerResponse",
|
56
|
+
"Document",
|
57
57
|
"DocumentDetail",
|
58
58
|
"DocumentListResponse",
|
59
59
|
"DocumentLookupResponse",
|
@@ -66,7 +66,6 @@ __all__ = [
|
|
66
66
|
"HealthResponseHealth",
|
67
67
|
"HealthService",
|
68
68
|
"HealthServiceStatus",
|
69
|
-
"IngestDocument",
|
70
69
|
"IngestLocalDocument",
|
71
70
|
"IngestRemoteDocument",
|
72
71
|
"IngestResponse",
|
@@ -88,4 +87,5 @@ __all__ = [
|
|
88
87
|
"SortOrder",
|
89
88
|
"SubscriptionDetail",
|
90
89
|
"SubscriptionDetailMeters",
|
90
|
+
"WebsiteSource",
|
91
91
|
]
|
@@ -9,7 +9,7 @@ from .document_type import DocumentType
|
|
9
9
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
10
10
|
|
11
11
|
|
12
|
-
class
|
12
|
+
class Document(UniversalBaseModel):
|
13
13
|
bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
|
14
14
|
"""
|
15
15
|
the bucketId of the bucket which this remote file will be ingested to.
|
@@ -8,7 +8,7 @@ import typing
|
|
8
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
9
9
|
|
10
10
|
|
11
|
-
class
|
11
|
+
class WebsiteSource(UniversalBaseModel):
|
12
12
|
bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
|
13
13
|
"""
|
14
14
|
the bucketId of the bucket which this website will be ingested to.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: groundx
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.20
|
4
4
|
Summary:
|
5
5
|
License: MIT
|
6
6
|
Requires-Python: >=3.8,<4.0
|
@@ -52,20 +52,26 @@ 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
|
55
|
+
from groundx import Document, GroundX
|
56
56
|
|
57
57
|
client = GroundX(
|
58
58
|
api_key="YOUR_API_KEY",
|
59
59
|
)
|
60
|
-
client.documents.
|
60
|
+
client.documents.ingest(
|
61
61
|
documents=[
|
62
|
-
|
62
|
+
Document(
|
63
63
|
bucket_id=1234,
|
64
|
-
file_name="
|
65
|
-
file_path="https://my.source.url.com/
|
64
|
+
file_name="my_file1.txt",
|
65
|
+
file_path="https://my.source.url.com/file1.txt",
|
66
66
|
file_type="txt",
|
67
67
|
search_data={"key": "value"},
|
68
|
-
)
|
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
|
+
),
|
69
75
|
],
|
70
76
|
)
|
71
77
|
```
|
@@ -77,7 +83,7 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
|
|
77
83
|
```python
|
78
84
|
import asyncio
|
79
85
|
|
80
|
-
from groundx import AsyncGroundX,
|
86
|
+
from groundx import AsyncGroundX, Document
|
81
87
|
|
82
88
|
client = AsyncGroundX(
|
83
89
|
api_key="YOUR_API_KEY",
|
@@ -85,15 +91,21 @@ client = AsyncGroundX(
|
|
85
91
|
|
86
92
|
|
87
93
|
async def main() -> None:
|
88
|
-
await client.documents.
|
94
|
+
await client.documents.ingest(
|
89
95
|
documents=[
|
90
|
-
|
96
|
+
Document(
|
91
97
|
bucket_id=1234,
|
92
|
-
file_name="
|
93
|
-
file_path="https://my.source.url.com/
|
98
|
+
file_name="my_file1.txt",
|
99
|
+
file_path="https://my.source.url.com/file1.txt",
|
94
100
|
file_type="txt",
|
95
101
|
search_data={"key": "value"},
|
96
|
-
)
|
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
|
+
),
|
97
109
|
],
|
98
110
|
)
|
99
111
|
|
@@ -110,7 +122,7 @@ will be thrown.
|
|
110
122
|
from groundx.core.api_error import ApiError
|
111
123
|
|
112
124
|
try:
|
113
|
-
client.documents.
|
125
|
+
client.documents.ingest(...)
|
114
126
|
except ApiError as e:
|
115
127
|
print(e.status_code)
|
116
128
|
print(e.body)
|
@@ -133,7 +145,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
|
|
133
145
|
Use the `max_retries` request option to configure this behavior.
|
134
146
|
|
135
147
|
```python
|
136
|
-
client.documents.
|
148
|
+
client.documents.ingest(..., request_options={
|
137
149
|
"max_retries": 1
|
138
150
|
})
|
139
151
|
```
|
@@ -153,7 +165,7 @@ client = GroundX(
|
|
153
165
|
|
154
166
|
|
155
167
|
# Override timeout for a specific method
|
156
|
-
client.documents.
|
168
|
+
client.documents.ingest(..., request_options={
|
157
169
|
"timeout_in_seconds": 1
|
158
170
|
})
|
159
171
|
```
|
@@ -1,10 +1,10 @@
|
|
1
|
-
groundx/__init__.py,sha256=
|
1
|
+
groundx/__init__.py,sha256=2Y4vdNS7OptGTx8PNJ_qeKmTNn8CLwFTPLyGJ-pcMfI,2871
|
2
2
|
groundx/buckets/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
3
3
|
groundx/buckets/client.py,sha256=TofNrkej1AC_-FU5rf_y8KG8ubFUpHtLa8PQ7rqax6E,26537
|
4
4
|
groundx/client.py,sha256=Q1Kw0z6K-z-ShhNyuuPe5fYonM9M2I_55-ukUrUWk1U,6507
|
5
5
|
groundx/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
|
6
6
|
groundx/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
7
|
-
groundx/core/client_wrapper.py,sha256=
|
7
|
+
groundx/core/client_wrapper.py,sha256=T6AlQ_t_YWnf52XrIQ5Tmv36AxaJQ0LuLIXcq7IZSno,1803
|
8
8
|
groundx/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
9
9
|
groundx/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
10
10
|
groundx/core/http_client.py,sha256=siUQ6UV0ARZALlxubqWSSAAPC9B4VW8y6MGlHStfaeo,19552
|
@@ -17,7 +17,7 @@ groundx/core/serialization.py,sha256=D9h_t-RQON3-CHWs1C4ESY9B-Yd5d-l5lnTLb_X896g
|
|
17
17
|
groundx/customer/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
18
18
|
groundx/customer/client.py,sha256=C_JANeDewRD1Kg-q7LPxdiOSWbYSTOiYlBYZLRYPI44,3467
|
19
19
|
groundx/documents/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
20
|
-
groundx/documents/client.py,sha256=
|
20
|
+
groundx/documents/client.py,sha256=XWAATHLbU3FV3L7YEQ5ftQu_fn-iILJzXdQogrvgMh8,64975
|
21
21
|
groundx/environment.py,sha256=CInm1_DKtZ1mrxutmKb1qqv82P33r_S87hZD3Hc1VB0,159
|
22
22
|
groundx/errors/__init__.py,sha256=-prNYsFd8xxM4va0vR1raZjcd10tllOJKyEWjX_pwdU,214
|
23
23
|
groundx/errors/bad_request_error.py,sha256=_EbO8mWqN9kFZPvIap8qa1lL_EWkRcsZe1HKV9GDWJY,264
|
@@ -31,16 +31,16 @@ groundx/search/__init__.py,sha256=RagVzjShP33mDg9o4N3kGzV0egL1RYNjCpXPE8VzMYE,14
|
|
31
31
|
groundx/search/client.py,sha256=10ifg9GyIwIZF13ULfCXF8iFIydq6H6QRDrGPDjpanw,19756
|
32
32
|
groundx/search/types/__init__.py,sha256=fNFXQloPa1PHHO8VZim6KQNMA9N5EZtfSkissdxtY_c,165
|
33
33
|
groundx/search/types/search_content_request_id.py,sha256=us7mYdzR0qPur_wR5I9BhHaLEzC5nLBRna6-xq4M1ec,128
|
34
|
-
groundx/types/__init__.py,sha256=
|
34
|
+
groundx/types/__init__.py,sha256=xKjmTkCby1yXYF0Nk4XR-NMBKMrh3ayvlNmeTWiB6o8,3598
|
35
35
|
groundx/types/bounding_box_detail.py,sha256=51qcen326NTHY2ZqH1cFXut0_MCmk39EbLoDAwotdq4,1832
|
36
36
|
groundx/types/bucket_detail.py,sha256=bQjCvfyWydjItmzNNTvH-iWxNDOggd7R7X1alFZzlEY,1511
|
37
37
|
groundx/types/bucket_list_response.py,sha256=jC0NBsLCYDSwQrBzuW0g3PWFycjtKl8YRkKhic_-1DA,650
|
38
38
|
groundx/types/bucket_response.py,sha256=E8V7H2_TVKdmMsGCBjwzdf2bg4rUjiXFnhXtVGVCqZQ,608
|
39
39
|
groundx/types/bucket_update_detail.py,sha256=B4atQMDSXEdx7otcDbvgsrAHtXNz9swMnOsXRe25coc,738
|
40
40
|
groundx/types/bucket_update_response.py,sha256=h5RJTEpc4WPI_C4sPvsJZo7IxKppnPR-I9VGEQryRlc,633
|
41
|
-
groundx/types/crawl_website_source.py,sha256=K4-IoK__K4OekBwmJhClL2rZD1P4rFPR2-Ck02jP2uw,1581
|
42
41
|
groundx/types/customer_detail.py,sha256=RNm0qXvKx6YvVmkVJZeCNIz7n8_siFMXJ_AGtH3i5Z0,1094
|
43
42
|
groundx/types/customer_response.py,sha256=_RbuanXhCWQkCeQ0dkwPgsjNBoBgNpixiNfRpXcMew8,618
|
43
|
+
groundx/types/document.py,sha256=NxhkpwlW9jskS6RyhLNPrgrgZBAj4Ag8wGAa7jThuMw,1695
|
44
44
|
groundx/types/document_detail.py,sha256=i1UfcQAGYo9v1HwrrpzQPw_O0qA7IOXwOUuPV1yU8nI,2323
|
45
45
|
groundx/types/document_list_response.py,sha256=Z0Hm5VBwI0qatbSp6nYHh0RrGwJN3Gqh2D72FfDseZk,839
|
46
46
|
groundx/types/document_lookup_response.py,sha256=hZBwUO2pI6xFfeh7DmX_l1xRoh-5oaVNgUVxd00ml14,1097
|
@@ -53,7 +53,6 @@ groundx/types/health_response.py,sha256=3UpYL2IZb56tTo-fOpSU-0OTRyWgpYiB3pMU3sfj
|
|
53
53
|
groundx/types/health_response_health.py,sha256=I0QeEljFp6l5LCJbCTArW031Om84egePgnGdtE6WXlI,632
|
54
54
|
groundx/types/health_service.py,sha256=M1-h1EJSpAXw-j3pY-09_g_WKkO0spdj8e7pgPzSGf0,1083
|
55
55
|
groundx/types/health_service_status.py,sha256=ugKJXlx8QGi83n_J6s1frFrW1hYfOn3Dlb_pPNexwMA,185
|
56
|
-
groundx/types/ingest_document.py,sha256=hIVo62aYNOpwmpUbyUya_u1WJy4qXfBNouuyPFMK7eU,1701
|
57
56
|
groundx/types/ingest_local_document.py,sha256=2T1HXR2a-BDj5LEOTM98Sl4sgjVMWbVShQLn8MTR6QA,1602
|
58
57
|
groundx/types/ingest_remote_document.py,sha256=xlPA4SYoUgoGXpxZhyORdezxIPGmr4wneav2ZEVmmOY,1683
|
59
58
|
groundx/types/ingest_response.py,sha256=139rn8wpT44jlUzYXiy0r8XzN2U_OtdLltpSbRU0TyA,633
|
@@ -75,8 +74,9 @@ groundx/types/sort.py,sha256=oXap7qO8jI5I2wRhjdEfei4x0sEk2OEId2ll92EFOF8,147
|
|
75
74
|
groundx/types/sort_order.py,sha256=hfJkStz6zHf3iWQFaVLkNCZPdyj5JS7TsQlN4Ij8Q5A,148
|
76
75
|
groundx/types/subscription_detail.py,sha256=WNfUw2EMVECIvNYcV2s51zZ6T3Utc4zYXw63bPaeM6U,768
|
77
76
|
groundx/types/subscription_detail_meters.py,sha256=lBa8-1QlMVHjr5RLGqhiTKnD1KMM0AAHTWvz9TVtG8w,830
|
77
|
+
groundx/types/website_source.py,sha256=0TYZqyR16bUO9dfVrNwmph-ICmRzgje02aim1M17x7k,1576
|
78
78
|
groundx/version.py,sha256=1yVogKaq260fQfckM2RYN2144SEw0QROsZW8ICtkG4U,74
|
79
|
-
groundx-2.0.
|
80
|
-
groundx-2.0.
|
81
|
-
groundx-2.0.
|
82
|
-
groundx-2.0.
|
79
|
+
groundx-2.0.20.dist-info/LICENSE,sha256=8dMPYAFBTA7O4DUxhrEKEks8CL2waCMYM6dHohW4xrI,1065
|
80
|
+
groundx-2.0.20.dist-info/METADATA,sha256=5w2zG2q5tkHlBjww5M4H1b7gvC8z-QCes56_-Z3MKfM,5493
|
81
|
+
groundx-2.0.20.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
82
|
+
groundx-2.0.20.dist-info/RECORD,,
|
File without changes
|
File without changes
|