Answer the question
In order to leave comments, you need to log in
How to start execution of one script from another?
Faced such a problem. If one script that runs from this file:
from flask import redirect, send_from_directory, send_file
svc = GenericService(__name__, 'config')
app = svc.get_app()
app.add_api('./openapi/specifications.yml')
@app.app.route('/')
def home():
return redirect('/v')
@app.app.route('/v1/<path:path>')
def send_frontend(path):
return send_from_directory('frontend', path)
@app.app.route('/f')
def send_frontend_index():
return send_file('frontend/index.html', None, False, None, False, 0)
if __name__ == '__main__':
app.run(debug=True)
Answer the question
In order to leave comments, you need to log in
Here they offer one of 7 options to use
https://stackoverflow.com/a/20749411
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question