--- id: bootstrap-flask version: "2.5.0" license: MIT license_treatment: permissive maintenance: active --- # Bootstrap-Flask — Bootstrap 4 & 5 helper for your Flask projects. License: permissive · Maintenance: active · Downloads: 301.7K/mo ## What it is and what it does Bootstrap-Flask is a Flask extension that bridges Flask, WTForms, and Bootstrap by providing a collection of Jinja macros. Instead of writing Bootstrap HTML by hand for forms, tables, and pagination controls, you import a macro and pass your Flask or WTForms object to it—the macro handles the markup generation. It supports both Bootstrap 4 and 5 through separate extension classes, each with its own template path. The package is lightweight, depending only on Flask and WTForms at runtime. It's designed for developers building Flask web applications who want to reduce template boilerplate while maintaining Bootstrap's styling and structure. The macros handle form field rendering with validation error display, data object serialization to tables, and pagination link generation—common tasks that would otherwise require repetitive HTML. Use it for: - Quickly render WTForms form objects with Bootstrap styling and validation error messages in one line. - Convert a list of database records or dictionaries into a Bootstrap-styled HTML table without manual row/column markup. - Display pagination controls as Bootstrap pagination components with proper link generation. - Build admin dashboards or CRUD interfaces where forms and tables are generated from data objects. - Migrate from older Flask-Bootstrap to a maintained extension that supports both Bootstrap 4 and 5. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Bootstrap-Flask provides Jinja macros that render Flask and WTForms objects directly to Bootstrap 4 & 5 HTML markup, eliminating boilerplate form, table, and pagination code. Yes. Bootstrap-Flask is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—reducing boilerplate when rendering forms and tables in Flask templates. It's well-suited for any Flask project using Bootstrap and WTForms. The permissive MIT license and stable API make it a safe dependency. ## Install pip install bootstrap-flask uv add bootstrap-flask poetry add bootstrap-flask ## Installing Bootstrap-Flask Before you install: Low friction: pure Python wheel with only Flask and WTForms as runtime dependencies. Active maintenance with recent commits and a stable release history since 2018. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions. Quickstart: pip install bootstrap-flask from flask import Flask app = Flask(__name__) # In template: # {% from 'bootstrap5/form.html' import render_form %} # {{ render_form(form) }} Requires Bootstrap 4 or 5 CSS/JS to be included in your HTML templates separately; the package provides macros only, not the framework itself. Verify before relying: - Whether all Bootstrap 5 components (alerts, modals, cards, etc.) have corresponding macros or only forms, tables, and pagination. - Performance impact when rendering large tables or complex nested forms with many fields. - Exact scope of what the render_form, table, and pagination macros support beyond the examples shown. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 301.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags flask bootstrap form rendering, wtforms to bootstrap html, flask jinja macros bootstrap, bootstrap table from python objects, flask pagination bootstrap, bootstrap form macros flask, render flask forms bootstrap, flask-extension, template-macros, form-rendering [View on SkillFed](https://skillfed.io/packages/bootstrap-flask) · [View on PyPI](https://pypi.org/project/bootstrap-flask/)