Skip to content

Commit 76cad32

Browse files
feat(api): manual updates (#38)
1 parent 9c71e3e commit 76cad32

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ print(project_return_schema.id)
4444

4545
While you can provide a `bearer_token` keyword argument,
4646
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
47-
to add `BEARER_TOKEN="My Bearer Token"` to your `.env` file
47+
to add `CODEX_BEARER_TOKEN="My Bearer Token"` to your `.env` file
4848
so that your Bearer Token is not stored in source control.
4949

5050
## Async usage

src/codex/_client.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,20 @@ def __init__(
100100
"""Construct a new synchronous Codex client instance.
101101
102102
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
103-
- `bearer_token` from `BEARER_TOKEN`
104-
- `api_key` from `AUTHENTICATED_API_KEY`
105-
- `access_key` from `PUBLIC_ACCESS_KEY`
103+
- `bearer_token` from `CODEX_BEARER_TOKEN`
104+
- `api_key` from `CODEX_API_KEY`
105+
- `access_key` from `CODEX_ACCESS_KEY`
106106
"""
107107
if bearer_token is None:
108-
bearer_token = os.environ.get("BEARER_TOKEN")
108+
bearer_token = os.environ.get("CODEX_BEARER_TOKEN")
109109
self.bearer_token = bearer_token
110110

111111
if api_key is None:
112-
api_key = os.environ.get("AUTHENTICATED_API_KEY")
112+
api_key = os.environ.get("CODEX_API_KEY")
113113
self.api_key = api_key
114114

115115
if access_key is None:
116-
access_key = os.environ.get("PUBLIC_ACCESS_KEY")
116+
access_key = os.environ.get("CODEX_ACCESS_KEY")
117117
self.access_key = access_key
118118

119119
self._environment = environment
@@ -362,20 +362,20 @@ def __init__(
362362
"""Construct a new async Codex client instance.
363363
364364
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
365-
- `bearer_token` from `BEARER_TOKEN`
366-
- `api_key` from `AUTHENTICATED_API_KEY`
367-
- `access_key` from `PUBLIC_ACCESS_KEY`
365+
- `bearer_token` from `CODEX_BEARER_TOKEN`
366+
- `api_key` from `CODEX_API_KEY`
367+
- `access_key` from `CODEX_ACCESS_KEY`
368368
"""
369369
if bearer_token is None:
370-
bearer_token = os.environ.get("BEARER_TOKEN")
370+
bearer_token = os.environ.get("CODEX_BEARER_TOKEN")
371371
self.bearer_token = bearer_token
372372

373373
if api_key is None:
374-
api_key = os.environ.get("AUTHENTICATED_API_KEY")
374+
api_key = os.environ.get("CODEX_API_KEY")
375375
self.api_key = api_key
376376

377377
if access_key is None:
378-
access_key = os.environ.get("PUBLIC_ACCESS_KEY")
378+
access_key = os.environ.get("CODEX_ACCESS_KEY")
379379
self.access_key = access_key
380380

381381
self._environment = environment

0 commit comments

Comments
 (0)