zachary-shah commited on
Commit
7ed77a6
·
1 Parent(s): 75fb4ca

Upload test_data.txt to tests/test_data.txt

Browse files
Files changed (1) hide show
  1. tests/test_data.txt +52 -0
tests/test_data.txt ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # data_transfer
2
+
3
+ A Python tool to upload files and directories to cloud backends with a focus on speed and simplicity.
4
+
5
+ Supported backends:
6
+ - Hugging Face Hub
7
+ - Google Drive
8
+
9
+ Features:
10
+ - Simple CLI and Python API
11
+ - Resumable, chunked uploads
12
+ - Parallel transfer where supported
13
+ - Credential storage via file store at `~/.config/data_transfer/credentials.json` (macOS & Linux)
14
+ - Configurable data root (default `./data`) and remote paths/filenames
15
+ - Timing summary with `-v`
16
+
17
+ ## Quickstart
18
+
19
+ 1. Install
20
+
21
+ ```bash
22
+ pip install -e .
23
+ ```
24
+
25
+ 2. Configure credentials
26
+
27
+ ```bash
28
+ # For Hugging Face
29
+ data-transfer auth hf
30
+
31
+ # For Google Drive (opens browser for OAuth once)
32
+ # Optionally specify path to client_secrets.json
33
+ # export GDRIVE_CLIENT_SECRETS=/path/to/client_secrets.json
34
+ data-transfer auth gdrive
35
+ ```
36
+
37
+ 3. Upload
38
+
39
+ ```bash
40
+ # Upload a single file to Hugging Face Hub repo under path `datasets/mydir/file.bin`
41
+ # By default source is resolved under ./data; override with --data-root
42
+
43
+ data-transfer upload --backend hf --source test.pt --remote datasets/mydir/file.bin --repo your-username/your-repo --create-repo -v
44
+
45
+ # Upload directory recursively to Google Drive under a folder id
46
+ # Remote path supports nested folders; will be created on demand under the given folder id
47
+ # Use --workers to speed up parallel uploads
48
+
49
+ data-transfer upload --backend gdrive --source ./myfolder --remote nested1/nested2 --parent-id <FOLDER_ID> --workers 8 -v
50
+ ```
51
+
52
+ See `data_transfer/config.example.toml` for optional defaults.