Skip to main content

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

Project description

AppsCfg

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

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

安装

pip install liwancai-AppsCfg

使用

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

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

其他导入方式

# 导入特定模块
from AppsCfg import Core

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

功能模块

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

SetCfgBase 类

主要功能:

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

GetConfig 函数

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

依赖包

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

许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liwancai_appscfg-1.0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

liwancai_appscfg-1.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file liwancai_appscfg-1.0.1.tar.gz.

File metadata

  • Download URL: liwancai_appscfg-1.0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for liwancai_appscfg-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fcac2e7853dc3b3bf2c13dfa4145175ec42cda2f35cc3191bda350b47bc83509
MD5 407163396f61880e0142355e29f8f156
BLAKE2b-256 995e0df0bb9bcbe48e6153fb1d29bf18e100cb16885e499250486c96b3f28fc9

See more details on using hashes here.

File details

Details for the file liwancai_appscfg-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for liwancai_appscfg-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 66b54ac6ba11dd8b8acfd82080ef22591993ce8d571ecba4dbcd8c4868bd1173
MD5 c6ba1b79b786fce1b2100c5fa7c5ecb6
BLAKE2b-256 3abf95e63f81eda94ad1a8827ec666f5c7101b471e5c70533e8449fb575c8dd3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page