--- id: branca version: "0.8.2" license: MIT license_treatment: permissive maintenance: active --- # branca — Generate complex HTML+JS pages with Python License: permissive · Maintenance: active · Downloads: 3.6M/mo ## 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 above — verify before relying. Branca generates HTML and JavaScript pages from Python code using Jinja2 templating, enabling programmatic creation of complex web content without writing raw HTML or JS. 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 pip install branca uv add branca poetry add branca ## Installing branca 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('