athena-intelligence 0.1.25__tar.gz → 0.1.26__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 (45) hide show
  1. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/PKG-INFO +1 -1
  2. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/pyproject.toml +1 -1
  3. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/client.py +17 -19
  4. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/core/client_wrapper.py +1 -1
  5. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/README.md +0 -0
  6. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/__init__.py +0 -0
  7. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/base_client.py +0 -0
  8. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/core/__init__.py +0 -0
  9. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/core/api_error.py +0 -0
  10. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/core/datetime_utils.py +0 -0
  11. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/core/file.py +0 -0
  12. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/core/http_client.py +0 -0
  13. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/core/jsonable_encoder.py +0 -0
  14. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/core/remove_none_from_dict.py +0 -0
  15. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/core/request_options.py +0 -0
  16. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/dataset/__init__.py +0 -0
  17. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/dataset/client.py +0 -0
  18. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/environment.py +0 -0
  19. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/errors/__init__.py +0 -0
  20. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/errors/unprocessable_entity_error.py +0 -0
  21. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/message/__init__.py +0 -0
  22. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/message/client.py +0 -0
  23. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/polling_message_client.py +0 -0
  24. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/py.typed +0 -0
  25. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/report/__init__.py +0 -0
  26. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/report/client.py +0 -0
  27. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/snippet/__init__.py +0 -0
  28. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/snippet/client.py +0 -0
  29. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/sql/__init__.py +0 -0
  30. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/sql/client.py +0 -0
  31. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/__init__.py +0 -0
  32. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/dataset.py +0 -0
  33. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/get_datasets_response.py +0 -0
  34. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/get_snippets_response.py +0 -0
  35. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/http_validation_error.py +0 -0
  36. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/message_out.py +0 -0
  37. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/message_out_dto.py +0 -0
  38. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/model.py +0 -0
  39. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/report.py +0 -0
  40. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/snippet.py +0 -0
  41. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/sql_results.py +0 -0
  42. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/status_enum.py +0 -0
  43. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/tools.py +0 -0
  44. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/validation_error.py +0 -0
  45. {athena_intelligence-0.1.25 → athena_intelligence-0.1.26}/src/athena/types/validation_error_loc_item.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: athena-intelligence
3
- Version: 0.1.25
3
+ Version: 0.1.26
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "athena-intelligence"
3
- version = "0.1.25"
3
+ version = "0.1.26"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  authors = []
@@ -4,13 +4,13 @@ import typing
4
4
 
5
5
  import httpx
6
6
 
7
- from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
7
+ from .base_client import BaseAthena, AsyncBaseAthena
8
8
  from .environment import AthenaEnvironment
9
9
  from .polling_message_client import \
10
10
  MessagePollingClient, AsyncMessagePollingClient
11
11
 
12
12
 
13
- class Athena:
13
+ class Athena(BaseAthena):
14
14
  """
15
15
  Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions.
16
16
 
@@ -43,15 +43,18 @@ class Athena:
43
43
  timeout: typing.Optional[float] = 60,
44
44
  httpx_client: typing.Optional[httpx.Client] = None
45
45
  ):
46
- self._client_wrapper = SyncClientWrapper(
47
- base_url=_get_base_url(base_url=base_url, environment=environment),
46
+ super().__init__(
47
+ base_url=base_url,
48
+ environment=environment,
48
49
  api_key=api_key,
49
- httpx_client=httpx.Client(timeout=timeout) if httpx_client is None else httpx_client,
50
+ timeout=timeout,
51
+ httpx_client=httpx_client,
50
52
  )
51
- self.message = MessagePollingClient(client_wrapper=self._client_wrapper)
53
+ self.message = MessagePollingClient(
54
+ client_wrapper=self._client_wrapper)
52
55
 
53
56
 
54
- class AsyncAthena:
57
+ class AsyncAthena(AsyncBaseAthena):
55
58
  """
56
59
  Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions.
57
60
 
@@ -84,18 +87,13 @@ class AsyncAthena:
84
87
  timeout: typing.Optional[float] = 60,
85
88
  httpx_client: typing.Optional[httpx.AsyncClient] = None
86
89
  ):
87
- self._client_wrapper = AsyncClientWrapper(
88
- base_url=_get_base_url(base_url=base_url, environment=environment),
90
+ super().__init__(
91
+ base_url=base_url,
92
+ environment=environment,
89
93
  api_key=api_key,
90
- httpx_client=httpx.AsyncClient(timeout=timeout) if httpx_client is None else httpx_client,
94
+ timeout=timeout,
95
+ httpx_client=httpx_client,
91
96
  )
92
- self.message = AsyncMessagePollingClient(client_wrapper=self._client_wrapper)
97
+ self.message = AsyncMessagePollingClient(
98
+ client_wrapper=self._client_wrapper)
93
99
 
94
-
95
- def _get_base_url(*, base_url: typing.Optional[str] = None, environment: AthenaEnvironment) -> str:
96
- if base_url is not None:
97
- return base_url
98
- elif environment is not None:
99
- return environment.value
100
- else:
101
- raise Exception("Please pass in either base_url or environment to construct the client")
@@ -16,7 +16,7 @@ class BaseClientWrapper:
16
16
  headers: typing.Dict[str, str] = {
17
17
  "X-Fern-Language": "Python",
18
18
  "X-Fern-SDK-Name": "athena-intelligence",
19
- "X-Fern-SDK-Version": "0.1.25",
19
+ "X-Fern-SDK-Version": "0.1.26",
20
20
  }
21
21
  headers["X-API-KEY"] = self.api_key
22
22
  return headers