# brython-dev/brython

Brython (Browser Python) is an implementation of Python 3 running in the browser

Repository: https://github.com/brython-dev/brython
Canonical: https://ross.abutalabs.com/products/brython
Language: Python
License: BSD-3-Clause
License Family: permissive
Last push: 2026-08-26T13:04:48+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 77, longevity 100
- inputs: {"age_days": 4370, "days_push": 7, "days_rel": 75, "gap_med": 84, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6611, forks 535 (observed 2026-08-28T04:09:45.723263+00:00)

## What it is
Brython is an implementation of Python 3 that runs entirely in the web browser, loaded as a JavaScript file and executing Python code embedded in HTML via <script type="text/python"> tags. It provides bindings to the DOM, events, HTML5/CSS3, and interop with existing JavaScript libraries like jQuery and D3, and ships a Python standard library subset usable client-side.

## Use cases
- run python code in the browser
- replace javascript with python for a web frontend
- write client-side web apps in python
- embed python scripts directly in html pages
- manipulate dom elements and events using python
- use python standard library modules in the browser
- teach python with zero-install browser examples
- interface python with javascript libraries like jquery or d3

## When to choose
- you want to build browser-based interfaces in Python instead of JavaScript
- you need a zero-install or no-build-toolchain way to run Python client-side (e.g., education, demos)
- you want to reuse Python code or stdlib modules in the browser
- you need DOM/event handling in Python with access to existing JS libraries
- you want to avoid compiling to JavaScript and just add a script tag

## When to avoid
- you need maximum frontend performance, as interpreted-in-browser Python is slower than native JavaScript
- you are building a large production SPA that benefits from the mature JavaScript/TypeScript ecosystem and tooling
- you need server-side execution or filesystem access, which Brython's browser context excludes
- your project depends on C extension packages (numpy, etc.) that Brython cannot run
- you need strong typing and npm-based tooling for team development

## Facets
- artifact type: framework
- maturity: active
- function: interpreter, compiler, frontend-framework, programming-language, developer-tools
- domain: web-development, frontend, programming-languages, compilers, cross-platform
- platform: browser
- tags: python-in-browser, python-to-javascript, transpiler, dom-manipulation, javascript-interop, client-side-python, html5, python3, cdn-usage, script-tag

## Member repositories
- brython-dev/brython (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:45.723263+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:43:30.694907+00:00, confidence not recorded.
  - readme: https://github.com/brython-dev/brython (fetched 2026-08-28T04:09:45.723263+00:00, sha 50a68d7c952d)
  - registry_pypi: https://pypi.org/pypi/brython/json (fetched 2026-08-29T08:39:41.236575+00:00, sha 7bc787d8ab03)
- Data as of 2026-08-30T08:39:29.467469+00:00.
