Skip to content

Instantly share code, notes, and snippets.

@AnchorBlues
Created March 31, 2021 05:12
Show Gist options
  • Save AnchorBlues/65d2cae157f53159a14eea887d800d33 to your computer and use it in GitHub Desktop.
Save AnchorBlues/65d2cae157f53159a14eea887d800d33 to your computer and use it in GitHub Desktop.
yaml形式で記述した設定ファイルの読み込みを行う関数
from typing import Dict, Any
import yaml
def read_setting_file(setting_file_path: str) -> Dict[str, Any]:
"""
設定ファイルの読み込みを行う関数
"""
with open(setting_file_path, mode='r', encoding='utf-8') as f:
settings = yaml.safe_load(f)
return settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment