branca
Generate complex HTML+JS pages with Python
Decision gist · record as of 2026-08-14
Yes. Branca is a stable, actively maintained library with low install friction, permissive licensing, and no known vulnerabilities. Install it if you need to generate HTML and JavaScript from Python code without writing raw markup—particularly useful for data visualization and report generation workflows.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction install with a single pure-Python dependency (jinja2).
- Active maintenance with recent commits and stable production status across Python 3.8–3.12.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute branca with minimal restrictions, including in commercial projects.
last release 2025-10-06 (312 days) · last repo commit 2026-08-13 · 134 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,649,338 downloads/mo, #2,543 on PyPI
Alternatives
Verify before relying
pip install branca
from branca.element import Figure, Html
fig = Figure()
fig.add_child(Html('<h1>Hello World</h1>'))
fig.render()- Whether branca's HTML/JS output is suitable for modern browser security policies (CSP, etc.)
- Performance characteristics when generating very large or deeply nested HTML structures
- Extent of interactive component support beyond basic templating
What it is and what it does
Branca is a Python library for programmatically generating HTML and JavaScript pages. It wraps Jinja2 templating to let you build complex web content as Python objects rather than writing raw markup. Originally developed as part of the folium project, it now stands alone as a general-purpose tool for anyone who needs to create dynamic web pages from Python code.
The library is designed for data visualization and web content generation workflows where you want to avoid hand-coding HTML and JavaScript. It supports modern Python versions (3.8–3.12) and has no heavy compiled dependencies, making it straightforward to install and use in any Python environment.
Use it for
- Generate interactive web dashboards and visualizations from Python data analysis code
- Create HTML reports programmatically with dynamic content and styling
- Build custom map or chart visualizations that need both HTML structure and JavaScript interactivity
- Template-based web content generation for data science notebooks and Jupyter environments
- Embed interactive elements into static documentation or data export workflows
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Branca is a stable, actively maintained library with low install friction, permissive licensing, and no known vulnerabilities. Install it if you need to generate HTML and JavaScript from Python code without writing raw markup—particularly useful for data visualization and report generation workflows.
Install
branca on PyPI
Before you install
Low friction install with a single pure-Python dependency (jinja2). Active maintenance with recent commits and stable production status across Python 3.8–3.12.
License in practice
MIT license is permissive; you can use, modify, and distribute branca with minimal restrictions, including in commercial projects.
Quickstart
pip install branca
from branca.element import Figure, Html
fig = Figure()
fig.add_child(Html('<h1>Hello World</h1>'))
fig.render()
Verify before relying
- Whether branca's HTML/JS output is suitable for modern browser security policies (CSP, etc.)
- Performance characteristics when generating very large or deeply nested HTML structures
- Extent of interactive component support beyond basic templating
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagejinja2 |
| Maintenance | Actively maintained 312 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,649,338 / month, #2,543 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: branca-0.8.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “dynamic html js pages”
- brancaBranca generates HTML and JavaScript pages from Python code using…
- chompjsParses JavaScript objects embedded in HTML or text into Python…
- Flask-MinifyFlask extension that automatically minifies HTML, JavaScript, CSS,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also folium · html5tagger · htmlBuilder · vsdx · htbuilder · jinja2-fragments · dominate · mjml · aiohttp-jinja2