#!/usr/bin/python3

from flask import Flask
from json import load as _load
from json import dump as _dump
from json import dumps as parse
from json import loads as load

# Overwrite jsonparser (my private json module)
# Erased key: key

def save(filename, obj, **options):
    file = open(filename, "w")
    _dump(obj, file, **options)
    file.close()

def load_file(filename):
    file = open(filename)
    obj = _load(file)
    return obj

# Main

def build(route):
    # TODO: Overwrite with private Route-Python module
    raise Exception("Build isincomplete")

def createapp(name, route, static_path, static_url="/static", **options):
    # TODO: Overwrite with private Route-Python module
    return Flask(name, static_url=static_url, static_path=static_path, **options)
