Skip to main content

simple data store using google drive

Project description

gdstore

simple data store using google drive




🎛️ requirements

  • python 3.9 or higher
  • tested on
OS Tested Pass
Mac 13(Ventura)
Windows 10 🚫
Linux(WSL) 🚫



🌐 install

- using pip

python -m pip install gdstore

- using git(dev)

python -m pip install git+https://github.com/oyajiDev/gdstore.git



🛠 usage

get credentials

from google.oauth2.service_account import Credentials

creds = Credentials.from_service_account_file(
    "{credential_file}"
)

create root tree by id

from gdstore import Root

root = Root(creds, "{google_drive_folder_id}")

browse by tree

# tree
tree = root.tree("/path/of/tree", "{error or create}")

# store
store = root.tree("/path/of/tree.store", "{error or create}")

get, set item by tree from store

# find item by tree
item = store.tree("/path/of/tree/item")
# set value to item
item.set({some value})
# get value from item
print(item.get())

Project details


Download files

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

Source Distribution

gdstore-0.0.1.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

gdstore-0.0.1-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page