{"id":23750,"library":"flask-openapi3-scalar","title":"Flask-OpenAPI3-Scalar","description":"Provides Scalar UI integration for flask-openapi3, allowing OpenAPI documentation to be rendered with Scalar's modern UI. Current version: 1.44.15. Release cadence: frequent updates.","status":"active","version":"1.44.15","language":"python","source_language":"en","source_url":"https://github.com/luolingchun/flask-openapi3-plugins/tree/master/flask-openapi3-scalar","tags":["flask","openapi","scalar","api-docs","ui"],"install":[{"cmd":"pip install flask-openapi3-scalar","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for OpenAPI specification generation","package":"flask-openapi3","optional":false}],"imports":[{"note":"ScalarUI is in the separate plugin package, not in flask-openapi3 itself.","wrong":"from flask_openapi3 import ScalarUI","symbol":"ScalarUI","correct":"from flask_openapi3_scalar import ScalarUI"},{"note":"Common mistake: not using the correct module name. The module name is flask_openapi3_scalar.","wrong":"import flask_openapi3_scalar as SomethingElse","symbol":"flask_openapi3_scalar","correct":"import flask_openapi3_scalar"}],"quickstart":{"code":"from flask import Flask\nfrom flask_openapi3 import OpenAPI\nfrom flask_openapi3_scalar import ScalarUI\n\napp = Flask(__name__)\napi = OpenAPI(app)\nspec = api.get_spec()\nScalarUI(spec, url_prefix='/scalar').register(app)\n\n@app.route('/')\ndef home():\n    return 'Hello, World!'\n\nif __name__ == '__main__':\n    app.run()","lang":"python","description":"Quickstart: create a Flask app with OpenAPI and register ScalarUI to serve interactive documentation at /scalar."},"warnings":[{"fix":"Use 'from flask_openapi3_scalar import ScalarUI' instead of hyphens.","message":"The package was originally named 'flask-openapi3-scalar' but the import path may change. Ensure you use the correct module name 'flask_openapi3_scalar' (underscores).","severity":"breaking","affected_versions":"all"},{"fix":"Always pass the spec object: ScalarUI(spec, ...) where spec is obtained from api.get_spec().","message":"The OpenAPI spec must be passed to ScalarUI. If you don't pass the spec, it may fail silently or show an empty UI.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the current parameter name as per documentation; if deprecated, use the new name.","message":"The 'url_prefix' parameter may be renamed or deprecated in future versions. Check changelog.","severity":"deprecated","affected_versions":"<=1.44.15"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install flask-openapi3-scalar' and ensure you use underscores in import.","cause":"The package is not installed or installed incorrectly.","error":"ModuleNotFoundError: No module named 'flask_openapi3_scalar'"},{"fix":"Change import to 'from flask_openapi3_scalar import ScalarUI'.","cause":"Importing ScalarUI from flask_openapi3 instead of flask_openapi3_scalar.","error":"AttributeError: module 'flask_openapi3' has no attribute 'ScalarUI'"},{"fix":"Pass the OpenAPI spec object: spec = api.get_spec(); ScalarUI(spec, ...).","cause":"The 'spec' argument is required but not provided.","error":"TypeError: ScalarUI() missing 1 required positional argument: 'spec'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}