Good Evening,
I am having some serious troubles getting flask-restful to work for me, It should be very simple and has been in the past but I am trying to load my libraries in a different format and I keep running into this error.
I am very new to python so I am sure I am making some simple mistake.
I am basing my structure and loading dynamic off this skeleton https://github.com/imwilsonxu/fbone
The basics are this In my extensions file I have this defined
from flask.ext import restful
api= restful.Api()
Then within my app.py file am doing this
app = Flask(app_name, instance_path=INSTANCE_FOLDER_PATH, instance_relative_config=True)
configure_app(app, config)
configure_blueprints(app, blueprints)
configure_extensions(app)
def configure_extensions(app):
# Flask-restful
api.init_app(app)
Then finally within a given blue print I am importing the api and trying there hello world example
from sandbox.extensions import api
class HelloWorld(restful.Resource):
def get(self):
return {'hello': 'world'}
api.add_resource(HelloWorld, '/')
This is the error I am getting.
AttributeError: 'Api' object has no attribute 'endpoints'
any help would be greatly appreciated.