groundx 2.0.19__py3-none-any.whl → 2.0.21__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/types/__init__.py CHANGED
@@ -6,11 +6,11 @@ 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
12
11
  from .document_detail import DocumentDetail
13
12
  from .document_list_response import DocumentListResponse
13
+ from .document_local_ingest_request import DocumentLocalIngestRequest
14
14
  from .document_lookup_response import DocumentLookupResponse
15
15
  from .document_response import DocumentResponse
16
16
  from .document_type import DocumentType
@@ -21,8 +21,8 @@ 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
25
+ from .ingest_local_document_metadata import IngestLocalDocumentMetadata
26
26
  from .ingest_remote_document import IngestRemoteDocument
27
27
  from .ingest_response import IngestResponse
28
28
  from .ingest_response_ingest import IngestResponseIngest
@@ -43,6 +43,7 @@ from .sort import Sort
43
43
  from .sort_order import SortOrder
44
44
  from .subscription_detail import SubscriptionDetail
45
45
  from .subscription_detail_meters import SubscriptionDetailMeters
46
+ from .website_source import WebsiteSource
46
47
 
47
48
  __all__ = [
48
49
  "BoundingBoxDetail",
@@ -51,11 +52,11 @@ __all__ = [
51
52
  "BucketResponse",
52
53
  "BucketUpdateDetail",
53
54
  "BucketUpdateResponse",
54
- "CrawlWebsiteSource",
55
55
  "CustomerDetail",
56
56
  "CustomerResponse",
57
57
  "DocumentDetail",
58
58
  "DocumentListResponse",
59
+ "DocumentLocalIngestRequest",
59
60
  "DocumentLookupResponse",
60
61
  "DocumentResponse",
61
62
  "DocumentType",
@@ -66,8 +67,8 @@ __all__ = [
66
67
  "HealthResponseHealth",
67
68
  "HealthService",
68
69
  "HealthServiceStatus",
69
- "IngestDocument",
70
70
  "IngestLocalDocument",
71
+ "IngestLocalDocumentMetadata",
71
72
  "IngestRemoteDocument",
72
73
  "IngestResponse",
73
74
  "IngestResponseIngest",
@@ -88,4 +89,5 @@ __all__ = [
88
89
  "SortOrder",
89
90
  "SubscriptionDetail",
90
91
  "SubscriptionDetailMeters",
92
+ "WebsiteSource",
91
93
  ]
@@ -0,0 +1,6 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .ingest_local_document import IngestLocalDocument
5
+
6
+ DocumentLocalIngestRequest = typing.List[IngestLocalDocument]
@@ -1,37 +1,19 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing_extensions
5
- from ..core.serialization import FieldMetadata
6
4
  import pydantic
7
- from .document_type import DocumentType
8
- import typing
5
+ from .ingest_local_document_metadata import IngestLocalDocumentMetadata
9
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import typing
10
8
 
11
9
 
12
10
  class IngestLocalDocument(UniversalBaseModel):
13
- bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
14
- """
15
- the bucketId of the bucket which this local file will be ingested to.
16
- """
17
-
18
- file_data: typing_extensions.Annotated[str, FieldMetadata(alias="fileData")] = pydantic.Field()
11
+ blob: str = pydantic.Field()
19
12
  """
20
- Binary data for the file being ingested.
13
+ The binary file data being ingested.
21
14
  """
22
15
 
23
- file_name: typing_extensions.Annotated[str, FieldMetadata(alias="fileName")] = pydantic.Field()
24
- """
25
- The name of the file being ingested
26
- """
27
-
28
- file_type: typing_extensions.Annotated[DocumentType, FieldMetadata(alias="fileType")]
29
- search_data: typing_extensions.Annotated[
30
- typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="searchData")
31
- ] = pydantic.Field(default=None)
32
- """
33
- Custom metadata which can be used to influence GroundX's search functionality. This data can be used to further hone GroundX search.
34
- """
16
+ metadata: IngestLocalDocumentMetadata
35
17
 
36
18
  if IS_PYDANTIC_V2:
37
19
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -2,17 +2,19 @@
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import typing_extensions
5
+ import typing
5
6
  from ..core.serialization import FieldMetadata
6
7
  import pydantic
7
- import typing
8
8
  from .document_type import DocumentType
9
9
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
10
10
 
11
11
 
12
- class IngestDocument(UniversalBaseModel):
13
- bucket_id: typing_extensions.Annotated[int, FieldMetadata(alias="bucketId")] = pydantic.Field()
12
+ class IngestLocalDocumentMetadata(UniversalBaseModel):
13
+ bucket_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="bucketId")] = pydantic.Field(
14
+ default=None
15
+ )
14
16
  """
15
- the bucketId of the bucket which this remote file will be ingested to.
17
+ The bucketId of the bucket which this local file will be ingested to.
16
18
  """
