pyyaml-include:yaml包括其他yaml

时间:2024-05-28 07:28:07
【文件属性】:

文件名称:pyyaml-include:yaml包括其他yaml

文件大小:49KB

文件格式:ZIP

更新时间:2024-05-28 07:28:07

yaml pyyaml Python

pyyaml包括 的扩展构造函数:将文件包含到文档中。 安装 pip install pyyaml-include 用法 考虑我们有这样的YAML文件: ├── 0.yml └── include.d ├── 1.yml └── 2.yml 1.yml的内容: name : " 1 " 2.yml的内容: name : " 2 " 要在0.yml包含1.yml和2.yml ,我们应将YamlIncludeConstructor添加到PyYAML的加载器中,然后在0.yaml添加!include标记: import yaml from yamlinclude import YamlIncludeConstructor YamlIncludeConstructor . add_to_loader_class ( loader_class = yaml . Full


【文件预览】:
pyyaml-include-master
----bandit.yml(121B)
----.coveragerc(19B)
----AUTHORS.md(183B)
----pyproject.toml(275B)
----docs()
--------yamlinclude.version.rst(145B)
--------AUTHORS.md(13B)
--------conf.py(6KB)
--------yamlinclude.readers.rst(145B)
--------make.bat(782B)
--------modules.rst(70B)
--------yamlinclude.constructor.rst(157B)
--------requirements.txt(40B)
--------CHANGELOG.md(15B)
--------Makefile(611B)
--------yamlinclude.rst(267B)
--------README.md(12B)
--------index.rst(597B)
----environment.yml(255B)
----.pylintrc(18KB)
----pytest.ini(29B)
----.pep8(29B)
----.github()
--------workflows()
----tests()
--------data()
--------test_multi.py(942B)
--------_internel.py(1KB)
--------__init__.py(0B)
--------test_loader.py(11KB)
--------test_custome_reader.py(2KB)
--------test_base_dir.py(4KB)
----LICENSE(34KB)
----requires()
--------dist.txt(6B)
--------dev.txt(45B)
----src()
--------yamlinclude()
----setup.cfg(1KB)
----setup.py(85B)
----.gitignore(11KB)
----CHANGELOG.md(1KB)
----readthedocs.yml(235B)
----README.md(4KB)
----.flake8(118B)

网友评论