def bulk_create_problem_yml(self, path):
"""Create new problem entries in database from yml document stream.
Can create a yml file with individual problems delimited into documents
using the `---` ... `---` document stream syntax.
Parameters
----------
path: str or path-like
Path to yml file
"""
with open(path, "r") as f:
obj_all = yaml.load_all(f)
for obj in obj_all:
self.create_problem(**obj)
评论列表
文章目录