Docs handler

Document File Handler

Module realizes doc file handler.

class luna_tasks.crutches_on_wheels.web.docs_handler.DevelopmentManualHandler(request)[source]

Handler for getting sphinx documentations from static directory

app

Get application :returns: running application

Return type:LunaApplication
config

Get running application config :returns: running application config

get()[source]

Get Sphinx service documentation, see get dev manual.

Resource is reached by address ‘/docs/dev’

class luna_tasks.crutches_on_wheels.web.docs_handler.SpecDocumentsHandler(request)[source]

Handler for getting openapi documentations from static directory

app

Get application :returns: running application

Return type:LunaApplication
config

Get running application config :returns: running application config

classmethod customise(docName=None)[source]

Handler customising method.

Parameters:docName – document name to store
Returns:the current handler class
docName

Current REST API document name getter.

Returns:REST API document name except extension
get()[source]

Get document of services, see get spec docs.

Resource is reached by address ‘/docs/spec’

Raises:VLException(Error.UnsupportedMediaType, 415, isCriticalError=False), if “Accept” header is incorrect
Return type:HTTPResponse
getDataFromStatic(extension)[source]

Get file body from a static directory with the specified extension

Parameters:extension – extension for document file (html or yml)
Returns:tuple (filename, document body)
Return type:Tuple[str, bytes]