1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

25 lines
544 B
Python
Raw Normal View History

2020-01-21 02:38:04 -07:00
"""Response model."""
# Standard Library Imports
from typing import List
# Third Party Imports
from pydantic import BaseModel
from pydantic import StrictStr
from pydantic import constr
2020-01-21 17:30:14 -07:00
class QueryError(BaseModel):
2020-01-21 02:38:04 -07:00
"""Query response model."""
output: StrictStr
2020-01-21 17:30:14 -07:00
level: constr(regex=r"(success|warning|error|danger)")
2020-01-21 02:38:04 -07:00
keywords: List[StrictStr]
2020-01-21 17:30:14 -07:00
class QueryResponse(BaseModel):
"""Query response model."""
output: StrictStr
level: constr(regex=r"(success|warning|error|danger)")
keywords: List[StrictStr] = []