Riot manifest parsing, concurrent downloader, and manifest/WAD diff toolkit.
Project description
RiotManifest
Riot 提供的 manifest 解析、并发下载、WAD 按需提取与差异分析工具。
安装
pip3 install riotmanifest
30 秒上手
最常见的下载入口是 PatcherManifest:
import asyncio
from riotmanifest import PatcherManifest
async def main() -> None:
manifest = PatcherManifest(
"https://lol.secure.dyn.riotcdn.net/channels/public/releases/CB3A1B2A17ED9AAB.manifest",
path="./out",
bundle_url="https://lol.dyn.riotcdn.net/channels/public/bundles/",
)
files = list(manifest.filter_files(flag="zh_CN", pattern="wad.client"))
await manifest.download_files_concurrently(files)
if __name__ == "__main__":
asyncio.run(main())
默认并发为 16。
常见任务
1. 下载 manifest 中的一批文件
- 入口:
PatcherManifest - 适合:批量下载
wad.client、语言资源、配置文件
2. 从 WAD 中按需提取少量文件
from riotmanifest import PatcherManifest, WADExtractor
manifest = PatcherManifest(manifest_url, path="")
extractor = WADExtractor(manifest)
data = extractor.extract_files(
{
"DATA/FINAL/Champions/Ahri.wad.client": [
"data/characters/ahri/skins/skin0.bin",
]
}
)
3. 比较两个版本的 manifest / WAD 差异
from riotmanifest import diff_manifests, diff_wad_headers
manifest_report = diff_manifests(old_manifest, new_manifest, flags="zh_CN", pattern="wad.client")
wad_report = diff_wad_headers(manifest_report=manifest_report)
4. 获取当前 live 且版本规则明确的一对 LCU / GAME manifest
from riotmanifest import RiotGameData, VersionMatchMode
rgd = RiotGameData()
pair = rgd.resolve_live_manifest_pair("EUW")
print(str(pair.version)) # 例如 16.5
print(pair.lcu.url)
print(pair.game.url)
relaxed_pair = rgd.resolve_live_manifest_pair(
"EUW",
match_mode=VersionMatchMode.IGNORE_REVISION,
)
实践建议
下载
- 默认并发
16是当前推荐值。 - 网络或磁盘较弱时可降到
8~12。 - 机器配置较好且网络稳定时,可尝试
16~24。
WAD 提取
WADExtractor适合“少量小文件按需提取”。- 若单个 WAD 目标文件很多,通常更建议先下载完整 WAD 再本地处理。
差异分析
- 大多数情况下,先
diff_manifests,再按需进入diff_wad_headers。 resolve_wad_diff_paths()默认推荐extractor模式。- 仅在“需要完整落盘、后续离线复用、磁盘空间充足”时考虑
download_root_wad。
RiotGameData
- 默认优先使用
STRICT,确保 build 级完全一致。 - 当你明确接受“同补丁内可能只有 exe / dll 修订、资源通常不变”时,再使用
IGNORE_REVISION。 str(pair.version)默认输出补丁号,例如16.5;如需精确显示,可读取pair.version.lcu.display_version或pair.version.game.display_version。
文档导航
详细文档已按功能拆分:
- docs/API.md:文档导航页
- docs/manifest.md:Manifest 下载参考
- docs/extractor.md:WADExtractor 参考
- docs/diff.md:差异分析参考
- docs/game.md:RiotGameData / 版本对象参考
- docs/TESTING.md:测试与基准说明
维护者
Virace
感谢
- @CommunityDragon, CDTB
许可证
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file riotmanifest-2.2.2.tar.gz.
File metadata
- Download URL: riotmanifest-2.2.2.tar.gz
- Upload date:
- Size: 63.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e989fecbf5627973ea20cea407a790c14848cb6e0c0a188897700159ad879eb0
|
|
| MD5 |
2b716e2a9c9584ba75879f9587c14436
|
|
| BLAKE2b-256 |
7fcf4863dd57c2e2b66025bfb914336eb8652c9e3fd8f36695cc72c80272b218
|
Provenance
The following attestation bundles were made for riotmanifest-2.2.2.tar.gz:
Publisher:
python-publish.yml on Virace/RiotManifest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
riotmanifest-2.2.2.tar.gz -
Subject digest:
e989fecbf5627973ea20cea407a790c14848cb6e0c0a188897700159ad879eb0 - Sigstore transparency entry: 1050048842
- Sigstore integration time:
-
Permalink:
Virace/RiotManifest@1ab762a4a8f62f653177c3911c284c919c5c122c -
Branch / Tag:
refs/tags/v2.2.2 - Owner: https://github.com/Virace
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1ab762a4a8f62f653177c3911c284c919c5c122c -
Trigger Event:
release
-
Statement type:
File details
Details for the file riotmanifest-2.2.2-py3-none-any.whl.
File metadata
- Download URL: riotmanifest-2.2.2-py3-none-any.whl
- Upload date:
- Size: 74.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df10b501ad1ab5fa9fc629c4c7cdef825c0d01880a54f3b9f0e04f0898a87eea
|
|
| MD5 |
2344fb1f8dbe2a98547393a2f0124aa8
|
|
| BLAKE2b-256 |
ba1a26938b63488bec0a36e231a89f5b8717e0eead593608ec2ceef5d730093d
|
Provenance
The following attestation bundles were made for riotmanifest-2.2.2-py3-none-any.whl:
Publisher:
python-publish.yml on Virace/RiotManifest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
riotmanifest-2.2.2-py3-none-any.whl -
Subject digest:
df10b501ad1ab5fa9fc629c4c7cdef825c0d01880a54f3b9f0e04f0898a87eea - Sigstore transparency entry: 1050048843
- Sigstore integration time:
-
Permalink:
Virace/RiotManifest@1ab762a4a8f62f653177c3911c284c919c5c122c -
Branch / Tag:
refs/tags/v2.2.2 - Owner: https://github.com/Virace
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1ab762a4a8f62f653177c3911c284c919c5c122c -
Trigger Event:
release
-
Statement type: