cfgstack


Namecfgstack JSON
Version 0.1.post29 PyPI version JSON
download
home_pagehttps://github.com/clearclaw/cfgstack
SummaryLoad stacks of JSON or YAML data
upload_time2022-05-15 06:15:50
maintainer
docs_urlNone
authorJ C Lawrence
requires_python
licenseLGPL v3.0
keywords configfile file stacks reference trees
VCS
bugtrack_url
requirements addict logtool pyyaml setuptools-lint toml
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "configfile,file stacks,reference trees",
    "author": "J C Lawrence",
    "author_email": "claw@kanga.nu",
    "download_url": "https://files.pythonhosted.org/packages/9f/0f/f5569d6e2e743182a045552785b16af26338d201ac743f322aa64eac32d4/cfgstack-0.1.post29.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\n\n",
    "bugtrack_url": null,
    "license": "LGPL v3.0",
    "summary": "Load stacks of JSON or YAML data",
    "version": "0.1.post29",
    "split_keywords": [
        "configfile",
        "file stacks",
        "reference trees"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "9a6e0ee8313fb78f9899427f685f3deb",
                "sha256": "4a9415320b470fd059db667b4d904a7c4cc5b401dddc3a6b9e41fda5c97175f6"
            },
            "downloads": -1,
            "filename": "cfgstack-0.1.post29.tar.gz",
            "has_sig": false,
            "md5_digest": "9a6e0ee8313fb78f9899427f685f3deb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 22574,
            "upload_time": "2022-05-15T06:15:50",
            "upload_time_iso_8601": "2022-05-15T06:15:50.649501Z",
            "url": "https://files.pythonhosted.org/packages/9f/0f/f5569d6e2e743182a045552785b16af26338d201ac743f322aa64eac32d4/cfgstack-0.1.post29.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-05-15 06:15:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "clearclaw",
    "github_project": "cfgstack",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "addict",
            "specs": []
        },
        {
            "name": "logtool",
            "specs": []
        },
        {
            "name": "pyyaml",
            "specs": []
        },
        {
            "name": "setuptools-lint",
            "specs": []
        },
        {
            "name": "toml",
            "specs": []
        }
    ],
    "lcname": "cfgstack"
}
        
Elapsed time: 0.38389s