Export google spreadsheet to csv, you can filter data with SQL statement.
Project description
googlesheets2csv
Export google spreadsheet to csv, you can filter data with SQL statement.
Installation
pip install googlesheets2csv
Development
git clone https://github.com/YuChunTsao/googlesheets2csv.git
cd googlesheets2csv
pip install -e .
How to get credential json?
- Create Google Cloud project.
- Enable "Google Sheets API" and "Google Drive API".
- Go to "APIs & Services > Credentials" and choose "CREATE CREDENTIALS > Service account".
- Fill out the form and click "Create" and "Done".
- Go to "IAM & Admin > Service Accounts > Keys" and click "ADD KEY > Create new key".
- Select JSON key type and press "Create". (The file will be downloaded automatically.)
CLI usage
usage: googlesheets2csv [-h] [-v] -c -sn -wn [-sql] output
Export google spreadsheet to csv, you can filter data with SQL statement.
positional arguments:
output Output csv file path
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-c, --credential_file
Google Cloud service account JSON file with credentials
-sn, --spreadsheet_name
spreadsheet name which you want to access
-wn, --worksheet_name
worksheet name which you want to access
-sql You can filter data with SQL statement. (default "SELECT * FROM your_worksheet_name")
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
File details
Details for the file googlesheets2csv-0.1.0.tar.gz
.
File metadata
- Download URL: googlesheets2csv-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52ba557b0ea97e4456c998310956f2b49558e038a37daf4ee0e3c5ab398a8f8e |
|
MD5 | eaf41be6cb63aa704dd08d3eadbe1950 |
|
BLAKE2b-256 | 8af83da653891c4629686d599bc73f9bc77654d1dfa873aa0501ff2bdfb54bd3 |
File details
Details for the file googlesheets2csv-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: googlesheets2csv-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fce8845e028fc9224d07d33eddfbcb3455f580105732699f214b19dfa2e46efa |
|
MD5 | 0f0d06d05aad0a0626237d285a1d32bc |
|
BLAKE2b-256 | b3ae0f711844ef6e0e202ff559fabe1803a93cb3e80025b50392e2b4f2d9c12d |