# data_transfer A Python tool to upload files and directories to cloud backends with a focus on speed and simplicity. Supported backends: - Hugging Face Hub - Google Drive Features: - Simple CLI and Python API - Resumable, chunked uploads - Parallel transfer where supported - Credential storage via file store at `~/.config/data_transfer/credentials.json` (macOS & Linux) - Configurable data root (default `./data`) and remote paths/filenames - Timing summary with `-v` ## Quickstart 1. Install ```bash pip install -e . ``` 2. Configure credentials ```bash # For Hugging Face data-transfer auth hf # For Google Drive (opens browser for OAuth once) # Optionally specify path to client_secrets.json # export GDRIVE_CLIENT_SECRETS=/path/to/client_secrets.json data-transfer auth gdrive ``` 3. Upload ```bash # Upload a single file to Hugging Face Hub repo under path `datasets/mydir/file.bin` # By default source is resolved under ./data; override with --data-root data-transfer upload --backend hf --source test.pt --remote datasets/mydir/file.bin --repo your-username/your-repo --create-repo -v # Upload directory recursively to Google Drive under a folder id # Remote path supports nested folders; will be created on demand under the given folder id # Use --workers to speed up parallel uploads data-transfer upload --backend gdrive --source ./myfolder --remote nested1/nested2 --parent-id --workers 8 -v ``` See `data_transfer/config.example.toml` for optional defaults.