Official Python SDK for the SynaDrive cloud storage API
Project description
SynaDrive Python SDK
Official Python client for the SynaDrive cloud storage API.
Installation
pip install synadrive
For better performance with connection pooling:
pip install synadrive[httpx]
Quick Start
from synadrive import SynaDriveClient
# Initialize client
client = SynaDriveClient(
api_key="your-api-key",
base_url="https://drive.synavue.com"
)
# List files
files = client.list_files()
# Upload a file
result = client.upload_file("/path/to/document.pdf", folder_id="folder-id")
# Download a file
client.download_file("file-id", save_path="./downloaded.pdf")
# Create a folder
folder = client.create_folder("My New Folder")
# Share a file
client.share("file-id", email="colleague@company.com", permission="edit")
# Search
results = client.search("quarterly report")
Authentication
The SDK supports two authentication methods:
# 1. Pass token directly
client = SynaDriveClient(api_key="your-token")
# 2. Environment variable
# export SYNADRIVE_API_KEY=your-token
client = SynaDriveClient()
Context Manager
with SynaDriveClient(api_key="your-key") as client:
files = client.list_files()
# Connection is automatically closed
Features
- Zero required dependencies — works with Python stdlib (
urllib) - Optional httpx — install
synadrive[httpx]for connection pooling & HTTP/2 - Full API coverage — files, folders, sharing, search, trash, versions, sync, AI
- Type hints — full typing support for IDE autocompletion
- Cross-platform — works on macOS, Linux, Windows
- Python 3.8+ — supports all modern Python versions
API Reference
Files
| Method | Description |
|---|---|
list_files(folder_id, limit, offset) |
List files in a folder |
get_file(file_id) |
Get file metadata |
upload_file(file_path, folder_id, tags) |
Upload a file |
download_file(file_id, save_path) |
Download a file |
delete_file(file_id) |
Move file to trash |
move_file(file_id, destination_folder_id) |
Move a file |
copy_file(file_id, destination_folder_id) |
Copy a file |
Folders
| Method | Description |
|---|---|
create_folder(name, parent_id) |
Create a new folder |
Sharing
| Method | Description |
|---|---|
share(item_id, email, permission) |
Share a file/folder |
get_share_link(item_id) |
Get public share link |
Search
| Method | Description |
|---|---|
search(query, **filters) |
Search files |
Sync
| Method | Description |
|---|---|
sync_delta(cursor, limit) |
Pull remote changes (delta sync) |
register_device(device_id, name) |
Register sync device |
list_devices() |
List registered devices |
revoke_device(device_pk) |
Revoke a device |
Trash
| Method | Description |
|---|---|
list_trash() |
List trashed items |
restore_from_trash(file_id) |
Restore from trash |
empty_trash() |
Permanently delete all trash |
AI Features
| Method | Description |
|---|---|
auto_tag(file_id) |
AI-generated tags |
smart_search(query) |
Semantic search |
suggest_folder(filename) |
AI folder suggestion |
Error Handling
from synadrive import SynaDriveClient, SynaDriveError, AuthenticationError, NotFoundError
try:
client.get_file("invalid-id")
except AuthenticationError:
print("Token expired — re-authenticate")
except NotFoundError:
print("File not found")
except SynaDriveError as e:
print(f"API error {e.status_code}: {e}")
License
MIT — © 2026 SynaVue Technologies
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
synadrive-1.0.0.tar.gz
(7.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synadrive-1.0.0.tar.gz.
File metadata
- Download URL: synadrive-1.0.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
213d474a49ee21700b72be871dbb927849a164488d02075171294abec20035b2
|
|
| MD5 |
bedc03e5cde01bc87d95813150de95af
|
|
| BLAKE2b-256 |
3439f987409f2e2cfaf3923fe0045340a465aeceae552e54cca425f419077728
|
File details
Details for the file synadrive-1.0.0-py3-none-any.whl.
File metadata
- Download URL: synadrive-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f228b47d7ea53162cb670039dc4b3d1c1319a8819a8c60a10fa6fccfb66c66d
|
|
| MD5 |
91505ff5f9ee495ee26129f1888ee62b
|
|
| BLAKE2b-256 |
94cba16eb24406c1871c451e1d328ff1477d9b3ffbc0a706ee24bc6e693f9469
|