EasyStorage
A Python library and CLI tool for managing folder-based Containers in Google Drive with persistent OAuth authentication, SHA-256 deduplication, and automated offloading verification. Made with Gemini ! 🚀
Features
- Persistent Long-Term Authentication: Stores OAuth refresh tokens in
~/.easystorage_creds.txtso browser login is required only once. - Unique Container Identification: Automatically manages
.container.jsoninside each folder storing a unique container ID and the original folder name. - SHA-256 Deduplication: Computes
filename + contenthashes for file items, skipping upload/download for identical files. - Store & Offload (
store_folder): Uploads local folders to Google Drive, verifies that all file hashes match in Drive, and moves the local directory to Trash. - Container Fetching (
fetch_container): Downloads containers from Drive into local directories using original folder names. Supports interactive TUI selection! - Full
uvandpipSupport: Modernpyproject.tomlpackaging built withhatchling.
Installation
Using uv (Recommended)
uv pip install -e .
Using pip
pip install -e .
Setup & Authentication
Before running EasyStorage, you need a Google Drive OAuth client secrets JSON file.
- Step-by-Step Setup Guide: See SETUP_SECRETS.md for detailed instructions on creating and saving your Google Drive OAuth credentials.
- Default File Locations: Save your JSON file to
~/.easystorage_secrets.json(global) or./client_secrets.json(project local).
CLI Usage
Interactive Container Fetch (TUI)
If you specify only the destination path, an interactive TUI menu will open displaying all available containers from Google Drive for selection:
easystorage fetch /path/to/destination
You can also explicitly pass the container_id:
easystorage fetch <container_id> /path/to/destination
Other Commands
# List all active containers in Drive
easystorage list
# Upload & update a local folder (without deleting local files)
easystorage update /path/to/my_folder
# Upload, verify integrity, and move local folder to Trash
easystorage store /path/to/my_folder
Python API Usage
from easystorage import (
get_drive,
get_containers_folder,
get_list_of_containers,
update_container,
store_folder,
fetch_container
)
# 1. Authorize Drive session
drive = get_drive()
# 2. List containers in Google Drive
containers = get_list_of_containers(drive)
for c in containers:
print(f"Container: {c.name} | ID: {c.id}")
# 3. Synchronize a local folder to Drive (keeps local files)
update_container("/path/to/my_folder", drive=drive)
# 4. Offload a folder to Drive (verifies upload integrity, then trashes local folder)
store_folder("/path/to/my_folder", drive=drive)
# 5. Fetch a container from Drive back to local disk
fetch_container("<container_id>", "/path/to/destination", drive=drive)
Metadata
Release files for easystorage 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| easystorage-0.2.0.tar.gz | 11.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easystorage-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.8 kB
Release files / easystorage-0.2.0.tar.gz
| Download URL | easystorage-0.2.0.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8596ecdffd96fcdca94181ff5d37494068531273738dd130f850d6f0487af407
|
|
BLAKE2b-256 checksum How to use checksums |
7b8321e4dde4d4537e876db33ab545527fe0c0133d8168f9403948a893d0396f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / easystorage-0.2.0-py3-none-any.whl
| Download URL | easystorage-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
774a574619b1d555a7404de32b476a324bdfbd70a5bc7b9be647cb442f808f05
|
|
BLAKE2b-256 checksum How to use checksums |
b3c3a6035500984f12d55ec90824a36597de1dc378ef1b698448b977c4968371
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|