{"id":22308822,"url":"https://github.com/ratson/google-spreadsheet-py","last_synced_at":"2025-03-26T01:29:04.143Z","repository":{"id":57435371,"uuid":"80298269","full_name":"ratson/google-spreadsheet-py","owner":"ratson","description":null,"archived":false,"fork":false,"pushed_at":"2017-01-28T17:31:52.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T22:19:56.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ratson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-28T17:22:35.000Z","updated_at":"2017-01-28T17:32:12.000Z","dependencies_parsed_at":"2022-09-01T18:40:31.773Z","dependency_job_id":null,"html_url":"https://github.com/ratson/google-spreadsheet-py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fgoogle-spreadsheet-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fgoogle-spreadsheet-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fgoogle-spreadsheet-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fgoogle-spreadsheet-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ratson","download_url":"https://codeload.github.com/ratson/google-spreadsheet-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245571308,"owners_count":20637321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T20:15:28.923Z","updated_at":"2025-03-26T01:29:04.124Z","avatar_url":"https://github.com/ratson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Google Spreadsheets API\n========================\nA simple Python wrapper for the Google Spreadsheeta API.\n[![Build Status](https://secure.travis-ci.org/yoavaviram/python-google-spreadsheet.png?branch=master)](http://travis-ci.org/yoavaviram/python-google-spreadsheet)\n\n\n\nFeatures\n--------\n\n* An object oriented interface for Worksheets\n* Supports List Feed view of spreadsheet rows, represented as dictionaries\n* Compatible with Google App Engine\n\n\nRequirements\n--------------\nBefore you get started, make sure you have:\n\n* Installed [Gdata](http://code.google.com/p/gdata-python-client/) (pip install gdata)\n\nUsage\n-----\n\nList Spreadsheets and Worksheets:\n\n     \u003e\u003e\u003e from google_spreadsheet.api import SpreadsheetAPI\n     \u003e\u003e\u003e api = SpreadsheetAPI(GOOGLE_SPREADSHEET_USER, \n            GOOGLE_SPREADSHEET_PASSWORD, GOOGLE_SPREADSHEET_SOURCE)\n     \u003e\u003e\u003e spreadsheets = api.list_spreadsheets()\n     \u003e\u003e\u003e spreadsheets\n     [('MyFirstSpreadsheet', 'tkZQWzwHEjKTWFFCAgw'), ('MySecondSpreadsheet', 't5I-ZPGdXjTrjMefHcg'), \n     ('MyThirdSpreadsheet', 't0heCWhzCmm9Y-GTTM_Q')]\n     \u003e\u003e\u003e worksheets = api.list_worksheets(spreadsheets[0][1])\n     \u003e\u003e\u003e worksheets\n     [('MyFirstWorksheet', 'od7'), ('MySecondWorksheet', 'od6'), ('MyThirdWorksheet', 'od4')]\n\nPlease note that in order to work with a Google Spreadsheet it must be accessible\nto the user who's login credentials are provided. The `GOOGLE_SPREADSHEET_SOURCE`\nargument is used by Google to identify your application and track API calls.\n\nWorking with a Worksheet:\n\n    \u003e\u003e\u003e sheet = spreadsheet.get_worksheet('tkZQWzwHEjKTWFFCAgw', 'od7')\n    \u003e\u003e\u003e rows = sheet.get_rows()\n    \u003e\u003e\u003e len(rows)\n    18\n    \u003e\u003e\u003e row_to_update = rows[0]\n    \u003e\u003e\u003e row_to_update['name'] = 'New Name'\n    \u003e\u003e\u003e sheet.update_row(row_to_update)\n    {'name': 'New Name'...}\n    \u003e\u003e\u003e row_to_insert = rows[0]\n    \u003e\u003e\u003e row_to_insert['name'] = 'Another Name'\n    \u003e\u003e\u003e row = sheet.insert_row(row_to_insert)\n    {'name': 'Another Name'...}\n    \u003e\u003e\u003e sheet.delete_row(row)\n    \u003e\u003e\u003e sheet.delete_all_rows()\n\nAdvanced Queries:\n\n    \u003e\u003e\u003e sheet = spreadsheet.get_worksheet('tkZQWzwHEjKTWFFCAgw', 'od7')\n    \u003e\u003e\u003e rows = sheet.get_rows(query='name = \"Joe\" and height \u003c 175')\n\nOr filter in memory:\n\n    \u003e\u003e\u003e sheet = spreadsheet.get_worksheet('tkZQWzwHEjKTWFFCAgw', 'od7')\n    \u003e\u003e\u003e filtered_rows = sheet.get_rows(\n            filter_func=lambda row: row['status'] == \"READY\")\n\nSort:\n\n    \u003e\u003e\u003e sheet = spreadsheet.get_worksheet('tkZQWzwHEjKTWFFCAgw', 'od7')\n    \u003e\u003e\u003e rows = sheet.get_rows(order_by='column:age', reverse='true')\n\nThat's it.\n\nFor more information about these calls, please consult the [Google Spreadsheets\nAPI Developer Guide](https://developers.google.com/google-apps/spreadsheets/).\n\nTests\n------\nTo run the test suite please follow these steps:\n\n* Make sure [Nose](http://readthedocs.org/docs/nose/en/latest/) is installed: (`pip install nose`)\n* Create a local file named: `test_settings.py` with the following variables set to the relevant values: `GOOGLE_SPREADSHEET_USER`, `GOOGLE_SPREADSHEET_PASSWORD`, `GOOGLE_SPREADSHEET_SOURCE`, `GOOGLE_SPREADSHEET_KEY`, `GOOGLE_WORKSHEET_KEY`, `COLUMN_NAME`, `COLUMN_UNIQUE_VALUE`\n* Run `nosetests`\n\nLicense\n-------\n\nCopyright \u0026copy; 2012 Yoav Aviram\n\nSee LICENSE for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratson%2Fgoogle-spreadsheet-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fratson%2Fgoogle-spreadsheet-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratson%2Fgoogle-spreadsheet-py/lists"}