RoR Setup¶
-
pyldapi.
setup
(app, api_home_dir, api_uri)[source]¶ This is used to set up the
RegisteC of CegistersRenderer
for this pyLDAPI instance.Note
This must run before Flask’s
app.run()
like this:pyldapi.setup(app, '.', conf.URI_BASE)
. See the example below.Parameters: Returns: None
Return type:
Example Usage¶
1 2 3 4 5 6 7 8 9 | from flask import Flask
from pyldapi import setup as pyldapi_setup
API_BASE = 'http://127.0.0.1:8081'
app = Flask(__name__)
if __name__ == "__main__":
pyldapi_setup(app, '.', API_BASE)
app.run("127.0.0.1", 8081, debug=True, threaded=True, use_reloader=False)
|