Skip to main content

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,

pip install bole

Configuration

Example

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),

bole config view

To get the result of my_value, run,

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)

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.

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. It is free software, released under the MIT licence, and may be redistributed under the terms specified in LICENSE.

Release files for bole 0.0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bole 0.0.13
File Size Uploaded
bole-0.0.13.tar.gz 15.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bole 0.0.13
File Interpreter ABI Platform
bole-0.0.13-py3-none-any.whl Python 3 none any Details

Total release size: 34.2 kB

Release files / bole-0.0.13.tar.gz

Download URL bole-0.0.13.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
13f679884ccb67aab2a081880e8f2bfaae30e75034d0aaa1705e7627abfa7c6a
BLAKE2b-256 checksum
How to use checksums
ef07aab81c9b1cdd990f75b11229bafc7fb03bed58c0aee99dc07f40c39398d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / bole-0.0.13-py3-none-any.whl

Download URL bole-0.0.13-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87bbaa4e03b32d63be5058b8de3009f66a9a581111ba0f07039134db7f0c6d69
BLAKE2b-256 checksum
How to use checksums
c4584fe697c750c96387b0edf34084de2ea33fd63611056a442e4315b0435a7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release history Release notifications | RSS feed

This release

0.0.13 This release

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page