pychess.Database package¶
Submodules¶
pychess.Database.JvR module¶
pychess.Database.PgnImport module¶
-
class
pychess.Database.PgnImport.
PgnImport
(chessfile, append_pgn=False)¶ Bases:
object
-
do_cancel
()¶
-
do_import
(filename, info=None, progressbar=None)¶
-
get_id
(name, name_table, field, info=None)¶
-
ini_names
(name_table, field)¶
-
initialize
()¶
-
-
pychess.Database.PgnImport.
read_games
(handle)¶ Based on chess.pgn.scan_headers() from Niklas Fiekas python-chess
pychess.Database.dbwalk module¶
-
pychess.Database.dbwalk.
walk
(node, arr, txt)¶ Prepares a game data for databse. Recursively walks the node tree to collect moves and comments. Arguments: node - list (a tree of lboards created by the pgn parser) arr - array(“H”) (2 byte unsigned ints representing lmove objects
or COMMENT, VARI_START, VARI_END, NAG+nag)txt - list (comment strings)
pychess.Database.model module¶
-
pychess.Database.model.
create_indexes
(engine)¶
-
pychess.Database.model.
drop_indexes
(engine)¶
-
pychess.Database.model.
get_engine
(path=None, dialect='sqlite', echo=False)¶
-
pychess.Database.model.
get_schema_version
(engine)¶
-
pychess.Database.model.
ini_schema_version
(engine)¶
-
pychess.Database.model.
insert_or_ignore
(engine, stmt)¶