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.3.tar.gz (2.7 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.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buttons_and_dials-0.1.3.tar.gz
  • Upload date:
  • Size: 2.7 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.3.tar.gz
Algorithm Hash digest
SHA256 cd8aefac96a513ceef8869e0375de55d3d9e3bbe91d12c6dfdb99e749cb0dba9
MD5 f09853313ecbf2f929283c6d93573275
BLAKE2b-256 18748ef510f8e644e0db90f222c814ef224681bccbdf10e770110be0cb3d4651

See more details on using hashes here.

File details

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

File metadata

  • Download URL: buttons_and_dials-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3b5bc66ef0f760b9e22e327acb5ac5479918373695e0024026567e77694ad435
MD5 55895a5af0e948883c42c0bc52ddff29
BLAKE2b-256 24ffe6a741417ee7897167cf435c97876d7c892654836efacbc367a5ca913b67

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