pyrk.db.database module¶
-
class
pyrk.db.database.
Database
(filepath='pyrk.h5', mode='w', title='PyRKDatabase')[source]¶ Bases:
object
The Database class handles operations on the pyrk simulation backend and provides utilities for interacting with it.
-
add_group
(groupname, grouptitle, path_to_group='/')[source]¶ Creates a new group in the file
Parameters:
-
add_row
(table, row_dict)[source]¶ Adds a row to the table and flushes the table
Parameters: - table – handle to the table where the row will reside
- row_dict (dictionary of row keys and values) – metadata to store in plain english, a title
-
add_table
(groupname, tablename, description, tabletitle)[source]¶ Creates a new table All groupnames must be directly under root
Parameters:
-
get_table
(groupname, tablename)[source]¶ Returns the table handle for a table within a group
Parameters: Returns: the path to the table in the group
Return type:
-
get_tablepath
(groupname, tablename)[source]¶ Compiles the string for a table within a group
Parameters: Returns: the path to the table in the group
Return type:
-
group_exists
(path_to_group, groupname)[source]¶ Checks whether the group exsts, with that name, at that path
Parameters: Returns: returns the group
Return type: pytables Group object
-
register_recorder
(groupname, tablename, recorder, timeseries=False)[source]¶ Register an entity that wants to represent itself in the Database
Parameters:
-