From cc549e31a0a9859a2e7b8d73c54a5f7c23cf7e4f Mon Sep 17 00:00:00 2001 From: Ken Cenerelli Date: Mon, 23 Feb 2026 14:56:21 -0800 Subject: [PATCH] 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. --- sheets/quickstart/quickstart.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sheets/quickstart/quickstart.py b/sheets/quickstart/quickstart.py index 6cb90a21..91f38860 100644 --- a/sheets/quickstart/quickstart.py +++ b/sheets/quickstart/quickstart.py @@ -47,15 +47,16 @@ def main(): flow = InstalledAppFlow.from_client_secrets_file( "credentials.json", SCOPES ) - creds = flow.run_local_server(port=0) - # Save the credentials for the next run + # Set the port to a fixed number. + creds = flow.run_local_server(port=8080) + # Save the credentials for the next run. with open("token.json", "w") as token: token.write(creds.to_json()) try: service = build("sheets", "v4", credentials=creds) - # Call the Sheets API + # Call the Sheets API. sheet = service.spreadsheets() result = ( sheet.values()