Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.73 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.73 KB

Python Sheets:

pygsheets- Google Spreadsheets Python API v4

Insert, Update, and Delete from a Google Spreadsheet with Google Sheets Python API v4

Requirements

Python 2.6+ or 3+

Installation

From PyPi

pip install pygsheets

From GitHub (Recommended)

pip install https://github.com/nithinmurali/pygsheets/archive/master.zip

Calling API:

To programmatically access your spreadsheet, you’ll need to create a service account and OAuth2 credentials from the Google API Console.

  1. Go to the Google APIs Console and create a new project (or select the one you have.).
  2. You will be redirected to the API Manager, there Under “Library”, Google APIs click on “Sheets API”.
  3. Click Enable API. Search for “Drive API” and enable the Google Drive API.
  4. Create credentials for a Web Server to access Application Data.
  5. Go to “Credentials” Tab and choose “Create Credentials > OAuth Client ID”.
  6. Download the JSON file.
  7. Copy the JSON file to your code directory and rename it to gc = pygsheets.authorize(outh_file='client_secretxxx.json')

google-developer-console.gif

My Google SpreadSheet:

Pampa-ds160.png

Panda Output:

Pampa-ds160.png

Updated Output:

screenshot-1495310942.png