athena-intelligence 0.1.25__py3-none-any.whl → 0.1.26__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.
athena/client.py CHANGED
@@ -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
@@ -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,9 +1,9 @@
1
1
  athena/__init__.py,sha256=93_n6iw5UHLlzbN6H_LiJHsWeWu8RIA6LEB_-opfgRc,901
2
2
  athena/base_client.py,sha256=RfS3KAPYhyRK8sdakv_KXJGu-jv9D6iu0iclVFbnWuE,4792
3
- athena/client.py,sha256=nFVJkayT6k0-DeqX-Ef7eVB-VHLHEq6wsqaZHy5Pp48,4004
3
+ athena/client.py,sha256=8QypiDlbZ0C1YsJh6GzhylLVCZXDQc1MCJTURo2_vvI,3576
4
4
  athena/core/__init__.py,sha256=RWfyDqkzWsf8e3VGc3NV60MovfJbg5XWzNFGB2DZ0hA,790
5
5
  athena/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
6
- athena/core/client_wrapper.py,sha256=Inf7Leqn5tSmqObhDxR14dgeHGGysx5VKMaRRH6fDcI,1198
6
+ athena/core/client_wrapper.py,sha256=xJr-oADCmjCUkaDTBrhXbRUHA0QW6E6PATgnUaeE9u4,1198
7
7
  athena/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
8
8
  athena/core/file.py,sha256=sy1RUGZ3aJYuw998bZytxxo6QdgKmlnlgBaMvwEKCGg,1480
9
9
  athena/core/http_client.py,sha256=LI0yP3jUyE0Ue7oyBcI9nyo1pljOwh9Y5ycTeIpKwOg,4882
@@ -40,6 +40,6 @@ athena/types/status_enum.py,sha256=0UZbhdAx215GHC-U53RS98mYHtn1N3On4VBe4j02Qtc,6
40
40
  athena/types/tools.py,sha256=Vfb-D9CYcPZH6MBATNODgfXjFyBpCs4qbkqpCMl7eBM,1277
41
41
  athena/types/validation_error.py,sha256=2JhGNJouo8QpfrMBoT_JCwYSn1nFN2Nnq0p9uPLDH-U,992
42
42
  athena/types/validation_error_loc_item.py,sha256=LAtjCHIllWRBFXvAZ5QZpp7CPXjdtN9EB7HrLVo6EP0,128
43
- athena_intelligence-0.1.25.dist-info/METADATA,sha256=N08JQ0f2xD8SqIOdWbVJW5jrX3f5HGot_zuN3XmaeL4,4738
44
- athena_intelligence-0.1.25.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
45
- athena_intelligence-0.1.25.dist-info/RECORD,,
43
+ athena_intelligence-0.1.26.dist-info/METADATA,sha256=x0iRKiTmjRf3IA9j2DsDxk7deH4XOAiFowDPbokxuwE,4738
44
+ athena_intelligence-0.1.26.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
45
+ athena_intelligence-0.1.26.dist-info/RECORD,,