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.
Files changed (80) hide show
  1. groundx/__init__.py +107 -0
  2. groundx/buckets/__init__.py +2 -0
  3. groundx/buckets/client.py +761 -0
  4. groundx/client.py +160 -0
  5. groundx/core/__init__.py +47 -0
  6. groundx/core/api_error.py +15 -0
  7. groundx/core/client_wrapper.py +54 -0
  8. groundx/core/datetime_utils.py +28 -0
  9. groundx/core/file.py +67 -0
  10. groundx/core/http_client.py +499 -0
  11. groundx/core/jsonable_encoder.py +101 -0
  12. groundx/core/pydantic_utilities.py +296 -0
  13. groundx/core/query_encoder.py +58 -0
  14. groundx/core/remove_none_from_dict.py +11 -0
  15. groundx/core/request_options.py +35 -0
  16. groundx/core/serialization.py +272 -0
  17. groundx/customer/__init__.py +2 -0
  18. groundx/customer/client.py +112 -0
  19. groundx/documents/__init__.py +5 -0
  20. groundx/documents/client.py +1544 -0
  21. groundx/documents/types/__init__.py +6 -0
  22. groundx/documents/types/document_remote_ingest_request_documents_item.py +45 -0
  23. groundx/documents/types/website_crawl_request_websites_item.py +46 -0
  24. groundx/environment.py +7 -0
  25. groundx/errors/__init__.py +6 -0
  26. groundx/errors/bad_request_error.py +9 -0
  27. groundx/errors/unauthorized_error.py +9 -0
  28. groundx/groups/__init__.py +2 -0
  29. groundx/groups/client.py +1098 -0
  30. groundx/health/__init__.py +2 -0
  31. groundx/health/client.py +236 -0
  32. groundx/py.typed +0 -0
  33. groundx/search/__init__.py +5 -0
  34. groundx/search/client.py +489 -0
  35. groundx/search/types/__init__.py +5 -0
  36. groundx/search/types/search_content_request_id.py +5 -0
  37. groundx/types/__init__.py +83 -0
  38. groundx/types/bounding_box_detail.py +54 -0
  39. groundx/types/bucket_detail.py +46 -0
  40. groundx/types/bucket_list_response.py +20 -0
  41. groundx/types/bucket_response.py +20 -0
  42. groundx/types/bucket_update_detail.py +22 -0
  43. groundx/types/bucket_update_response.py +20 -0
  44. groundx/types/customer_detail.py +39 -0
  45. groundx/types/customer_response.py +20 -0
  46. groundx/types/document_detail.py +62 -0
  47. groundx/types/document_list_response.py +23 -0
  48. groundx/types/document_lookup_response.py +32 -0
  49. groundx/types/document_response.py +20 -0
  50. groundx/types/document_type.py +7 -0
  51. groundx/types/group_detail.py +52 -0
  52. groundx/types/group_list_response.py +20 -0
  53. groundx/types/group_response.py +20 -0
  54. groundx/types/health_response.py +20 -0
  55. groundx/types/health_response_health.py +20 -0
  56. groundx/types/health_service.py +36 -0
  57. groundx/types/health_service_status.py +5 -0
  58. groundx/types/ingest_response.py +20 -0
  59. groundx/types/ingest_response_ingest.py +23 -0
  60. groundx/types/message_response.py +19 -0
  61. groundx/types/meter_detail.py +40 -0
  62. groundx/types/process_status_response.py +20 -0
  63. groundx/types/process_status_response_ingest.py +26 -0
  64. groundx/types/process_status_response_ingest_progress.py +26 -0
  65. groundx/types/process_status_response_ingest_progress_cancelled.py +21 -0
  66. groundx/types/process_status_response_ingest_progress_complete.py +21 -0
  67. groundx/types/process_status_response_ingest_progress_errors.py +21 -0
  68. groundx/types/process_status_response_ingest_progress_processing.py +21 -0
  69. groundx/types/processing_status.py +5 -0
  70. groundx/types/search_response.py +20 -0
  71. groundx/types/search_response_search.py +59 -0
  72. groundx/types/search_result_item.py +96 -0
  73. groundx/types/sort.py +5 -0
  74. groundx/types/sort_order.py +5 -0
  75. groundx/types/subscription_detail.py +24 -0
  76. groundx/types/subscription_detail_meters.py +23 -0
  77. groundx/version.py +3 -0
  78. groundx-2.0.11.dist-info/METADATA +177 -0
  79. groundx-2.0.11.dist-info/RECORD +80 -0
  80. 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)
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .types import DocumentRemoteIngestRequestDocumentsItem, WebsiteCrawlRequestWebsitesItem
4
+
5
+ __all__ = ["DocumentRemoteIngestRequestDocumentsItem", "WebsiteCrawlRequestWebsitesItem"]