Metadata-Version: 2.4
Name: inpanel-client
Version: 0.0.3
Summary: InPanel Client - A Desktop Client for InPanel Server Management
Author-email: Jackson Dou <jksdou@qq.com>
Maintainer-email: Jackson Dou <jksdou@qq.com>
License-Expression: MIT
Project-URL: Homepage, https://inpanel.org
Project-URL: Repository, https://github.com/inpanel/inpanel-client
Project-URL: Documentation, https://inpanel.org
Project-URL: Issues, https://github.com/inpanel/inpanel-client/issues
Keywords: server,management,admin,panel,client,desktop,tkinter,linux
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: X11 Applications
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# InPanel Client

[![PyPI](https://img.shields.io/pypi/v/inpanel-client)](https://pypi.org/project/inpanel-client/)
[![Python](https://img.shields.io/pypi/pyversions/inpanel-client)](https://pypi.org/project/inpanel-client/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

InPanel  —— 通过图形化界面远程管理 [InPanel](https://inpanel.org) 服务器。

基于 Python Tkinter 构建，通过 HTTP API 与 InPanel 服务端通信，支持连接管理、系统监控、服务控制、文件管理、数据库管理、站点管理、系统工具等完整功能。

---

## 功能模块

### 仪表盘 (Dashboard)
- 系统运行状态概览
- CPU、内存、磁盘、网络实时监控

### 服务管理 (Services)
- 管理 Nginx、Apache、MySQL、Redis 等服务
- 启动 / 停止 / 重启 / 状态查看
- 服务安装与卸载

### 文件管理 (Files)
- 远程文件浏览、编辑、上传、下载
- 文件权限修改
- 回收站管理

### 数据库管理 (Databases)
- MySQL / MariaDB 数据库管理
- 数据库创建与删除
- 用户权限管理

### 站点管理 (Sites)
- 站点创建与配置
- Nginx / Apache 虚拟主机管理

### 应用管理 (Apps)
- 一键部署常用应用
- 应用状态管理

### 系统工具 (Tools)
| 工具 | 说明 |
|------|------|
| 网络管理 | 网络接口配置、主机名、DNS 设置 |
| 时间管理 | 系统时间、时区、NTP 同步 |
| 定时任务 | Cron 计划任务管理 |
| 用户管理 | 系统用户与用户组管理 |
| 进程管理 | 进程查看与终止 |
| 命令行终端 | 远程 Shell 命令执行 |
| 防火墙管理 | iptables / firewalld / ufw 规则管理 |
| 软件仓库 | 系统软件源配置 |
| SSL 证书 | 证书申请、续期、管理 |
| 磁盘管理 | 磁盘分区与挂载信息 |

### 设置 (Settings)
- 连接管理与切换
- 客户端偏好设置

---

## 安装

### 要求

- Python >= 3.6
- Tkinter 支持

> **注意：** Windows 和 macOS 的 Python 官方安装包已自带 Tkinter，无需额外操作。  
> Linux 用户需要手动安装 tkinter：

| 系统 | 安装命令 |
|------|----------|
| Debian / Ubuntu | `sudo apt install python3-tk` |
| RHEL / CentOS / Fedora | `sudo dnf install python3-tkinter` |
| Arch Linux | `sudo pacman -S tk` |
| Alpine | `sudo apk add python3-tkinter` |

安装后可验证：

```bash
python3 -c "import tkinter; print('tkinter OK')"
```

### 通过 pip 安装

```bash
pip install inpanel-client
```

安装完成后通过命令行启动：

```bash
inpanel-client
```

### 通过源码安装

```bash
git clone https://github.com/inpanel/inpanel-client.git
cd inpanel-client
pip install .
```

---

## 卸载

```bash
pip uninstall inpanel-client
```

---

## 开发说明

### 克隆项目

```bash
git clone https://github.com/inpanel/inpanel-client.git
cd inpanel-client
```

### 安装开发依赖

```bash
pip install -e .
```

### 项目结构

```
inpanel-client/
├── inpanel_client/              # 主包目录
│   ├── __init__.py              # 包入口
│   ├── app.py                   # 程序入口，main() 函数
│   ├── inpanel.py               # 主界面框架、侧边栏导航与连接管理
│   ├── api.py                   # InPanel HTTP API 客户端封装
│   ├── init.py                  # 数据库初始化窗口
│   ├── menu.py                  # 菜单栏
│   ├── settings.py              # 设置模块
│   ├── win.py                   # 通用窗口组件（启动屏幕、编辑窗口等）
│   ├── utils/                   # 工具模块
│   │   ├── connection_config.py # 连接配置管理（JSON 存储）
│   │   ├── dbcontent.py         # 数据库内容操作
│   │   ├── functions.py         # 通用函数（窗口居中、排序、弹窗基类）
│   │   ├── global_variable.py   # 全局变量管理
│   │   └── sqlite_helper.py     # SQLite 数据库助手
│   ├── data/                    # 数据文件
│   │   ├── config.ini           # 配置文件
│   │   ├── connection.json      # 连接配置
│   │   ├── database.db          # SQLite 数据库
│   │   └── image/               # 图片资源
│   └── views/                   # 视图模块
│       ├── common/              # 公共视图（关于、帮助）
│       ├── dashboard/           # 仪表盘
│       ├── service/             # 服务管理
│       ├── file/                # 文件管理（含回收站）
│       ├── database/            # 数据库管理
│       ├── site/                # 站点管理
│       ├── app/                 # 应用管理
│       ├── tools/               # 系统工具（网络/时间/定时任务/用户/进程/终端/防火墙/仓库/SSL/磁盘）
│       └── settings/            # 设置
├── scripts/                     # 构建脚本
│   └── build_package.sh         # pip 包构建脚本
├── resources/                   # 资源文件（应用图标等）
├── test/                        # 测试代码
├── pyproject.toml               # pip 打包配置
├── build.spec                   # PyInstaller 桌面应用打包
├── build.sh                     # 桌面应用构建入口
├── setup.iss / exe.iss          # Inno Setup Windows 安装包
├── InPanel.pkgproj              # Packages macOS 安装包
├── requirements.txt             # 依赖声明
└── LICENSE                      # MIT 开源协议
```

### 构建 pip 包

```bash
# 构建 sdist + wheel
./scripts/build_package.sh

# 仅构建 sdist
./scripts/build_package.sh sdist

# 仅构建 wheel
./scripts/build_package.sh wheel

# 构建并上传到 PyPI
./scripts/build_package.sh upload

# 构建并上传到 Test PyPI
./scripts/build_package.sh test
```

### 构建桌面应用

```bash
# macOS / Linux 桌面应用
pyinstaller build.spec
```

---

## 开发者

**Jackson Dou** — [jksdou@qq.com](mailto:jksdou@qq.com)

- 项目主页：[https://inpanel.org](https://inpanel.org)
- 源码仓库：[https://github.com/inpanel/inpanel-client](https://github.com/inpanel/inpanel-client)
- 问题反馈：[https://github.com/inpanel/inpanel-client/issues](https://github.com/inpanel/inpanel-client/issues)

---

## 协议

本项目基于 [MIT License](LICENSE) 开源发布。

Copyright © 2017 - 2026 Jackson Dou
