Skip to content
Projets

Squarespace/datasheets has 622 GitHub stars and 58 forks. GitHot measured -1 stars in 24 hours. Last checked 2026-11-19 23:30 UTC. Last push 2023-12-19.

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
-1
in 7 days
Historique en cours
in 15 days
Historique en cours
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

À propos

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

Données

README.md

Original

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.