quantlab.acquisition.registry.is_configured#
- quantlab.acquisition.registry.is_configured(descriptor)[source]#
Return whether every credential variable the source names is set.
Answers
Falserather than raising on an unconfigured machine, and never turns a credential value into anything but this boolean. A variable set to the empty string counts as unset, which matches the check the vendor clients apply when they are constructed.- Parameters:
- descriptorSourceDescriptor
The source to check.
- Returns:
- bool
True if every name in
descriptor.required_envis set and non-empty.
Examples
With
TIINGO_API_KEYunset in the environment:>>> from quantlab.acquisition.base import DataSourceRegistry >>> from quantlab.acquisition.registry import is_configured >>> is_configured(DataSourceRegistry.get("tiingo")) False