def _pkg_response(pkgs):
    if pkgs:
        return {'pkgs': pkgs}
    else:
        return HTTPNotFound("No packages found")
Take a package mapping and return either a dict for jinja or a 404
dataset/ETHPy150Open mathcamp/pypicloud/pypicloud/views/simple.py/_pkg_response