async def get_health_info(self, request): loaded_plugins_sorted = sorted(self._app_svc.get_loaded_plugins(), key=operator.attrgetter('name')) mapping = { 'application': 'CALDERA', 'version': app.get_version(), 'plugins': loaded_plugins_sorted } return web.json_response(CalderaInfoSchema().dump(mapping))
def load_render(views): """Add the renderer to the shared context. Inputs: views path containing application views """ render = render_jinja( views, encoding='utf-8', extensions=['jinja2.ext.do', AssetsExtension]) render._lookup.assets_environment = env render._lookup.globals.update(dict(DEV=config.DEV, VERSION=get_version())) def inner(): web.ctx.render = render; return inner
def expected_caldera_info(): return { 'application': 'CALDERA', 'plugins': [], 'version': app.get_version() }
def get_version_request(): return flask.make_response(get_version())
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from setuptools import find_packages from setuptools import setup from app import get_name from app import get_version requirements = os.path.join(os.path.dirname(__file__), 'requirements.txt') INSTALL_REQUIRES = open(requirements).read().split() params = dict( name=get_name(), version=get_version(), packages=find_packages(exclude=['fabfile']), install_requires=INSTALL_REQUIRES, ) setup(**params)