box/box_list.py
def from_toml(
            cls,
            toml_string: str = None,
            filename: Union[str, PathLike] = None,
            key_name: str = "toml",
            encoding: str = "utf-8",
            errors: str = "strict",
            **kwargs,
        ):
            """
            Transforms a toml string or file into a BoxList object

            :param toml_string: string to pass to `toml.load`
            :param filename: filename to open and pass to `toml.load`
            :param key_name: Specify the name of the key to pull the list from
                (cannot directly convert from toml)
            :param encoding: File encoding
            :param errors: How to handle encoding errors
            :param kwargs: parameters to pass to `Box()`
            :return:
            """
            box_args = {}
            for arg in list(kwargs.keys()):
                if arg in BOX_PARAMETERS:
                    box_args[arg] = kwargs.pop(arg)

            data = _from_toml(toml_string=toml_string, filename=filename, encoding=encoding, errors=errors)
            if key_name not in data:
                raise BoxError(f"{key_name} was not found.")
            return cls(data[key_name], **box_args)

            Transforms a toml string or file into a BoxList object

            :param toml_string: string to pass to `toml.load`
            :param filename: filename to open and pass to `toml.load`
            :param key_name: Specify the name of the key to pull the list from
                (cannot directly convert from toml)
            :param encoding: File encoding
            :param errors: How to handle encoding errors
            :param kwargs: parameters to pass to `Box()`
            :return:
            
Transforms a toml string or file into a BoxList object
Transforms a toml string or file into a BoxList object
def from_toml(
            cls,
            toml_string: str = None,
            filename: Union[str, PathLike] = None,
            key_name: str = "toml",
            encoding: str = "utf-8",
            errors: str = "strict",
            **kwargs,
        ):
            box_args = {}
            for arg in list(kwargs.keys()):
                if arg in BOX_PARAMETERS:
                    box_args[arg] = kwargs.pop(arg)
            data = _from_toml(toml_string=toml_string, filename=filename, encoding=encoding, errors=errors)
            if key_name not in data:
                raise BoxError(f"{key_name} was not found.")
            return cls(data[key_name], **box_args)
def from_toml ( cls , toml_string : str = None , filename : Union [ str , PathLike ] = None , key_name : str = "toml" , encoding : str = "utf-8" , errors : str = "strict" , ** kwargs , ) : box_args = { } for arg in list ( kwargs . keys ( ) ) : if arg in BOX_PARAMETERS : box_args [ arg ] = kwargs . pop ( arg ) data = _from_toml ( toml_string = toml_string , filename = filename , encoding = encoding , errors = errors ) if key_name not in data : raise BoxError ( f"{key_name} was not found." ) return cls ( data [ key_name ] , ** box_args )
Transforms a toml string or file into a BoxList object
Transforms a toml string or file into a BoxList object
"""
            Transforms a toml string or file into a BoxList object

            :param toml_string: string to pass to `toml.load`
            :param filename: filename to open and pass to `toml.load`
            :param key_name: Specify the name of the key to pull the list from
                (cannot directly convert from toml)
            :param encoding: File encoding
            :param errors: How to handle encoding errors
            :param kwargs: parameters to pass to `Box()`
            :return:
            """
None
cls
toml_string
str
string to pass to `toml.load`
string to pass to ` toml . load `
filename
Union[str, PathLike]
filename to open and pass to `toml.load`
filename to open and pass to ` toml . load `
key_name
str
Specify the name of the key to pull the list from
(cannot directly convert from toml)
Specify the name of the key to pull the list from ( cannot directly convert from toml )
encoding
str
None
errors
str
None
kwargs
parameters to pass to `Box()`
parameters to pass to ` Box () `