diff options
author | neodarz <neodarz@neodarz.net> | 2020-04-11 14:19:57 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2020-04-11 14:19:57 +0200 |
commit | 8a591f173cfccf072c31af88656a5ed12936fcfe (patch) | |
tree | 08f0f2ae762a711a94cd34a70e8684d7f6853e7b /pyfunkwhale/utils.py | |
download | pyfunkwhale-8a591f173cfccf072c31af88656a5ed12936fcfe.tar.xz pyfunkwhale-8a591f173cfccf072c31af88656a5ed12936fcfe.zip |
Initial commit
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 |