Skip to content

Commit 0d829a6

Browse files
chore(docs): use environment variables for authentication in code snippets
1 parent 385fea6 commit 0d829a6

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

8787
```python
88+
import os
8889
import asyncio
8990
from cloudflare import DefaultAioHttpClient
9091
from cloudflare import AsyncCloudflare
9192

9293

9394
async def main() -> None:
9495
async with AsyncCloudflare(
95-
api_token="Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY",
96+
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
9697
http_client=DefaultAioHttpClient(),
9798
) as client:
9899
zone = await client.zones.create(

0 commit comments

Comments
 (0)