groundx 2.0.11__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 +107 -0
- groundx/buckets/__init__.py +2 -0
- groundx/buckets/client.py +761 -0
- groundx/client.py +160 -0
- groundx/core/__init__.py +47 -0
- groundx/core/api_error.py +15 -0
- groundx/core/client_wrapper.py +54 -0
- groundx/core/datetime_utils.py +28 -0
- groundx/core/file.py +67 -0
- groundx/core/http_client.py +499 -0
- groundx/core/jsonable_encoder.py +101 -0
- groundx/core/pydantic_utilities.py +296 -0
- groundx/core/query_encoder.py +58 -0
- groundx/core/remove_none_from_dict.py +11 -0
- groundx/core/request_options.py +35 -0
- groundx/core/serialization.py +272 -0
- groundx/customer/__init__.py +2 -0
- groundx/customer/client.py +112 -0
- groundx/documents/__init__.py +5 -0
- groundx/documents/client.py +1544 -0
- groundx/documents/types/__init__.py +6 -0
- groundx/documents/types/document_remote_ingest_request_documents_item.py +45 -0
- groundx/documents/types/website_crawl_request_websites_item.py +46 -0
- groundx/environment.py +7 -0
- groundx/errors/__init__.py +6 -0
- groundx/errors/bad_request_error.py +9 -0
- groundx/errors/unauthorized_error.py +9 -0
- groundx/groups/__init__.py +2 -0
- groundx/groups/client.py +1098 -0
- groundx/health/__init__.py +2 -0
- groundx/health/client.py +236 -0
- groundx/py.typed +0 -0
- groundx/search/__init__.py +5 -0
- groundx/search/client.py +489 -0
- groundx/search/types/__init__.py +5 -0
- groundx/search/types/search_content_request_id.py +5 -0
- groundx/types/__init__.py +83 -0
- groundx/types/bounding_box_detail.py +54 -0
- groundx/types/bucket_detail.py +46 -0
- groundx/types/bucket_list_response.py +20 -0
- groundx/types/bucket_response.py +20 -0
- groundx/types/bucket_update_detail.py +22 -0
- groundx/types/bucket_update_response.py +20 -0
- groundx/types/customer_detail.py +39 -0
- groundx/types/customer_response.py +20 -0
- groundx/types/document_detail.py +62 -0
- groundx/types/document_list_response.py +23 -0
- groundx/types/document_lookup_response.py +32 -0
- groundx/types/document_response.py +20 -0
- groundx/types/document_type.py +7 -0
- groundx/types/group_detail.py +52 -0
- groundx/types/group_list_response.py +20 -0
- groundx/types/group_response.py +20 -0
- groundx/types/health_response.py +20 -0
- groundx/types/health_response_health.py +20 -0
- groundx/types/health_service.py +36 -0
- groundx/types/health_service_status.py +5 -0
- groundx/types/ingest_response.py +20 -0
- groundx/types/ingest_response_ingest.py +23 -0
- groundx/types/message_response.py +19 -0
- groundx/types/meter_detail.py +40 -0
- groundx/types/process_status_response.py +20 -0
- groundx/types/process_status_response_ingest.py +26 -0
- groundx/types/process_status_response_ingest_progress.py +26 -0
- groundx/types/process_status_response_ingest_progress_cancelled.py +21 -0
- groundx/types/process_status_response_ingest_progress_complete.py +21 -0
- groundx/types/process_status_response_ingest_progress_errors.py +21 -0
- groundx/types/process_status_response_ingest_progress_processing.py +21 -0
- groundx/types/processing_status.py +5 -0
- groundx/types/search_response.py +20 -0
- groundx/types/search_response_search.py +59 -0
- groundx/types/search_result_item.py +96 -0
- groundx/types/sort.py +5 -0
- groundx/types/sort_order.py +5 -0
- groundx/types/subscription_detail.py +24 -0
- groundx/types/subscription_detail_meters.py +23 -0
- groundx/version.py +3 -0
- groundx-2.0.11.dist-info/METADATA +177 -0
- groundx-2.0.11.dist-info/RECORD +80 -0
- groundx-2.0.11.dist-info/WHEEL +4 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .document_detail import DocumentDetail
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class ProcessStatusResponseIngestProgressCancelled(UniversalBaseModel):
|
11
|
+
documents: typing.Optional[typing.List[DocumentDetail]] = None
|
12
|
+
total: typing.Optional[int] = None
|
13
|
+
|
14
|
+
if IS_PYDANTIC_V2:
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
16
|
+
else:
|
17
|
+
|
18
|
+
class Config:
|
19
|
+
frozen = True
|
20
|
+
smart_union = True
|
21
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .document_detail import DocumentDetail
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class ProcessStatusResponseIngestProgressComplete(UniversalBaseModel):
|
11
|
+
documents: typing.Optional[typing.List[DocumentDetail]] = None
|
12
|
+
total: typing.Optional[int] = None
|
13
|
+
|
14
|
+
if IS_PYDANTIC_V2:
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
16
|
+
else:
|
17
|
+
|
18
|
+
class Config:
|
19
|
+
frozen = True
|
20
|
+
smart_union = True
|
21
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .document_detail import DocumentDetail
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class ProcessStatusResponseIngestProgressErrors(UniversalBaseModel):
|
11
|
+
documents: typing.Optional[typing.List[DocumentDetail]] = None
|
12
|
+
total: typing.Optional[int] = None
|
13
|
+
|
14
|
+
if IS_PYDANTIC_V2:
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
16
|
+
else:
|
17
|
+
|
18
|
+
class Config:
|
19
|
+
frozen = True
|
20
|
+
smart_union = True
|
21
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .document_detail import DocumentDetail
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class ProcessStatusResponseIngestProgressProcessing(UniversalBaseModel):
|
11
|
+
documents: typing.Optional[typing.List[DocumentDetail]] = None
|
12
|
+
total: typing.Optional[int] = None
|
13
|
+
|
14
|
+
if IS_PYDANTIC_V2:
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
16
|
+
else:
|
17
|
+
|
18
|
+
class Config:
|
19
|
+
frozen = True
|
20
|
+
smart_union = True
|
21
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from .search_response_search import SearchResponseSearch
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
6
|
+
import typing
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class SearchResponse(UniversalBaseModel):
|
11
|
+
search: SearchResponseSearch
|
12
|
+
|
13
|
+
if IS_PYDANTIC_V2:
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
15
|
+
else:
|
16
|
+
|
17
|
+
class Config:
|
18
|
+
frozen = True
|
19
|
+
smart_union = True
|
20
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
import pydantic
|
6
|
+
from .search_result_item import SearchResultItem
|
7
|
+
import typing_extensions
|
8
|
+
from ..core.serialization import FieldMetadata
|
9
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
10
|
+
|
11
|
+
|
12
|
+
class SearchResponseSearch(UniversalBaseModel):
|
13
|
+
count: typing.Optional[int] = pydantic.Field(default=None)
|
14
|
+
"""
|
15
|
+
Total results
|
16
|
+
"""
|
17
|
+
|
18
|
+
results: typing.Optional[typing.List[SearchResultItem]] = pydantic.Field(default=None)
|
19
|
+
"""
|
20
|
+
Search results
|
21
|
+
"""
|
22
|
+
|
23
|
+
query: typing.Optional[str] = pydantic.Field(default=None)
|
24
|
+
"""
|
25
|
+
The original search request query
|
26
|
+
"""
|
27
|
+
|
28
|
+
score: typing.Optional[float] = pydantic.Field(default=None)
|
29
|
+
"""
|
30
|
+
Confidence score in the search results
|
31
|
+
"""
|
32
|
+
|
33
|
+
search_query: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="searchQuery")] = (
|
34
|
+
pydantic.Field(default=None)
|
35
|
+
)
|
36
|
+
"""
|
37
|
+
The actual search query, if the search request query was re-written
|
38
|
+
"""
|
39
|
+
|
40
|
+
text: typing.Optional[str] = pydantic.Field(default=None)
|
41
|
+
"""
|
42
|
+
Suggested context for LLM completion
|
43
|
+
"""
|
44
|
+
|
45
|
+
next_token: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="nextToken")] = pydantic.Field(
|
46
|
+
default=None
|
47
|
+
)
|
48
|
+
"""
|
49
|
+
For paginated results
|
50
|
+
"""
|
51
|
+
|
52
|
+
if IS_PYDANTIC_V2:
|
53
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
54
|
+
else:
|
55
|
+
|
56
|
+
class Config:
|
57
|
+
frozen = True
|
58
|
+
smart_union = True
|
59
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,96 @@
|
|
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
|
+
import typing
|
6
|
+
from .bounding_box_detail import BoundingBoxDetail
|
7
|
+
from ..core.serialization import FieldMetadata
|
8
|
+
import pydantic
|
9
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
10
|
+
|
11
|
+
|
12
|
+
class SearchResultItem(UniversalBaseModel):
|
13
|
+
bounding_boxes: typing_extensions.Annotated[
|
14
|
+
typing.Optional[typing.List[BoundingBoxDetail]], FieldMetadata(alias="boundingBoxes")
|
15
|
+
] = pydantic.Field(default=None)
|
16
|
+
"""
|
17
|
+
Coordinates corresponding to the areas of the document where the chunk appears
|
18
|
+
"""
|
19
|
+
|
20
|
+
bucket_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="bucketId")] = pydantic.Field(
|
21
|
+
default=None
|
22
|
+
)
|
23
|
+
"""
|
24
|
+
Content bucket the search result belongs to
|
25
|
+
"""
|
26
|
+
|
27
|
+
chunk_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="chunkId")] = pydantic.Field(
|
28
|
+
default=None
|
29
|
+
)
|
30
|
+
"""
|
31
|
+
Unique system generated ID for the chunk
|
32
|
+
"""
|
33
|
+
|
34
|
+
document_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="documentId")] = pydantic.Field(
|
35
|
+
default=None
|
36
|
+
)
|
37
|
+
"""
|
38
|
+
Unique system generated ID for the document
|
39
|
+
"""
|
40
|
+
|
41
|
+
file_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fileName")] = pydantic.Field(
|
42
|
+
default=None
|
43
|
+
)
|
44
|
+
"""
|
45
|
+
Name of ingested file
|
46
|
+
"""
|
47
|
+
|
48
|
+
multimodal_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="multimodalUrl")] = (
|
49
|
+
pydantic.Field(default=None)
|
50
|
+
)
|
51
|
+
"""
|
52
|
+
An image clipping of the table or figure object from the document
|
53
|
+
"""
|
54
|
+
|
55
|
+
page_images: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="pageImages")] = (
|
56
|
+
None
|
57
|
+
)
|
58
|
+
score: typing.Optional[float] = pydantic.Field(default=None)
|
59
|
+
"""
|
60
|
+
Confidence score in the search result
|
61
|
+
"""
|
62
|
+
|
63
|
+
search_data: typing_extensions.Annotated[
|
64
|
+
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="searchData")
|
65
|
+
] = pydantic.Field(default=None)
|
66
|
+
"""
|
67
|
+
Document, section, and chunk search data, both custom and system-generated
|
68
|
+
"""
|
69
|
+
|
70
|
+
source_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sourceUrl")] = pydantic.Field(
|
71
|
+
default=None
|
72
|
+
)
|
73
|
+
"""
|
74
|
+
Source document URL
|
75
|
+
"""
|
76
|
+
|
77
|
+
suggested_text: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="suggestedText")] = (
|
78
|
+
pydantic.Field(default=None)
|
79
|
+
)
|
80
|
+
"""
|
81
|
+
System-generated text, re-written for LLM completions
|
82
|
+
"""
|
83
|
+
|
84
|
+
text: typing.Optional[str] = pydantic.Field(default=None)
|
85
|
+
"""
|
86
|
+
Original text from the source document
|
87
|
+
"""
|
88
|
+
|
89
|
+
if IS_PYDANTIC_V2:
|
90
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
91
|
+
else:
|
92
|
+
|
93
|
+
class Config:
|
94
|
+
frozen = True
|
95
|
+
smart_union = True
|
96
|
+
extra = pydantic.Extra.allow
|
groundx/types/sort.py
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .subscription_detail_meters import SubscriptionDetailMeters
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class SubscriptionDetail(UniversalBaseModel):
|
11
|
+
"""
|
12
|
+
Subscription information for the user, including current usage and limits
|
13
|
+
"""
|
14
|
+
|
15
|
+
meters: typing.Optional[SubscriptionDetailMeters] = None
|
16
|
+
|
17
|
+
if IS_PYDANTIC_V2:
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
19
|
+
else:
|
20
|
+
|
21
|
+
class Config:
|
22
|
+
frozen = True
|
23
|
+
smart_union = True
|
24
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,23 @@
|
|
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
|
+
import typing
|
6
|
+
from .meter_detail import MeterDetail
|
7
|
+
from ..core.serialization import FieldMetadata
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
9
|
+
import pydantic
|
10
|
+
|
11
|
+
|
12
|
+
class SubscriptionDetailMeters(UniversalBaseModel):
|
13
|
+
file_tokens: typing_extensions.Annotated[typing.Optional[MeterDetail], FieldMetadata(alias="fileTokens")] = None
|
14
|
+
searches: typing.Optional[MeterDetail] = None
|
15
|
+
|
16
|
+
if IS_PYDANTIC_V2:
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
18
|
+
else:
|
19
|
+
|
20
|
+
class Config:
|
21
|
+
frozen = True
|
22
|
+
smart_union = True
|
23
|
+
extra = pydantic.Extra.allow
|
groundx/version.py
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: groundx
|
3
|
+
Version: 2.0.11
|
4
|
+
Summary:
|
5
|
+
Requires-Python: >=3.8,<4.0
|
6
|
+
Classifier: Intended Audience :: Developers
|
7
|
+
Classifier: Operating System :: MacOS
|
8
|
+
Classifier: Operating System :: Microsoft :: Windows
|
9
|
+
Classifier: Operating System :: OS Independent
|
10
|
+
Classifier: Operating System :: POSIX
|
11
|
+
Classifier: Operating System :: POSIX :: Linux
|
12
|
+
Classifier: Programming Language :: Python
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
20
|
+
Classifier: Typing :: Typed
|
21
|
+
Requires-Dist: httpx (>=0.21.2)
|
22
|
+
Requires-Dist: pydantic (>=1.9.2)
|
23
|
+
Requires-Dist: pydantic-core (>=2.18.2,<3.0.0)
|
24
|
+
Requires-Dist: typing_extensions (>=4.0.0)
|
25
|
+
Description-Content-Type: text/markdown
|
26
|
+
|
27
|
+
# Eyelevel Python Library
|
28
|
+
|
29
|
+
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Feyelevelai%2Fgroundx-python)
|
30
|
+
[](https://pypi.python.org/pypi/groundx)
|
31
|
+
|
32
|
+
The Eyelevel Python library provides convenient access to the Eyelevel API from Python.
|
33
|
+
|
34
|
+
## Installation
|
35
|
+
|
36
|
+
```sh
|
37
|
+
pip install groundx
|
38
|
+
```
|
39
|
+
|
40
|
+
## Reference
|
41
|
+
|
42
|
+
A full reference for this library is available [here](./reference.md).
|
43
|
+
|
44
|
+
## Usage
|
45
|
+
|
46
|
+
Instantiate and use the client with the following:
|
47
|
+
|
48
|
+
```python
|
49
|
+
from groundx import GroundX
|
50
|
+
from groundx.documents import DocumentRemoteIngestRequestDocumentsItem
|
51
|
+
|
52
|
+
client = GroundX(
|
53
|
+
api_key="YOUR_API_KEY",
|
54
|
+
)
|
55
|
+
client.documents.ingest_remote(
|
56
|
+
documents=[
|
57
|
+
DocumentRemoteIngestRequestDocumentsItem(
|
58
|
+
bucket_id=1234,
|
59
|
+
source_url="https://my.source.url.com/file.txt",
|
60
|
+
)
|
61
|
+
],
|
62
|
+
)
|
63
|
+
```
|
64
|
+
|
65
|
+
## Async Client
|
66
|
+
|
67
|
+
The SDK also exports an `async` client so that you can make non-blocking calls to our API.
|
68
|
+
|
69
|
+
```python
|
70
|
+
import asyncio
|
71
|
+
|
72
|
+
from groundx import AsyncGroundX
|
73
|
+
from groundx.documents import DocumentRemoteIngestRequestDocumentsItem
|
74
|
+
|
75
|
+
client = AsyncGroundX(
|
76
|
+
api_key="YOUR_API_KEY",
|
77
|
+
)
|
78
|
+
|
79
|
+
|
80
|
+
async def main() -> None:
|
81
|
+
await client.documents.ingest_remote(
|
82
|
+
documents=[
|
83
|
+
DocumentRemoteIngestRequestDocumentsItem(
|
84
|
+
bucket_id=1234,
|
85
|
+
source_url="https://my.source.url.com/file.txt",
|
86
|
+
)
|
87
|
+
],
|
88
|
+
)
|
89
|
+
|
90
|
+
|
91
|
+
asyncio.run(main())
|
92
|
+
```
|
93
|
+
|
94
|
+
## Exception Handling
|
95
|
+
|
96
|
+
When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
|
97
|
+
will be thrown.
|
98
|
+
|
99
|
+
```python
|
100
|
+
from groundx.core.api_error import ApiError
|
101
|
+
|
102
|
+
try:
|
103
|
+
client.documents.ingest_remote(...)
|
104
|
+
except ApiError as e:
|
105
|
+
print(e.status_code)
|
106
|
+
print(e.body)
|
107
|
+
```
|
108
|
+
|
109
|
+
## Advanced
|
110
|
+
|
111
|
+
### Retries
|
112
|
+
|
113
|
+
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
114
|
+
as the request is deemed retriable and the number of retry attempts has not grown larger than the configured
|
115
|
+
retry limit (default: 2).
|
116
|
+
|
117
|
+
A request is deemed retriable when any of the following HTTP status codes is returned:
|
118
|
+
|
119
|
+
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
120
|
+
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
121
|
+
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
122
|
+
|
123
|
+
Use the `max_retries` request option to configure this behavior.
|
124
|
+
|
125
|
+
```python
|
126
|
+
client.documents.ingest_remote(..., request_options={
|
127
|
+
"max_retries": 1
|
128
|
+
})
|
129
|
+
```
|
130
|
+
|
131
|
+
### Timeouts
|
132
|
+
|
133
|
+
The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.
|
134
|
+
|
135
|
+
```python
|
136
|
+
|
137
|
+
from groundx import GroundX
|
138
|
+
|
139
|
+
client = GroundX(
|
140
|
+
...,
|
141
|
+
timeout=20.0,
|
142
|
+
)
|
143
|
+
|
144
|
+
|
145
|
+
# Override timeout for a specific method
|
146
|
+
client.documents.ingest_remote(..., request_options={
|
147
|
+
"timeout_in_seconds": 1
|
148
|
+
})
|
149
|
+
```
|
150
|
+
|
151
|
+
### Custom Client
|
152
|
+
|
153
|
+
You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies
|
154
|
+
and transports.
|
155
|
+
```python
|
156
|
+
import httpx
|
157
|
+
from groundx import GroundX
|
158
|
+
|
159
|
+
client = GroundX(
|
160
|
+
...,
|
161
|
+
httpx_client=httpx.Client(
|
162
|
+
proxies="http://my.test.proxy.example.com",
|
163
|
+
transport=httpx.HTTPTransport(local_address="0.0.0.0"),
|
164
|
+
),
|
165
|
+
)
|
166
|
+
```
|
167
|
+
|
168
|
+
## Contributing
|
169
|
+
|
170
|
+
While we value open-source contributions to this SDK, this library is generated programmatically.
|
171
|
+
Additions made directly to this library would have to be moved over to our generation code,
|
172
|
+
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
|
173
|
+
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
|
174
|
+
an issue first to discuss with us!
|
175
|
+
|
176
|
+
On the other hand, contributions to the README are always very welcome!
|
177
|
+
|
@@ -0,0 +1,80 @@
|
|
1
|
+
groundx/__init__.py,sha256=RFV2n0_4MD5vG1VNsUGoDaZrF7b4SDG5k_jrp000BwE,2879
|
2
|
+
groundx/buckets/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
3
|
+
groundx/buckets/client.py,sha256=TofNrkej1AC_-FU5rf_y8KG8ubFUpHtLa8PQ7rqax6E,26537
|
4
|
+
groundx/client.py,sha256=Q1Kw0z6K-z-ShhNyuuPe5fYonM9M2I_55-ukUrUWk1U,6507
|
5
|
+
groundx/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
|
6
|
+
groundx/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
7
|
+
groundx/core/client_wrapper.py,sha256=1o2T2R8LPYc7G-M-nulfYyNg9RfnL3TdPjWMTy9aLjo,1803
|
8
|
+
groundx/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
9
|
+
groundx/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
10
|
+
groundx/core/http_client.py,sha256=siUQ6UV0ARZALlxubqWSSAAPC9B4VW8y6MGlHStfaeo,19552
|
11
|
+
groundx/core/jsonable_encoder.py,sha256=qaF1gtgH-kQZb4kJskETwcCsOPUof-NnYVdszHkb-dM,3656
|
12
|
+
groundx/core/pydantic_utilities.py,sha256=Pj_AIcjRR-xc28URvV4t2XssDPjLvpN6HAcsY3MVLRM,11973
|
13
|
+
groundx/core/query_encoder.py,sha256=ekulqNd0j8TgD7ox-Qbz7liqX8-KP9blvT9DsRCenYM,2144
|
14
|
+
groundx/core/remove_none_from_dict.py,sha256=EU9SGgYidWq7SexuJbNs4-PZ-5Bl3Vppd864mS6vQZw,342
|
15
|
+
groundx/core/request_options.py,sha256=h0QUNCFVdCW_7GclVySCAY2w4NhtXVBUCmHgmzaxpcg,1681
|
16
|
+
groundx/core/serialization.py,sha256=D9h_t-RQON3-CHWs1C4ESY9B-Yd5d-l5lnTLb_X896g,9601
|
17
|
+
groundx/customer/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
18
|
+
groundx/customer/client.py,sha256=C_JANeDewRD1Kg-q7LPxdiOSWbYSTOiYlBYZLRYPI44,3467
|
19
|
+
groundx/documents/__init__.py,sha256=PErZSfUvOyPkEahdMLXRVhGRyynH7vRzSb9P4lM3i28,249
|
20
|
+
groundx/documents/client.py,sha256=hBVLfMbPqIdKo1picLIR3EWCfUFh65TXeLC7wRNW4QU,57815
|
21
|
+
groundx/documents/types/__init__.py,sha256=KYBZuTtGW9281sSUh2ooszTt4wonIHQUEHyWAJp5IaI,337
|
22
|
+
groundx/documents/types/document_remote_ingest_request_documents_item.py,sha256=IjZu1L3MGUxW2qydZlns5_DsMgOLNyAWDvKpy9VL6iE,1714
|
23
|
+
groundx/documents/types/website_crawl_request_websites_item.py,sha256=6So4stWecfZYPbiQWg6-FgsfIqV4g2ujFXXgn70evNI,1597
|
24
|
+
groundx/environment.py,sha256=CInm1_DKtZ1mrxutmKb1qqv82P33r_S87hZD3Hc1VB0,159
|
25
|
+
groundx/errors/__init__.py,sha256=-prNYsFd8xxM4va0vR1raZjcd10tllOJKyEWjX_pwdU,214
|
26
|
+
groundx/errors/bad_request_error.py,sha256=_EbO8mWqN9kFZPvIap8qa1lL_EWkRcsZe1HKV9GDWJY,264
|
27
|
+
groundx/errors/unauthorized_error.py,sha256=1ewNCqSG1P-uogB5yCNwreq4Bf3VRor0woSOXS4NjPU,266
|
28
|
+
groundx/groups/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
29
|
+
groundx/groups/client.py,sha256=CiCent5Wb8iC2QtR_xI2kNCvMdONuE0-HSfpy3QbL2I,38863
|
30
|
+
groundx/health/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
31
|
+
groundx/health/client.py,sha256=fcTa21RWPyBuT77PQ0EncC6rBaW_DrYlRvudy9-0H58,7545
|
32
|
+
groundx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
33
|
+
groundx/search/__init__.py,sha256=RagVzjShP33mDg9o4N3kGzV0egL1RYNjCpXPE8VzMYE,145
|
34
|
+
groundx/search/client.py,sha256=10ifg9GyIwIZF13ULfCXF8iFIydq6H6QRDrGPDjpanw,19756
|
35
|
+
groundx/search/types/__init__.py,sha256=fNFXQloPa1PHHO8VZim6KQNMA9N5EZtfSkissdxtY_c,165
|
36
|
+
groundx/search/types/search_content_request_id.py,sha256=us7mYdzR0qPur_wR5I9BhHaLEzC5nLBRna6-xq4M1ec,128
|
37
|
+
groundx/types/__init__.py,sha256=2GTGHb5P0h2dTD-FzF-G6ViIhdICL2DMgTBhB9WNH8g,3321
|
38
|
+
groundx/types/bounding_box_detail.py,sha256=51qcen326NTHY2ZqH1cFXut0_MCmk39EbLoDAwotdq4,1832
|
39
|
+
groundx/types/bucket_detail.py,sha256=bQjCvfyWydjItmzNNTvH-iWxNDOggd7R7X1alFZzlEY,1511
|
40
|
+
groundx/types/bucket_list_response.py,sha256=jC0NBsLCYDSwQrBzuW0g3PWFycjtKl8YRkKhic_-1DA,650
|
41
|
+
groundx/types/bucket_response.py,sha256=E8V7H2_TVKdmMsGCBjwzdf2bg4rUjiXFnhXtVGVCqZQ,608
|
42
|
+
groundx/types/bucket_update_detail.py,sha256=B4atQMDSXEdx7otcDbvgsrAHtXNz9swMnOsXRe25coc,738
|
43
|
+
groundx/types/bucket_update_response.py,sha256=h5RJTEpc4WPI_C4sPvsJZo7IxKppnPR-I9VGEQryRlc,633
|
44
|
+
groundx/types/customer_detail.py,sha256=RNm0qXvKx6YvVmkVJZeCNIz7n8_siFMXJ_AGtH3i5Z0,1094
|
45
|
+
groundx/types/customer_response.py,sha256=_RbuanXhCWQkCeQ0dkwPgsjNBoBgNpixiNfRpXcMew8,618
|
46
|
+
groundx/types/document_detail.py,sha256=i1UfcQAGYo9v1HwrrpzQPw_O0qA7IOXwOUuPV1yU8nI,2323
|
47
|
+
groundx/types/document_list_response.py,sha256=Z0Hm5VBwI0qatbSp6nYHh0RrGwJN3Gqh2D72FfDseZk,839
|
48
|
+
groundx/types/document_lookup_response.py,sha256=hZBwUO2pI6xFfeh7DmX_l1xRoh-5oaVNgUVxd00ml14,1097
|
49
|
+
groundx/types/document_response.py,sha256=EBDrYhTYoA3Q3ZpqwFEYmTgE3tY86TScFPhBnc3_ItI,642
|
50
|
+
groundx/types/document_type.py,sha256=NgsbSUXopTkzkut1AwXgthxWjsFzlKNnUhyfYqU_IM4,216
|
51
|
+
groundx/types/group_detail.py,sha256=ms8iEEE1d88PTNwJOHeSiyoXn0hKdMrjJhkM2tlMdMs,1754
|
52
|
+
groundx/types/group_list_response.py,sha256=mDIDaW8uWo4Wd-sk8_SzaZeUD1EC4ZqcJpbieQLRszc,645
|
53
|
+
groundx/types/group_response.py,sha256=SGqaQYPV9jaA4ET3x2adhkgL9NQQB9XwolXTuBQ1Xx0,603
|
54
|
+
groundx/types/health_response.py,sha256=3UpYL2IZb56tTo-fOpSU-0OTRyWgpYiB3pMU3sfjWUU,633
|
55
|
+
groundx/types/health_response_health.py,sha256=I0QeEljFp6l5LCJbCTArW031Om84egePgnGdtE6WXlI,632
|
56
|
+
groundx/types/health_service.py,sha256=M1-h1EJSpAXw-j3pY-09_g_WKkO0spdj8e7pgPzSGf0,1083
|
57
|
+
groundx/types/health_service_status.py,sha256=ugKJXlx8QGi83n_J6s1frFrW1hYfOn3Dlb_pPNexwMA,185
|
58
|
+
groundx/types/ingest_response.py,sha256=139rn8wpT44jlUzYXiy0r8XzN2U_OtdLltpSbRU0TyA,633
|
59
|
+
groundx/types/ingest_response_ingest.py,sha256=8FKApYNvS6KFxEKm05pKpKJ0BAagxoE0cWeTt-qjm1g,781
|
60
|
+
groundx/types/message_response.py,sha256=g_FJJyXYg_3fjZQueXkcy11q-qUfZGdVdALddHBieh4,585
|
61
|
+
groundx/types/meter_detail.py,sha256=FybpzJj5QrtlDXT26ejw2CH1koOWe0ZeG-MS0n63HSI,1152
|
62
|
+
groundx/types/process_status_response.py,sha256=ScmEqF9TVGeugFLshyFbGQpM4MkAawsEJ3sUBILP87c,662
|
63
|
+
groundx/types/process_status_response_ingest.py,sha256=tZteJy-DI_2jT6eLbTJ812qJc_WG9Sd44w7G1LVatLQ,1066
|
64
|
+
groundx/types/process_status_response_ingest_progress.py,sha256=4rPMHdLEc6PC5qTjMBAB4IA-l38t5KPcN8qtET7qKfc,1320
|
65
|
+
groundx/types/process_status_response_ingest_progress_cancelled.py,sha256=PpvHXzb6ewD-nWUSMpE0T4ZS0UtIo4iP57os1MP4CWQ,723
|
66
|
+
groundx/types/process_status_response_ingest_progress_complete.py,sha256=6-UuZCHK28No15RPigumAJ4r_gAUjbElH3Brg7ED8pU,722
|
67
|
+
groundx/types/process_status_response_ingest_progress_errors.py,sha256=aSpl99wXwcTFhtkB47BpBZATcqzQS6cXHssKLPdtnzQ,720
|
68
|
+
groundx/types/process_status_response_ingest_progress_processing.py,sha256=rqaTkeki5Vf3SgeeZtuSRtioGqmj99JcbfKoeI-Hgos,724
|
69
|
+
groundx/types/processing_status.py,sha256=d71n9cgs3gMH1Lyr-Wqq-iYJB6oMEE9yVRdJsmIb9Ws,198
|
70
|
+
groundx/types/search_response.py,sha256=EUwAFEHfzEisHCSTxa5zAy7VWY-bebV5VLx0b7irNlI,633
|
71
|
+
groundx/types/search_response_search.py,sha256=fhEbG9qQZHWlxpI_A9rLOHhm7VbzECrTLhicHkR2Xi0,1685
|
72
|
+
groundx/types/search_result_item.py,sha256=ut1q-aSTnzfRCfEQ8sdrf2A20ix2NF5iisiah5vPaww,3083
|
73
|
+
groundx/types/sort.py,sha256=oXap7qO8jI5I2wRhjdEfei4x0sEk2OEId2ll92EFOF8,147
|
74
|
+
groundx/types/sort_order.py,sha256=hfJkStz6zHf3iWQFaVLkNCZPdyj5JS7TsQlN4Ij8Q5A,148
|
75
|
+
groundx/types/subscription_detail.py,sha256=WNfUw2EMVECIvNYcV2s51zZ6T3Utc4zYXw63bPaeM6U,768
|
76
|
+
groundx/types/subscription_detail_meters.py,sha256=lBa8-1QlMVHjr5RLGqhiTKnD1KMM0AAHTWvz9TVtG8w,830
|
77
|
+
groundx/version.py,sha256=1yVogKaq260fQfckM2RYN2144SEw0QROsZW8ICtkG4U,74
|
78
|
+
groundx-2.0.11.dist-info/METADATA,sha256=HJ89cs438P-Ho4wEKAlt2_InjOM-Lg0wQO4hv8ZREq0,4949
|
79
|
+
groundx-2.0.11.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
80
|
+
groundx-2.0.11.dist-info/RECORD,,
|