Catalog PyPI
Back to packageRELEASE DETAILS

0.1.2

PyPI

ablerConfig

配置信息处理包

Published1 May 2023
Direct dependencies2
Transitive dependenciesNot calculated

README

Version 0.1.2 documentation

ablerConfig

简介

这是一个用于处理配置信息的Python包。它可以帮助应用程序读取、写入和验证配置文件。该包暂时只供彭彭项目组自用。

特点

  • 支持JSON5格式的配置文件。
  • 可以验证配置文件的格式和内容。
  • 可以使用默认值填充缺失的配置项。
  • 可以将配置文件转换为Python对象,以便更方便地访问和修改。
  • 支持内部配置文件和本地外部配置文件。

依赖项

  • pyjson5
  • json5

安装

您可以使用pip安装abler_config:

pip install ablerConfig

使用方法

加载配置文件

您可以使用ablerConfig.Config()函数加载配置文件。例如:

import ablerConfig as config
config.Config(default='my-config', local_dir='ex-conf', show_message=my_show_message)

引用配置项

您可以使用ablerConfig.Config.object_of()方法引用配置文件中的配置对象,也可以使用ablerConfig.Config.value_of()方法将引用配置文件中的简单配置项。例如:

from ablerConfig import Config, ConfigNode

conf = Config.object_of('alarm_control.state_send')
addr = tuple(Config.value_of('net_gate.tt_addr'))

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
pyjson5
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.6",
  "evaluation": "NOT_EVALUATED"
}
pyjson5runtime
json5
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.6",
  "evaluation": "NOT_EVALUATED"
}
json5runtime

Distribution files

2 collected
ablerConfig-0.1.2-py3-none-any.whl

bdist_wheel · 5.52 KB · Python py3

Source file
ablerConfig-0.1.2.tar.gz

sdist · 5.36 KB · Python source

Source file

Repository

PENDING
hanlaohan/abler-config

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:28 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:42005d0295ac37d4c5ebe9004d50a2bcce63f92e6d14115bb995df1511972dc1

Other collected versions

View all collected versions →