Skip to main content

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buttons_and_dials-0.1.5.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

buttons_and_dials-0.1.5-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file buttons_and_dials-0.1.5.tar.gz.

File metadata

  • Download URL: buttons_and_dials-0.1.5.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/21.6.0

File hashes

Hashes for buttons_and_dials-0.1.5.tar.gz
Algorithm Hash digest
SHA256 97b8501916374e87b91c7c8dd59fcded6e77e56458b7aa8ba7dd56ea1f41fcf8
MD5 871b6c07a0f2ec4239ab231e5d54168c
BLAKE2b-256 ec64bbf6676786831eefbac0e07dc7cc2539b830d94aa4b2e8aa74129a861bed

See more details on using hashes here.

File details

Details for the file buttons_and_dials-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: buttons_and_dials-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/21.6.0

File hashes

Hashes for buttons_and_dials-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 66bae5729693938925c542881394c4d776f35940db1cb2c05c4c0567069efea6
MD5 576234a37e97db72d7234fabeaaae803
BLAKE2b-256 283939c5ecc7e9348292a0a5fa9b7f7190ca49a42db44ac257da0d0d27a95558

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page