Skip to content

Commit c2f1e45

Browse files
feat(api): update via SDK Studio
1 parent deee26c commit c2f1e45

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 32
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/patronus-ai%2Fpatronus-api-55e335c613870dd79fd7b7befbb5e6647b74d5fe1fc709f9b641ea6f49df7cca.yml
33
openapi_spec_hash: 83c391682f5b5d436f81f71546973693
4-
config_hash: 023b0d0fc2c0b676d64464f0163ea15f
4+
config_hash: 3edacaaee328871c3b914557c6a8ce5d

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import os
3131
from patronus_api import PatronusAPI
3232

3333
client = PatronusAPI(
34-
api_key=os.environ.get("PATRONUS_API_API_KEY"), # This is the default and can be omitted
34+
api_key=os.environ.get("PATRONUS_API_KEY"), # This is the default and can be omitted
3535
)
3636

3737
response = client.evaluations.evaluate(
@@ -51,7 +51,7 @@ print(response.results)
5151

5252
While you can provide an `api_key` keyword argument,
5353
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
54-
to add `PATRONUS_API_API_KEY="My API Key"` to your `.env` file
54+
to add `PATRONUS_API_KEY="My API Key"` to your `.env` file
5555
so that your API Key is not stored in source control.
5656

5757
## Async usage
@@ -64,7 +64,7 @@ import asyncio
6464
from patronus_api import AsyncPatronusAPI
6565

6666
client = AsyncPatronusAPI(
67-
api_key=os.environ.get("PATRONUS_API_API_KEY"), # This is the default and can be omitted
67+
api_key=os.environ.get("PATRONUS_API_KEY"), # This is the default and can be omitted
6868
)
6969

7070

src/patronus_api/_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ def __init__(
9595
) -> None:
9696
"""Construct a new synchronous PatronusAPI client instance.
9797
98-
This automatically infers the `api_key` argument from the `PATRONUS_API_API_KEY` environment variable if it is not provided.
98+
This automatically infers the `api_key` argument from the `PATRONUS_API_KEY` environment variable if it is not provided.
9999
"""
100100
if api_key is None:
101-
api_key = os.environ.get("PATRONUS_API_API_KEY")
101+
api_key = os.environ.get("PATRONUS_API_KEY")
102102
if api_key is None:
103103
raise PatronusAPIError(
104-
"The api_key client option must be set either by passing api_key to the client or by setting the PATRONUS_API_API_KEY environment variable"
104+
"The api_key client option must be set either by passing api_key to the client or by setting the PATRONUS_API_KEY environment variable"
105105
)
106106
self.api_key = api_key
107107

@@ -281,13 +281,13 @@ def __init__(
281281
) -> None:
282282
"""Construct a new async AsyncPatronusAPI client instance.
283283
284-
This automatically infers the `api_key` argument from the `PATRONUS_API_API_KEY` environment variable if it is not provided.
284+
This automatically infers the `api_key` argument from the `PATRONUS_API_KEY` environment variable if it is not provided.
285285
"""
286286
if api_key is None:
287-
api_key = os.environ.get("PATRONUS_API_API_KEY")
287+
api_key = os.environ.get("PATRONUS_API_KEY")
288288
if api_key is None:
289289
raise PatronusAPIError(
290-
"The api_key client option must be set either by passing api_key to the client or by setting the PATRONUS_API_API_KEY environment variable"
290+
"The api_key client option must be set either by passing api_key to the client or by setting the PATRONUS_API_KEY environment variable"
291291
)
292292
self.api_key = api_key
293293

tests/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def test_validate_headers(self) -> None:
342342
assert request.headers.get("X-API-KEY") == api_key
343343

344344
with pytest.raises(PatronusAPIError):
345-
with update_env(**{"PATRONUS_API_API_KEY": Omit()}):
345+
with update_env(**{"PATRONUS_API_KEY": Omit()}):
346346
client2 = PatronusAPI(base_url=base_url, api_key=None, _strict_response_validation=True)
347347
_ = client2
348348

@@ -1152,7 +1152,7 @@ def test_validate_headers(self) -> None:
11521152
assert request.headers.get("X-API-KEY") == api_key
11531153

11541154
with pytest.raises(PatronusAPIError):
1155-
with update_env(**{"PATRONUS_API_API_KEY": Omit()}):
1155+
with update_env(**{"PATRONUS_API_KEY": Omit()}):
11561156
client2 = AsyncPatronusAPI(base_url=base_url, api_key=None, _strict_response_validation=True)
11571157
_ = client2
11581158

0 commit comments

Comments
 (0)