Warning: Bocadillo is now UNMAINTAINED. Users are recommended to migrate to a supported alternative, such as Starlette or FastAPI. Please see #344 for more information.




A lazy proxy for application settings.

Once configured, an instance of this class can be used to access settings from anywhere in the application code base.

Such an instance is in fact exposed as bocadillo.settings.

Settings can be accessed using:

  • Dot notation: settings.FOO.
  • The getattr builtin: getattr(settings, "FOO").
  • The dict-like .get() method: settings.get("FOO", "foo").