Bases: object
The Sage Notebook storage abstraction layer abstract base class. Each storage abstraction layer derives from this.
Export the worksheet with given username and id_number to the given filename (e.g., ‘worksheet.sws’).
INPUT:
- title - title to use for the exported worksheet (if
None, just use current title)
Return the history log for the given user.
INPUT:
- username – string
OUTPUT:
- list of strings
OUTPUT:
- dictionary of user info
Return worksheet with given id_number belonging to the given user.
INPUT:
- username – string
- id_number – integer
OUTPUT:
- a worksheet
Save the history log (a list of strings) for the given user.
INPUT:
- username – string
- history – list of strings
INPUT:
- users – dictionary mapping user names to users
INPUT:
- worksheet – a Sage worksheet
- conf_only – default: False; if True, only save the config file, not the actual body of the worksheet
Return list of all the worksheets belonging to the user with given name. If the given user does not exists, an empty list is returned.
EXAMPLES: The load_user_data function must be defined in the derived class:
sage: from sagenb.storage.abstract_storage import Datastore
sage: Datastore().worksheets('foobar')
...
NotImplementedError