numerous.sdk.models.parameter module#
- class numerous.sdk.models.parameter.FileReference(id, path, name, file_manager_client)#
Bases:
objectRepresents the reference to a selected file, uploaded to the platform. Can be used to access that files content.
- download()#
Download the referenced file, and get the resulting path.
If the file has already been downloaded, the previously downloaded file is overridden.
- Return type:
str
-
file_manager_client:
FileManagerStub#
- property file_path: str#
The local path to the referenced file. The file will be downloaded on access.
- static from_document(data, file_manager_client)#
- Return type:
-
id:
str#
-
name:
str#
- open_bytes()#
Open the referenced file for reading binary content.
- Return type:
Generator[IO[bytes],None,None]
- open_text()#
Open the referenced file for reading text content.
- Return type:
Generator[IO[str],None,None]
-
path:
str#
- read_bytes()#
Read the bytes of the referenced file.
- Return type:
bytes
- read_json()#
Read the JSON content of the referenced file.
- Return type:
Union[dict,list]
- read_text()#
Read the text content of the referenced file.
- Return type:
str
- class numerous.sdk.models.parameter.MapLocation(id, name, center)#
Bases:
object-
center:
tuple[float,float]#
- static from_document(data)#
- Return type:
-
id:
str#
-
name:
str#
-
center:
- class numerous.sdk.models.parameter.Parameter(id, uuid, display_name, type, value)#
Bases:
object-
display_name:
str#
-
id:
str#
-
type:
str#
-
uuid:
str#
-
value:
Any#
-
display_name:
- class numerous.sdk.models.parameter.Selection(id, value)#
Bases:
object-
id:
str#
-
value:
Union[str,float,int]#
-
id:
- class numerous.sdk.models.parameter.SimTimeUnit(value)#
Bases:
EnumAn enumeration.
- days = 'days'#
- classmethod from_string(value_str)#
- Return type:
- hours = 'hours'#
- minutes = 'minutes'#
- months = 'months'#
- seconds = 'seconds'#
- years = 'years'#
- class numerous.sdk.models.parameter.TimeValue(total_seconds, unit, delta)#
Bases:
object-
delta:
timedelta#
-
total_seconds:
float#
-
unit:
SimTimeUnit#
-
delta:
- numerous.sdk.models.parameter.get_parameters_dict(data, file_manager_client)#
- Return type:
dict[str,Parameter]
- numerous.sdk.models.parameter.get_parameters_list(data, file_manager_client)#
- Return type:
list[Parameter]
- numerous.sdk.models.parameter.parse_value(data, file_manager_client)#
- Return type:
Any