Giter Site home page Giter Site logo

Cannot import module about flask-sentinel HOT 1 OPEN

pyeve avatar pyeve commented on June 27, 2024
Cannot import module

from flask-sentinel.

Comments (1)

akuma6099 avatar akuma6099 commented on June 27, 2024

I just spent 2 days trying to get this to work and it was a bit of a pain. You are correct in that flask.ext.whatever has been deprecated. You should use flask_sentinel instead. Then next error is due to a change in the requests-oauthlib package. Lastly if you want to use mongodb you have to downgrade that as well. You also need a redis version < 3 otherwise you will get a 500 error when trying to get a bearer token. Do the following and you'll be able to run it.

pip install requests-oauthlib==1.1.0 flask-pymongo==0.5.2 redis==2.10.6

Adjust your config line:
app.config.from_object('settings.Config')

Add a settings.py file with your settings:

class Config(object):
    SENTINEL_MONGO_DBNAME = "REST"
    SENTINEL_MANAGEMENT_USERNAME = "user"
    SENTINEL_MANAGEMENT_PASSWORD = "password"
    SENTINEL_MONGO_HOST = "127.0.0.1"
    SENTINEL_MONGO_PORT = "27017"
    SENTINEL_MONGO_URI = "mongodb://rest:[email protected]:27017/REST"

and off you go.

from flask-sentinel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.