#!/usr/bin/env python

import json
import toolbox
from cronenberg.demo import demo_dashboard
from cronenberg.cask.storage import EntityEncoder
from cronenberg.model import *

def dump():
    dash = demo_dashboard(toolbox.PROD)
    print json.dumps(dash, cls=EntityEncoder, indent=4, sort_keys=True)

def load():
    with open("test1.json", "r") as f:
        data = json.load(f)
        dash = Dashboard.from_json('automation_overview', data)
        print json.dumps(dash, cls=EntityEncoder, indent=4, sort_keys=True)

load()

@@ -71,30 +71,17 @@
  import 
-demo_dashboard
+*
 %0Afrom cr
@@ -178,16 +178,20 @@
  dash = 
+gbc_
 demo_das
@@ -201,20 +201,8 @@
 ard(
-toolbox.PROD
 )%0A  
@@ -492,15 +492,15 @@
 =True)%0A%0A
-load
+dump
 ()%0A

fix import