skillfed

Bootstrap-Flask

Bootstrap 4 & 5 helper for your Flask projects.

bootstrap-flask v2.5.0 301.7K downloads/30d#7,833 on PyPI1,195
Permissive license MIT Active released

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 on this page — 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

bootstrap-flask on PyPI

pip

pip install bootstrap-flask

uv

uv add bootstrap-flask

poetry

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 not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — Flask, WTForms
Maintenance actively maintained — 469 days since the last release
Last repo commit
First released
Downloads 301,656/month — #7,833 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: bootstrap_flask-2.5.0-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: FlaskIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules

Tags

flask bootstrap form renderingwtforms to bootstrap htmlflask jinja macros bootstrapbootstrap table from python objectsflask pagination bootstrapbootstrap form macros flaskrender flask forms bootstrap
flask-extensiontemplate-macrosform-rendering

More Python Modules packages