from pathlib import Path
from moorcheh import MoorchehClient
from moorcheh.docker_runtime import default_upload_dir, host_path_to_container_upload_path
with MoorchehClient("http://localhost:8080") as client:
# By file_id
resp = client.files.delete("my-documents", file_id="a1b2c3d4e5f67890")
# By path (container path)
upload_root = default_upload_dir()
host_file = (upload_root / "document.pdf").resolve()
resp = client.files.delete(
"my-documents",
path=host_path_to_container_upload_path(host_file, upload_root),
)
job = client.files.job_status("my-documents", resp["job_id"])