• Stars
    star
    617
  • Rank 72,724 (Top 2 %)
  • Language
    Python
  • License
    Other
  • Created almost 8 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Read data from, write data to, and modify the formatting of Google Sheets

datasheets

pip_versions travis_ci coveralls

datasheets is a library for interfacing with Google Sheets, including reading data from, writing data to, and modifying the formatting of Google Sheets. It is built on top of Google's google-api-python-client, google_auth, and google_auth_oauthlib libraries using the Google Drive v3 and Google Sheets v4 REST APIs.

It can be installed with pip via pip install datasheets.

Detailed information can be found in the documentation.

Basic Usage

Get the necessary OAuth credentials from the Google Developer Console as described in Getting OAuth Credentials.

After that, using datasheets looks like:

import datasheets

# Create a data set to upload
import pandas as pd
df = pd.DataFrame([('a', 1.3), ('b', 2.7), ('c', 3.9)], columns=['letter', 'number'])

client = datasheets.Client()
workbook = client.create_workbook('my_new_workbook')
tab = workbook.create_tab('my_new_tab')

# Upload a data set
tab.insert_data(df, index=False)

# Fetch the data again
df_again = tab.fetch_data()

# Show workbooks you have access to; this may be slow if you are shared on many workbooks
client.fetch_workbooks_info()

# Show tabs within a given workbook
workbook.fetch_tab_names()

For further information, see the documentation.

License

Copyright 2018 Squarespace, INC.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

pgbedrock

Manage a Postgres cluster's roles, role memberships, schema ownership, and privileges
Python
311
star
2

base-template

A Squarespace starter template with minimal markup and styles.
CSS
190
star
3

simple-source

Easy and type-safe iOS table and collection views in Swift.
Swift
98
star
4

jersey2-guice

Jersey 2.0 w/ Guice
Java
92
star
5

squarespace-toolbelt

JavaScript
87
star
6

base-template-npm

JavaScript
86
star
7

wright-framework

Less
66
star
8

template-compiler

Java compiler for primary Squarespace template language
Java
41
star
9

squarespace-core

JavaScript
32
star
10

endeavor-framework

Less
29
star
11

template-engine

TypeScript implementation of Squarespace template language
TypeScript
26
star
12

less-compiler

Less compiler in Java
Java
18
star
13

squarespace-video-background-rendering

JavaScript
15
star
14

eslint-config-squarespace

Provides the universal configuration for eslint at Squarespace.
JavaScript
14
star
15

doncab-framework

Less
14
star
16

squarespace-mercury

JavaScript
13
star
17

squarespace-video-background

Less
11
star
18

pouchdb-lru-cache

PouchDB plugin for storing binary data in a least-recently-used (LRU) cache.
JavaScript
11
star
19

squarespace-controller

JavaScript
10
star
20

cldr

Java library for localization using Unicode CLDR JSON data
Java
10
star
21

squarespace-social-links

Less
9
star
22

squarespace.github.io

Open source at Squarespace
CSS
9
star
23

squarespace-layout-base

JavaScript
8
star
24

bureau-framework

Less
8
star
25

dossier-framework

Less
8
star
26

graphite-tools

Tools for the Graphite project
Python
7
star
27

squarespace-layout-autocolumns

JavaScript
6
star
28

squarespace-polyfills

JavaScript
6
star
29

squarespace-darwin

JavaScript
5
star
30

squarespace-ancillary

JavaScript
4
star
31

cldr-engine-java

Java port of @phensley/cldr Typescript library
Java
4
star
32

less-ts

Squarespace Less compiler in Typescript
TypeScript
3
star
33

squarespace-layout-slideshow

JavaScript
2
star
34

gradle-jasmin-plugin

Gradle plugin to assemble Jasmin source to JVM classfiles
Java
2
star
35

squarespace-fonts-loaded

JavaScript
1
star
36

clojuresque-base

Clojure
1
star
37

introduction-to-react-workshop

HTML
1
star
38

gradle-utils

Groovy
1
star
39

compiler-common

Common code for Squarespace's compiler projects
Java
1
star
40

clojuresque

Groff
1
star
41

netty-http-client-test

Java
1
star