Flask-Classful provides class-based views for Flask, allowing you to define methods corresponding to HTTP methods (GET, POST, etc.) and automatically generate routes. Version 0.16.0 (latest) fixes compatibility with Flask >= 2.2. The library is now maintained under the Pallets Community Ecosystem. Release cadence is irregular.
Install & Compatibility
Where this runs
tested against v0.16.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.452s · 22.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.1s · import 0.430s · 23MB
21MB installed
● package 21MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
flask.ext.classy is an older/alternative packaging; the correct import is from flask_classful.
from flask_classful import FlaskView
The route decorator is exported from flask_classful.
from flask_classful import route
Minimal Flask app with a class-based view. Access http://localhost:5000/my-view/ to see 'Hello World!'.
from flask import Flask
from flask_classful import FlaskView
app = Flask(__name__)
class MyView(FlaskView):
def index(self):
return "Hello World!"
MyView.register(app)
if __name__ == "__main__":
app.run()
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.