# MCArchive API for Python **Repository Path**: AngryMouse7891/mcarchive-api-python ## Basic Information - **Project Name**: MCArchive API for Python - **Description**: Unofficial library to help you consume the MCArchive API - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-14 - **Last Updated**: 2026-11-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: Minecraft, HttpClient, Python, API, JSON ## README #

MCArchive API for Python star star GitHub Stars GitHub Forks latest

> [!WARNING] > 这个库与 MCArchive 没有任何关联。 ## 简介 这是一个允许开发者与MCArchive API交互的Python库,使用[`httpx`](https://pypi.org/project/httpx/)进行API交互,[`urllib`](https://pypi.org/project/urllib/)库作为变量转URL参数。 ## 安装 通过`pip`包管理器安装: ```bash pip install mcarchive-api poetry install mcarchive-api #或者使用Poetry uv pip install mcarchive-api #或者使用uv ``` 你也可以下载轮子并安装: ```bash pip install ./mcarchive_api-x.x.x-py3-none-any.whl ``` 或者克隆Git仓库并构建轮子: ```bash git clone https://github.com/AngryMouse7891/mcarchive-api-python.git cd mcarchive-api-python uv build ``` ## 使用方法 以下是该库所有模块的描述: - `mcarchive_api.default`:获取Minecraft游戏版本和作者 - `mcarchive_api.mods`:获取所有模组以及通过特定slug获取 - `mcarchive_api.files`:通过文件名/SHA256哈希值获取文件 比如获取所有Minecraft游戏版本: ```python from mcarchive_api.default import get_game_versions print(f'Game Versions: {get_game_versions()}') ``` 更多详细请看[MCArchive API官方文档](https://mcarchive.net/api/v1/)。 ## 使用的依赖 | 包名 | 最新版本 | 描述 | | ------------------------------------------- | ------------------------------------------ | ------------------------- | | [`httpx`](https://pypi.org/project/httpx) | ![latest](https://img.shields.io/pypi/v/httpx) | HTTP客户端 | | [`urllib3`](https://pypi.org/project/httpx) | ![latest](https://img.shields.io/pypi/v/urllib3) | 带有线程安全连接池、文件上传等功能的 HTTP 库 | | [`colorama`](https://pypi.org/project/colorama) | ![latest](https://img.shields.io/pypi/v/colorama) | 彩色文本输出 | ## 开源许可 使用[MIT许可证](https://choosealicense.com/zh/licenses/mit/)。