New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

buttons-and-dials

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buttons-and-dials

  • 0.1.3
  • PyPI
  • Socket score

Maintainers
1

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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc