newton.utils.download_asset#

newton.utils.download_asset(asset_folder, cache_dir=None, force_refresh=False)[source]#

Downloads a specific folder from the newton-assets GitHub repository into a local cache.

Parameters:
  • asset_folder (str) – The folder within the repository to download (e.g., “assets/models”)

  • cache_dir (str | None) – Directory to cache downloads. If None, uses system temp directory

  • force_refresh (bool) – If True, re-downloads even if cached version exists

Returns:

Path to the downloaded folder in the local cache

Return type:

Path