Welcome to python-xonotic-db’s documentation!¶
-
class
xon_db.
XonoticDB
(data: str, db_buckets=8192, hashfunc=<function crc_block>)[source]¶ A class for reading and writing xonotic databases. Provides dict-like interface
-
filter
(key_pattern='*', is_regex=False)[source]¶ Filter database key by pattern :param key_pattern: pattern (either glob or regex) :param is_regex: should be True if the pattern is regex :return: iterator of (key, value) pairs
-
static
get_backup_file_name
(file_path)[source]¶ Get a file name for backup file :param file_path: file path :return: backup file name
-
classmethod
load
(file)[source]¶ Load a database from an open file :param file: file :return: XonoticDB instance
-
classmethod
load_path
(file_path)[source]¶ Load a database from the specified file path :param file_path: file path :return: XonoticDB instance
-