Installation
Quick start
Initialization
api_key(required) – your D3 API key.base_url(optional) – API base URL, default:https://api.dragdropdo.com.timeout(optional) – request timeout in ms, default:30000.headers(optional) – additional headers to send with every request.
File upload
file(required) – file path string.file_name(required) – original file name.mime_type(optional) – MIME type (auto‑detected if omitted).parts(optional) – number of upload parts (auto‑calculated).on_progress(optional) – progress callback.
Supported operations
ext(required) – file extension (e.g.pdf,jpg).action(optional) – specific action (convert,compress, …).parameters(optional) – parameters to validate (e.g.{"convert_to": "png"}).
Create operations
action(required) –"convert" | "compress" | "merge" | "zip" | "lock" | "unlock" | "reset_password".file_keys(required) – array of file keys from upload.parameters(optional) – action‑specific parameters.notes(optional) – user metadata.
Convenience helpers
The client exposes shorthand helpers:Status & polling
StatusOptions (used by get_status):
main_task_id(required) – main task ID fromcreate_operation/ convenience helpers.file_key(optional) – when set, requests status for that specific input file.
PollStatusOptions (extends StatusOptions; used by poll_status):
- Same fields as
StatusOptions, plus: interval(optional) – milliseconds between polls, default2000.timeout(optional) – maximum total polling time in milliseconds, default300000(5 minutes).on_update(optional) –Callable[[StatusResponse], None], invoked after each successful status fetch.