# beartype/beartype

Unbearably fast near-real-time pure-Python runtime-static type-checker.

Repository: https://github.com/beartype/beartype
Canonical: https://ross.abutalabs.com/products/beartype
Homepage: https://beartype.readthedocs.io
Language: Python
License: MIT
License Family: permissive
Topics: python3, runtime-typechecking, static-typechecking
Last push: 2026-08-22T06:42:21+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 61, longevity 100
- inputs: {"age_days": 2343, "days_push": 11, "days_rel": 263, "gap_med": 10, "n_releases_24m": 14}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3486, forks 81 (observed 2026-08-28T04:08:07.014970+00:00)

## What it is
Beartype is a pure-Python, PEP-compliant runtime type checker that validates type hints at near-real-time speed with O(1) constant-time checks. It can implicitly type-check all annotated callables, classes, and variable assignments across a package via a single import hook.

## Use cases
- enforce type hints at runtime in Python
- validate function arguments against type annotations
- catch type errors in production without performance overhead
- type-check an entire Python package with one line
- validate data structures against complex PEP 484/585 type hints

## When to choose
- you want runtime type checking with negligible overhead
- you need PEP-compliant validation of modern type hints (generics, unions, Annotated)
- you want a zero-dependency pure-Python solution
- you want to opt a whole package into type checking via an import hook

## When to avoid
- you only need static type checking at edit time (use mypy or pyright)
- you need runtime schema validation with coercion or detailed error schemas (consider pydantic)
- your codebase is not Python

## Facets
- artifact type: library
- maturity: active
- function: type-system, testing, developer-tools
- domain: developer-tools, programming-languages, performance
- platform: python, cross-platform
- tags: type-checking, type-hints, runtime-validation, pep-compliant, pure-python

## Member repositories
- beartype/beartype (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:07.014970+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-29T18:36:23.586476+00:00, confidence not recorded.
  - readme: https://github.com/beartype/beartype (fetched 2026-08-28T04:08:07.014970+00:00, sha 791d92df8947)
  - registry_pypi: https://pypi.org/pypi/beartype/json (fetched 2026-08-29T09:30:41.652086+00:00, sha 35677ee3866d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
