mstrio > server > server¶
- class mstrio.server.server.ServerSettings(connection)¶
Bases:
BaseSettings
Object representation of Strategy One I-Server Settings.
Used to fetch, view, modify, update, export to file, import from file and validate Server settings.
The object can be optionally initialized with connection, which will automatically fetch the current I-Server settings. If not specified, settings can be loaded from file using import_from() method. Object attributes (representing settings) can be modified manually. Lastly, the object can be applied to any project using the update() method.
- Parameters:
connection (Connection) –
- settings¶
settings_value
- alter(**settings)¶
Alter settings in a command manager like way.
- compare_with_files(files, show_diff_only=False)¶
Compare the current project settings to settings in file/files :param files: List of paths to the settings files. Supported settings
files are JSON, CSV, Pickle. Ex: “/file.csv”
- Parameters:
show_diff_only (bool, optional) – Whether to display all settings or only different from first project in list.
files (str) –
- Returns:
Dataframe with values of current settings and settings from files.
- Return type:
DataFrame
- fetch()¶
Fetch current I-Server settings and update this ServerSettings object.
- Return type:
None
- import_from(file)¶
Import project settings from a ‘csv’, ‘json’ or ‘pickle’ file.
- Parameters:
file (str) – Path to the file with supported extension type name. Ex: “<path>/file.csv”
- Return type:
None
- list_properties(show_names=True, show_description=False)¶
Return settings and their values as dictionary.
- Parameters:
show_names (bool) – if True, return meaningful setting values, else, return exact setting values
show_description (bool) – if True return, description and value for each setting, else, return values only
- Return type:
dict
- to_csv(name, show_description=False)¶
Export the current project settings to the csv file.
- Parameters:
name (str) – Name of file
show_description (bool) – if True return, description and value for each setting, else, return values only
- Return type:
None
- to_dataframe()¶
Return a DataFrame object containing settings and their values.
- Return type:
DataFrame
- to_json(name)¶
Export the current project settings to the json file :param name: Name of file :type name: str
- Parameters:
name (str) –
- Return type:
None
- to_pickle(name)¶
Export the current project settings to the pickle file :param name: Name of file :type name: str
- Parameters:
name (str) –
- Return type:
None
- update()¶
Update the current I-Server settings using this ServerSettings object.
- Return type:
None