Interactive Shell
Interactive shell is a convenient Python REPL interface that allows you to manage, query and modify data in your DEKER™ storage.
Note
DEKER™ shell is based on amazing ptpython - a better Python REPL
Features
Autocompletion
Syntax highlighting
clientandcollectionsvariables initialized at startShortcut
usefunction to change currentcollectionImported at start:
numpyasnp,datetimeand alldekerpublic classesRunning
asyncioloop (thus, enabling you to useasyncandawait)All the
ptpythonfeatures
Start
Once installed, open your terminal and run the shell providing path to DEKER™ storage via command
line parameter (in this case it would be /tmp/deker-data):
deker file:///tmp/deker-data
Examples
Using global collection variable:
Creating a new collection:
REPL menu (called with F2):
Interface
Imported DEKER™ Classes
Basic storage access and management classes:
Collection schema related:
Physical storage (HDF5) level options:
Preset Variables
client: Client (registry of collections) instance, connected to the uri-databasecollections: list of Client collections namescollection: global default collection variable, set by use(“coll_name”) method;np: numpy librarydatetime: datetime library
Functions
use("collection_name"): gets collection from client and saves it tocollectionvariableget_global_coll_variable(): returnscollectionglobal variable
Miscellaneous
You can also run an isolated Python script with:
deker my_python_script.py