maxcountryman / flask-bcrypt

Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Home Page:http://readthedocs.org/docs/flask-bcrypt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flask_bcrypt not compatible with connexion?

thewithz opened this issue · comments

Traceback (most recent call last):
File "server.py", line 56, in
bcrypt = Bcrypt(app)
File "/home/thewithz/.local/lib/python3.6/site-packages/flask_bcrypt.py", line 127, in init self.init_app(app)
File "/home/thewithz/.local/lib/python3.6/site-packages/flask_bcrypt.py", line 134, in init_app
self._log_rounds = app.config.get('BCRYPT_LOG_ROUNDS', 12)
AttributeError: 'FlaskApp' object has no attribute 'config'

if __name__ == '__main__':
app = connexion.FlaskApp(__name__, port=5000, specification_dir='swagger/')
app.add_api('swagger.yaml', arguments={'title': 'title'})
bcrypt = Bcrypt(app)
app.run()

Havn't tested yet, but I suspect that if I just comment out the default value and set log_rounds manually in my own code, i can work around it.