This commit is contained in:
soju6jan
2022-10-02 20:18:05 +09:00
parent b9c3aac91f
commit 29930fdef7
150 changed files with 53982 additions and 0 deletions

13
lib/support/base/yaml.py Normal file
View File

@@ -0,0 +1,13 @@
import yaml
class SupportYaml(object):
@classmethod
def write_yaml(cls, filepath, data):
with open(filepath, 'w', encoding='utf8') as f:
yaml.dump(data, f, default_flow_style=False, allow_unicode=True)
@classmethod
def read_yaml(self, filepath):
with open(filepath, encoding='utf8') as file:
data = yaml.load(file, Loader=yaml.FullLoader)
return data