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