interface#

JLAP interface for repodata.

Classes#

JlapRepoInterface

Helper class that provides a standard way to create an ABC using

RepodataStateSkipFormat

Load/save info file that accompanies cached repodata.json.

ZstdRepoInterface

Support repodata.json.zst (if available) without checking .jlap

class JlapRepoInterface(url: str, repodata_fn: str | None, *, cache: conda.gateways.repodata.RepodataCache, **kwargs)#

Bases: conda.gateways.repodata.RepoInterface

Helper class that provides a standard way to create an ABC using inheritance.

repodata(state: dict | conda.gateways.repodata.RepodataState) str | None#

Fetch newest repodata if necessary.

Always writes to cache_path_json.

repodata_parsed(state: dict | conda.gateways.repodata.RepodataState) dict | None#

JLAP has to parse the JSON anyway.

Use this to avoid a redundant parse when repodata is updated.

When repodata is not updated, it doesn't matter whether this function or the caller reads from a file.

_repodata_state_copy(state: dict | conda.gateways.repodata.RepodataState)#
class RepodataStateSkipFormat(*args, skip_formats=set(), **kwargs)#

Bases: conda.gateways.repodata.RepodataState

Load/save info file that accompanies cached repodata.json.

skip_formats: set[str]#
should_check_format(format)#

Return True if named format should be attempted.

class ZstdRepoInterface(url: str, repodata_fn: str | None, *, cache: conda.gateways.repodata.RepodataCache, **kwargs)#

Bases: JlapRepoInterface

Support repodata.json.zst (if available) without checking .jlap

_repodata_state_copy(state: dict | conda.gateways.repodata.RepodataState)#