Skip to content

Commit cc549e3

Browse files
authored
docs: Set fixed port for local server in quickstart.py
Changed the local server port from a dynamic port to a fixed port (8080) for running the authentication flow. Added periods to match style.
1 parent 9f6332f commit cc549e3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sheets/quickstart/quickstart.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ def main():
4747
flow = InstalledAppFlow.from_client_secrets_file(
4848
"credentials.json", SCOPES
4949
)
50-
creds = flow.run_local_server(port=0)
51-
# Save the credentials for the next run
50+
# Set the port to a fixed number.
51+
creds = flow.run_local_server(port=8080)
52+
# Save the credentials for the next run.
5253
with open("token.json", "w") as token:
5354
token.write(creds.to_json())
5455

5556
try:
5657
service = build("sheets", "v4", credentials=creds)
5758

58-
# Call the Sheets API
59+
# Call the Sheets API.
5960
sheet = service.spreadsheets()
6061
result = (
6162
sheet.values()

0 commit comments

Comments
 (0)