athena-intelligence 0.1.98__tar.gz → 0.1.99__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 (40) hide show
  1. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/PKG-INFO +1 -1
  2. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/pyproject.toml +1 -1
  3. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/client.py +17 -17
  4. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/core/client_wrapper.py +1 -1
  5. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/tools/client.py +16 -22
  6. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/types/data_frame_parsing_error.py +1 -1
  7. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/types/data_frame_unknown_format_error.py +1 -1
  8. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/README.md +0 -0
  9. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/__init__.py +0 -0
  10. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/base_client.py +0 -0
  11. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/core/__init__.py +0 -0
  12. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/core/api_error.py +0 -0
  13. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/core/datetime_utils.py +0 -0
  14. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/core/file.py +0 -0
  15. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/core/http_client.py +0 -0
  16. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/core/jsonable_encoder.py +0 -0
  17. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/core/pydantic_utilities.py +0 -0
  18. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/core/query_encoder.py +0 -0
  19. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/core/remove_none_from_dict.py +0 -0
  20. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/core/request_options.py +0 -0
  21. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/environment.py +0 -0
  22. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/errors/__init__.py +0 -0
  23. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/errors/internal_server_error.py +0 -0
  24. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/errors/not_found_error.py +0 -0
  25. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/errors/unprocessable_entity_error.py +0 -0
  26. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/errors/unsupported_media_type_error.py +0 -0
  27. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/py.typed +0 -0
  28. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/tools/__init__.py +0 -0
  29. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/tools/types/__init__.py +0 -0
  30. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/tools/types/tools_data_frame_request_columns_item.py +0 -0
  31. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/types/__init__.py +0 -0
  32. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/types/data_frame_request_out.py +0 -0
  33. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/types/data_frame_request_out_columns_item.py +0 -0
  34. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/types/data_frame_request_out_data_item_item.py +0 -0
  35. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/types/data_frame_request_out_index_item.py +0 -0
  36. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/types/file_fetch_error.py +0 -0
  37. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/types/http_validation_error.py +0 -0
  38. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/types/validation_error.py +0 -0
  39. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/types/validation_error_loc_item.py +0 -0
  40. {athena_intelligence-0.1.98 → athena_intelligence-0.1.99}/src/athena/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: athena-intelligence
3
- Version: 0.1.98
3
+ Version: 0.1.99
4
4
  Summary: Athena Intelligence Python Library
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "athena-intelligence"
3
- version = "0.1.98"
3
+ version = "0.1.99"
4
4
  description = "Athena Intelligence Python Library"
5
5
  readme = "README.md"
6
6
  authors = []
