pyiron_base.database.manager module

A class for mediating connections to SQL databases.

class pyiron_base.database.manager.DatabaseManager(*args, **kwargs)

Bases: object

close_connection()

Internal function to close the connection to the database.

property connection_timeout

Get the connection timeout in seconds. Zero means close the database after every connection.

Returns:

timeout in seconds

Return type:

int

property database
property database_is_disabled
open_connection()

Internal function to open the connection to the database. Only after this function is called the database is accessable.

open_local_sqlite_connection(connection_string)
property project_check_enabled
property sql_connection_string
property sql_table_name
property sql_view_connection_string
property sql_view_table_name
switch_to_central_database()

Switch to central database

switch_to_local_database(file_name='pyiron.db', cwd=None)

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()

Switch from viewer mode to user mode - if view_mode is enable pyiron has read only access to the database.

switch_to_viewer_mode()

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.

Parameters:

full_path (str) – path

Returns:

path

Return type:

str

update()
Warning: Database interaction does not have written spec. This method does a thing. It might not be the thing

you want.

property using_local_database