Skip to main content

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.toml in 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.

Release files for buttons-and-dials 0.1.5

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

Source distribution (sdist)

Source distribution for buttons-and-dials 0.1.5
File Size Uploaded
buttons_and_dials-0.1.5.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for buttons-and-dials 0.1.5
File Interpreter ABI Platform
buttons_and_dials-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / buttons_and_dials-0.1.5.tar.gz

Download URL buttons_and_dials-0.1.5.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
97b8501916374e87b91c7c8dd59fcded6e77e56458b7aa8ba7dd56ea1f41fcf8
BLAKE2b-256 checksum
How to use checksums
ec64bbf6676786831eefbac0e07dc7cc2539b830d94aa4b2e8aa74129a861bed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.7 Darwin/21.6.0

Release files / buttons_and_dials-0.1.5-py3-none-any.whl

Download URL buttons_and_dials-0.1.5-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66bae5729693938925c542881394c4d776f35940db1cb2c05c4c0567069efea6
BLAKE2b-256 checksum
How to use checksums
283939c5ecc7e9348292a0a5fa9b7f7190ca49a42db44ac257da0d0d27a95558
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.7 Darwin/21.6.0

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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