Skip to main content

Google Spreadsheets Python library

Project description

gspread is a super simple library for interacting with Google Spreadsheets.

Features

  • Open a spreadsheet by its title, url or key.

  • Select cells by labels, e.g. ‘A1’.

  • Extract range, entire row or column values.

  • Independent of Google Data Python client library.

Example

This code will connect to Google Data API and fetch 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")

# Get a first worksheet
worksheet = spreadsheet.sheet1

# Get a cell value
val = worksheet.acell('B1').value

The cell’s value can be easily updated:

worksheet.update_acell('B1', '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.10.tar.gz (10.2 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.10.linux-i686.exe (73.9 kB view details)

Uploaded Source

File details

Details for the file gspread-0.0.10.tar.gz.

File metadata

  • Download URL: gspread-0.0.10.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gspread-0.0.10.tar.gz
Algorithm Hash digest
SHA256 89bcb7bbd9d0797291c6d51cef353756276f09d56ac9ee43206c9ff7a5840447
MD5 edd3b50b5e5d0a6cf848b1efdacf78a8
BLAKE2b-256 2f9acb27561b93c775e61ad669787feab3b781aeb26f02121f8ad6d2c3dd6bdc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gspread-0.0.10.linux-i686.exe
Algorithm Hash digest
SHA256 9bc1041f7ba555146ab4f791eb6b58f0ba849b13284841a5aa87c68387739b28
MD5 694cdd42c26437d4a435ce701cc77c52
BLAKE2b-256 3b5a5bf60e9afb8016f28be98255d86da1c7d337f79de8085233f8bfa6a19f73

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