Skip to main content

MicroPython-GoogleSheet

Update or append the data to Google Sheet, or get the data on Google Sheet. by using HTTP to execute the Google Apps Script API. Compatible with ESP32.

Full Documentation

Github: https://github.com/PerfecXX/MicroPython-GoogleSheet

Quick Example

# Import Library
from ggsheet import MicroGoogleSheet
from network import WLAN,STA_IF

# Network Creadential
ssid = "Change_SSID"
password = "Change_Password"

# Connect to Network
sta_if = WLAN(STA_IF)
sta_if.active(True)
if not sta_if.isconnected():
    print("Connecting to wifi: ", ssid)
    sta_if.connect(ssid, password)
    while not sta_if.isconnected():
        pass
print("Connection successful")

# Google Sheet Credential
google_sheet_url = "https://docs.google.com/spreadsheets/d/xxxxxxxxx/edit#gid=0"
google_sheet_name = "Sheet1"
google_app_deployment_id = "xxxxxxxx"

# Create Instance
ggsheet = MicroGoogleSheet(google_sheet_url,google_sheet_name)
ggsheet.set_DeploymentID(google_app_deployment_id)

# Update the data to a specific cell (Row,Column,Data)
ggsheet.updateCell(1,1,"Hello this is my first data")

# Get the data from a specific cell (Row,Column)
print(ggsheet.getCell(1,1))

# Delete the data from a specific cell (Row,Column)
ggsheet.deleteCell(1,1)

# Append the data to a specific row (Row, Data List)
ggsheet.appendRow(1,[1,2,3,"Row 1 Appended!"])

# Update the data in a specific row (Row, Data List)
ggsheet.updateRow(1,[3,2,1,"Row 1 Updated!"])

# Get all of the data from a specific row (Row)
ggsheet.getRow(1)

# Delete the data in a specific row (Row)
ggsheet.deleteRow(1)

# Append the data to a specific column (Column, Data List)
ggsheet.appendColumn(1,[1,2,3,"Column 1 Appended!"])

# Update the data to a specific column (Column, Data List)
ggsheet.updateColumn(1,[3,2,1,"Column 1 Updated!"])

# Get all of the data from a specific column (Column)
ggsheet.getColumn(1)

# Delete the data in a specific column (Column)
ggsheet.deleteColumn(1)

Download files

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

Source Distribution

micropython-googlesheet-0.0.5.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file micropython-googlesheet-0.0.5.tar.gz.

File metadata

  • Download URL: micropython-googlesheet-0.0.5.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.10

File hashes

Hashes for micropython-googlesheet-0.0.5.tar.gz
Algorithm Hash digest
SHA256 044b5d820442814ad62059fc021868828cb408fc0102df5a0bf4cd373f66a75f
MD5 118035c414168ab6cfdcd623e9ca475d
BLAKE2b-256 a35844a9df903730ef4a6e6f9143498d88b61368fd7e005b9225950cebb8e87f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page