diff options
Diffstat (limited to 'pyfunkwhale/utils.py')
-rw-r--r-- | pyfunkwhale/utils.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pyfunkwhale/utils.py b/pyfunkwhale/utils.py new file mode 100644 index 0000000..9ba5d0f --- /dev/null +++ b/pyfunkwhale/utils.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import json + + +def read_file(filename): + with open(filename, 'r') as file: + data = file.read() + + return data + + +def write_file(filename, data): + with open(filename, 'w') as file: + file.write(json.dumps(data)) + + return data |