Skip to content

Commit f80ab62

Browse files
chore(docs): use environment variables for authentication in code snippets
1 parent 972cee4 commit f80ab62

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,15 @@ pip install brapi[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 brapi import DefaultAioHttpClient
9293
from brapi import AsyncBrapi
9394

9495

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

0 commit comments

Comments
 (0)