groundx 2.0.20__tar.gz → 2.0.29__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.
- {groundx-2.0.20 → groundx-2.0.29}/PKG-INFO +15 -28
- {groundx-2.0.20 → groundx-2.0.29}/README.md +12 -27
- {groundx-2.0.20 → groundx-2.0.29}/pyproject.toml +4 -1
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/__init__.py +5 -1
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/client.py +2 -2
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/client_wrapper.py +1 -1
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/documents/client.py +270 -443
- groundx-2.0.29/src/groundx/ingest.py +334 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/__init__.py +4 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/document.py +2 -2
- groundx-2.0.29/src/groundx/types/document_local_ingest_request.py +6 -0
- groundx-2.0.29/src/groundx/types/ingest_local_document.py +25 -0
- groundx-2.0.20/src/groundx/types/ingest_local_document.py → groundx-2.0.29/src/groundx/types/ingest_local_document_metadata.py +10 -11
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/ingest_remote_document.py +1 -1
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/website_source.py +1 -1
- {groundx-2.0.20 → groundx-2.0.29}/LICENSE +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/buckets/__init__.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/buckets/client.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/__init__.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/api_error.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/datetime_utils.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/file.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/http_client.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/jsonable_encoder.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/pydantic_utilities.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/query_encoder.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/remove_none_from_dict.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/request_options.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/core/serialization.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/customer/__init__.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/customer/client.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/documents/__init__.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/environment.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/errors/__init__.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/errors/bad_request_error.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/errors/unauthorized_error.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/groups/__init__.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/groups/client.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/health/__init__.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/health/client.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/py.typed +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/search/__init__.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/search/client.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/search/types/__init__.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/search/types/search_content_request_id.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/bounding_box_detail.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/bucket_detail.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/bucket_list_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/bucket_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/bucket_update_detail.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/bucket_update_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/customer_detail.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/customer_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/document_detail.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/document_list_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/document_lookup_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/document_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/document_type.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/group_detail.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/group_list_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/group_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/health_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/health_response_health.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/health_service.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/health_service_status.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/ingest_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/ingest_response_ingest.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/message_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/meter_detail.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/process_status_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/process_status_response_ingest.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/process_status_response_ingest_progress.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/process_status_response_ingest_progress_cancelled.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/process_status_response_ingest_progress_complete.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/process_status_response_ingest_progress_errors.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/process_status_response_ingest_progress_processing.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/processing_status.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/search_response.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/search_response_search.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/search_result_item.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/sort.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/sort_order.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/subscription_detail.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/types/subscription_detail_meters.py +0 -0
- {groundx-2.0.20 → groundx-2.0.29}/src/groundx/version.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: groundx
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.29
|
4
4
|
Summary:
|
5
5
|
License: MIT
|
6
6
|
Requires-Python: >=3.8,<4.0
|
@@ -20,18 +20,20 @@ Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
21
21
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
22
22
|
Classifier: Typing :: Typed
|
23
|
+
Requires-Dist: aiohttp (>=3.8.0)
|
23
24
|
Requires-Dist: httpx (>=0.21.2)
|
24
25
|
Requires-Dist: pydantic (>=1.9.2)
|
25
26
|
Requires-Dist: pydantic-core (>=2.18.2,<3.0.0)
|
27
|
+
Requires-Dist: requests (>=2.4.0)
|
26
28
|
Requires-Dist: typing_extensions (>=4.0.0)
|
27
29
|
Description-Content-Type: text/markdown
|
28
30
|
|
29
|
-
#
|
31
|
+
# GroundX Python Library
|
30
32
|
|
31
33
|
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Feyelevelai%2Fgroundx-python)
|
32
34
|
[](https://pypi.python.org/pypi/groundx)
|
33
35
|
|
34
|
-
The
|
36
|
+
The GroundX Python library provides convenient access to the GroundX API from Python.
|
35
37
|
|
36
38
|
## Documentation
|
37
39
|
|
@@ -57,21 +59,15 @@ from groundx import Document, GroundX
|
|
57
59
|
client = GroundX(
|
58
60
|
api_key="YOUR_API_KEY",
|
59
61
|
)
|
60
|
-
|
62
|
+
|
63
|
+
client.ingest(
|
61
64
|
documents=[
|
62
65
|
Document(
|
63
66
|
bucket_id=1234,
|
64
67
|
file_name="my_file1.txt",
|
65
|
-
file_path="https://my.source.url.com/file1.txt",
|
66
68
|
file_type="txt",
|
67
|
-
|
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
|
+
source_url="https://my.source.url.com/file1.txt",
|
70
|
+
)
|
75
71
|
],
|
76
72
|
)
|
77
73
|
```
|
@@ -89,27 +85,18 @@ client = AsyncGroundX(
|
|
89
85
|
api_key="YOUR_API_KEY",
|
90
86
|
)
|
91
87
|
|
92
|
-
|
93
88
|
async def main() -> None:
|
94
|
-
await client.
|
89
|
+
await client.ingest(
|
95
90
|
documents=[
|
96
91
|
Document(
|
97
92
|
bucket_id=1234,
|
98
93
|
file_name="my_file1.txt",
|
99
|
-
file_path="https://my.source.url.com/file1.txt",
|
100
94
|
file_type="txt",
|
101
|
-
|
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
|
-
),
|
95
|
+
source_url="https://my.source.url.com/file1.txt",
|
96
|
+
)
|
109
97
|
],
|
110
98
|
)
|
111
99
|
|
112
|
-
|
113
100
|
asyncio.run(main())
|
114
101
|
```
|
115
102
|
|
@@ -122,7 +109,7 @@ will be thrown.
|
|
122
109
|
from groundx.core.api_error import ApiError
|
123
110
|
|
124
111
|
try:
|
125
|
-
client.
|
112
|
+
client.ingest(...)
|
126
113
|
except ApiError as e:
|
127
114
|
print(e.status_code)
|
128
115
|
print(e.body)
|
@@ -145,7 +132,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
|
|
145
132
|
Use the `max_retries` request option to configure this behavior.
|
146
133
|
|
147
134
|
```python
|
148
|
-
client.
|
135
|
+
client.ingest(..., request_options={
|
149
136
|
"max_retries": 1
|
150
137
|
})
|
151
138
|
```
|
@@ -165,7 +152,7 @@ client = GroundX(
|
|
165
152
|
|
166
153
|
|
167
154
|
# Override timeout for a specific method
|
168
|
-
client.
|
155
|
+
client.ingest(..., request_options={
|
169
156
|
"timeout_in_seconds": 1
|
170
157
|
})
|
171
158
|
```
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# GroundX Python Library
|
2
2
|
|
3
3
|
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Feyelevelai%2Fgroundx-python)
|
4
4
|
[](https://pypi.python.org/pypi/groundx)
|
5
5
|
|
6
|
-
The
|
6
|
+
The GroundX Python library provides convenient access to the GroundX API from Python.
|
7
7
|
|
8
8
|
## Documentation
|
9
9
|
|
@@ -29,21 +29,15 @@ from groundx import Document, GroundX
|
|
29
29
|
client = GroundX(
|
30
30
|
api_key="YOUR_API_KEY",
|
31
31
|
)
|
32
|
-
|
32
|
+
|
33
|
+
client.ingest(
|
33
34
|
documents=[
|
34
35
|
Document(
|
35
36
|
bucket_id=1234,
|
36
37
|
file_name="my_file1.txt",
|
37
|
-
file_path="https://my.source.url.com/file1.txt",
|
38
38
|
file_type="txt",
|
39
|
-
|
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
|
-
),
|
39
|
+
source_url="https://my.source.url.com/file1.txt",
|
40
|
+
)
|
47
41
|
],
|
48
42
|
)
|
49
43
|
```
|
@@ -61,27 +55,18 @@ client = AsyncGroundX(
|
|
61
55
|
api_key="YOUR_API_KEY",
|
62
56
|
)
|
63
57
|
|
64
|
-
|
65
58
|
async def main() -> None:
|
66
|
-
await client.
|
59
|
+
await client.ingest(
|
67
60
|
documents=[
|
68
61
|
Document(
|
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
|
-
|
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
|
|
84
|
-
|
85
70
|
asyncio.run(main())
|
86
71
|
```
|
87
72
|
|
@@ -94,7 +79,7 @@ will be thrown.
|
|
94
79
|
from groundx.core.api_error import ApiError
|
95
80
|
|
96
81
|
try:
|
97
|
-
client.
|
82
|
+
client.ingest(...)
|
98
83
|
except ApiError as e:
|
99
84
|
print(e.status_code)
|
100
85
|
print(e.body)
|
@@ -117,7 +102,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
|
|
117
102
|
Use the `max_retries` request option to configure this behavior.
|
118
103
|
|
119
104
|
```python
|
120
|
-
client.
|
105
|
+
client.ingest(..., request_options={
|
121
106
|
"max_retries": 1
|
122
107
|
})
|
123
108
|
```
|
@@ -137,7 +122,7 @@ client = GroundX(
|
|
137
122
|
|
138
123
|
|
139
124
|
# Override timeout for a specific method
|
140
|
-
client.
|
125
|
+
client.ingest(..., request_options={
|
141
126
|
"timeout_in_seconds": 1
|
142
127
|
})
|
143
128
|
```
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "groundx"
|
3
|
-
version = "2.0.
|
3
|
+
version = "2.0.29"
|
4
4
|
description = ""
|
5
5
|
readme = "README.md"
|
6
6
|
authors = []
|
@@ -33,9 +33,11 @@ Repository = 'https://github.com/eyelevelai/groundx-python'
|
|
33
33
|
|
34
34
|
[tool.poetry.dependencies]
|
35
35
|
python = "^3.8"
|
36
|
+
aiohttp = ">=3.8.0"
|
36
37
|
httpx = ">=0.21.2"
|
37
38
|
pydantic = ">= 1.9.2"
|
38
39
|
pydantic-core = "^2.18.2"
|
40
|
+
requests = ">=2.4.0"
|
39
41
|
typing_extensions = ">= 4.0.0"
|
40
42
|
|
41
43
|
[tool.poetry.dev-dependencies]
|
@@ -45,6 +47,7 @@ pytest-asyncio = "^0.23.5"
|
|
45
47
|
python-dateutil = "^2.9.0"
|
46
48
|
types-python-dateutil = "^2.9.0.20240316"
|
47
49
|
ruff = "^0.5.6"
|
50
|
+
types-requests = ">=2.0.0"
|
48
51
|
|
49
52
|
[tool.pytest.ini_options]
|
50
53
|
testpaths = [ "tests" ]
|
@@ -12,6 +12,7 @@ from .types import (
|
|
12
12
|
Document,
|
13
13
|
DocumentDetail,
|
14
14
|
DocumentListResponse,
|
15
|
+
DocumentLocalIngestRequest,
|
15
16
|
DocumentLookupResponse,
|
16
17
|
DocumentResponse,
|
17
18
|
DocumentType,
|
@@ -23,6 +24,7 @@ from .types import (
|
|
23
24
|
HealthService,
|
24
25
|
HealthServiceStatus,
|
25
26
|
IngestLocalDocument,
|
27
|
+
IngestLocalDocumentMetadata,
|
26
28
|
IngestRemoteDocument,
|
27
29
|
IngestResponse,
|
28
30
|
IngestResponseIngest,
|
@@ -47,8 +49,8 @@ from .types import (
|
|
47
49
|
)
|
48
50
|
from .errors import BadRequestError, UnauthorizedError
|
49
51
|
from . import buckets, customer, documents, groups, health, search
|
50
|
-
from .client import AsyncGroundX, GroundX
|
51
52
|
from .environment import GroundXEnvironment
|
53
|
+
from .ingest import AsyncGroundX, GroundX
|
52
54
|
from .search import SearchContentRequestId
|
53
55
|
from .version import __version__
|
54
56
|
|
@@ -66,6 +68,7 @@ __all__ = [
|
|
66
68
|
"Document",
|
67
69
|
"DocumentDetail",
|
68
70
|
"DocumentListResponse",
|
71
|
+
"DocumentLocalIngestRequest",
|
69
72
|
"DocumentLookupResponse",
|
70
73
|
"DocumentResponse",
|
71
74
|
"DocumentType",
|
@@ -79,6 +82,7 @@ __all__ = [
|
|
79
82
|
"HealthService",
|
80
83
|
"HealthServiceStatus",
|
81
84
|
"IngestLocalDocument",
|
85
|
+
"IngestLocalDocumentMetadata",
|
82
86
|
"IngestRemoteDocument",
|
83
87
|
"IngestResponse",
|
84
88
|
"IngestResponseIngest",
|
@@ -19,7 +19,7 @@ from .customer.client import AsyncCustomerClient
|
|
19
19
|
from .health.client import AsyncHealthClient
|
20
20
|
|
21
21
|
|
22
|
-
class
|
22
|
+
class GroundXBase:
|
23
23
|
"""
|
24
24
|
Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
|
25
25
|
|
@@ -85,7 +85,7 @@ class GroundX:
|
|
85
85
|
self.health = HealthClient(client_wrapper=self._client_wrapper)
|
86
86
|
|
87
87
|
|
88
|
-
class
|
88
|
+
class AsyncGroundXBase:
|
89
89
|
"""
|
90
90
|
Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
|
91
91
|
|