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
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.
Result
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.
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.
The columns entered are then plot on the graph with the corresponding columns for x-axis and y-axis.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for GreenDeck_GsheetsTest-0.0.17.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9162f33130d4bbd6ee6664911be51116ccc285ec49c7595c4133b78544413ea4 |
|
MD5 | e7042e75fb6b14737a9210ef8ec61609 |
|
BLAKE2b-256 | 48476119084f054141142b7d9c084859199083f2328e3093bb2e61bc95af5734 |
Hashes for GreenDeck_GsheetsTest-0.0.17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7f8d1ce956e1a4a895a5cc85ba21c2253d9ec23bc5fc15497084ec8aedf46f3 |
|
MD5 | a108e0a100a51403df5dca1c213eedd8 |
|
BLAKE2b-256 | 916ab8b0c0c5e56b6a512d07e47d762989c513d895ed8b022ca8ca1c22bd188c |