17
19
 
18
20
  file_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fileName")] = pydantic.Field(
@@ -22,11 +24,6 @@ class IngestDocument(UniversalBaseModel):
22
24
  The name of the file being ingested
23
25
  """
24
26
 
25
- file_path: typing_extensions.Annotated[str, FieldMetadata(alias="filePath")] = pydantic.Field()
26
- """
27
- The local file path or remote URL of the document being ingested by GroundX.
28
- """
29
-
30
27
  file_type: typing_extensions.Annotated[typing.Optional[DocumentType], FieldMetadata(alias="fileType")] = None
31
28
  search_data: typing_extensions.Annotated[
32
29
  typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="searchData")
@@ -8,7 +8,7 @@ import typing
8
8
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
9
 
10
10
 
11
- class CrawlWebsiteSource(UniversalBaseModel):
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.19
3
+ Version: 2.0.21
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.8,<4.0
@@ -52,19 +52,18 @@ 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 GroundX, IngestDocument
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
- IngestDocument(
62
+ IngestRemoteDocument(
63
63
  bucket_id=1234,
64
- file_name="my_file.txt",
65
- file_path="https://my.source.url.com/file.txt",
64
+ file_name="my_file1.txt",
66
65
  file_type="txt",
67
- search_data={"key": "value"},
66
+ source_url="https://my.source.url.com/file1.txt",
68
67
  )
69
68
  ],
70
69
  )
@@ -77,7 +76,7 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
77
76
  ```python
78
77
  import asyncio
79
78
 
80
- from groundx import AsyncGroundX, IngestDocument
79
+ from groundx import AsyncGroundX, IngestRemoteDocument
81
80
 
82
81
  client = AsyncGroundX(
83
82
  api_key="YOUR_API_KEY",
@@ -85,14 +84,13 @@ client = AsyncGroundX(
85
84
 
86
85
 
87
86
  async def main() -> None:
88
- await client.documents.ingest(
87
+ await client.documents.ingest_remote(
89
88
  documents=[
90
- IngestDocument(
89
+ IngestRemoteDocument(
91
90
  bucket_id=1234,
92
- file_name="my_file.txt",
93
- file_path="https://my.source.url.com/file.txt",
91
+ file_name="my_file1.txt",
94
92
  file_type="txt",
95
- search_data={"key": "value"},
93
+ source_url="https://my.source.url.com/file1.txt",
96
94
  )
97
95
  ],
98
96
  )
@@ -110,7 +108,7 @@ will be thrown.
110
108
  from groundx.core.api_error import ApiError
111
109
 
112
110
  try:
113
- client.documents.ingest(...)
111
+ client.documents.ingest_remote(...)
114
112
  except ApiError as e:
115
113
  print(e.status_code)
116
114
  print(e.body)
@@ -133,7 +131,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
133
131
  Use the `max_retries` request option to configure this behavior.
134
132
 
135
133
  ```python
136
- client.documents.ingest(..., request_options={
134
+ client.documents.ingest_remote(..., request_options={
137
135
  "max_retries": 1
138
136
  })
139
137
  ```
@@ -153,7 +151,7 @@ client = GroundX(
153
151
 
154
152
 
155
153
  # Override timeout for a specific method
156
- client.documents.ingest(..., request_options={
154
+ client.documents.ingest_remote(..., request_options={
157
155
  "timeout_in_seconds": 1
158
156
  })
159
157
  ```
@@ -1,10 +1,10 @@
1
- groundx/__init__.py,sha256=k9TpTModn8DZ6OiU_90cp_F5o40BSbwuo9z5Pd5xRlo,2893
1
+ groundx/__init__.py,sha256=_IGBowwyPGd2Yc8c-X8b4FRu5rNA_SoTj4e3bhtB69Y,2975
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=X38nIST_Dd7BXPecXq1I-3IODFee5YsbPXEULyPclZU,1803
7
+ groundx/core/client_wrapper.py,sha256=ZCThAGYPgh2zcfTO99ZP-m7Fdgqktuyv7kfz-Y1Q6FY,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=GNT1B6uGS2JnHnC2MfNbwXhkf2JTLLEblK0ouKytA0k,65631
20
+ groundx/documents/client.py,sha256=94t45T3Z9RHj4OBh454qYbjke8HdW1ad_-TPiocPmeE,58853
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,18 +31,18 @@ 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=ms9d1ANY2mUuAvKUOTd76dWc5Ujza4w31Dw6luDxQ-k,3633
34
+ groundx/types/__init__.py,sha256=ViqDRA9l-OWZP4_Zl7nVOvd_EZKpTFFvyYkxdHB9vco,3762
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
44
43
  groundx/types/document_detail.py,sha256=i1UfcQAGYo9v1HwrrpzQPw_O0qA7IOXwOUuPV1yU8nI,2323
45
44
  groundx/types/document_list_response.py,sha256=Z0Hm5VBwI0qatbSp6nYHh0RrGwJN3Gqh2D72FfDseZk,839
45
+ groundx/types/document_local_ingest_request.py,sha256=zqaT_QgYcEc8AfVwZm-O5jLTEiYSsO-i3VVgZ_7xl7w,197
46
46
  groundx/types/document_lookup_response.py,sha256=hZBwUO2pI6xFfeh7DmX_l1xRoh-5oaVNgUVxd00ml14,1097
47
47
  groundx/types/document_response.py,sha256=EBDrYhTYoA3Q3ZpqwFEYmTgE3tY86TScFPhBnc3_ItI,642
48
48
  groundx/types/document_type.py,sha256=NgsbSUXopTkzkut1AwXgthxWjsFzlKNnUhyfYqU_IM4,216
@@ -53,8 +53,8 @@ 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
- groundx/types/ingest_local_document.py,sha256=2T1HXR2a-BDj5LEOTM98Sl4sgjVMWbVShQLn8MTR6QA,1602
56
+ groundx/types/ingest_local_document.py,sha256=am6TPgHu40S4Lzo9hMkDRauYnc-AWBuYL0Lgk85Fseg,753
57
+ groundx/types/ingest_local_document_metadata.py,sha256=I4CSafx8kLSHLbU5_TkU6igy2plevkzUzdsR7vhovHg,1558
58
58
  groundx/types/ingest_remote_document.py,sha256=xlPA4SYoUgoGXpxZhyORdezxIPGmr4wneav2ZEVmmOY,1683
59
59
  groundx/types/ingest_response.py,sha256=139rn8wpT44jlUzYXiy0r8XzN2U_OtdLltpSbRU0TyA,633
60
60
  groundx/types/ingest_response_ingest.py,sha256=8FKApYNvS6KFxEKm05pKpKJ0BAagxoE0cWeTt-qjm1g,781
@@ -75,8 +75,9 @@ groundx/types/sort.py,sha256=oXap7qO8jI5I2wRhjdEfei4x0sEk2OEId2ll92EFOF8,147
75
75
  groundx/types/sort_order.py,sha256=hfJkStz6zHf3iWQFaVLkNCZPdyj5JS7TsQlN4Ij8Q5A,148
76
76
  groundx/types/subscription_detail.py,sha256=WNfUw2EMVECIvNYcV2s51zZ6T3Utc4zYXw63bPaeM6U,768
77
77
  groundx/types/subscription_detail_meters.py,sha256=lBa8-1QlMVHjr5RLGqhiTKnD1KMM0AAHTWvz9TVtG8w,830
78
+ groundx/types/website_source.py,sha256=0TYZqyR16bUO9dfVrNwmph-ICmRzgje02aim1M17x7k,1576
78
79
  groundx/version.py,sha256=1yVogKaq260fQfckM2RYN2144SEw0QROsZW8ICtkG4U,74
79
- groundx-2.0.19.dist-info/LICENSE,sha256=8dMPYAFBTA7O4DUxhrEKEks8CL2waCMYM6dHohW4xrI,1065
80
- groundx-2.0.19.dist-info/METADATA,sha256=dm1o9seVYMmGyZT9uAsw7frc_QjIS_aPPdCXVLy5KRQ,5145
81
- groundx-2.0.19.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
82
- groundx-2.0.19.dist-info/RECORD,,
80
+ groundx-2.0.21.dist-info/LICENSE,sha256=8dMPYAFBTA7O4DUxhrEKEks8CL2waCMYM6dHohW4xrI,1065
81
+ groundx-2.0.21.dist-info/METADATA,sha256=4SvJFYtth9J6AYAv5SuzIsB-KGtAaLYVGiqCv_CZD90,5122
82
+ groundx-2.0.21.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
83
+ groundx-2.0.21.dist-info/RECORD,,