[New Feature] Rest API implementation to showcase the OpenDBM features
This commit is contained in:
0
rest_api/app/schemas/__init__.py
Normal file
0
rest_api/app/schemas/__init__.py
Normal file
6
rest_api/app/schemas/biomaker_request.py
Normal file
6
rest_api/app/schemas/biomaker_request.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
class BiomakerRequest(BaseModel):
|
||||
file_url: str
|
||||
platform: str
|
||||
variables: list = []
|
||||
7
rest_api/app/schemas/file_properties.py
Normal file
7
rest_api/app/schemas/file_properties.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
class FileProperties(BaseModel):
|
||||
file_name: str = None
|
||||
file_extension: str = None
|
||||
platform: str = ''
|
||||
|
||||
9
rest_api/app/schemas/token.py
Normal file
9
rest_api/app/schemas/token.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Union
|
||||
|
||||
class Token(BaseModel):
|
||||
access_token: str
|
||||
token_type: str
|
||||
|
||||
class TokenData(BaseModel):
|
||||
username: Union[str, None] = None
|
||||
11
rest_api/app/schemas/user.py
Normal file
11
rest_api/app/schemas/user.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Union
|
||||
|
||||
class User(BaseModel):
|
||||
username: str
|
||||
email: Union[str, None] = None
|
||||
full_name: Union[str, None] = None
|
||||
disabled: Union[bool, None] = None
|
||||
|
||||
class UserInDB(User):
|
||||
hashed_password: str
|
||||
Reference in New Issue
Block a user