crotal.db.Database(path, content=None)[source]¶Database is the interface to the file 'db.json'.
Initalize a new database object.
None
from_file(path)[source]¶Read the database from the path argument. :param path: The file path of the designated database file. :return: The database object.
get_table(table)[source]¶Get a table object, same to self.__getitem__.
table object.get_item(table, key)[source]¶Get the value directly from the database based on key and table name.
The corresponding value stored in the table.
set_item(table, key, value)[source]¶Set the entry directly from the database based on key and table name.
Value to be set in the table.
The corresponding value stored in the table.