def keybundle_from_local_file(filename, typ, usage):
    """
    Create a KeyBundle based on the content in a local file
    
    :param filename: Name of the file 
    :param typ: Type of content
    :param usage: What the key should be used for
    :return: The created KeyBundle
    """
    usage = harmonize_usage(usage)

    if typ.lower() == "jwks":
        kb = KeyBundle(source=filename, fileformat="jwks", keyusage=usage)
    elif typ.lower() == 'der':
        kb = KeyBundle(source=filename, fileformat="der", keyusage=usage)
    else:
        raise UnknownKeyType("Unsupported key type")

    return kb
def keybundle_from_local_file ( filename , typ , usage ) : usage = harmonize_usage ( usage ) if typ . lower ( ) == "jwks" : kb = KeyBundle ( source = filename , fileformat = "jwks" , keyusage = usage ) elif typ . lower ( ) == 'der' : kb = KeyBundle ( source = filename , fileformat = "der" , keyusage = usage ) else : raise UnknownKeyType ( "Unsupported key type" ) return kb
Create a KeyBundle based on the content in a local file
    
    :param filename: Name of the file 
    :param typ: Type of content
    :param usage: What the key should be used for
    :return: The created KeyBundle