Loading…
Loading…
Python · microframework
Flask is Archiet's default backend. A generated Flask app includes JWT auth with httpOnly cookies, SQLAlchemy models with Alembic migrations, a typed OpenAPI spec, Celery for async tasks, and a multi-stage Dockerfile. The companion Next.js frontend uses App Router + shadcn/ui.
Every Flask app generated by Archiet ships with these baseline pieces. No template-cutting, no placeholder TODOs.
One representative file from a generated Flask app. Your generated output will include many more files like this one, customized to the entities and flows in your blueprint.
from flask import Blueprint, jsonify, request
from flask_jwt_extended import create_access_token, set_access_cookies
auth_bp = Blueprint("auth", __name__)
@auth_bp.route("/login", methods=["POST"])
def login():
body = request.get_json(force=True) or {}
user = User.query.filter_by(email=body["email"]).first()
if not user or not user.verify_password(body["password"]):
return jsonify({"error": "invalid_credentials"}), 401
token = create_access_token(identity=user.id)
resp = jsonify({"data": user.to_dict()})
set_access_cookies(resp, token)
return respPick Flask when you want the shortest path from architecture to a shippable Python API. Minimal magic, easy to hire for, composes cleanly with the whole Python ecosystem.