Skip to main content

Greendeck Test to plot graph using gsheets

Project description

Installation

Installation with pip

pip install GreenDeck-GsheetsTest==0.0.17

To run the file clients_secrets.json file is required in the root directory. For example in a Mac the root directory is "/Users/username" therefore the "client_secrets.json" file will be searched at this location.
Download the client_secrets.json file from the github repository and save it in the root directory.

Dependency

matplot
pandas
gsheets

Usage

To use the package in the terminal the following steps need to be performed. First enter the python environment before brginning to execute these commands.

In order to use the package it needs to be imported using the command

import GreenDeck

After this the module needs to be imported using the command

from GreenDeck import GsheetsTest

Lastly you need to call the login method in order to start using the package.

GsheetsTest.login()

Sample

screenshot-run-program

Run-through

After calling the login() method if the user has not logged in then the default browser is opened where user can login using his/her Google Account and the data is stored in the storage.json file which then omits the process of logging in again every time the program is run.

screenshot-login-screen

Result

screenshot-login-success

After getting this result on the web browser. Close the browser and go back to the terminal where the program was being executed. You will see a list of all the sheets that are present or have been added to that Google Account. These sheets are numbered and for further operations you can select one of the sheets from the list by entering their corresponding number.

screenshot-list-sheet

The sheet corresponding to the entered number is accessed and the column names of that sheet are displayed. Following which user is asked to select the column to be taken as x-axis and y-axis.

screenshot-list-column

The columns entered are then plot on the graph with the corresponding columns for x-axis and y-axis.

screenshot-result-graph

Methods

login()

This method is used for logging in the user. After logging in the user this method gets all the sheets available at the GoogleSheets account and calls the list_sheet() method.

list_sheet()

This method takes a list of all sheets as the input and prints all these sheet objects and asks the user to select one of the sheets. This selected sheet is then passed onto the plot_graph method.

plot_graph()

This method takes the google sheet object as the input and then displays all the column names in the sheet. Then the user is asked to select a column for x-axis and y-axis. The cholumns selected are then plot on a graph.

License

MIT License . For more details, please read the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

GreenDeck_GsheetsTest-0.0.17.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

GreenDeck_GsheetsTest-0.0.17-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file GreenDeck_GsheetsTest-0.0.17.tar.gz.

File metadata

  • Download URL: GreenDeck_GsheetsTest-0.0.17.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for GreenDeck_GsheetsTest-0.0.17.tar.gz
Algorithm Hash digest
SHA256 9162f33130d4bbd6ee6664911be51116ccc285ec49c7595c4133b78544413ea4
MD5 e7042e75fb6b14737a9210ef8ec61609
BLAKE2b-256 48476119084f054141142b7d9c084859199083f2328e3093bb2e61bc95af5734

See more details on using hashes here.

File details

Details for the file GreenDeck_GsheetsTest-0.0.17-py3-none-any.whl.

File metadata

  • Download URL: GreenDeck_GsheetsTest-0.0.17-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for GreenDeck_GsheetsTest-0.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 e7f8d1ce956e1a4a895a5cc85ba21c2253d9ec23bc5fc15497084ec8aedf46f3
MD5 a108e0a100a51403df5dca1c213eedd8
BLAKE2b-256 916ab8b0c0c5e56b6a512d07e47d762989c513d895ed8b022ca8ca1c22bd188c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page