Skip to content

Commit 89f2835

Browse files
chore(docs): use environment variables for authentication in code snippets
1 parent 832d353 commit 89f2835

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
@@ -87,14 +87,15 @@ pip install knockapi[aiohttp]
8787
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
8888

8989
```python
90+
import os
9091
import asyncio
9192
from knockapi import DefaultAioHttpClient
9293
from knockapi import AsyncKnock
9394

9495

9596
async def main() -> None:
9697
async with AsyncKnock(
97-
api_key="My API Key",
98+
api_key=os.environ.get("KNOCK_API_KEY"), # This is the default and can be omitted
9899
http_client=DefaultAioHttpClient(),
99100
) as client:
100101
response = await client.workflows.trigger(

0 commit comments

Comments
 (0)