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.1.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.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buttons_and_dials-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 e0754bd0bbbad408c022ef7b09b660dfcf019f6ee199f483607fe658e07dd4e6
MD5 51c89686fa05dba92ceb254a188c4b63
BLAKE2b-256 a95cc9901227321cba0f06f4243f758cb8ffa2461dd2ef240d9152dd46a5dbbc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: buttons_and_dials-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e87a1e62a35151fddedf7825188662927c0f185ce02329fa48e3789ce4e11ad
MD5 6a31df4ff2a55cd655bde92af51d554b
BLAKE2b-256 8b8a63f3c831e01ba3321b2924ce7eab3d5ae89cec99960da699198e220cb1c2

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