728x90 반응형 개발/python, python frameworks5 python flask - blueprint main.py from flask import Flask from test_api import test_api app = Flask(__name__) app.register_blueprint(test_api) @app.route('/') def main(): return "hello" test_api.py from flask import Blueprint test_api = Blueprint('test_api', __name__, url_prefix='/test') @test_api.route("/here") def test(): return "here" flask server 올린 후 request: localhost:5000/ response : hello request: localhost:5000/.. 2020. 3. 12. 이전 1 2 다음 728x90