groundx 2.0.12__tar.gz → 2.0.13__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 (83) hide show
  1. {groundx-2.0.12 → groundx-2.0.13}/PKG-INFO +1 -1
  2. {groundx-2.0.12 → groundx-2.0.13}/pyproject.toml +1 -1
  3. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/__init__.py +6 -1
  4. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/client_wrapper.py +1 -1
  5. groundx-2.0.13/src/groundx/documents/__init__.py +13 -0
  6. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/documents/client.py +45 -6
  7. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/documents/types/__init__.py +6 -1
  8. groundx-2.0.13/src/groundx/documents/types/documents_ingest_local_request_files_item.py +43 -0
  9. groundx-2.0.12/src/groundx/documents/__init__.py +0 -5
  10. {groundx-2.0.12 → groundx-2.0.13}/LICENSE +0 -0
  11. {groundx-2.0.12 → groundx-2.0.13}/README.md +0 -0
  12. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/buckets/__init__.py +0 -0
  13. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/buckets/client.py +0 -0
  14. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/client.py +0 -0
  15. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/__init__.py +0 -0
  16. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/api_error.py +0 -0
  17. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/datetime_utils.py +0 -0
  18. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/file.py +0 -0
  19. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/http_client.py +0 -0
  20. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/jsonable_encoder.py +0 -0
  21. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/pydantic_utilities.py +0 -0
  22. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/query_encoder.py +0 -0
  23. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/remove_none_from_dict.py +0 -0
  24. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/request_options.py +0 -0
  25. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/core/serialization.py +0 -0
  26. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/customer/__init__.py +0 -0
  27. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/customer/client.py +0 -0
  28. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/documents/types/document_remote_ingest_request_documents_item.py +0 -0
  29. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/documents/types/website_crawl_request_websites_item.py +0 -0
  30. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/environment.py +0 -0
  31. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/errors/__init__.py +0 -0
  32. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/errors/bad_request_error.py +0 -0
  33. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/errors/unauthorized_error.py +0 -0
  34. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/groups/__init__.py +0 -0
  35. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/groups/client.py +0 -0
  36. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/health/__init__.py +0 -0
  37. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/health/client.py +0 -0
  38. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/py.typed +0 -0
  39. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/search/__init__.py +0 -0
  40. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/search/client.py +0 -0
  41. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/search/types/__init__.py +0 -0
  42. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/search/types/search_content_request_id.py +0 -0
  43. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/__init__.py +0 -0
  44. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/bounding_box_detail.py +0 -0
  45. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/bucket_detail.py +0 -0
  46. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/bucket_list_response.py +0 -0
  47. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/bucket_response.py +0 -0
  48. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/bucket_update_detail.py +0 -0
  49. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/bucket_update_response.py +0 -0
  50. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/customer_detail.py +0 -0
  51. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/customer_response.py +0 -0
  52. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/document_detail.py +0 -0
  53. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/document_list_response.py +0 -0
  54. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/document_lookup_response.py +0 -0
  55. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/document_response.py +0 -0
  56. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/document_type.py +0 -0
  57. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/group_detail.py +0 -0
  58. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/group_list_response.py +0 -0
  59. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/group_response.py +0 -0
  60. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/health_response.py +0 -0
  61. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/health_response_health.py +0 -0
  62. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/health_service.py +0 -0
  63. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/health_service_status.py +0 -0
  64. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/ingest_response.py +0 -0
  65. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/ingest_response_ingest.py +0 -0
  66. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/message_response.py +0 -0
  67. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/meter_detail.py +0 -0
  68. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/process_status_response.py +0 -0
  69. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/process_status_response_ingest.py +0 -0
  70. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/process_status_response_ingest_progress.py +0 -0
  71. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/process_status_response_ingest_progress_cancelled.py +0 -0
  72. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/process_status_response_ingest_progress_complete.py +0 -0
  73. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/process_status_response_ingest_progress_errors.py +0 -0
  74. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/process_status_response_ingest_progress_processing.py +0 -0
  75. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/processing_status.py +0 -0
  76. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/search_response.py +0 -0
  77. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/search_response_search.py +0 -0
  78. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/search_result_item.py +0 -0
  79. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/sort.py +0 -0
  80. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/sort_order.py +0 -0
  81. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/subscription_detail.py +0 -0
  82. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/types/subscription_detail_meters.py +0 -0
  83. {groundx-2.0.12 → groundx-2.0.13}/src/groundx/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: groundx
