napari.plugins

Module Attributes

plugins.menu_item_template = '{}: {}'

Classes

NapariPluginManager

PluginManager subclass for napari-specific functionality.

PackageMetadata

Pydantic model for standard python package metadata.

Path

PurePath subclass that can make system calls.

PluginManifest

Functions

napari.plugins.get_settings(path=<object object>) napari.settings._napari_settings.NapariSettings[source]

Get settings for a given path.

Parameters

path (Path, optional) – The path to read/write the settings from.

Returns

The settings manager.

Return type

SettingsManager

Notes

The path can only be set once per session.

napari.plugins.lru_cache(maxsize=128, typed=False)[source]

Least-recently-used cache decorator.

If maxsize is set to None, the LRU features are disabled and the cache can grow without bound.

If typed is True, arguments of different types will be cached separately. For example, f(3.0) and f(3) will be treated as distinct calls with distinct results.

Arguments to the cached function must be hashable.

View the cache statistics named tuple (hits, misses, maxsize, currsize) with f.cache_info(). Clear the cache and statistics with f.cache_clear(). Access the underlying function with f.__wrapped__.

See: https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)