#!/usr/bin/env python

import json
import sys

from gigamonkeys.spreadsheets import spreadsheets

spreadsheet_id = sys.argv[1]
ranges = sys.argv[2:]

data = spreadsheets().get(spreadsheet_id, include_grid_data=bool(ranges), ranges=ranges)

json.dump(data, sys.stdout, indent=2)

[((13, 0, 13, 37), 'json.dump', 'json.dump', (), '', False, 'import json\n'), ((11, 7, 11, 21), 'gigamonkeys.spreadsheets.spreadsheets', 'spreadsheets', ({}, {}), '()', False, 'from gigamonkeys.spreadsheets import spreadsheets\n')]