Beispiel #1
0
def testAttrDict():
    attr_d = AttrDict({
        "name":"liwei",
        "exp":["pkuvis","jike"],
        "groups":[{
            "name":"jike"
        }, {
            "name":"pkuvis"
        }, {
            "name":"buaa"
        }]
    })
    assert attr_d.groups[0].name == "jike"

    d = attr_d.toDict()
    assert d["groups"][0]["name"] == "jike"
Beispiel #2
0
import os
from seck.utils import AttrDict, load_json

_config_dict = load_json("./config.json")
config = AttrDict(_config_dict)

config.env = os.getenv("BLOG_ENV") or "development"