Source code for luna_python_matcher.app_common.handlers.version_handler
# -*- coding: utf-8 -*-
"""Version Handler
Module realize version handler.
"""
from sanic.response import HTTPResponse
from app.version import VERSION
from app_common.handlers.base_handler import CommonBaseHandler
from crutches_on_wheels.utils.timer import timer
[docs]class VersionHandler(CommonBaseHandler):
"""
Handler for getting version
"""
[docs] @timer
async def get(self) -> HTTPResponse:
"""
Get version of services, see `spec_get_version`_.
.. _spec_get_version:
_static/api.html#operation/getVersion
Resource is reached by address '/version'
"""
return self.success(outputJson=VERSION)