Skip to content

Commit be3611a

Browse files
chore(docs): use environment variables for authentication in code snippets
1 parent 8532ac5 commit be3611a

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

117117
```python
118+
import os
118119
import asyncio
119120
from openlayer import DefaultAioHttpClient
120121
from openlayer import AsyncOpenlayer
121122

122123

123124
async def main() -> None:
124125
async with AsyncOpenlayer(
125-
api_key="My API Key",
126+
api_key=os.environ.get("OPENLAYER_API_KEY"), # This is the default and can be omitted
126127
http_client=DefaultAioHttpClient(),
127128
) as client:
128129
response = await client.inference_pipelines.data.stream(

0 commit comments

Comments
 (0)