API#

Extensions#

make_register_namespace_decorator(cls, ...)

Create a decorator for registering custom functionality with a class.

Types used by the former:

ExtensionNamespace(instance)

Protocol for extension namespaces.

Examples: Extension namespaces

Deprecations#

deprecated(msg, *[, category, stacklevel])

Decorator to indicate that a class, function, or overload is deprecated.

deprecated_arg(arg, msg, *[, category, ...])

Decorator to indicate that a function argument is deprecated.

Deprecation(version_deprecated[, msg])

Utility class storing information on deprecated functionality.

Examples: Deprecating a function, Deprecating a function argument, Settings class

Settings#

Settings(…)

Base class for package settings.

Examples: Settings class

Datasets (scverse_misc.datasets)#

Reusable, declarative dataset download for scverse packages.

Parse a YAML registry into typed DatasetEntry objects, then download and load one with fetch(). Dataset type strings are dispatched against a pluggable loader registry (register_loader()); anndata and spatialdata loaders ship built in.

Requires the datasets extra (pip install scverse-misc[datasets]); the built-in spatialdata loader additionally needs the spatialdata extra.

DatasetEntry(name, type, files[, metadata])

A named dataset made up of one or more files.

FileEntry(name[, url, s3_key, sha256])

A single downloadable file belonging to a dataset.

parse_registry(path)

Parse a YAML registry into (base_url, {name: DatasetEntry}).

fetch(entry, cache_dir, *[, base_url, retries])

Download (if needed) and load entry, dispatching to the loader registered for entry.type.

register_loader(type_name[, loader])

available_loaders()

Return the names of all registered loader types.

Loader(*args, **kwargs)

Function that can be annotated by register_loader().

DownloadCB(*args, **kwargs)

Callback passed as download to a Loader.