async def get_object(source, *args):
warnings.warn("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>DeprecationWarning)<EOL>if isinstance(source, peewee.Query):<EOL><INDENT>query = source<EOL>model = query.model<EOL><DEDENT>else:<EOL><INDENT>query = source.select()<EOL>model = source<EOL><DEDENT>for obj in (await select(query.where(*args))):<EOL><INDENT>return obj<EOL><DEDENT>raise model.DoesNotExist<EOL>
Get object asynchronously.

    :param source: mode class or query to get object from
    :param args: lookup parameters
    :return: model instance or raises ``peewee.DoesNotExist`` if object not
        found