interface#

用于 repodata 的 JLAP 接口。

#

JlapRepoInterface

提供使用继承创建 ABC 标准方法的辅助类。

RepodataStateSkipFormat

加载/保存伴随缓存的 repodata.json 的信息文件。

ZstdRepoInterface

支持 repodata.json.zst(如果可用),无需检查 .jlap

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

基类: conda.gateways.repodata.RepoInterface

提供使用继承创建 ABC 标准方法的辅助类。

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

如有必要,获取最新的 repodata。

始终写入 cache_path_json

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

JLAP 无论如何都必须解析 JSON。

当 repodata 更新时,使用此方法可避免冗余解析。

当 repodata 未更新时,此函数或调用者是否从文件读取都无关紧要。

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

基类: conda.gateways.repodata.RepodataState

加载/保存伴随缓存的 repodata.json 的信息文件。

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

如果应尝试命名格式,则返回 True。

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

基类: JlapRepoInterface

支持 repodata.json.zst(如果可用),无需检查 .jlap

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