from image import Repository from data import model def repository_for_repo(repo): """ Returns a Repository object representing the repo data model instance given. """ return Repository( id=repo.id, name=repo.name, namespace_name=repo.namespace_user.username, description=repo.description, is_public=model.repository.is_repository_public(repo) )