Skip to content

Commit 2c2fa17

Browse files
chore(docs): use environment variables for authentication in code snippets
1 parent ece4535 commit 2c2fa17

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

8686
```python
87+
import os
8788
import asyncio
8889
from gcore import DefaultAioHttpClient
8990
from gcore import AsyncGcore
9091

9192

9293
async def main() -> None:
9394
async with AsyncGcore(
94-
api_key="My API Key",
95+
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
9596
http_client=DefaultAioHttpClient(),
9697
) as client:
9798
project = await client.cloud.projects.create(

0 commit comments

Comments
 (0)