Solution
from flask import Flask, jsonify, request, Blueprint
first_blueprint = Blueprint('first_blueprint', __name__)
# notice the change in the route
@first_blueprint.route('/',methods=['GET'])
def obter_livros():
...
# notice change in the path
@first_blueprint.route('/',methods=['GET'])
def obter_livro_por_id(id):
...
# do the same for the other view functions in the file
# in the other file also create a blueprint
from flask import App
from teste import first_blueprint
app = Flask(__name__)
app.register_blueprint(first_blueprint, url_prefix='/livros')
# register the other blueprint