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,112 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.client_wrapper import SyncClientWrapper
|
4
|
+
import typing
|
5
|
+
from ..core.request_options import RequestOptions
|
6
|
+
from ..types.customer_response import CustomerResponse
|
7
|
+
from ..core.pydantic_utilities import parse_obj_as
|
8
|
+
from json.decoder import JSONDecodeError
|
9
|
+
from ..core.api_error import ApiError
|
10
|
+
from ..core.client_wrapper import AsyncClientWrapper
|
11
|
+
|
12
|
+
|
13
|
+
class CustomerClient:
|
14
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
15
|
+
self._client_wrapper = client_wrapper
|
16
|
+
|
17
|
+
def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> CustomerResponse:
|
18
|
+
"""
|
19
|
+
Get the account information associated with the API key.
|
20
|
+
|
21
|
+
Parameters
|
22
|
+
----------
|
23
|
+
request_options : typing.Optional[RequestOptions]
|
24
|
+
Request-specific configuration.
|
25
|
+
|
26
|
+
Returns
|
27
|
+
-------
|
28
|
+
CustomerResponse
|
29
|
+
Look up success
|
30
|
+
|
31
|
+
Examples
|
32
|
+
--------
|
33
|
+
from groundx import GroundX
|
34
|
+
|
35
|
+
client = GroundX(
|
36
|
+
api_key="YOUR_API_KEY",
|
37
|
+
)
|
38
|
+
client.customer.get()
|
39
|
+
"""
|
40
|
+
_response = self._client_wrapper.httpx_client.request(
|
41
|
+
"v1/customer",
|
42
|
+
method="GET",
|
43
|
+
request_options=request_options,
|
44
|
+
)
|
45
|
+
try:
|
46
|
+
if 200 <= _response.status_code < 300:
|
47
|
+
return typing.cast(
|
48
|
+
CustomerResponse,
|
49
|
+
parse_obj_as(
|
50
|
+
type_=CustomerResponse, # type: ignore
|
51
|
+
object_=_response.json(),
|
52
|
+
),
|
53
|
+
)
|
54
|
+
_response_json = _response.json()
|
55
|
+
except JSONDecodeError:
|
56
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
57
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
58
|
+
|
59
|
+
|
60
|
+
class AsyncCustomerClient:
|
61
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
62
|
+
self._client_wrapper = client_wrapper
|
63
|
+
|
64
|
+
async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> CustomerResponse:
|
65
|
+
"""
|
66
|
+
Get the account information associated with the API key.
|
67
|
+
|
68
|
+
Parameters
|
69
|
+
----------
|
70
|
+
request_options : typing.Optional[RequestOptions]
|
71
|
+
Request-specific configuration.
|
72
|
+
|
73
|
+
Returns
|
74
|
+
-------
|
75
|
+
CustomerResponse
|
76
|
+
Look up success
|
77
|
+
|
78
|
+
Examples
|
79
|
+
--------
|
80
|
+
import asyncio
|
81
|
+
|
82
|
+
from groundx import AsyncGroundX
|
83
|
+
|
84
|
+
client = AsyncGroundX(
|
85
|
+
api_key="YOUR_API_KEY",
|
86
|
+
)
|
87
|
+
|
88
|
+
|
89
|
+
async def main() -> None:
|
90
|
+
await client.customer.get()
|
91
|
+
|
92
|
+
|
93
|
+
asyncio.run(main())
|
94
|
+
"""
|
95
|
+
_response = await self._client_wrapper.httpx_client.request(
|
96
|
+
"v1/customer",
|
97
|
+
method="GET",
|
98
|
+
request_options=request_options,
|
99
|
+
)
|
100
|
+
try:
|
101
|
+
if 200 <= _response.status_code < 300:
|
102
|
+
return typing.cast(
|
103
|
+
CustomerResponse,
|
104
|
+
parse_obj_as(
|
105
|
+
type_=CustomerResponse, # type: ignore
|
106
|
+
object_=_response.json(),
|
107
|
+
),
|
108
|
+
)
|
109
|
+
_response_json = _response.json()
|
110
|
+
except JSONDecodeError:
|
111
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
112
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|