Author: Pahaz Blinov
Repo: https://github.com/pahaz/google-spreadsheets-api/
Simple create/append google spreadsheet api helper.
Requirements
Installation
google_spreadsheet is on PyPI, so simply run:
pip install google_spreadsheet
or
easy_install google_spreadsheet
to have it installed in your environment.
For installing from source, clone the repo and run:
python setup.py install
Usage scenarios
Two typical usecases where google_spreadsheet is helpful there are: 1. create new spreadsheet with restricted acccess rules, 2. append data to existing spreadsheet.
You can use it for export your user data to the google spreadsheet. And sharing this data to all around the world or sharing to specific users.
Usage examples
Example 1: create spreadsheet
from google_spreadsheet import get_credentials, Spreadsheets
def create_example():
credentials = get_credentials('auth.json', [
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/spreadsheets'])
api = Spreadsheets(credentials=credentials)
sheet = api.create('test1', writers=['pahaz.blinov@gmail.com'])
print(sheet)
if __name__ == '__main__':
create_example()
Example 2: append row to existing spreadsheet
from google_spreadsheet import get_credentials, Spreadsheets
def append_data_example():
credentials = get_credentials('auth.json', [
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/spreadsheets'])
api = Spreadsheets(credentials=credentials)
sheet = api.get('1jSHsmPTOOiPXdYQlrVBwbo3MO1vp64lmi5R_Ld_duKo')
sheet.append([[1, 2], [3, 4]])
if __name__ == '__main__':
append_data_example()
Metadata
Release files for google_spreadsheet 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| google_spreadsheet-0.0.6.tar.gz | 6.1 kB | Without provenance | Details for google_spreadsheet-0.0.6.tar.gz |
Release files / google_spreadsheet-0.0.6.tar.gz
| Download URL | google_spreadsheet-0.0.6.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b695350b069f9be51a11594b9e685da663c27ac1685733f16101d528e81e987e
|
|
BLAKE2b-256 checksum How to use checksums |
c1283ce1c64b6ef8cb7af944cc96c59e6b941075bdc47db3ec905f3570fcbd18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for google_spreadsheet 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.