Instantiate - Alpha Documentation

# Instantiate

This enable the use of model columns which is not possible using SqlAlchemy:

    attr = {
        Duck.name: name,
        Duck.duck_type_id: duck_type_id,
    }
    duck = Duck()
    duck.init(attr)

or

    duck = Duck()
    duck.init({
        Duck.name: name,
        Duck.duck_type_id: duck_type_id,
    })

Instead of:

    attr = {
        Duck.name: name,
        Duck.duck_type_id: duck_type_id,
    }
    duck = Duck()
    duck.init(**{x.key:y for x,y in attr.items()})