Metadata-Version: 2.4
Name: liwancai-AppsCfg
Version: 1.0.1
Summary: 应用程序配置管理包，提供配置读取、运行时监控和基础配置类
Author: liwancai
Author-email: liwancai <248411282@qq.com>
License: MIT
Project-URL: Homepage, https://github.com/liwancai/liwancai-AppsCfg
Keywords: configuration,app,management,runtime
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: liwancai-PyLog>=1.0.0
Requires-Dist: liwancai-DirsFile>=1.0.0
Requires-Dist: liwancai-PyTools>=1.0.0
Dynamic: author
Dynamic: requires-python

# AppsCfg

应用程序配置管理包，提供配置读取、运行时监控和基础配置类。

**注意**: 包在PyPI上的名称是 `liwancai-AppsCfg`，但导入时使用 `AppsCfg`

## 安装

```bash
pip install liwancai-AppsCfg
```

## 使用

```python
# 导入整个包的所有功能
from AppsCfg import *

# 使用功能示例
AppName, DataPath, config = GetConfig()
cfg = SetCfgBase(AppName, DataPath, config)
```

### 其他导入方式

```python
# 导入特定模块
from AppsCfg import Core

# 导入特定函数
from AppsCfg.Core import SetCfgBase, GetConfig
```

## 功能模块

- **SetCfgBase**: 基础配置类，提供应用程序配置管理功能
- **GetConfig**: 配置获取函数，自动读取和解析配置文件

### SetCfgBase 类

主要功能：
- 应用程序配置管理
- 运行时监控
- 本地IP获取
- 启动/停止时间记录

```python
class SetCfgBase:
    def __init__(self, AppName, DataPath, config):
        # 初始化配置
        
    def update_runtime(self):
        # 更新运行时间
        
    def Start(self):
        # 启动应用程序
        
    def Stop(self):
        # 停止应用程序
        
    def GetLocalIP(self):
        # 获取本地IP地址
```

### GetConfig 函数

```python
def GetConfig(DataPath: str = f"./Apps/{AppName}/Datas/"):
    # 自动获取应用程序配置
    # 返回: AppName, DataPath, config
```

## 依赖包

- `liwancai-PyLog`: 日志管理
- `liwancai-DirsFile`: 文件和目录操作
- `liwancai-PyTools`: 工具函数集合

## 许可证

MIT License
