{"id":21413,"library":"gsheets","title":"gsheets","description":"Pythonic wrapper for the Google Sheets API (v4). Current version 0.6.1, requires Python >=3.7. Low release cadence.","status":"active","version":"0.6.1","language":"python","source_language":"en","source_url":"https://github.com/xflr6/gsheets","tags":["google-sheets","api-wrapper","gsheets"],"install":[{"cmd":"pip install gsheets","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Required for Google Sheets API authentication and client","package":"google-api-python-client","optional":false},{"reason":"Used for OAuth2 authentication (deprecated in favor of google-auth)","package":"oauth2client","optional":false}],"imports":[{"note":"Old class name; SheetsManager was renamed to Sheets in v0.3","wrong":"from gsheets import SheetsManager","symbol":"SheetsManager","correct":"from gsheets import Sheets"},{"note":"","symbol":"Sheets","correct":"from gsheets import Sheets"}],"quickstart":{"code":"from gsheets import Sheets\n\nsheets = Sheets.from_files('client_secret.json', 'storage.json')\n# Or via environment variable for CI:\nimport os\nsheets = Sheets.from_files(os.environ.get('GSHEETS_CLIENT_SECRET', 'client_secret.json'), os.environ.get('GSHEETS_STORAGE', 'storage.json'))\n\nsheet = sheets['<SPREADSHEET_KEY>']\nprint(sheet.title)","lang":"python","description":"Initialize with OAuth client secret file, then access spreadsheet by key."},"warnings":[{"fix":"Use google-auth and google-api-python-client with manual credentials.","message":"The library uses oauth2client (deprecated). For new projects, consider switching to google-auth directly.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from gsheets import Sheets' instead.","message":"SheetsManager was renamed to Sheets in v0.3. Importing SheetsManager will break.","severity":"deprecated","affected_versions":">=0.3"},{"fix":"Extract the key from the URL: https://docs.google.com/spreadsheets/d/<KEY>/edit","message":"Spreadsheet keys are case-sensitive and must be the full ID from URL, not the URL itself.","severity":"gotcha","affected_versions":"all"},{"fix":"Use sheet.to_frame(head=1) to skip header if using pandas.","message":"Rows returned are 1-indexed and include header row by default. The first data row is row 2.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.6.1':12 '3.7':15 'api':8,23 'api-wrapp':22 'cadenc':18 'current':10 'googl':6,20 'google-sheet':19 'gsheet':1,25 'low':16 'python':2,14 'releas':17 'requir':13 'sheet':7,21 'v4':9 'version':11 'wrapper':3,24","created_at":"2026-04-27T16:59:46.238826+00:00","updated_at":"2026-04-27T16:59:46.238826+00:00","problems":[{"fix":"Change import to 'from gsheets import Sheets'","cause":"SheetsManager was renamed to Sheets in v0.3.","error":"ImportError: cannot import name 'SheetsManager' from 'gsheets'"},{"fix":"Upgrade to latest: pip install --upgrade gsheets","cause":"Using an older version (<0.3) that didn't have the class-based API.","error":"AttributeError: 'Sheets' object has no attribute 'from_files'"},{"fix":"Delete storage.json and re-authenticate, or regenerate client_secret.json from Google Cloud Console.","cause":"OAuth token expired or client_secret.json is incorrect.","error":"google.auth.exceptions.RefreshError: invalid_grant"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.6.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/xflr6/gsheets","docs":"https://gsheets.readthedocs.io","changelog":"https://gsheets.readthedocs.io/en/latest/changelog.html","pypi":"https://pypi.org/project/gsheets/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["gcp","data","crm-productivity"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}