geovista.cache#

Convenience functions to access, download and cache geovista resources.

Notes

Added in version 0.1.0.

Package Contents#

Functions#

pooch_mute([silent])

Control the pooch cache manager logger verbosity.

reload_registry([fname])

Refresh the registry of the CACHE.

Attributes#

BASE_URL

Base URL for geovista resources.

CACHE

Cache manager for geovista resources.

DATA_VERSION

The geovista-data repository version for geovista resources.

GEOVISTA_CACHEDIR

Environment variable to override pooch cache manager path.

GEOVISTA_DATA_VERSION

Environment variable to override default DATA_VERSION.

GEOVISTA_POOCH_MUTE

Verbosity status of the pooch cache manager logger.

RETRY_ATTEMPTS

The number of retry attempts to download a resource.

geovista.cache.pooch_mute(silent=True)[source]#

Control the pooch cache manager logger verbosity.

Updates the status variable GEOVISTA_POOCH_MUTE.

Parameters:
silentbool, optional

Whether to silence or activate the pooch cache manager logger messages to the console.

Notes

Added in version 0.5.0.

geovista.cache.reload_registry(fname=None)[source]#

Refresh the registry of the CACHE.

See pooch.Pooch.load_registry() for more details.

Parameters:
fnamestr, optional

The filename of the registry to be loaded. If None, defaults to the cache/registry.txt resource file packaged with geovista.

Notes

Added in version 0.1.0.

geovista.cache.BASE_URL: str = 'https://github.com/bjlittle/geovista-data/raw/{version}/assets/'#

Base URL for geovista resources.

geovista.cache.CACHE: pooch.Pooch#

Cache manager for geovista resources.

geovista.cache.DATA_VERSION: str = '2024.07.0'#

The geovista-data repository version for geovista resources.

geovista.cache.GEOVISTA_CACHEDIR: str = 'GEOVISTA_CACHEDIR'#

Environment variable to override pooch cache manager path.

geovista.cache.GEOVISTA_DATA_VERSION: str#

Environment variable to override default DATA_VERSION.

geovista.cache.GEOVISTA_POOCH_MUTE: bool#

Verbosity status of the pooch cache manager logger.

geovista.cache.RETRY_ATTEMPTS: int = 3#

The number of retry attempts to download a resource.