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
client
andcollections
variables initialized at startShortcut
use
function to change currentcollection
Imported at start:
numpy
asnp
,datetime
and alldeker
public classesRunning
asyncio
loop (thus, enabling you to useasync
andawait
)All the
ptpython
features
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 tocollection
variableget_global_coll_variable()
: returnscollection
global variable
Miscellaneous
You can also run an isolated Python script with:
deker my_python_script.py