No project description provided
Project description
buttons_and_dials
Customizable configs for your packages.
Use case
You have your potato software that somewhere within it's contents contains
a file default-potato.toml describing some settings.
Let say you want to enable your users to customize those settings:
- by providing a file
potato-settings.tomlin the CWD. - by providing a toml file pointed by environment variable POTATO_FILE=some/path
- by passing command line arguments to some script
Then you should use buttons_and_dials.
Snippet
In your code, simply define
from buttons_and_dials import ConfigSet
configs = ConfigSet(
set_name='potato-settings',
initial_settings_path='internal/path/default-potato.toml'
check_cwd=True,
argv_prefix='--cfg'
)
And from now on, you can access attributes of configs object and enjoy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters