Google Spreadsheets Python library
Project description
gspread — Google Spreadsheets Python library
gspread is a client library for interacting with Google Spreadsheets.
Features
Open a spreadsheet by its title, url or key.
Extract range, entire row or column values.
Independent of Google Data Python client library.
Example
The following code is a Python program that connects to Google Data API and fetches a cell’s value from a spreadsheet:
import gspread
# Login with your Google account
gc = gspread.login('account@gmail.com','password')
# Spreadsheets can be opened by their title in Google Docs
spreadsheet = gc.open("where's all the money gone 2011")
# Select worksheet by index
worksheet = spreadsheet.get_worksheet(0)
# Get a cell value
val = worksheet.cell(1, 2).value
The cell’s value can be easily updated:
worksheet.update_cell(1, 2, 'Bingo!')
To fetch a cell range, specify it by common notation:
cell_list = worksheet.range('A1:A7')
After some processing, this range can be updated in batch:
for cell in cell_list:
cell.value = 'O_o'
worksheet.update_cells(cell_list)
Docs & API
Head to gspread’s page.
Code
Check gspread on GitHub.
License
MIT
Download
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gspread-0.0.9.tar.gz.
File metadata
- Download URL: gspread-0.0.9.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27c70038ff375581b3c34428ef2ee27a4274dcbbd67b8bdec7d45adff95ab147
|
|
| MD5 |
daa6023c835481593769df334f26088f
|
|
| BLAKE2b-256 |
823b0c9621469bbd655b4a48b2c58ef96c43cccd11ed740523859ff2b2e8927c
|
File details
Details for the file gspread-0.0.9.linux-i686.exe.
File metadata
- Download URL: gspread-0.0.9.linux-i686.exe
- Upload date:
- Size: 73.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a3371d84299e3903868d6c2ef5c2b35b53f638cffd1ecb9a93d3c4c0c317743
|
|
| MD5 |
2414d8a4274c13c65a8a730019b9d6fa
|
|
| BLAKE2b-256 |
c0356be5e72313d5a37e4084f193cfb281bd84535862dd3c21c2b350c9252a61
|