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', 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'))

Metadata

Release files for ablerConfig 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ablerConfig 0.1.2
File Size Uploaded Provenance
ablerConfig-0.1.2.tar.gz 5.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ablerConfig 0.1.2
File Interpreter ABI Platform
ablerConfig-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / ablerConfig-0.1.2.tar.gz

Download URL ablerConfig-0.1.2.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
30b6c5e1d294d17bd237f1b2e85dbd71e8d20c5fe15025f82eddb5c739c69000
BLAKE2b-256 checksum
How to use checksums
208a5fba15b6b9746d604325952205b753408569d562d5d808517dfcc850bbb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / ablerConfig-0.1.2-py3-none-any.whl

Download URL ablerConfig-0.1.2-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c581959f270f6396f71821c18faecf48357b16f8f55d1a73e1dd5715c1493247
BLAKE2b-256 checksum
How to use checksums
c2ddadf1d806e7d172489b44f8b92b18ddf88f17b446bdfa529ebaa365568fd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Security for ablerConfig 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page