@@ -34,11 +34,11 @@ def _inherit_signature_and_doc(
34
34
 
35
35
  class WrappedToolsClient(ToolsClient):
36
36
 
37
- def get_file(self, document_id: str) -> io.BytesIO:
37
+ def get_file(self, asset_id: str) -> io.BytesIO:
38
38
  """
39
39
  Parameters
40
40
  ----------
41
- document_id : str
41
+ asset_id : str
42
42
 
43
43
  Returns
44
44
  -------
@@ -50,28 +50,28 @@ class WrappedToolsClient(ToolsClient):
50
50
  from athena.client import Athena
51
51
 
52
52
  client = Athena(api_key="YOUR_API_KEY")
53
- file_io = client.tools.get_file(document_id="document_id")
53
+ file_io = client.tools.get_file(asset_id="asset_id")
54
54
  pl.read_csv(file_io)
55
55
  """
56
- file_bytes = b''.join(self.raw_data(document_id=document_id))
56
+ file_bytes = b''.join(self.raw_data(asset_id=asset_id))
57
57
  bytes_io = io.BytesIO(file_bytes)
58
58
  return bytes_io
59
59
 
60
60
  @_inherit_signature_and_doc(ToolsClient.data_frame, {'DataFrameRequestOut': 'pd.DataFrame'})
61
- def data_frame(self, *, document_id: str, **kwargs) -> 'pd.DataFrame':
61
+ def data_frame(self, *, asset_id: str, **kwargs) -> 'pd.DataFrame':
62
62
  _check_pandas_installed()
63
- model = super().data_frame(document_id=document_id, **kwargs)
63
+ model = super().data_frame(asset_id=asset_id, **kwargs)
64
64
  return _read_json_frame(model)
65
65
 
66
- def read_data_frame(self, document_id: str, *args, **kwargs) -> 'pd.DataFrame':
66
+ def read_data_frame(self, asset_id: str, *args, **kwargs) -> 'pd.DataFrame':
67
67
  """
68
68
  Parameters
69
69
  ----------
70
- document_id : str
70
+ asset_id : str
71
71
 
72
72
  **kwargs : dict
73
73
  keyword arguments passed to pandas `read_csv` or `read_excel` function,
74
- depending on the file type of the document identified by `document_id`.
74
+ depending on the file type of the document identified by `asset_id`.
75
75
 
76
76
  Returns
77
77
  -------
@@ -82,10 +82,10 @@ class WrappedToolsClient(ToolsClient):
82
82
  from athena.client import Athena
83
83
 
84
84
  client = Athena(api_key="YOUR_API_KEY")
85
- client.tools.read_data_frame(document_id="document_id")
85
+ client.tools.read_data_frame(asset_id="asset_id")
86
86
  """
87
87
  _check_pandas_installed()
88
- file_bytes = self.get_file(document_id)
88
+ file_bytes = self.get_file(asset_id)
89
89
  return _to_pandas_df(file_bytes, *args, **kwargs)
90
90
 
91
91
 
@@ -105,21 +105,21 @@ def _add_docs_for_async_variant(obj):
105
105
  class WrappedAsyncToolsClient(AsyncToolsClient):
106
106
 
107
107
  @_add_docs_for_async_variant(WrappedToolsClient.get_file)
108
- async def get_file(self, document_id: str) -> io.BytesIO:
109
- file_bytes = b''.join([gen async for gen in self.raw_data(document_id=document_id)])
108
+ async def get_file(self, asset_id: str) -> io.BytesIO:
109
+ file_bytes = b''.join([gen async for gen in self.raw_data(asset_id=asset_id)])
110
110
  bytes_io = io.BytesIO(file_bytes)
111
111
  return bytes_io
112
112
 
113
113
  @_inherit_signature_and_doc(AsyncToolsClient.data_frame, {'DataFrameRequestOut': 'pd.DataFrame'})
114
- async def data_frame(self, *, document_id: str, **kwargs) -> 'pd.DataFrame':
114
+ async def data_frame(self, *, asset_id: str, **kwargs) -> 'pd.DataFrame':
115
115
  _check_pandas_installed()
116
- model = await super().data_frame(document_id=document_id, **kwargs)
116
+ model = await super().data_frame(asset_id=asset_id, **kwargs)
117
117
  return _read_json_frame(model)
118
118
 
119
119
  @_add_docs_for_async_variant(WrappedToolsClient.read_data_frame)
120
- async def read_data_frame(self, document_id: str, *args, **kwargs) -> 'pd.DataFrame':
120
+ async def read_data_frame(self, asset_id: str, *args, **kwargs) -> 'pd.DataFrame':
121
121
  _check_pandas_installed()
122
- file_bytes = await self.get_file(document_id)
122
+ file_bytes = await self.get_file(asset_id)
123
123
  return _to_pandas_df(file_bytes, *args, **kwargs)
124
124
 
125
125
 
@@ -17,7 +17,7 @@ class BaseClientWrapper:
17
17
  headers: typing.Dict[str, str] = {
18
18
  "X-Fern-Language": "Python",
19
19
  "X-Fern-SDK-Name": "athena-intelligence",
20
- "X-Fern-SDK-Version": "0.1.98",
20
+ "X-Fern-SDK-Version": "0.1.99",
21
21
  }
22
22
  headers["X-API-KEY"] = self.api_key
23
23
  return headers
@@ -26,7 +26,7 @@ class ToolsClient:
26
26
  def data_frame(
27
27
  self,
28
28
  *,
29
- document_id: str,
29
+ asset_id: str,
30
30
  row_limit: typing.Optional[int] = None,
31
31
  index_column: typing.Optional[int] = None,
32
32
  columns: typing.Optional[
@@ -39,7 +39,7 @@ class ToolsClient:
39
39
  """
40
40
  Parameters
41
41
  ----------
42
- document_id : str
42
+ asset_id : str
43
43
 
44
44
  row_limit : typing.Optional[int]
45
45
 
@@ -70,14 +70,14 @@ class ToolsClient:
70
70
  api_key="YOUR_API_KEY",
71
71
  )
72
72
  client.tools.data_frame(
73
- document_id="document_id",
73
+ asset_id="asset_id",
74
74
  )
75
75
  """
76
76
  _response = self._client_wrapper.httpx_client.request(
77
77
  "api/v0/tools/file/data-frame",
78
78
  method="GET",
79
79
  params={
80
- "document_id": document_id,
80
+ "asset_id": asset_id,
81
81
  "row_limit": row_limit,
82
82
  "index_column": index_column,
83
83
  "columns": columns,
@@ -107,14 +107,14 @@ class ToolsClient:
107
107
  raise ApiError(status_code=_response.status_code, body=_response_json)
108
108
 
109
109
  def raw_data(
110
- self, *, document_id: str, request_options: typing.Optional[RequestOptions] = None
110
+ self, *, asset_id: str, request_options: typing.Optional[RequestOptions] = None
111
111
  ) -> typing.Iterator[bytes]:
112
112
  """
113
113
  Get the raw file data for given asset.
114
114
 
115
115
  Parameters
116
116
  ----------
117
- document_id : str
117
+ asset_id : str
118
118
 
119
119
  request_options : typing.Optional[RequestOptions]
120
120
  Request-specific configuration.
@@ -132,14 +132,11 @@ class ToolsClient:
132
132
  api_key="YOUR_API_KEY",
133
133
  )
134
134
  client.tools.raw_data(
135
- document_id="string",
135
+ asset_id="string",
136
136
  )
137
137
  """
138
138
  with self._client_wrapper.httpx_client.stream(
139
- "api/v0/tools/file/raw-data",
140
- method="GET",
141
- params={"document_id": document_id},
142
- request_options=request_options,
139
+ "api/v0/tools/file/raw-data", method="GET", params={"asset_id": asset_id}, request_options=request_options
143
140
  ) as _response:
144
141
  if 200 <= _response.status_code < 300:
145
142
  for _chunk in _response.iter_bytes():
@@ -166,7 +163,7 @@ class AsyncToolsClient:
166
163
  async def data_frame(
167
164
  self,
168
165
  *,
169
- document_id: str,
166
+ asset_id: str,
170
167
  row_limit: typing.Optional[int] = None,
171
168
  index_column: typing.Optional[int] = None,
172
169
  columns: typing.Optional[
@@ -179,7 +176,7 @@ class AsyncToolsClient:
179
176
  """
180
177
  Parameters
181
178
  ----------
182
- document_id : str
179
+ asset_id : str
183
180
 
184
181
  row_limit : typing.Optional[int]
185
182
 
@@ -210,14 +207,14 @@ class AsyncToolsClient:
210
207
  api_key="YOUR_API_KEY",
211
208
  )
212
209
  await client.tools.data_frame(
213
- document_id="document_id",
210
+ asset_id="asset_id",
214
211
  )
215
212
  """
216
213
  _response = await self._client_wrapper.httpx_client.request(
217
214
  "api/v0/tools/file/data-frame",
218
215
  method="GET",
219
216
  params={
220
- "document_id": document_id,
217
+ "asset_id": asset_id,
221
218
  "row_limit": row_limit,
222
219
  "index_column": index_column,
223
220
  "columns": columns,
@@ -247,14 +244,14 @@ class AsyncToolsClient:
247
244
  raise ApiError(status_code=_response.status_code, body=_response_json)
248
245
 
249
246
  async def raw_data(
250
- self, *, document_id: str, request_options: typing.Optional[RequestOptions] = None
247
+ self, *, asset_id: str, request_options: typing.Optional[RequestOptions] = None
251
248
  ) -> typing.AsyncIterator[bytes]:
252
249
  """
253
250
  Get the raw file data for given asset.
254
251
 
255
252
  Parameters
256
253
  ----------
257
- document_id : str
254
+ asset_id : str
258
255
 
259
256
  request_options : typing.Optional[RequestOptions]
260
257
  Request-specific configuration.
@@ -272,14 +269,11 @@ class AsyncToolsClient:
272
269
  api_key="YOUR_API_KEY",
273
270
  )
274
271
  await client.tools.raw_data(
275
- document_id="string",
272
+ asset_id="string",
276
273
  )
277
274
  """
278
275
  async with self._client_wrapper.httpx_client.stream(
279
- "api/v0/tools/file/raw-data",
280
- method="GET",
281
- params={"document_id": document_id},
282
- request_options=request_options,
276
+ "api/v0/tools/file/raw-data", method="GET", params={"asset_id": asset_id}, request_options=request_options
283
277
  ) as _response:
284
278
  if 200 <= _response.status_code < 300:
285
279
  async for _chunk in _response.aiter_bytes():
@@ -8,7 +8,7 @@ from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
8
 
9
9
 
10
10
  class DataFrameParsingError(pydantic_v1.BaseModel):
11
- document_id: str
11
+ asset_id: str
12
12
  message: str
13
13
 
14
14
  def json(self, **kwargs: typing.Any) -> str:
@@ -8,7 +8,7 @@ from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
8
 
9
9
 
10
10
  class DataFrameUnknownFormatError(pydantic_v1.BaseModel):
11
- document_id: str
11
+ asset_id: str
12
12
  media_type: str
13
13
  message: str
14
14