Sync flask-connexion-rest-part-1 with the updated tutorial - #852
Open
realpython-bot wants to merge 1 commit into
Open
realpython-bot wants to merge 1 commit into
realpython-bot wants to merge 1 commit into
Conversation
…n REST APIs With Flask, Connexion, and SQLAlchemy – Part 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
flask-connexion-rest-part-1/with the maintenance update of the tutorial Python REST APIs With Flask, Connexion, and SQLAlchemy – Part 1.The folder still shipped Flask 2.2.2 / Connexion 2.14.1. That pin set no longer installs into a working environment (pip resolves Flask 2.2.2 against Werkzeug 3.x, so
from flask import FlaskraisesImportError: cannot import name 'url_quote'), and Connexion 3 introduced two breaking changes the code hits.What changed
requirements.txt— re-pinned to a clean-room resolution ofFlask==3.1.3plusconnexion[flask,swagger-ui,uvicorn]==3.3.0on Python 3.14. Every line is==pinned, matching the article'sdependenciesfield (flask==3.1.3,connexion==3.3.0,python==3.14).rp_flask_api/app.py— droppeddebug=Truefromapp.run(). On Connexion 3,App.run()forwards its keyword arguments touvicorn.run(), which has nodebugparameter, sopython app.pydied withTypeError: run() got an unexpected keyword argument 'debug'before the server started.rp_flask_api/swagger.yml— movedx-body-name: "person"from insideschemaup ontorequestBodyfor both thepostand theputoperations. Connexion 3 dropped support for the nested form, soPOST /api/peoplereturned HTTP 500 withTypeError: create() missing 1 required positional argument: 'person'(and the same forupdate()onPUT).flask_starter/is unchanged: it runs on plain Flask, whoserun()still acceptsdebug.How it was verified
In a fresh Python 3.14.6 venv installed from the new
requirements.txt(pip checkclean):GET /GET /api/peoplePOST /api/peoplePOST /api/people(duplicate)GET /api/people/PanPUT /api/people/PanDELETE /api/people/PanGET /api/people/Pan(after delete)GET /api/ui/flask_starter/app.pyalso boots and servesGET /with 200.Repo gates:
uvx ruff@0.14.1 format --check flask-connexion-rest-part-1→ 3 files already formatted;uvx ruff@0.14.1 check flask-connexion-rest-part-1→ all checks passed.Links
🤖 Generated with Claude Code