Skip to content

Commit a30f6ae

Browse files
chore(docs): use environment variables for authentication in code snippets
1 parent 53a8ffa commit a30f6ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,15 @@ pip install agentex-sdk[aiohttp]
113113
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
114114

115115
```python
116+
import os
116117
import asyncio
117118
from agentex import DefaultAioHttpClient
118119
from agentex import AsyncAgentex
119120

120121

121122
async def main() -> None:
122123
async with AsyncAgentex(
123-
api_key="My API Key",
124+
api_key=os.environ.get("AGENTEX_SDK_API_KEY"), # This is the default and can be omitted
124125
http_client=DefaultAioHttpClient(),
125126
) as client:
126127
tasks = await client.tasks.list()

0 commit comments

Comments
 (0)