diff --git a/README.md b/README.md index b8e49de..2695ffe 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,6 @@ project_return_schema = client.projects.create( print(project_return_schema.id) ``` -While you can provide an `api_key` keyword argument, -we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/) -to add `CODEX_API_KEY="My API Key"` to your `.env` file -so that your API Key is not stored in source control. - ## Async usage Simply import `AsyncCodex` instead of `Codex` and use `await` with each API call: diff --git a/src/codex/_client.py b/src/codex/_client.py index 843f6a2..09aaafd 100644 --- a/src/codex/_client.py +++ b/src/codex/_client.py @@ -95,18 +95,9 @@ def __init__( # part of our public interface in the future. _strict_response_validation: bool = False, ) -> None: - """Construct a new synchronous Codex client instance. - - This automatically infers the following arguments from their corresponding environment variables if they are not provided: - - `api_key` from `CODEX_API_KEY` - - `access_key` from `CODEX_ACCESS_KEY` - """ - if api_key is None: - api_key = os.environ.get("CODEX_API_KEY") + """Construct a new synchronous Codex client instance.""" self.api_key = api_key - if access_key is None: - access_key = os.environ.get("CODEX_ACCESS_KEY") self.access_key = access_key self._environment = environment @@ -334,18 +325,9 @@ def __init__( # part of our public interface in the future. _strict_response_validation: bool = False, ) -> None: - """Construct a new async Codex client instance. - - This automatically infers the following arguments from their corresponding environment variables if they are not provided: - - `api_key` from `CODEX_API_KEY` - - `access_key` from `CODEX_ACCESS_KEY` - """ - if api_key is None: - api_key = os.environ.get("CODEX_API_KEY") + """Construct a new async Codex client instance.""" self.api_key = api_key - if access_key is None: - access_key = os.environ.get("CODEX_ACCESS_KEY") self.access_key = access_key self._environment = environment