# bole
Cascading configuration manager and logger for python (yaml, json)
###### Why bole?
Bole = "trunk of a tree" = "log" :)
# BETA
Bole is a python configuration manager that has,
1. Loads configurations from `yaml, json`
2. Allows inheritance - child folder can load config from parent folder.
3. Allows imports - allows specifying config loading paths (and globs)
4. Has an easy to use cli.
# Install
Just install the pip [package](https://pypi.org/project/bole/),
```shell
pip install bole
```
# Configuration
## Example
```yaml
settings:
inherit: True # If true, allow inherit parent folders.
environments:
test:
my_value: 22
dev:
my_value: 42
my_value: 0
some_col:
a:
- b: 0
```
To view this configuration just run (in the config folder),
```shell
bole config view
```
To get the result of `my_value`, run,
```shell
bole config get my_value # or
bole config get some_col.a[0].b
```
## Built in keywords and structures.
The following keywords are reserved (default values presented)
```yaml
settings:
inherit: False # If true, allow inherit parent folders.
inherit_siblings: True # If true allow inherit configuration files in the same source directory.
allow_imports: True # If false dose not allow imports.
use_deep_merge: True # Merge configurations via deep merge. If false, Only root keys are merged (and overwritten)
concatenate_lists: True # When merging, append the merged list to the current one.
imports:
- "**/*.config.yaml" # Recursively import all .config.yaml
- path: my-config.yaml
required: False # this item is not required.
recursive: null # Applies if glob. Import recursively.
environments:
[env name]:{ config overrides (any) }
```
## Example configuration
Example configuration with inheritance can be found in [tests](tests/test_files/root).
# Contribution
Feel free to ping me in issues or directly on LinkedIn to contribute.
# Future implementation
We plan to support multiple python version per environment.
Looking for help on this subject.
# Licence
Copyright ©
`Zav Shotan`, `Patrick Huber`, and other [contributors](graphs/contributors).
It is free software, released under the MIT licence, and may be redistributed under the terms specified in `LICENSE`.
Raw data
{
"_id": null,
"home_page": "https://github.com/LamaAni/bole",
"name": "bole",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "configuration config log yaml json",
"author": "Zav Shotan",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/ef/07/aab81c9b1cdd990f75b11229bafc7fb03bed58c0aee99dc07f40c39398d0/bole-0.0.13.tar.gz",
"platform": null,
"description": "# bole\nCascading configuration manager and logger for python (yaml, json)\n\n###### Why bole?\nBole = \"trunk of a tree\" = \"log\" :)\n\n# BETA\n\nBole is a python configuration manager that has,\n1. Loads configurations from `yaml, json`\n2. Allows inheritance - child folder can load config from parent folder.\n3. Allows imports - allows specifying config loading paths (and globs)\n4. Has an easy to use cli.\n\n# Install\n\nJust install the pip [package](https://pypi.org/project/bole/),\n\n```shell\npip install bole\n```\n\n# Configuration\n\n## Example\n\n```yaml\nsettings:\n inherit: True # If true, allow inherit parent folders.\nenvironments:\n test:\n my_value: 22\n dev: \n my_value: 42\n\nmy_value: 0\nsome_col:\n a: \n - b: 0\n```\n\nTo view this configuration just run (in the config folder),\n```shell\nbole config view\n```\n\nTo get the result of `my_value`, run,\n```shell\nbole config get my_value # or\nbole config get some_col.a[0].b\n```\n\n## Built in keywords and structures.\n\nThe following keywords are reserved (default values presented)\n\n```yaml\nsettings:\n inherit: False # If true, allow inherit parent folders.\n inherit_siblings: True # If true allow inherit configuration files in the same source directory.\n allow_imports: True # If false dose not allow imports.\n use_deep_merge: True # Merge configurations via deep merge. If false, Only root keys are merged (and overwritten)\n concatenate_lists: True # When merging, append the merged list to the current one.\nimports:\n - \"**/*.config.yaml\" # Recursively import all .config.yaml\n - path: my-config.yaml\n required: False # this item is not required.\n recursive: null # Applies if glob. Import recursively.\nenvironments:\n [env name]:{ config overrides (any) }\n\n```\n\n## Example configuration\n\nExample configuration with inheritance can be found in [tests](tests/test_files/root).\n\n# Contribution\n\nFeel free to ping me in issues or directly on LinkedIn to contribute.\n\n# Future implementation\n\nWe plan to support multiple python version per environment.\n\nLooking for help on this subject.\n\n# Licence\n\nCopyright \u00a9\n`Zav Shotan`, `Patrick Huber`, and other [contributors](graphs/contributors).\nIt is free software, released under the MIT licence, and may be redistributed under the terms specified in `LICENSE`.\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Cascading configuration manager and logger for python (yaml, json)",
"version": "0.0.13",
"project_urls": {
"Homepage": "https://github.com/LamaAni/bole",
"Source": "https://github.com/LamaAni/bole"
},
"split_keywords": [
"configuration",
"config",
"log",
"yaml",
"json"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c4584fe697c750c96387b0edf34084de2ea33fd63611056a442e4315b0435a7b",
"md5": "f24ded1c5207f858468694de4ff643c0",
"sha256": "87bbaa4e03b32d63be5058b8de3009f66a9a581111ba0f07039134db7f0c6d69"
},
"downloads": -1,
"filename": "bole-0.0.13-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f24ded1c5207f858468694de4ff643c0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 18315,
"upload_time": "2022-07-12T21:04:57",
"upload_time_iso_8601": "2022-07-12T21:04:57.059248Z",
"url": "https://files.pythonhosted.org/packages/c4/58/4fe697c750c96387b0edf34084de2ea33fd63611056a442e4315b0435a7b/bole-0.0.13-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ef07aab81c9b1cdd990f75b11229bafc7fb03bed58c0aee99dc07f40c39398d0",
"md5": "8ac0d1daa6162adc51ca4baf4051aac7",
"sha256": "13f679884ccb67aab2a081880e8f2bfaae30e75034d0aaa1705e7627abfa7c6a"
},
"downloads": -1,
"filename": "bole-0.0.13.tar.gz",
"has_sig": false,
"md5_digest": "8ac0d1daa6162adc51ca4baf4051aac7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15911,
"upload_time": "2022-07-12T21:04:58",
"upload_time_iso_8601": "2022-07-12T21:04:58.476679Z",
"url": "https://files.pythonhosted.org/packages/ef/07/aab81c9b1cdd990f75b11229bafc7fb03bed58c0aee99dc07f40c39398d0/bole-0.0.13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-07-12 21:04:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "LamaAni",
"github_project": "bole",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "click",
"specs": [
[
"==",
"8.1.3"
]
]
},
{
"name": "pyyaml",
"specs": [
[
"==",
"6.0"
]
]
}
],
"lcname": "bole"
}