{ "info": { "author": "Al Sweigart", "author_email": "al@inventwithpython.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "EZSheets\n======\n\nA Pythonic interface to the Google Sheets API that actually works as of June 2019.\n\nInstallation\n------------\n\nTo install with pip, run:\n\n pip install ezsheets\n\nQuickstart Guide\n----------------\n\nFirst, go to https://developers.google.com/sheets/api/quickstart/python and click the \"Enable the Google Sheets API\" button. You'll need to log into your Google account. (I recommend using a separate Google account specifically made for your Python scripts.) Then download the credentials.json file, rename it to credentials-sheets.json, and place it in the same folder as your Python script.\n\nNext, install the follow modules using `pip` (or `pip3` for Python 3 on macOS and Linux):\n\n pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib\n\nNext install the EZSheets module:\n\n pip install --upgrade ezsheets\n\nThe first time you call an EZSheets function, the module will use your credentials-sheets.json file to generate a token-sheets.pickle and token-drive.pickle file. Don't share these files: Treat these files the same as you would your Google account password.\n\nCreate a `Spreadsheet` object by using the Spreadsheet's URL:\n\n >>> import ezsheets\n >>> s = ezsheets.Spreadsheet('https://docs.google.com/spreadsheets/d/16RWH9XBBwd8pRYZDSo9EontzdVPqxdGnwM5MnP6T48c/edit#gid=0')\n\nYou can also just provide the spreadsheet ID part of the URL:\n\n >>> s = ezsheets.Spreadsheet('16RWH9XBBwd8pRYZDSo9EontzdVPqxdGnwM5MnP6T48c')\n\n`Spreadsheet` objects have a `title` and `spreadsheetId` attributes:\n\n >>> s.title\n 'Class Data Example'\n >>> s.title = 'Class Data'\n >>> s.title\n 'Class Data'\n >>> s.spreadsheetId\n '16RWH9XBBwd8pRYZDSo9EontzdVPqxdGnwM5MnP6T48c'\n\n`Spreadsheet` objects also have a `sheets` attribute, which is a list of `Sheet` objects:\n\n >>> s.sheets\n (Sheet(title='Sheet3', sheetId=314007586, rowCount=1000, columnCount=26), Sheet(title='Foobar', sheetId=2075929783, rowCount=1000, columnCount=27), Sheet(title='Class Data', sheetId=0, rowCount=101, columnCount=22, frozenRowCount=1), Sheet(title='Sheet2', sheetId=880141843, rowCount=1000, columnCount=26))\n >>> s.sheetTitles\n ('Sheet3', 'Foobar', 'Class Data', 'Sheet2')\n >>> sh = s.sheets[0]\n\nYou can then view the size and title of a sheet:\n\n >>> sh = s.sheets[0]\n >>> sh.title\n 'Sheet3'\n >>> sh.title = 'My New Title'\n >>> sh.title\n 'My New Title'\n >>> sh.columnCount, sh.rowCount\n (26, 1000)\n\nYou can also get or update data in a specific cell, row, or column:\n\n >>> sh.get(1,1)\n 'fads'\n >>> sh.update(1, 1, 'New cell value')\n >>> sh.getRow(1)\n ['New cell value', 'fe', 'fa', 'ewafwe', 'f', 'ew', 'ewafawef', 'ewf', 'ewf', 'ew', 'fewa', 'f', 'ew', '', '', '', '', '', '', 'ewf', 'ewafewaf', 'ewfewf', '', 'f', 'ewfewafewaf', 'ewfew']\n >>> sh.updateRow(['cell A', 'cell B', 'cell C'])\n Traceback (most recent call last):\n File \"\", line 1, in \n TypeError: updateRow() missing 1 required positional argument: 'values'\n >>> sh.updateRow(1, ['cell A', 'cell B', 'cell C'])\n >>> sh.getColumn(1)\n ['cell A']\n >>> sh.update(1, 2, 'another value')\n >>> sh.getColumn(1)\n ['cell A', 'another value']\n >>> sh.updateAll([['CELL A', 'ANOTHER VALUE', 'CELL C'], ['ANOTHER VALUE']])\n >>> sh.getAll()\n [['CELL A', 'ANOTHER VALUE', 'CELL C'], ['ANOTHER VALUE']]\n\nIf the data on the Google Sheet changes, you can refresh your local copy of the data:\n\n >>> sh.refresh() # Updates the Sheet object.\n >>> s.refresh() # Updates the Spreadsheet object and all its sheets.\n\nYou can rearrange the order of the sheets in the spreadsheet:\n\n >>> s.sheetTitles\n ('My New Title', 'Foobar', 'Class Data', 'Sheet2')\n >>> s.sheets[0].index\n 0\n >>> s.sheets[0].index = 2\n >>> s.sheetTitles\n ('Foobar', 'Class Data', 'My New Title', 'Sheet2')\n >>> s.sheets[2].index = 0\n >>> s.sheetTitles\n ('My New Title', 'Foobar', 'Class Data', 'Sheet2')\n\nYou can recolor the tabs as well. (Currently you can't reset the tab color back to no color.)\n\n\n\nContribute\n----------\n\nIf you'd like to contribute to EZSheets, check out https://github.com/asweigart/ezsheets", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/asweigart/ezsheets", "keywords": "", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "EZSheets", "package_url": "https://pypi.org/project/EZSheets/", "platform": "", "project_url": "https://pypi.org/project/EZSheets/", "project_urls": { "Homepage": "https://github.com/asweigart/ezsheets" }, "release_url": "https://pypi.org/project/EZSheets/0.0.6/", "requires_dist": null, "requires_python": "", "summary": "A Pythonic interface to the Google Sheets API that actually works as of July 2019.", "version": "0.0.6" }, "last_serial": 5514421, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7ac949b969411bf20bde28432493da1e", "sha256": "d825b2bb8f38a2e938b5a3c64d792534c73d9f221ca5f08fd7168148c595b1d9" }, "downloads": -1, "filename": "EZSheets-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7ac949b969411bf20bde28432493da1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1602, "upload_time": "2019-02-08T06:40:57", "url": "https://files.pythonhosted.org/packages/d2/9d/1ce25b4a923e95e113d989f034e4a950ea6cd461a31e514f1583a918aa6e/EZSheets-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "7dfe6e6cdba3eb80d02eefd927ef11cb", "sha256": "6bb08544835f60ff947ad32605fc1e3d03ccf1b1e46b39e13aeea001aea01417" }, "downloads": -1, "filename": "EZSheets-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7dfe6e6cdba3eb80d02eefd927ef11cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18866, "upload_time": "2019-03-14T22:17:26", "url": "https://files.pythonhosted.org/packages/2d/30/35e495d538f1a4c82c5b7ab91bfe84f626cce2316308b67dcb5f0f5ea959/EZSheets-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "0212ddb2c1d64504f60ee2917b0841b6", "sha256": "b9ee2301019945354bec88e9fb88085f5e5dcae9690ff93a19f7a1efe0df8c9f" }, "downloads": -1, "filename": "EZSheets-0.0.3.tar.gz", "has_sig": false, "md5_digest": "0212ddb2c1d64504f60ee2917b0841b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18979, "upload_time": "2019-03-17T20:20:45", "url": "https://files.pythonhosted.org/packages/f9/51/e8cbcef9df00b52a0467089c6698de34cad992d8e92a582ec0d0df878330/EZSheets-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "c14f341089aa8780606c7401269ce559", "sha256": "025169defb7c4b26d3019f47c916b5ab3c557dc882f8febda582d54546f2d396" }, "downloads": -1, "filename": "EZSheets-0.0.4.tar.gz", "has_sig": false, "md5_digest": "c14f341089aa8780606c7401269ce559", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18966, "upload_time": "2019-04-16T07:59:03", "url": "https://files.pythonhosted.org/packages/6d/0c/67bb9d8b0b11100ab26b803dcebc544eb96c9a03ed9b8b63cb3e2b303759/EZSheets-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "58e2aa26ec8481d9b82e1b5c9bf52910", "sha256": "7ea6e0dfdcb3d3290c03f1f96b7d21220cba4f308288e79c8cd93697631da622" }, "downloads": -1, "filename": "EZSheets-0.0.5.tar.gz", "has_sig": false, "md5_digest": "58e2aa26ec8481d9b82e1b5c9bf52910", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19029, "upload_time": "2019-05-28T17:00:09", "url": "https://files.pythonhosted.org/packages/ad/c1/07ac2c4e59bf5848bdeb5b500a46b08b8fccb6daf7bfe8bc31829b7c6a3b/EZSheets-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "599b3471f516bd7d70306636746a8006", "sha256": "f902a8ffe174cbc0267786c322a6834af5170b90167e4c28fe445ec3ed30c565" }, "downloads": -1, "filename": "EZSheets-0.0.6.tar.gz", "has_sig": false, "md5_digest": "599b3471f516bd7d70306636746a8006", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19062, "upload_time": "2019-07-10T23:27:48", "url": "https://files.pythonhosted.org/packages/40/6d/8ee59f42baef4c019cd540627144bb1916a4dee8864037ab68ce5deae86a/EZSheets-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "599b3471f516bd7d70306636746a8006", "sha256": "f902a8ffe174cbc0267786c322a6834af5170b90167e4c28fe445ec3ed30c565" }, "downloads": -1, "filename": "EZSheets-0.0.6.tar.gz", "has_sig": false, "md5_digest": "599b3471f516bd7d70306636746a8006", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19062, "upload_time": "2019-07-10T23:27:48", "url": "https://files.pythonhosted.org/packages/40/6d/8ee59f42baef4c019cd540627144bb1916a4dee8864037ab68ce5deae86a/EZSheets-0.0.6.tar.gz" } ] }