flask_restful_dbbase.DBBase.create_scoped_session¶
- DBBase.create_scoped_session(options=None)¶
Create a
scoped_session
on the factory fromcreate_session()
.An extra key
'scopefunc'
can be set on theoptions
dict to specify a custom scope function. If it’s not provided, Flask’s app context stack identity is used. This will ensure that sessions are created and removed with the request/response cycle, and should be fine in most cases.- Parameters:
options – dict of keyword arguments passed to session class in
create_session