pyiron_base.database.manager.DatabaseManager#
- class pyiron_base.database.manager.DatabaseManager(*args, **kwargs)[source]#
Bases:
objectMethods
__init__()Internal function to close the connection to the database.
Internal function to open the connection to the database.
open_local_sqlite_connection(connection_string)Switch to central database
switch_to_local_database([file_name, cwd])Swtich to an local SQLite based database.
Switch from viewer mode to user mode - if view_mode is enable pyiron has read only access to the database.
Switch from user mode to viewer mode - if view_mode is enable pyiron has read only access to the database.
top_path(full_path)Validated that the full_path is a sub directory of one of the pyrion environments loaded.
update()Warning: Database interaction does not have written spec. This method does a thing. It might not be the thing
Attributes
Get the connection timeout in seconds.
databasedatabase_is_disabledproject_check_enabledsql_connection_stringsql_table_namesql_view_connection_stringusing_local_database- property connection_timeout: int#
Get the connection timeout in seconds. Zero means close the database after every connection.
- Returns:
timeout in seconds
- Return type:
int
- open_connection() None[source]#
Internal function to open the connection to the database. Only after this function is called the database is accessable.
- switch_to_local_database(file_name: str = 'pyiron.db', cwd: str | None = None) None[source]#
Swtich to an local SQLite based database.
- Parameters:
file_name (str) – SQLite database file name
cwd (str/None) – directory where the SQLite database file is located in
- switch_to_user_mode() None[source]#
Switch from viewer mode to user mode - if view_mode is enable pyiron has read only access to the database.
- switch_to_viewer_mode() None[source]#
Switch from user mode to viewer mode - if view_mode is enable pyiron has read only access to the database.