### Install gspread with pip Source: https://docs.gspread.org Install gspread using pip. Requires Python 3+. ```bash pip install gspread ``` -------------------------------- ### Quick example: open, update, and format a Google Sheet Source: https://docs.gspread.org Authenticate with a service account, open a spreadsheet by title, update a cell range and a single cell, and format a header range. Requires a service account JSON key file configured for gspread. ```python import gspread gc = gspread.service_account() # Open a sheet from a spreadsheet in one go wks = gc.open("Where is the money Lebowski?").sheet1 # Update a range of cells using the top left corner address wks.update([[1, 2], [3, 4]], 'A1') # Or update a single cell wks.update_acell('B42', "it's down there somewhere, let me take another look.") # Format the header wks.format('A1:B1', {'textFormat': {'bold': True}}) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.