-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterface.py
53 lines (36 loc) · 1.23 KB
/
interface.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
""" This module contains all the interfaces for data models used."""
# standard imports
from typing import Optional, List
# third-party imports
from pydantic import BaseModel, Extra
class ProgrammingLanguage(BaseModel, extra=Extra.allow):
"""Interface for programming language."""
name: str
url: str
licenses: List[str]
description: Optional[str] = None
class Licenses(BaseModel, extra=Extra.allow):
"""Interface for opensource licenses."""
name: str
spdx_id: Optional[str] = None
class Organization(BaseModel, extra=Extra.allow):
"""Interface for organization."""
name: str
description: Optional[str] = None
url: Optional[str] = None
class ToolCategory(BaseModel, extra=Extra.allow):
"""Interface for tree of software tool categorizations."""
name: str
parent: Optional[str] = None
description: Optional[str] = None
class SoftwareTool(BaseModel, extra=Extra.allow):
""" Interface for software tool. """
name: str
categories: List[str]
languages: List[str]
organizations: List[str]
licenses: List[str]
description: Optional[str] = None
url_website: Optional[str] = None
url_sourcecode: Optional[str] = None
url_docs: Optional[str] = None