Posts

Showing posts with the label Typed
Why Use Flask-Nova: Modern APIs on Top of Vanilla Flask Why Use Flask-Nova: Modern APIs on Top of Vanilla Flask If you love Flask but wish it had type hints, automatic OpenAPI docs, dependency injection, and better DX — Flask-Nova is for you. The Problem with Vanilla Flask Let’s say you want to build a simple JSON API with Flask. You’d probably write something like: from flask import Flask, request, jsonify app = Flask(__name__) @app.route("/greet", methods=["POST"]) def greet(): data = request.get_json() name = data.get("name") return jsonify({"message": f"Hello, {name}!"}) It works. But now imagine: You want to validate the request data. You want OpenAPI docs for your frontend team. You want typed parameters from the URL or query. You want better error handling and testing. You want some structure, without rewriting everything. Soon, your simpl...