skip to navigation
skip to content

Not Logged In

sheetsync 0.1.4

Library to synchronize rows of data with a google spreadsheet

Latest Version: 0.1.5

A Python library for creating and updating spreadsheets that contain rows of data. Click here to read the full documentation.

Installation

Install from PyPi using pip, a package manager for Python.:

pip install sheetsync

Or to develop this library further, you can clone the git repo and install:

git clone git@github.com:mbrenig/SheetSync.git SheetSyncRepo
pip install SheetSyncRepo

Note, you may need to run the commands above with sudo.

Getting Started

SheetSync works with data in a dictionary of dictionaries. Each row is represented by a dictionary, and these are themselves stored in a dictionary indexed by a row-specific key. For example:

data = { "Kermit": {"Color" : "Green", "Performer" : "Jim Henson"},
         "Miss Piggy" : {"Color" : "Pink", "Performer" : "Frank Oz"}
        }

To synchronize this data (insert, modify or delete rows) with a target sheet in a google spreadsheet document you do this:

import sheetsync
# Get or create a spreadsheet...
target = sheetsync.Sheet(username="googledriveuser@domain.com",
                         password="app-specific-password",
                         document_name="Let's try out SheetSync")
# Add data to the spreadsheet...
target.sync(data)
print "Review the new spreadsheet created here: %s" % target.document_href

This creates a new spreadsheet document in your google drive and then inserts the data.

Debugging

SheetSync uses the standard python logging module, the simplest way to find out what it’s doing under the covers is to turn on all logging:

import sheetsync
import logging
# Set all loggers to DEBUG level..
logging.getLogger('').setLevel(logging.DEBUG)
# Register the default log handler to send logs to console..
logging.basicConfig()

If you find issues please raise them on github, and if you have fixes please submit pull requests. Thanks!

Digging Deeper

The full documentation is in the process of being written but will soon cover features such as:

 
File Type Py Version Uploaded on Size
SheetSync-0.1.4.tar.gz (md5) Source 2014-05-27 15KB
  • Downloads (All Versions):
  • 4 downloads in the last day
  • 34 downloads in the last week
  • 156 downloads in the last month