flask_jsonrpc.conf package

Submodules

flask_jsonrpc.conf.global_settings module

IS_ENV_KEY(key)[source]
Parameters:

key (str)

Return type:

bool

ENV_TO_CONFIG(key)[source]
Parameters:

key (str)

Return type:

str

CONFIG_TO_ENV(key)[source]
Parameters:

key (str)

Return type:

str

Module contents

class LazyObject(*args, **kwargs)[source]

Bases: Protocol

A protocol for lazy objects that defer initialization until accessed.

new_method_proxy(getter)[source]

Create a method proxy that initializes the lazy object on first access.

Parameters:

getter (Callable[..., Any]) – The method to proxy.

Returns:

The proxied method.

Return type:

Callable[…, Any]

class Settings(fallback_settings=None)[source]

Bases: object

Settings object that loads configuration from global settings and allows fallback settings.

If a setting is not found in the global settings, it will look for it in the provided fallback settings.

Parameters:

fallback_settings (MutableMapping[str, Any] | None) – Optional fallback settings.

class LazySettings(*, fallback_settings=None)[source]

Bases: object

A lazy settings object that initializes the settings on first access.

If a setting is not found in the global settings, it will look for it in the provided fallback settings.

Parameters:

fallback_settings (MutableMapping[str, Any] | None) – Optional fallback settings.