def get_encoding(name):
    """
    Returns an Encoder object for the named encoding
    """
    try:
        return __encodings[name.lower()]()
    except __HOLE__:
        try:
            msg = "Invalid encoding: '{}'".format(name)
        except:
            msg = "Invalid encoding"
        raise EncodingException(msg)
dataset/ETHPy150Open ipfs/py-ipfs-api/ipfsApi/encoding.py/get_encoding