@@ -55,12 +55,12 @@ class Zeroentropy(SyncAPIClient):
5555 with_streaming_response : ZeroentropyWithStreamedResponse
5656
5757 # client options
58- bearer_token : str
58+ api_key : str
5959
6060 def __init__ (
6161 self ,
6262 * ,
63- bearer_token : str | None = None ,
63+ api_key : str | None = None ,
6464 base_url : str | httpx .URL | None = None ,
6565 timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
6666 max_retries : int = DEFAULT_MAX_RETRIES ,
@@ -82,15 +82,15 @@ def __init__(
8282 ) -> None :
8383 """Construct a new synchronous zeroentropy client instance.
8484
85- This automatically infers the `bearer_token ` argument from the `ZEROENTROPY_API_KEY` environment variable if it is not provided.
85+ This automatically infers the `api_key ` argument from the `ZEROENTROPY_API_KEY` environment variable if it is not provided.
8686 """
87- if bearer_token is None :
88- bearer_token = os .environ .get ("ZEROENTROPY_API_KEY" )
89- if bearer_token is None :
87+ if api_key is None :
88+ api_key = os .environ .get ("ZEROENTROPY_API_KEY" )
89+ if api_key is None :
9090 raise ZeroentropyError (
91- "The bearer_token client option must be set either by passing bearer_token to the client or by setting the ZEROENTROPY_API_KEY environment variable"
91+ "The api_key client option must be set either by passing api_key to the client or by setting the ZEROENTROPY_API_KEY environment variable"
9292 )
93- self .bearer_token = bearer_token
93+ self .api_key = api_key
9494
9595 if base_url is None :
9696 base_url = os .environ .get ("ZEROENTROPY_BASE_URL" )
@@ -124,8 +124,8 @@ def qs(self) -> Querystring:
124124 @property
125125 @override
126126 def auth_headers (self ) -> dict [str , str ]:
127- bearer_token = self .bearer_token
128- return {"Authorization" : f"Bearer { bearer_token } " }
127+ api_key = self .api_key
128+ return {"Authorization" : f"Bearer { api_key } " }
129129
130130 @property
131131 @override
@@ -139,7 +139,7 @@ def default_headers(self) -> dict[str, str | Omit]:
139139 def copy (
140140 self ,
141141 * ,
142- bearer_token : str | None = None ,
142+ api_key : str | None = None ,
143143 base_url : str | httpx .URL | None = None ,
144144 timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
145145 http_client : httpx .Client | None = None ,
@@ -173,7 +173,7 @@ def copy(
173173
174174 http_client = http_client or self ._client
175175 return self .__class__ (
176- bearer_token = bearer_token or self .bearer_token ,
176+ api_key = api_key or self .api_key ,
177177 base_url = base_url or self .base_url ,
178178 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
179179 http_client = http_client ,
@@ -231,12 +231,12 @@ class AsyncZeroentropy(AsyncAPIClient):
231231 with_streaming_response : AsyncZeroentropyWithStreamedResponse
232232
233233 # client options
234- bearer_token : str
234+ api_key : str
235235
236236 def __init__ (
237237 self ,
238238 * ,
239- bearer_token : str | None = None ,
239+ api_key : str | None = None ,
240240 base_url : str | httpx .URL | None = None ,
241241 timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
242242 max_retries : int = DEFAULT_MAX_RETRIES ,
@@ -258,15 +258,15 @@ def __init__(
258258 ) -> None :
259259 """Construct a new async zeroentropy client instance.
260260
261- This automatically infers the `bearer_token ` argument from the `ZEROENTROPY_API_KEY` environment variable if it is not provided.
261+ This automatically infers the `api_key ` argument from the `ZEROENTROPY_API_KEY` environment variable if it is not provided.
262262 """
263- if bearer_token is None :
264- bearer_token = os .environ .get ("ZEROENTROPY_API_KEY" )
265- if bearer_token is None :
263+ if api_key is None :
264+ api_key = os .environ .get ("ZEROENTROPY_API_KEY" )
265+ if api_key is None :
266266 raise ZeroentropyError (
267- "The bearer_token client option must be set either by passing bearer_token to the client or by setting the ZEROENTROPY_API_KEY environment variable"
267+ "The api_key client option must be set either by passing api_key to the client or by setting the ZEROENTROPY_API_KEY environment variable"
268268 )
269- self .bearer_token = bearer_token
269+ self .api_key = api_key
270270
271271 if base_url is None :
272272 base_url = os .environ .get ("ZEROENTROPY_BASE_URL" )
@@ -300,8 +300,8 @@ def qs(self) -> Querystring:
300300 @property
301301 @override
302302 def auth_headers (self ) -> dict [str , str ]:
303- bearer_token = self .bearer_token
304- return {"Authorization" : f"Bearer { bearer_token } " }
303+ api_key = self .api_key
304+ return {"Authorization" : f"Bearer { api_key } " }
305305
306306 @property
307307 @override
@@ -315,7 +315,7 @@ def default_headers(self) -> dict[str, str | Omit]:
315315 def copy (
316316 self ,
317317 * ,
318- bearer_token : str | None = None ,
318+ api_key : str | None = None ,
319319 base_url : str | httpx .URL | None = None ,
320320 timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
321321 http_client : httpx .AsyncClient | None = None ,
@@ -349,7 +349,7 @@ def copy(
349349
350350 http_client = http_client or self ._client
351351 return self .__class__ (
352- bearer_token = bearer_token or self .bearer_token ,
352+ api_key = api_key or self .api_key ,
353353 base_url = base_url or self .base_url ,
354354 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
355355 http_client = http_client ,
0 commit comments