blueprints/api_tasks.py
def is_base64(sb):
    """Will check if a provided string or bytes is base64 decodable, and trurn true or false
    Params:
        sb: The variable to check
    """
    try:
            if isinstance(sb, str):
                    # If there's any unicode here, an exception will be thrown and the function will return false
                    sb_bytes = bytes(sb, 'ascii')
            elif isinstance(sb, bytes):
                    sb_bytes = sb
            else:
                    raise ValueError("Argument must be string or bytes")
            if base64.b64encode(base64.b64decode(sb_bytes)):
                return True
    except Exception:
            return False
Will check if a provided string or bytes is base64 decodable, and trurn true or false
    Params:
        sb: The variable to check
    
Will check if a provided string or bytes is base64 decodable, and trurn true or false
Will check if a provided string or bytes is base64 decodable and trurn true or false
def is_base64(sb):
    try:
            if isinstance(sb, str):
                    sb_bytes = bytes(sb, 'ascii')
            elif isinstance(sb, bytes):
                    sb_bytes = sb
            else:
                    raise ValueError("Argument must be string or bytes")
            if base64.b64encode(base64.b64decode(sb_bytes)):
                return True
    except Exception:
            return False
def is_base64 ( sb ) : try : if isinstance ( sb , str ) : sb_bytes = bytes ( sb , 'ascii' ) elif isinstance ( sb , bytes ) : sb_bytes = sb else : raise ValueError ( "Argument must be string or bytes" ) if base64 . b64encode ( base64 . b64decode ( sb_bytes ) ) : return True except Exception : return False
Will check if a provided string or bytes is base64 decodable, and trurn true or false
Will check if a provided string or bytes is base64 decodable and trurn true or false
"""Will check if a provided string or bytes is base64 decodable, and trurn true or false
    Params:
        sb: The variable to check
    """ # If there's any unicode here, an exception will be thrown and the function will return false
sb
The variable to check
The variable to check