Name | C41811.Config JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | A useful config module. |
upload_time | 2024-12-19 09:43:02 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | MIT License Copyright (c) 2024 C418____11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
config
yaml
toml
json
|
VCS |
|
bugtrack_url |
|
requirements |
pydantic
wrapt
pyrsistent
tox
PyYAML
ruamel.yaml
toml
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# C41811.Config
[English](README_EN.md) | 中文
---
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/c41811.config.svg)](https://pypi.python.org/pypi/C41811.Config/)
[![PyPI - License](https://img.shields.io/pypi/l/C41811.Config?color=blue)](https://github.com/C418-11/C41811_Config/blob/main/LICENSE)
| 文档 | [![Documentation Status](https://readthedocs.org/projects/c41811config/badge/?version=latest)](https://C41811Config.readthedocs.io) [![made-with-sphinx-doc](https://img.shields.io/badge/Made%20with-Sphinx-1f425f.svg)](https://www.sphinx-doc.org/) |
|:----:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| PyPI | [![PyPI - Version](https://img.shields.io/pypi/v/C41811.Config)](https://pypi.python.org/pypi/C41811.Config/) [![PyPI - Wheel](https://img.shields.io/pypi/wheel/C41811.Config)](https://pypi.python.org/pypi/C41811.Config/) [![PyPI download month](https://img.shields.io/pypi/dm/c41811.config.svg)](https://pypi.python.org/pypi/C41811.Config/) |
| 源码 | [![Static Badge](https://img.shields.io/badge/Github-C41811.Config-green?logo=github)](https://github.com/C418-11/C41811_Config/) [![Python CI](https://github.com/C418-11/C41811_Config/actions/workflows/python-ci.yml/badge.svg?branch=develop)](https://github.com/C418-11/C41811_Config/actions/workflows/python-ci.yml) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/C418-11/C41811_Config/python-publish.yml)](https://github.com/C418-11/C41811_Config/actions/workflows/python-publish.yml) |
## 简介
C41811.Config 是一个功能强大且易于使用的配置管理包,旨在简化配置文件的读取和写入操作。它支持多种流行的配置格式,
包括 JSON、YAML、TOML 和 Pickle,满足不同项目的需求。通过模块化的设计,C41811.Config 提供了可靠的配置处理解决方案,
帮助开发者快速构建和维护高质量的应用程序。
## 安装
```commandline
pip install C41811.Config
```
## 一个简单的示例
```python
from C41811.Config import JsonSL
from C41811.Config import requireConfig
from C41811.Config import saveAll
JsonSL().register_to()
cfg = requireConfig(
'', "Hello World.json",
{
"Hello": "World",
"foo": dict, # 包含foo下的所有键
"foo\\.bar": { # foo.bar仅包含baz键
"baz": "qux"
}
}
).check()
saveAll()
print(cfg)
print()
print(f"{cfg["Hello"]=}")
print(cfg.foo)
print(cfg["foo"]["bar"])
print(cfg.foo.bar.baz)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "C41811.Config",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "config, yaml, toml, json",
"author": null,
"author_email": "C418____11 <553515788@qq.com>",
"download_url": "https://files.pythonhosted.org/packages/3b/11/4abca296f4a2c5791a7485968430ce3ad3ae2e023d6199d3bc0dc7cda232/c41811_config-0.1.2.tar.gz",
"platform": null,
"description": "# C41811.Config\n\n[English](README_EN.md) | \u4e2d\u6587\n\n---\n\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/c41811.config.svg)](https://pypi.python.org/pypi/C41811.Config/)\n[![PyPI - License](https://img.shields.io/pypi/l/C41811.Config?color=blue)](https://github.com/C418-11/C41811_Config/blob/main/LICENSE)\n\n| \u6587\u6863 | [![Documentation Status](https://readthedocs.org/projects/c41811config/badge/?version=latest)](https://C41811Config.readthedocs.io) [![made-with-sphinx-doc](https://img.shields.io/badge/Made%20with-Sphinx-1f425f.svg)](https://www.sphinx-doc.org/) |\n|:----:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n| PyPI | [![PyPI - Version](https://img.shields.io/pypi/v/C41811.Config)](https://pypi.python.org/pypi/C41811.Config/) [![PyPI - Wheel](https://img.shields.io/pypi/wheel/C41811.Config)](https://pypi.python.org/pypi/C41811.Config/) [![PyPI download month](https://img.shields.io/pypi/dm/c41811.config.svg)](https://pypi.python.org/pypi/C41811.Config/) |\n| \u6e90\u7801 | [![Static Badge](https://img.shields.io/badge/Github-C41811.Config-green?logo=github)](https://github.com/C418-11/C41811_Config/) [![Python CI](https://github.com/C418-11/C41811_Config/actions/workflows/python-ci.yml/badge.svg?branch=develop)](https://github.com/C418-11/C41811_Config/actions/workflows/python-ci.yml) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/C418-11/C41811_Config/python-publish.yml)](https://github.com/C418-11/C41811_Config/actions/workflows/python-publish.yml) |\n\n## \u7b80\u4ecb\n\nC41811.Config \u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u4e14\u6613\u4e8e\u4f7f\u7528\u7684\u914d\u7f6e\u7ba1\u7406\u5305\uff0c\u65e8\u5728\u7b80\u5316\u914d\u7f6e\u6587\u4ef6\u7684\u8bfb\u53d6\u548c\u5199\u5165\u64cd\u4f5c\u3002\u5b83\u652f\u6301\u591a\u79cd\u6d41\u884c\u7684\u914d\u7f6e\u683c\u5f0f\uff0c\n\u5305\u62ec JSON\u3001YAML\u3001TOML \u548c Pickle\uff0c\u6ee1\u8db3\u4e0d\u540c\u9879\u76ee\u7684\u9700\u6c42\u3002\u901a\u8fc7\u6a21\u5757\u5316\u7684\u8bbe\u8ba1\uff0cC41811.Config \u63d0\u4f9b\u4e86\u53ef\u9760\u7684\u914d\u7f6e\u5904\u7406\u89e3\u51b3\u65b9\u6848\uff0c\n\u5e2e\u52a9\u5f00\u53d1\u8005\u5feb\u901f\u6784\u5efa\u548c\u7ef4\u62a4\u9ad8\u8d28\u91cf\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\n\n## \u5b89\u88c5\n\n```commandline\npip install C41811.Config\n```\n\n## \u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\n\n```python\nfrom C41811.Config import JsonSL\nfrom C41811.Config import requireConfig\nfrom C41811.Config import saveAll\n\nJsonSL().register_to()\n\ncfg = requireConfig(\n '', \"Hello World.json\",\n {\n \"Hello\": \"World\",\n \"foo\": dict, # \u5305\u542bfoo\u4e0b\u7684\u6240\u6709\u952e\n \"foo\\\\.bar\": { # foo.bar\u4ec5\u5305\u542bbaz\u952e\n \"baz\": \"qux\"\n }\n }\n).check()\nsaveAll()\n\nprint(cfg)\nprint()\nprint(f\"{cfg[\"Hello\"]=}\")\nprint(cfg.foo)\nprint(cfg[\"foo\"][\"bar\"])\nprint(cfg.foo.bar.baz)\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 C418____11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A useful config module.",
"version": "0.1.2",
"project_urls": {
"Bug Tracker": "https://github.com/C418-11/C41811_Config/issues",
"Documentation": "https://C41811Config.readthedocs.io",
"Source Code": "https://github.com/C418-11/C41811_Config"
},
"split_keywords": [
"config",
" yaml",
" toml",
" json"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e2387792549daf8ec43ac78e0fffc5c01896a31904e0b16c647a50eb77d0bc35",
"md5": "23cad3ee7d9a3556c92ca22898db2193",
"sha256": "f4a939c1c3e9e52bd1043c6ca1f3c3707e07e4b4658e5a9c05a60ef9f08b359c"
},
"downloads": -1,
"filename": "C41811.Config-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "23cad3ee7d9a3556c92ca22898db2193",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 32612,
"upload_time": "2024-12-19T09:43:00",
"upload_time_iso_8601": "2024-12-19T09:43:00.181344Z",
"url": "https://files.pythonhosted.org/packages/e2/38/7792549daf8ec43ac78e0fffc5c01896a31904e0b16c647a50eb77d0bc35/C41811.Config-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3b114abca296f4a2c5791a7485968430ce3ad3ae2e023d6199d3bc0dc7cda232",
"md5": "83746447ddc1919420643238bb18ae93",
"sha256": "4c71053fd8809d0e1e428aaa2cde5a46ce45c8b995634d76bab3ea0c0477bed0"
},
"downloads": -1,
"filename": "c41811_config-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "83746447ddc1919420643238bb18ae93",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 23873,
"upload_time": "2024-12-19T09:43:02",
"upload_time_iso_8601": "2024-12-19T09:43:02.821805Z",
"url": "https://files.pythonhosted.org/packages/3b/11/4abca296f4a2c5791a7485968430ce3ad3ae2e023d6199d3bc0dc7cda232/c41811_config-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-19 09:43:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "C418-11",
"github_project": "C41811_Config",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "pydantic",
"specs": [
[
"~=",
"2.10.3"
]
]
},
{
"name": "wrapt",
"specs": [
[
"~=",
"1.17.0"
]
]
},
{
"name": "pyrsistent",
"specs": [
[
"~=",
"0.20.0"
]
]
},
{
"name": "tox",
"specs": [
[
"~=",
"4.23.2"
]
]
},
{
"name": "PyYAML",
"specs": [
[
"~=",
"6.0.2"
]
]
},
{
"name": "ruamel.yaml",
"specs": [
[
"~=",
"0.18.6"
]
]
},
{
"name": "toml",
"specs": [
[
"~=",
"0.10.2"
]
]
}
],
"lcname": "c41811.config"
}