userver: pytest_userver.dynconf.DynamicConfig Class Reference
Loading...
Searching...
No Matches
pytest_userver.dynconf.DynamicConfig Class Reference

Detailed Description

Simple dynamic config backend.

See also
dynamic_config

Definition at line 266 of file dynconf.py.

Public Member Functions

None __init__ (self, *, ConfigValuesDict initial_values, Optional[ConfigValuesDict] defaults, Iterable[str] config_cache_components, caches.InvalidationState cache_invalidation_state, _Changelog changelog)
 
None set_values (self, ConfigValuesDict values)
 
None set_values_unsafe (self, ConfigValuesDict values)
 
None set (self, **values)
 
None switch_to_static_default (self, *str keys)
 
None switch_to_dynamic_value (self, *str keys)
 
ConfigValuesDict get_values_unsafe (self)
 
Set[str] get_kill_switches_disabled_unsafe (self)
 
Any get (self, str key, Any default=None)
 
None remove_values (self, Iterable[str] keys)
 
None remove (self, str key)
 
Any modify (self, str key)
 
Tuple[Any,...] modify_many (self, *Tuple[str,...] keys)
 

Protected Member Functions

None _sync_with_service (self)
 

Protected Attributes

 _values = initial_values.copy()
 
None _kill_switches_disabled = set()
 
 _defaults = defaults
 
 _cache_invalidation_state = cache_invalidation_state
 
 _config_cache_components = config_cache_components
 
 _changelog = changelog
 

Constructor & Destructor Documentation

◆ __init__()

None pytest_userver.dynconf.DynamicConfig.__init__ ( self,
* ,
ConfigValuesDict initial_values,
Optional[ConfigValuesDict] defaults,
Iterable[str] config_cache_components,
caches.InvalidationState cache_invalidation_state,
_Changelog changelog )

Definition at line 273 of file dynconf.py.

Member Function Documentation

◆ _sync_with_service()

None pytest_userver.dynconf.DynamicConfig._sync_with_service ( self)
protected

Definition at line 377 of file dynconf.py.

◆ get()

Any pytest_userver.dynconf.DynamicConfig.get ( self,
str key,
Any default = None )

Definition at line 330 of file dynconf.py.

◆ get_kill_switches_disabled_unsafe()

Set[str] pytest_userver.dynconf.DynamicConfig.get_kill_switches_disabled_unsafe ( self)

Definition at line 327 of file dynconf.py.

◆ get_values_unsafe()

ConfigValuesDict pytest_userver.dynconf.DynamicConfig.get_values_unsafe ( self)

Definition at line 324 of file dynconf.py.

◆ modify()

Any pytest_userver.dynconf.DynamicConfig.modify ( self,
str key )

Definition at line 363 of file dynconf.py.

◆ modify_many()

Tuple[Any, ...] pytest_userver.dynconf.DynamicConfig.modify_many ( self,
*Tuple[str, ...] keys )

Definition at line 369 of file dynconf.py.

◆ remove()

None pytest_userver.dynconf.DynamicConfig.remove ( self,
str key )

Definition at line 359 of file dynconf.py.

◆ remove_values()

None pytest_userver.dynconf.DynamicConfig.remove_values ( self,
Iterable[str] keys )

Definition at line 346 of file dynconf.py.

◆ set()

None pytest_userver.dynconf.DynamicConfig.set ( self,
** values )

Definition at line 303 of file dynconf.py.

◆ set_values()

None pytest_userver.dynconf.DynamicConfig.set_values ( self,
ConfigValuesDict values )

Definition at line 291 of file dynconf.py.

◆ set_values_unsafe()

None pytest_userver.dynconf.DynamicConfig.set_values_unsafe ( self,
ConfigValuesDict values )

Definition at line 294 of file dynconf.py.

◆ switch_to_dynamic_value()

None pytest_userver.dynconf.DynamicConfig.switch_to_dynamic_value ( self,
*str keys )

Definition at line 316 of file dynconf.py.

◆ switch_to_static_default()

None pytest_userver.dynconf.DynamicConfig.switch_to_static_default ( self,
*str keys )

Definition at line 306 of file dynconf.py.

Member Data Documentation

◆ _cache_invalidation_state

pytest_userver.dynconf.DynamicConfig._cache_invalidation_state = cache_invalidation_state
protected

Definition at line 287 of file dynconf.py.

◆ _changelog

pytest_userver.dynconf.DynamicConfig._changelog = changelog
protected

Definition at line 289 of file dynconf.py.

◆ _config_cache_components

pytest_userver.dynconf.DynamicConfig._config_cache_components = config_cache_components
protected

Definition at line 288 of file dynconf.py.

◆ _defaults

pytest_userver.dynconf.DynamicConfig._defaults = defaults
protected

Definition at line 286 of file dynconf.py.

◆ _kill_switches_disabled

None pytest_userver.dynconf.DynamicConfig._kill_switches_disabled = set()
protected

Definition at line 283 of file dynconf.py.

◆ _values

pytest_userver.dynconf.DynamicConfig._values = initial_values.copy()
protected

Definition at line 282 of file dynconf.py.


The documentation for this class was generated from the following file: