{"id":6644,"library":"flask-script","title":"Flask-Script","description":"Flask-Script is a Python extension for Flask that provided support for writing external scripts, including running a development server, a customized Python shell, database setup scripts, and other command-line tasks. The project's last release was in September 2017 (version 2.0.6), and its maintainers are no longer actively developing new features, only merging pull requests. It has largely been superseded by Flask's built-in command-line interface (Flask CLI), which uses the Click library.","status":"deprecated","version":"2.0.6","language":"en","source_language":"en","source_url":"https://github.com/smurfix/flask-script","tags":["Flask","CLI","scripting","command-line-interface","deprecated"],"install":[{"cmd":"pip install Flask-Script","lang":"bash","label":"Install Flask-Script"}],"dependencies":[{"reason":"Core dependency for web application framework.","package":"Flask","optional":false}],"imports":[{"note":"The `flask.ext` prefix was an older import pattern that has been deprecated.","wrong":"from flask.ext.script import Manager","symbol":"Manager","correct":"from flask_script import Manager"},{"symbol":"Command","correct":"from flask_script import Command"},{"symbol":"Server","correct":"from flask_script import Server"},{"symbol":"Shell","correct":"from flask_script import Shell"}],"quickstart":{"code":"from flask import Flask\nfrom flask_script import Manager, Command\n\napp = Flask(__name__)\n\nclass HelloCommand(Command):\n    \"\"\"Says hello.\"\"\"\n    def run(self):\n        print(\"Hello, world!\")\n\nmanager = Manager(app)\nmanager.add_command(\"hello\", HelloCommand())\n\nif __name__ == '__main__':\n    manager.run()","lang":"python","description":"This quickstart creates a simple 'manage.py' script that initializes a Flask app with a Flask-Script Manager and adds a custom 'hello' command. Run it using `python manage.py hello` to see 'Hello, world!' printed."},"warnings":[{"fix":"For new projects, avoid Flask-Script entirely. For existing projects, you must migrate to Flask's built-in CLI, which uses the Click library, or downgrade Flask to a compatible version (<2.0).","message":"Flask-Script is explicitly not compatible with Flask 2.0 and later versions, leading to import errors or unexpected behavior.","severity":"breaking","affected_versions":"Flask >= 2.0"},{"fix":"New projects should use Flask's built-in CLI (installed with Flask) or the Click library directly for command-line interfaces. Existing projects are strongly encouraged to migrate.","message":"The Flask-Script library is no longer actively maintained; the last release was in 2017. Flask itself has provided a built-in command-line interface (Flask CLI) since version 0.11 (and extensively with Flask 1.0 and Click) that offers superior functionality and active development.","severity":"deprecated","affected_versions":"All versions (due to lack of maintenance and official deprecation by Flask)"},{"fix":"Always use `from flask_script import Manager` (or other components) directly.","message":"The import path `flask.ext.script` is deprecated. While it might still work in some legacy setups, it signals an outdated approach.","severity":"deprecated","affected_versions":"Older Flask versions using the `flask.ext` namespace."},{"fix":"Prefer using `flask run` from the Flask CLI for development, as it handles reloading and debugging more reliably.","message":"Using Flask-Script's `Server` command for a development server with automatic reloading can lead to \"bizarre side-effects\" like code executing twice or silent crashes. Flask's built-in CLI offers a more robust development server.","severity":"gotcha","affected_versions":"All versions using the `Server` command."}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z","problems":[]}