{"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,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","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,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}