3
- Version: 2.0.12
3
+ Version: 2.0.13
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.8,<4.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "groundx"
3
- version = "2.0.12"
3
+ version = "2.0.13"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  authors = []
@@ -44,7 +44,11 @@ from .types import (
44
44
  from .errors import BadRequestError, UnauthorizedError
45
45
  from . import buckets, customer, documents, groups, health, search
46
46
  from .client import AsyncGroundX, GroundX
47
- from .documents import DocumentRemoteIngestRequestDocumentsItem, WebsiteCrawlRequestWebsitesItem
47
+ from .documents import (
48
+ DocumentRemoteIngestRequestDocumentsItem,
49
+ DocumentsIngestLocalRequestFilesItem,
50
+ WebsiteCrawlRequestWebsitesItem,
51
+ )
48
52
  from .environment import GroundXEnvironment
49
53
  from .search import SearchContentRequestId
50
54
  from .version import __version__
@@ -66,6 +70,7 @@ __all__ = [
66
70
  "DocumentRemoteIngestRequestDocumentsItem",
67
71
  "DocumentResponse",
68
72
  "DocumentType",
73
+ "DocumentsIngestLocalRequestFilesItem",
69
74
  "GroundX",
70
75
  "GroundXEnvironment",
71
76
  "GroupDetail",
@@ -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.12",
19
+ "X-Fern-SDK-Version": "2.0.13",
20
20
  }
21
21
  headers["X-API-Key"] = self.api_key
22
22
  return headers
@@ -0,0 +1,13 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .types import (
4
+ DocumentRemoteIngestRequestDocumentsItem,
5
+ DocumentsIngestLocalRequestFilesItem,
6
+ WebsiteCrawlRequestWebsitesItem,
7
+ )
8
+
9
+ __all__ = [
10
+ "DocumentRemoteIngestRequestDocumentsItem",
11
+ "DocumentsIngestLocalRequestFilesItem",
12
+ "WebsiteCrawlRequestWebsitesItem",
13
+ ]
@@ -11,6 +11,7 @@ from ..errors.bad_request_error import BadRequestError
11
11
  from ..errors.unauthorized_error import UnauthorizedError
12
12
  from json.decoder import JSONDecodeError
13
13
  from ..core.api_error import ApiError
14
+ from .types.documents_ingest_local_request_files_item import DocumentsIngestLocalRequestFilesItem
14
15
  from .types.website_crawl_request_websites_item import WebsiteCrawlRequestWebsitesItem
15
16
  from ..types.process_status_response import ProcessStatusResponse
16
17
  from ..core.jsonable_encoder import jsonable_encoder
@@ -120,7 +121,12 @@ class DocumentsClient:
120
121
  raise ApiError(status_code=_response.status_code, body=_response.text)
121
122
  raise ApiError(status_code=_response.status_code, body=_response_json)
122
123
 
123
- def ingest_local(self, *, request_options: typing.Optional[RequestOptions] = None) -> IngestResponse:
124
+ def ingest_local(
125
+ self,
126
+ *,
127
+ files: typing.List[DocumentsIngestLocalRequestFilesItem],
128
+ request_options: typing.Optional[RequestOptions] = None,
129
+ ) -> IngestResponse:
124
130
  """
125
131
  Upload documents hosted on a local file system for ingestion into a GroundX bucket.
126
132
 
@@ -128,6 +134,8 @@ class DocumentsClient:
128
134
 
129
135
  Parameters
130
136
  ----------
137
+ files : typing.List[DocumentsIngestLocalRequestFilesItem]
138
+
131
139
  request_options : typing.Optional[RequestOptions]
132
140
  Request-specific configuration.
133
141
 
@@ -139,16 +147,28 @@ class DocumentsClient:
139
147
  Examples
140
148
  --------
141
149
  from groundx import GroundX
150
+ from groundx.documents import DocumentsIngestLocalRequestFilesItem
142
151
 
143
152
  client = GroundX(
144
153
  api_key="YOUR_API_KEY",
145
154
  )
146
- client.documents.ingest_local()
155
+ client.documents.ingest_local(
156
+ files=[
157
+ DocumentsIngestLocalRequestFilesItem(
158
+ bucket_id=1,
159
+ file_data="fileData",
160
+ file_name="fileName",
161
+ file_type="txt",
162
+ )
163
+ ],
164
+ )
147
165
  """
148
166
  _response = self._client_wrapper.httpx_client.request(
149
167
  "v1/ingest/documents/local",
150
168
  method="POST",
151
- data={},
169
+ data={
170
+ "files": files,
171
+ },
152
172
  files={},
153
173
  request_options=request_options,
154
174
  omit=OMIT,
@@ -850,7 +870,12 @@ class AsyncDocumentsClient:
850
870
  raise ApiError(status_code=_response.status_code, body=_response.text)
851
871
  raise ApiError(status_code=_response.status_code, body=_response_json)
852
872
 
853
- async def ingest_local(self, *, request_options: typing.Optional[RequestOptions] = None) -> IngestResponse:
873
+ async def ingest_local(
874
+ self,
875
+ *,
876
+ files: typing.List[DocumentsIngestLocalRequestFilesItem],
877
+ request_options: typing.Optional[RequestOptions] = None,
878
+ ) -> IngestResponse:
854
879
  """
855
880
  Upload documents hosted on a local file system for ingestion into a GroundX bucket.
856
881
 
@@ -858,6 +883,8 @@ class AsyncDocumentsClient:
858
883
 
859
884
  Parameters
860
885
  ----------
886
+ files : typing.List[DocumentsIngestLocalRequestFilesItem]
887
+
861
888
  request_options : typing.Optional[RequestOptions]
862
889
  Request-specific configuration.
863
890
 
@@ -871,6 +898,7 @@ class AsyncDocumentsClient:
871
898
  import asyncio
872
899
 
873
900
  from groundx import AsyncGroundX
901
+ from groundx.documents import DocumentsIngestLocalRequestFilesItem
874
902
 
875
903
  client = AsyncGroundX(
876
904
  api_key="YOUR_API_KEY",
@@ -878,7 +906,16 @@ class AsyncDocumentsClient:
878
906
 
879
907
 
880
908
  async def main() -> None:
881
- await client.documents.ingest_local()
909
+ await client.documents.ingest_local(
910
+ files=[
911
+ DocumentsIngestLocalRequestFilesItem(
912
+ bucket_id=1,
913
+ file_data="fileData",
914
+ file_name="fileName",
915
+ file_type="txt",
916
+ )
917
+ ],
918
+ )
882
919
 
883
920
 
884
921
  asyncio.run(main())
@@ -886,7 +923,9 @@ class AsyncDocumentsClient:
886
923
  _response = await self._client_wrapper.httpx_client.request(
887
924
  "v1/ingest/documents/local",
888
925
  method="POST",
889
- data={},
926
+ data={
927
+ "files": files,
928
+ },
890
929
  files={},
891
930
  request_options=request_options,
892
931
  omit=OMIT,
@@ -1,6 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from .document_remote_ingest_request_documents_item import DocumentRemoteIngestRequestDocumentsItem
4
+ from .documents_ingest_local_request_files_item import DocumentsIngestLocalRequestFilesItem
4
5
  from .website_crawl_request_websites_item import WebsiteCrawlRequestWebsitesItem
5
6
 
6
- __all__ = ["DocumentRemoteIngestRequestDocumentsItem", "WebsiteCrawlRequestWebsitesItem"]
7
+ __all__ = [
8
+ "DocumentRemoteIngestRequestDocumentsItem",
9
+ "DocumentsIngestLocalRequestFilesItem",
10
+ "WebsiteCrawlRequestWebsitesItem",
11
+ ]
@@ -0,0 +1,43 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import typing_extensions
5
+ from ...core.serialization import FieldMetadata
6
+ import pydantic
7
+ from ...types.document_type import DocumentType
8
+ import typing
9
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
10
+
11
+
12
+ class DocumentsIngestLocalRequestFilesItem(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()
19
+ """
20
+ The actual file being ingested.
21
+ """
22
+
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
+ """
35
+
36
+ if IS_PYDANTIC_V2:
37
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
38
+ else:
39
+
40
+ class Config:
41
+ frozen = True
42
+ smart_union = True
43
+ extra = pydantic.Extra.allow
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from .types import DocumentRemoteIngestRequestDocumentsItem, WebsiteCrawlRequestWebsitesItem
4
-
5
- __all__ = ["DocumentRemoteIngestRequestDocumentsItem", "WebsiteCrawlRequestWebsitesItem"]
File without changes
File without changes
File without changes
File without changes