Source code for scsilhouette.download
# src/scsilhouette/download.py
import os
import pooch
from urllib.parse import urlparse
[docs]
def download_h5ad(url: str, output_dir: str) -> str:
os.makedirs(output_dir, exist_ok=True)
filename = get_filename_from_url(url)
# Let pooch manage the full path under output_dir
file_path = pooch.retrieve(
url=url,
known_hash=None,
fname=filename,
path=output_dir,
progressbar=True,
)
return file_path