dandi.delete¶
Functions
|
Delete dandisets and assets from the server. |
|
Given a path to a local file, return the ID of the Dandiset in which it is located and the path to the file relative to the root of said Dandiset. |
|
Classes
|
Class for registering assets & Dandisets to delete and then deleting them |
- class dandi.delete.Deleter(client: DandiAPIClient | None = None, dandiset: RemoteDandiset | None = None, deleting_dandiset: bool = False, skip_missing: bool = False, remote_assets: list[RemoteAsset] = <factory>)[source]¶
Class for registering assets & Dandisets to delete and then deleting them
- add_asset(asset: RemoteAsset) None [source]¶
- client: DandiAPIClient | None = None¶
- dandiset: RemoteDandiset | None = None¶
- deleting_dandiset: bool = False¶
Whether we are deleting an entire Dandiset (true) or just assets (false)
- register_asset(instance: DandiInstance, dandiset_id: str, version_id: str, asset_path: str) None [source]¶
- register_asset_folder(instance: DandiInstance, dandiset_id: str, version_id: str, folder_path: str) None [source]¶
- register_assets_url(url: str, parsed_url: ParsedDandiURL) None [source]¶
- register_dandiset(instance: DandiInstance, dandiset_id: str) None [source]¶
- register_local_path_equivalent(instance_name: str | DandiInstance, filepath: str) None [source]¶
- remote_assets: list[RemoteAsset]¶
- set_dandiset(instance: DandiInstance, dandiset_id: str) bool [source]¶
Returns
False
if no action should be taken due to the Dandiset not existing
- skip_missing: bool = False¶
- dandi.delete.delete(paths: Iterable[str], dandi_instance: str | DandiInstance = 'dandi', devel_debug: bool = False, jobs: int | None = None, force: bool = False, skip_missing: bool = False) None [source]¶
Delete dandisets and assets from the server.
PATH could be a local path or a URL to an asset, directory, or an entire dandiset.