generated from nlpsandbox/date-annotator-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtool_controller.py
39 lines (29 loc) · 1.1 KB
/
tool_controller.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from openapi_server.models.tool import Tool # noqa: E501
from openapi_server.models.tool_dependencies import ToolDependencies # noqa: E501
from openapi_server.models.tool_type import ToolType # noqa: E501
from openapi_server.models.license import License
def get_tool(): # noqa: E501
"""Get tool information
Get information about the tool # noqa: E501
:rtype: Tool
"""
tool = Tool(
name="date-annotator-example",
version="1.2.0",
license=License.APACHE_2_0,
repository="github:nlpsandbox/date-annotator-example",
description="Example implementation of the NLP Sandbox Date " +
"Annotator API",
author="NLP Sandbox Team",
author_email="[email protected]",
url="https://github.com/nlpsandbox/date-annotator-example",
type=ToolType.DATE_ANNOTATOR,
api_version="1.2.0"
)
return tool, 200
def get_tool_dependencies(): # noqa: E501
"""Get tool dependencies
Get the dependencies of this tool # noqa: E501
:rtype: ToolDependencies
"""
return ToolDependencies(tools=[]), 200