@@ -782,30 +782,75 @@ def _get_dynamic_config_value(
782782 return res .val ()
783783
784784 def get_bool (self , feature_name : str , default : bool = False ) -> bool :
785+ """Fetch a Dynamic Configuration of boolean type.
786+
787+ :param feature_name: Name of the dynamic config you want a value for.
788+
789+ :param default: what is returned if dynamic config is not active
790+ (:code:`False` unless overriden).
791+
792+ :return: the boolean value of the dyanimc config if it is active/exists, :code:`default` parameter otherwise.
793+ """
785794 decider = self ._get_decider ()
786795 if not decider :
787796 return default
788797 return self ._get_dynamic_config_value (feature_name , decider .get_bool , default )
789798
790799 def get_int (self , feature_name : str , default : int = 0 ) -> int :
800+ """Fetch a Dynamic Configuration of int type.
801+
802+ :param feature_name: Name of the dynamic config you want a value for.
803+
804+ :param default: what is returned if dynamic config is not active
805+ (:code:`0` unless overriden).
806+
807+ :return: the int value of the dyanimc config if it is active/exists, :code:`default` parameter otherwise.
808+ """
791809 decider = self ._get_decider ()
792810 if not decider :
793811 return default
794812 return self ._get_dynamic_config_value (feature_name , decider .get_int , default )
795813
796814 def get_float (self , feature_name : str , default : float = 0.0 ) -> float :
815+ """Fetch a Dynamic Configuration of float type.
816+
817+ :param feature_name: Name of the dynamic config you want a value for.
818+
819+ :param default: what is returned if dynamic config is not active
820+ (:code:`0.0` unless overriden).
821+
822+ :return: the float value of the dyanimc config if it is active/exists, :code:`default` parameter otherwise.
823+ """
797824 decider = self ._get_decider ()
798825 if not decider :
799826 return default
800827 return self ._get_dynamic_config_value (feature_name , decider .get_float , default )
801828
802829 def get_string (self , feature_name : str , default : str = "" ) -> str :
830+ """Fetch a Dynamic Configuration of string type.
831+
832+ :param feature_name: Name of the dynamic config you want a value for.
833+
834+ :param default: what is returned if dynamic config is not active
835+ (:code:`""` unless overriden).
836+
837+ :return: the string value of the dyanimc config if it is active/exists, :code:`default` parameter otherwise.
838+ """
803839 decider = self ._get_decider ()
804840 if not decider :
805841 return default
806842 return self ._get_dynamic_config_value (feature_name , decider .get_string , default )
807843
808844 def get_map (self , feature_name : str , default : Optional [dict ] = None ) -> Optional [dict ]:
845+ """Fetch a Dynamic Configuration of map type.
846+
847+ :param feature_name: Name of the dynamic config you want a value for.
848+
849+ :param default: what is returned if dynamic config is not active
850+ (:code:`None` unless overriden).
851+
852+ :return: the map value of the dyanimc config if it is active/exists, :code:`default` parameter otherwise.
853+ """
809854 decider = self ._get_decider ()
810855 if not decider :
811856 return default
0 commit comments