Skip to main content

gsheets

|PyPI version| |License| |Supported Python| |Format|

gsheets is a small wrapper around the Google Sheets API_ (v4) to provide more convenient access to Google Sheets_ from Python scripts.

go to google console
1.Create a Project in google cloud
2.through Navigation menu Go ti API'S & Services and go to library
3.search for google sheets api and enable it
4.search for google drive api enable it and on the right side corner click on create credentials select google drive api in which api you are using column and web server (eg node js tomcat) in Where will you be calling the API from dropdown and tick on application data. and then no and press button
5.fill any name in account and role select project and then editor and type json and submit. it will download the json file .
6.open json file search client email go to google sheet you want to use and select share and give access to client email and send.

Links

Libraries


.. code:: bash

$ pip install -r requirements.txt

Installation

This package runs under Python 2.7, and 3.6+, use pip_ to install:

.. code:: bash

$ pip install read-excel

This will also install google-api-python-client_ and its dependencies, notably httplib2_ and oauth2client_, as required dependencies.

Quickstart

Log into the Google Developers Console_ with the Google account whose spreadsheets you want to access. Create (or select) a project and enable the Drive API and Sheets API (under Google Apps APIs).

Go to the Credentials for your project and create New credentials > OAuth client ID > of type Other. In the list of your OAuth 2.0 client IDs click Download JSON for the Client ID you just created. Save the file as client_secrets.json in your home directory (user directory).

import the library and load the data by passing the filename and json file downloaded from console it will return a dataframe and print top 5 rows of your data:

.. code:: python

>>> import read-excel as rf

>>> dataframe = rf.load_data(filename_of_your_sheet,json_path)

For plotting the data you have to pass the dataframe you just loaded and pass the name X axis columns name and Y axis column name it will plot the data for you:

.. code:: python

for plotting
>>> plot_data(dataframe,"x-axis-column","y-axis-column")

...

Release files for gsheet 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for gsheet 0.0.1
File Interpreter ABI Platform
gsheet-0.0.1-py3-none-any.whl Python 3 none any Details

Release files / gsheet-0.0.1-py3-none-any.whl

Download URL gsheet-0.0.1-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee07ad9dfbd779e14509f63b4cb952469626b5aeaa5e85c7ed5d80c5b691f8f4
BLAKE2b-256 checksum
How to use checksums
e0475fa43d6c154e3971172cee48b4750affd9cbebca74742f137bdafec95125
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.4.2 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.5

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page