Mcsmapi
A lightweight wrapper around the MCSManager API, featuring action chains for streamlined management./一个轻量级的 MCSManager API 封装,支持动作链,管理更简单高效。
Install / Use
/learn @molanp/McsmapiREADME
MCSM API
English|Chinese Simplified
Documentation
📄 Docs: docs
💡 Example: example
Introduction
mcsmapi is a PyPI package based on MCSManager, designed to simplify interactions with the MCSM API.
With this library, you can more easily access and operate the various features provided by MCSM.
Installation
You can install mcsmapi using pip:
pip install mcsmapi
If you need the latest build files, please visit Actions
Supported Features
- [x] Dashboard data (
Overview) - [x] User management (
User) - [x] Instance management (
Instance) - [x] Daemon management (
Daemon) - [x] File management (
File) - [x] Image management (
Image) - [x] Schedule task management (
Schedule)
Supported MCSM Versions
| MCSM Version | Support Status | | :----------: | :------------: | | 10.x | ✅ |
Quick Example
from mcsmapi import MCSMAPI
# Initialize
mcsm = MCSMAPI("https://example.com") # https or http required
# Log in with username and password (API permissions depend on the account permissions)
mcsm.login("username", "password")
# Log in with API key (API permissions depend on the API key permissions)
mcsm.login_with_apikey("apikey")
# Get dashboard data
overview = mcsm.overview
overview_data = overview.overview()
# Get MCSM version
mcsm_version = overview_data.version
Contributing
If you encounter any issues or have suggestions for improvements, feel free to submit an Issue or create a Pull Request.
License
mcsmapi is licensed under the MIT License.
Please refer to the LICENSE file for more details.
