def build_cache(self):
"""
Returns dict with {searched_name: row}
"""
cache = {}
cache_path = os.path.join(
settings.DATA_DIR, 'directory', 'directory.csv')
with open(cache_path, 'r') as cache_file:
reader = csv.DictReader(cache_file)
for row in reader:
cache[row['searched_name']] = row
return cache
importdirectoryrecords.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录