Metadata-Version: 2.1
Name: gdstore
Version: 0.0.1
Summary: simple data store using google drive
Author-email: oyajiDev <this.dev.somehit@gmail.com>
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: google-api-python-client==2.97.0
Requires-Dist: google-auth-oauthlib==1.0.0
Requires-Dist: google-auth==2.22.0
Requires-Dist: gspread==5.10.0
Requires-Dist: tqdm==4.66.1
Requires-Dist: unix-os==0.4
Project-URL: repository, https://github.com/oyajiDev/gdstore

<h1 align="center">
    gdstore
</h1>
<p align="center">
    simple data store using google drive
</p>
<br/>

<div align="center">
    <a href="https://github.com/oyajiDev/gdstore/blob/main/LICENSE">
        <img src="https://img.shields.io/github/license/oyajiDev/gdstore.svg" alt="MIT License" />
    </a>
    <a href="https://pypi.org/project/gdstore/">
        <img src="https://img.shields.io/pypi/v/gdstore.svg" alt="pypi" />
    </a>
</div>
<br/><br/>


## 🎛️ requirements
- python 3.9 or higher
- tested on

|        OS       | Tested | Pass |
| --------------- | ------ | ---- |
| Mac 13(Ventura) |   ✅   |  ✅  |
| Windows 10      |   🚫   |      |
| Linux(WSL)      |   🚫   |      |

<br/><br/>

## 🌐 install
### - using pip
```zsh
python -m pip install gdstore
```

### - using git(dev)
```zsh
python -m pip install git+https://github.com/oyajiDev/gdstore.git
```

<br/><br/>

## 🛠 usage
### get credentials
```python
from google.oauth2.service_account import Credentials

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

### create root tree by id
```python
from gdstore import Root

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

### browse by tree
```python
# 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
```python
# 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())
```

