databased.custom_manager

 1from argshell import ArgShellParser, Namespace, with_parser
 2from pathier import Pathier
 3
 4from databased import DataBased, DBManager, dbparsers
 5
 6root = Pathier(__file__).parent
 7
 8
 9class CustomManager(DBManager):
10    intro = "Starting custommanager (enter help or ? for command info)..."
11    prompt = "custommanager>"
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/dbmanager.py
18# https://github.com/matt-manes/databased/blob/main/src/databased/dbparsers.py
19
20if __name__ == "__main__":
21    CustomManager().cmdloop()
class CustomManager(databased.dbmanager.DBManager):
10class CustomManager(DBManager):
11    intro = "Starting custommanager (enter help or ? for command info)..."
12    prompt = "custommanager>"
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
emptyline
default
completedefault
completenames
complete
get_names
complete_help
print_topics
columnize
databased.dbmanager.DBManager
do_use_db
do_dbpath
do_backup
do_size
do_create_table
do_drop_table
do_add_row
do_info
do_show
do_count
do_query
do_update
do_delete
do_flush_log
do_customize
preloop
argshell.argshell.ArgShell
do_quit
do_help
cmdloop