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