cache_key#

brainglobe_atlasapi.remotes.cache_key(remote)[source]#

Return the local cache directory name for a remote.

The BrainGlobe remote keeps its historical directory; every other remote is cached under the last segment of its URL, e.g. s3://bucket/prefix/allen-atlas-assets-rc11 under allen-atlas-assets-rc11.

Parameters:

remote (str) – Remote, without a trailing slash.

Returns:

Directory name, relative to the brainglobe directory.

Return type:

str

Raises:

ValueError – If a non-default remote would take the default remote’s directory.