Skip to main content

ablerConfig

简介

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

特点

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

依赖项

  • pyjson5
  • json5

安装

您可以使用pip安装abler_config:

pip install ablerConfig

使用方法

加载配置文件

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

import ablerConfig as config
config.Config(default='my-config', 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'))

Download files

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

Source Distribution

ablerConfig-0.0.8.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

ablerConfig-0.0.8-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file ablerConfig-0.0.8.tar.gz.

File metadata

  • Download URL: ablerConfig-0.0.8.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for ablerConfig-0.0.8.tar.gz
Algorithm Hash digest
SHA256 933e6e92b8944da4d65406e5563fd14fc03d0118a6824fa6c17d48e36e2be055
MD5 80cb1d594a84fd5f81be6997ccf33f4f
BLAKE2b-256 63709151b12df744c3b35db32e9d3c1be1572b3c3e7eab13bc233a58357771cb

See more details on using hashes here.

File details

Details for the file ablerConfig-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: ablerConfig-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for ablerConfig-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 85b11860c5ab13757d69d0565fded19c7ed3f490b2006f1d77df6daf3468d8d3
MD5 63aa994a10ee4197269387625f0f556f
BLAKE2b-256 56b20b8f06d008d01e32e26a35b1cf8229d74700e93cf3122133e0a6f59ee85f

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