Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Dict wrapper for google spreadsheet

Project Description
# Dictsheet - Easy to use Google Spreadsheets Python API

Manage your spreadsheets in dict way. A easy to use Google spreadsheets Python API. Manage information in the sheet in rows. Based on gspread

* Manage the spreadsheet in dict way
* Get/Set sheet mapping
* Update a row or element(s) in a row.
* Iterate rows in a spreadsheet.

## Requirements
Python 2.6+ or Python 3+, gspread

## Install

pip install dictsheet

## Basic Usage

1. [Obtain OAuth2 credentials from Google Developers Console](
2. Obtain the sheet title.
3. Start using dictsheet:
import gspread
from oauth2client.service_account import ServiceAccountCredentials
from dictsheet import DictSheet

# The Credential file obtained from Google
CREDENTIAL_FILE = 'My Projecthah-xxxxxxx.json'
#Title of the sheet
SHEET_NAME = u'titleOfTheSheet'

# Create credentials
scope = ['']
credentials = ServiceAccountCredentials.from_json_keyfile_name(CREDENTIAL_FILE, scope)
# Use gspread to connect to Google Spread Sheet
gc = gspread.authorize(credentials)
sh =
wks = sh.get_worksheet(0)

# Initialize dictsheet
dict_wks = DictSheet(wks=wks)

# Basic usage
# Get mapping
print dick_wks.mapping

# Set mapping
map = {"name":1, "phone":2, "address":3}
dict_wks.mapping = map

# Appending
dict_wks.append({"name": "Chandler Huang","phone": 987654321})

# Updating (2 is the row number)
dict_wks.update({2: {"name": "Kelly"}, 6:{"phone": 12345}})

# Iterating
for idx, dict_data in dict_wks.items():
print idx, ' : ',dict_data

# Clearing a row

## Contributors

Chandler Huang, Xander Li

## Contact,
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dictsheet-0.0.10.tar.gz (6.3 kB) Copy SHA256 Checksum SHA256 Source Aug 26, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting