def load(package_file: str, db: Database = None) -> Database: """ Loads the package file into the passed database. :param package_file: name of the used package file :param db: used database or None if a new database should be used :return: used database """ typecheck_locals(package_file=FileName(allow_non_existent=False)) db = db or Database() db.load(package_file) global actions actions = Actions() actions.load_from_db(db) return db