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

parse_line(line: str)[source]

Parse a line from database :param line: line to parse

remove_all_cts_records_by(crypto_idfp)[source]

Remove all CTS records from the specified player :param crypto_idfp: :return:

remove_cts_record(map, position)[source]

Remove a CTS record :param map: :param position: :return:

save(file_path)[source]

Write database to a file. If a file with the specified name exists it’s backed up :param file_path: file path

exception xon_db.XonoticDBException[source]

Something went wrong with Xonotic DB

Indices and tables