databased.customshell

 1from argshell import ArgShellParser, Namespace, with_parser
 2from pathier import Pathier
 3
 4from databased import DataBased, DBShell, dbparsers
 5
 6root = Pathier(__file__).parent
 7
 8
 9class CustomShell(DBShell):
10    intro = "Starting customshell (enter help or ? for command info)..."
11    prompt = "customshell>"
12    dbpath: Pathier = None  # Replace None with a path to a .db file to set a default database # type: ignore
13
14
15# For help with adding custom functionality see:
16# https://github.com/matt-manes/argshell
17# https://github.com/matt-manes/databased/blob/main/src/databased/dbshell.py
18# https://github.com/matt-manes/databased/blob/main/src/databased/dbparsers.py
19
20if __name__ == "__main__":
21    CustomShell().cmdloop()
class CustomShell(databased.dbshell.DBShell):
10class CustomShell(DBShell):
11    intro = "Starting customshell (enter help or ? for command info)..."
12    prompt = "customshell>"
13    dbpath: Pathier = None  # Replace None with a path to a .db file to set a default database # type: ignore

Subclass this to create custom ArgShells.

Inherited Members
cmd.Cmd
Cmd
precmd
postcmd
postloop
parseline
onecmd
default
completedefault
completenames
complete
get_names
complete_help
print_topics
columnize
databased.dbshell.DBShell
do_use_db
do_dbpath
do_backup
do_size
do_add_table
do_drop_table
do_add_row
do_info
do_show
do_count
do_query
do_update
do_delete
do_add_column
do_flush_log
do_scan_dbs
do_customize
preloop
argshell.argshell.ArgShell
do_quit
do_sys
do_help
cmdloop
emptyline