configura


Nameconfigura JSON
Version 0.1 PyPI version JSON
download
home_pagehttps://github.com/bossauh/configura
SummaryConfigura is a Python configuration library that enables you to convert a folder of .json files into an easily accessible configuration folder.
upload_time2023-04-21 04:15:45
maintainer
docs_urlNone
authorPhilippe Mathew
requires_python
licenseMIT
keywords config
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Configura

Configura is a Python configuration library that enables you to convert a folder of .json files into an easily accessible configuration folder.

## Usage

Say you have a folder with the following structure:

```
config_folder /
    main.json
    server.json
    misc.json
```

You can use configura to access those configurations like so:

```python
from configura import config

# Optionally, set your config folder here
# base_path defaults to "./config" so if your folder is named config, you don't have to modify this at all
config.base_path = "./config_folder"

# Print a misc.json as a dictionary
print(config.misc)
...

# Access data inside the misc.json as a dictionary
print(config.misc["model"])
```

# LICENSE

MIT License

Copyright (c) 2023 Philippe Mathew

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 plimitation 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bossauh/configura",
    "name": "configura",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "config",
    "author": "Philippe Mathew",
    "author_email": "philmattdev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/01/9e/d4d62814013e42d34f96fa29cbdb7325275e7a70d9a7c51281b8268d880c/configura-0.1.tar.gz",
    "platform": null,
    "description": "# Configura\r\n\r\nConfigura is a Python configuration library that enables you to convert a folder of .json files into an easily accessible configuration folder.\r\n\r\n## Usage\r\n\r\nSay you have a folder with the following structure:\r\n\r\n```\r\nconfig_folder /\r\n    main.json\r\n    server.json\r\n    misc.json\r\n```\r\n\r\nYou can use configura to access those configurations like so:\r\n\r\n```python\r\nfrom configura import config\r\n\r\n# Optionally, set your config folder here\r\n# base_path defaults to \"./config\" so if your folder is named config, you don't have to modify this at all\r\nconfig.base_path = \"./config_folder\"\r\n\r\n# Print a misc.json as a dictionary\r\nprint(config.misc)\r\n...\r\n\r\n# Access data inside the misc.json as a dictionary\r\nprint(config.misc[\"model\"])\r\n```\r\n\r\n# LICENSE\r\n\r\nMIT License\r\n\r\nCopyright (c) 2023 Philippe Mathew\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without plimitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Configura is a Python configuration library that enables you to convert a folder of .json files into an easily accessible configuration folder.",
    "version": "0.1",
    "split_keywords": [
        "config"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "019ed4d62814013e42d34f96fa29cbdb7325275e7a70d9a7c51281b8268d880c",
                "md5": "3d71a4ab7822714a3caf521b9bde9ef1",
                "sha256": "74fc1a6e346650bfbc987f43e6e73b89e99f6030795346e718b8c1a60081fe9d"
            },
            "downloads": -1,
            "filename": "configura-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3d71a4ab7822714a3caf521b9bde9ef1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3160,
            "upload_time": "2023-04-21T04:15:45",
            "upload_time_iso_8601": "2023-04-21T04:15:45.929706Z",
            "url": "https://files.pythonhosted.org/packages/01/9e/d4d62814013e42d34f96fa29cbdb7325275e7a70d9a7c51281b8268d880c/configura-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-21 04:15:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "bossauh",
    "github_project": "configura",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "configura"
}
        
Elapsed time: 0.07908s