CfgStack
========
CfgStack is a configfile system reader. System? Yeah. In reading
and parsing one file, CfgStack can be directed to go read other files
and to incorporate their contents into the growing dataset.
::
CfgStack ("somefile")
Attempts to load the named file as JSON/YAML/TOML with default
extensions of json/yaml/yml/toml (can be over-ridden). The loaded
object must be a dictionary. The "data" member of the resulting
object is an addict Dict of the loaded dataset. So far so simple.
::
_include_:
- file1
- file2
_default_:
zero: 0
one: 1
foo:
this: that
zero: null
var: value
bar:
_default_:
inner: inside_bar
inside:
oh: boy
yep: really
baz:
_include_:
- file3
A few things going on here:
- "_include_" keys are assumed to list additional data files which
will be loaded and their contents merged with the dictionary at the
same level. If multiple files are listed, they will be applied in
order from the top down. Files are searched for in the CWD or
optionally in a list of passed paths.
- "_default_" keys provide default key:value pairs for all
dictionary values at the current level
Note that all includes are applied first, then all defaults. Higher
level values override lower level values, across both includes and
defaults (includes first) and both for contents and data-type.
Raw data
{
"_id": null,
"home_page": "https://github.com/clearclaw/cfgstack",
"name": "cfgstack",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "configfile, file stacks, reference trees",
"author": "J C Lawrence",
"author_email": "claw@kanga.nu",
"download_url": "https://files.pythonhosted.org/packages/10/85/7c6f0573b728558de256d815fb4d613ad6e64da80d9865ee617f7a09c2be/cfgstack-0.2.post2.tar.gz",
"platform": null,
"description": "CfgStack\n========\n\nCfgStack is a configfile system reader. System? Yeah. In reading\nand parsing one file, CfgStack can be directed to go read other files\nand to incorporate their contents into the growing dataset.\n\n::\n\n CfgStack (\"somefile\")\n \nAttempts to load the named file as JSON/YAML/TOML with default\nextensions of json/yaml/yml/toml (can be over-ridden). The loaded\nobject must be a dictionary. The \"data\" member of the resulting\nobject is an addict Dict of the loaded dataset. So far so simple.\n\n::\n\n _include_:\n - file1\n - file2\n _default_:\n zero: 0\n one: 1\n foo:\n this: that\n zero: null\n var: value\n bar:\n _default_:\n inner: inside_bar\n inside: \n oh: boy\n yep: really\n baz:\n _include_:\n - file3\n\nA few things going on here:\n\n- \"_include_\" keys are assumed to list additional data files which\n will be loaded and their contents merged with the dictionary at the\n same level. If multiple files are listed, they will be applied in\n order from the top down. Files are searched for in the CWD or\n optionally in a list of passed paths.\n\n- \"_default_\" keys provide default key:value pairs for all\n dictionary values at the current level\n \nNote that all includes are applied first, then all defaults. Higher\nlevel values override lower level values, across both includes and\ndefaults (includes first) and both for contents and data-type. \n",
"bugtrack_url": null,
"license": "GPL-3.0-only",
"summary": "Load stacks of JSON, TOML or YAML data",
"version": "0.2.post2",
"project_urls": {
"Homepage": "https://github.com/clearclaw/cfgstack",
"Repository": "https://github.com/clearclaw/cfgstack"
},
"split_keywords": [
"configfile",
" file stacks",
" reference trees"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "32e61ae93b0124844721e55e76d9158dc69406efbbc63c6c3beb8a9bbe4d8e21",
"md5": "73dd4b418ff9c7b92aeee310605fcc5c",
"sha256": "5c549c1b0707ae954f0339190eef23fd8080081463aeb79380648492af4b3195"
},
"downloads": -1,
"filename": "cfgstack-0.2.post2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "73dd4b418ff9c7b92aeee310605fcc5c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 6636,
"upload_time": "2024-07-22T02:10:23",
"upload_time_iso_8601": "2024-07-22T02:10:23.924671Z",
"url": "https://files.pythonhosted.org/packages/32/e6/1ae93b0124844721e55e76d9158dc69406efbbc63c6c3beb8a9bbe4d8e21/cfgstack-0.2.post2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "10857c6f0573b728558de256d815fb4d613ad6e64da80d9865ee617f7a09c2be",
"md5": "781ec5fd727938173fd4b119e44be6d0",
"sha256": "45f274ab517fa5d983a81a6dfc26ba2070fcc2ca8c4e7ce5e129e06980f22d5a"
},
"downloads": -1,
"filename": "cfgstack-0.2.post2.tar.gz",
"has_sig": false,
"md5_digest": "781ec5fd727938173fd4b119e44be6d0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 6149,
"upload_time": "2024-07-22T02:10:25",
"upload_time_iso_8601": "2024-07-22T02:10:25.253922Z",
"url": "https://files.pythonhosted.org/packages/10/85/7c6f0573b728558de256d815fb4d613ad6e64da80d9865ee617f7a09c2be/cfgstack-0.2.post2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-22 02:10:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "clearclaw",
"github_project": "cfgstack",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "cfgstack"
}