Skip to main content

GSheetQuery

GSheetQuery is a python library for using Google Sheets as a document database. It modeled after pymongo's interface.

License: MIT Open Issues Build Status codecov PyPI ReadTheDocs

Overview

For small projects, full Python frameworks can be overkill (Django). Especially if you want code up and running quickly. Google Sheets can be leveraged as a database and made accessible by GSheetQuery.

This library will allow users to interact with google sheets as a document database similar to MongoDB.

Install

Install using pip install gsheetquery in your preferred command line. Import to your python files like any other module.

Quickstart

from gsheetquery import Client, Collection

# Initialize the client object
client = Client()

# Create a new database
database = client.create_database("my_new_database")

# Add a new collection to the database
new_collection = database['new-collection']

# List the collections in the database
collection_names = database.list_collection_names()
print("Collections in the database:", collection_names)

# Add a doc to the collection
new_doc = {"name": "Bob", "age", "30"}
new_collection.insert_one(new_doc)

# Query the collection
new_collection.find_one({"age": "30"})

# Delete the database
client.drop_collection('new-collection')

Metadata

Release files for gsheetquery 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gsheetquery 0.0.3
File Size Uploaded
gsheetquery-0.0.3.tar.gz 11.1 kB Details

Release files / gsheetquery-0.0.3.tar.gz

Download URL gsheetquery-0.0.3.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2e0f2333d1ece64de94f9f27954eabac4a777569abb60221c495605227a21813
BLAKE2b-256 checksum
How to use checksums
732f0a002e52258b85f07b50a348aa922847e3f4acac03fe55247286afe9bc5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release 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