Skip to main content

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

gspread-0.0.9.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

gspread-0.0.9.linux-i686.exe (73.3 kB view details)

Uploaded Source

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

Hashes for gspread-0.0.9.tar.gz
Algorithm Hash digest
SHA256 27c70038ff375581b3c34428ef2ee27a4274dcbbd67b8bdec7d45adff95ab147
MD5 daa6023c835481593769df334f26088f
BLAKE2b-256 823b0c9621469bbd655b4a48b2c58ef96c43cccd11ed740523859ff2b2e8927c

See more details on using hashes here.

File details

Details for the file gspread-0.0.9.linux-i686.exe.

File metadata

File hashes

Hashes for gspread-0.0.9.linux-i686.exe
Algorithm Hash digest
SHA256 2a3371d84299e3903868d6c2ef5c2b35b53f638cffd1ecb9a93d3c4c0c317743
MD5 2414d8a4274c13c65a8a730019b9d6fa
BLAKE2b-256 c0356be5e72313d5a37e4084f193cfb281bd84535862dd3c21c2b350c9252a61

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