import inspect


def get_model_init_params_names(model):
    """Retrieve all params of model init method

    :param DeclarativeMeta model: an object from sqlalchemy
    :return tuple: list of init method fields names and boolean flag that init method has kwargs
    """
    argnames, _, varkw = inspect.getfullargspec(model.__init__)[:3]
    if argnames:
        argnames.remove('self')
    return argnames, bool(varkw)