这是一个 FastAPI 项目,主要封装了 mcstatus 包,用于查询 Minecraft 服务器状态,支持Java和基岩,以及附带其他小特性!
Find a file
Murasame Noa 2d74bc6328
Merge pull request #7 from GiriNeko/dev
feat: update mcstatus-img submodule and fix docker running issue.
2025-09-03 17:40:23 +08:00
mc_status_img@774554790e update: mcstatus-img submodule to update 2025-09-03 15:52:01 +08:00
.gitattributes Initial commit 2025-08-16 04:44:03 +08:00
.gitignore feat: compact pull #4 and delete unusable things. (#6) 2025-09-02 22:42:20 +08:00
.gitmodules Add module mc-status-img (#4) 2025-09-02 20:32:57 +08:00
app.py feat: compact pull #4 and delete unusable things. (#6) 2025-09-02 22:42:20 +08:00
BedrockServerStatus.py Intial Init 2025-08-16 04:50:02 +08:00
config.py feat: compact pull #4 and delete unusable things. (#6) 2025-09-02 22:42:20 +08:00
dnslookup.py Intial Init 2025-08-16 04:50:02 +08:00
Dockerfile fix: docker running issue 2025-09-03 16:07:59 +08:00
FormatData.py feat: image generater support. 2025-09-02 17:33:23 +08:00
generate_img.py feat: compact pull #4 and delete unusable things. (#6) 2025-09-02 22:42:20 +08:00
JavaServerStatus.py Intial Init 2025-08-16 04:50:02 +08:00
LICENSE Initial commit 2025-08-16 04:44:03 +08:00
pyproject.toml fix: requirements and some syntax fix. 2025-09-02 17:53:47 +08:00
README.md 重写成 FastAPI (#3) 2025-08-28 11:29:23 +08:00
requirements.txt fix: requirements and some syntax fix. 2025-09-02 17:53:47 +08:00

McStatus-API

这是一个 FastAPI 项目,主要封装了 mcstatus 包,用于查询 Minecraft 服务器状态支持Java和基岩以及附带其他小特性

💻用法

此项目的页面模板正在筹备中,敬请等待!

  • GET /java?ip=<IP> - (Required) - 查询 Java 版服务器状态
  • GET - /bedrock?ip=<IP> - (Required) - 查询基岩版服务器状态
  • Get - /docs - FastAPI 的内建文档

📦安装&▶启动

以下提到的方法 任选其一 即可 确保你有Python 3.10或以上的环境)

uv
uv run app.py
pdm
pdm install
pdm run app.py
pip
# 请确保使用 Python >= 3.13!
pip install -r requirements.txt
python app.py
docker
docker build -t mcstatus-api .
docker run --name mcstatus-api -p 8000:8000 -d mcstatus-api

或者你也可以使用这个编译好的镜像registry.cn-guangzhou.aliyuncs.com/ineko-docker/mcstatus-api:latest

🖊下一步计划

  1. 添加配置文件
  2. 添加一个基于此项目的服务端(他可能只是一个API Caller或者是一个Websocket服务器)
    服务端可以调用多个API并将其返回的信息进行合并并输出旨在用于检查不同地区的延迟
  3. 添加是否默认使用 SRV 解析的变量
  4. 等一切尘埃落定后,我会考虑使用 FastAPI --- 已完成

📞 联系

TG群组点此加入
吹水群:1049319982
邮箱:congyu@sbhfy.cn