What does nutstore-sync-skill do?
Nutstore WebDAV sync tool - no desktop client required, pure standard library implementation. Supports upload, download, directory listing, delete, and more. Zero dependencies, cross-platform.
Features
- Pure standard library - No external packages, uses only Python built-in modules (
urllib,base64,pathlib, etc.) - No desktop client - Interact directly with Nutstore's WebDAV API
- Comprehensive operations - Upload, download, list directories, create directories, delete files/directories, get storage info
- Cross-platform - Works on Windows, macOS, Linux
- Simple API - Intuitive function calls for all WebDAV operations
Prerequisites
- Python 3.6+
- Nutstore account with WebDAV enabled
Configuration
Set the following environment variables or pass them as parameters:
export NUTSTORE_USER="your-nutstore-email"
export NUTSTORE_PASS="your-nutstore-password-or-app-password"
Usage
Import the skill and call the functions:
from nutstore_sync import NutstoreClient
# Initialize client
client = NutstoreClient()
# Upload a file
client.upload_file("/remote/path/file.txt", "/local/path/file.txt")
# Download a file
client.download_file("/remote/path/file.txt", "/local/path/downloaded.txt")
# List directory contents
items = client.list_directory("/remote/path")
for item in items:
print(item["name"])
# Delete a file
client.delete("/remote/path/file.txt")
# Get storage info
info = client.get_storage_info()
print(f"Used: {info['used']}, Total: {info['total']}")
API Reference
| Function | Description |
|---|---|
upload_file(remote_path, local_path) | Upload a local file to Nutstore |
download_file(remote_path, local_path) | Download a file from Nutstore |
list_directory(remote_path) | List files and directories |
create_directory(remote_path) | Create a remote directory |
delete(remote_path) | Delete a file or directory |
get_storage_info() | Get storage usage information |
Notes
- App passwords are recommended for security (enable in Nutstore account settings)
- File paths use forward slashes (
/) for remote paths - Directory listing returns entries with
name,type(file or directory), andsize