Flask Flask-Security with GAE ndb?

I create and host my application on Google App Engine using Python on Flask. And now I want to use the extension for protection against flacks and realized that there are not many resources in my configuration, which is a little unexpected for me, since I thought that this stack should be simple.

The Flask-Security Page quick launch window provides examples of SQLAlchemy, MongoDB, and Peewee. However, I cannot find GAE-NDB samples in particular. If someone can tell me whether it is possible to use a flash drive in my dev stack, and it would be very useful if some examples of creating an object security, for example, under code example in SQLAlchemy

db = SQLAlchemy(app)
class User(db.Model, UserMixin):
    pass

# Setup Flask-Security
user_datastore = SQLAlchemyUserDatastore(db, User)
security = Security(app, user_datastore)

Many thanks!

UPDATE and my workaround for those of you who have the same question or doubt

GAE-NDB , , -.

, , . Flask-Security Flask :

  • Flask-SQLAlchemy
  • -MongoEngine
  • -Peewee

- mongodb , mongolab. .

+4
1

gae-init., - Flask Google App Engine. , , , -.

+3

Source: https://habr.com/ru/post/1525493/


All Articles