Added the init_app method.

The init_app method is useful in flask apps with app factory pattern.

@singingwolfboy Please review it. Thanks :smile: