Skip to content

Commit ad9ad2b

Browse files
committed
prefer env vars
1 parent 8b369fc commit ad9ad2b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/posit/connect/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def __init__(self, url: str, api_key: str) -> None:
121121
122122
Examples
123123
--------
124-
>>> Client("https://connect.example.com", "{your API key}")
124+
>>> Client("https://connect.example.com", os.getenv("CONNECT_API_KEY"))
125125
"""
126126

127127
def __init__(self, *args, **kwargs) -> None:
@@ -152,8 +152,8 @@ def __init__(self, *args, **kwargs) -> None:
152152
--------
153153
>>> Client()
154154
>>> Client("https://connect.example.com")
155-
>>> Client("https://connect.example.com", "{your API key}")
156-
>>> Client(api_key="{your API key}", url="https://connect.example.com")
155+
>>> Client("https://connect.example.com", os.getenv("CONNECT_API_KEY"))
156+
>>> Client(api_key=os.getenv("CONNECT_API_KEY"), url="https://connect.example.com")
157157
"""
158158
api_key = None
159159
url = None

0 commit comments

Comments
 (0)