Tip

πŸ’— Upbear us at GitHub Sponsors and SonarQube Advanced Security (Tidelift). Follow us on Bluesky.

Your generous support is our quality assurance. πŸ’—

FeaturesΒΆ

Beartype complies with vast swaths of Python’s typing landscape and lint-filled laundry list of Python Enhancement Proposals (PEPs) – but nobody’s perfect. Not even the hulking form of beartype does everything. </audience_gasps>

Let’s chart exactly what beartype complies with and when beartype first did so. Introducing… Beartype’s feature matrix of bloated doom! It will bore you into stunned disbelief that somebody typed all this. [1]

category

feature

partial support

full support

Python

3.5

β€”

0.1.0β€”0.3.0

3.6

β€”

0.1.0β€”0.10.4

3.7

β€”

0.1.0β€”0.15.0

3.8

β€”

0.1.0β€”0.19.0

3.9

β€”

0.3.2β€”0.22.0

3.10

β€”

0.7.0β€”current

3.11

β€”

0.12.0β€”current

3.12

β€”

0.17.0β€”current

3.13

β€”

0.19.0β€”current

3.14

β€”

0.22.0β€”current

PEP

342

none

0.22.8β€”current

PEP

362

none

none

PEP

380

none

0.22.8β€”current

435

0.16.0β€”current

none

440

0.1.0β€”current

none

484

0.2.0β€”current

none

517

β€”

0.19.0β€”current

518

β€”

0.19.0β€”current

PEP

525

none

0.22.7β€”current

526

β€”

0.15.0β€”current

544

β€”

0.4.0β€”current

557

0.10.0β€”current

none

560

β€”

0.4.0β€”current

561

β€”

0.6.0β€”current

563

β€”

0.7.0β€”current

570

β€”

0.10.0β€”current

572

β€”

0.4.0β€”current

585

β€”

0.5.0β€”current

586

β€”

0.7.0β€”current

589

0.9.0β€”current

none

591

0.13.0β€”current

none

593

β€”

0.4.0β€”current

604

β€”

0.10.0β€”current

612

0.19.0β€”current

none

613

none

0.18.0β€”current

621

β€”

0.19.0β€”current

646

0.22.0β€”current

none

647

β€”

0.13.0β€”current

649

none

0.22.0β€”current

663

0.16.0β€”current

none

673

β€”

0.14.0β€”current

675

0.14.0β€”current

none

681

none

none

688

β€”

0.1.0β€”current

692

0.19.0β€”current

none

695

β€”

0.21.0β€”current

696

none

0.22.0β€”current

698

none

none

705

none

none

742

β€”

0.20.0β€”current

747

none

none

749

none

0.22.0β€”current

3102

β€”

0.1.0β€”current

3119

β€”

0.9.0β€”current

3141

β€”

0.1.0β€”current

packaging

PyPI

β€”

0.1.0β€”current

Anaconda

β€”

0.1.0β€”current

Arch Linux

β€”

0.12.0β€”current

Gentoo Linux

β€”

0.2.0β€”current

macOS Homebrew

β€”

0.5.1β€”current

macOS MacPorts

β€”

0.5.1β€”current

decoratable

classes

β€”

0.11.0β€”current

coroutines

β€”

0.9.0β€”current

dataclasses

β€”

0.10.0β€”current

enumerations

0.16.0β€”current

none

functions

β€”

0.1.0β€”current

generators (asynchronous)

β€”

0.9.0β€”current

generators (synchronous)

β€”

0.1.0β€”current

methods

β€”

0.1.0β€”current

pseudo-functions (__call__())

β€”

0.13.0β€”current

hints

covariant

β€”

0.1.0β€”current

contravariant

none

none

absolute forward references

β€”

0.14.0β€”current

relative forward references

β€”

0.14.0β€”current

subscriptable forward references

β€”

0.16.0β€”current

tuple unions

β€”

0.1.0β€”current

type alias statements

β€”

0.21.0β€”current

parameters

optional

β€”

0.18.0β€”current

keyword-only

β€”

0.1.0β€”current

positional-only

β€”

0.10.0β€”current

variadic keyword

β€”

0.19.0β€”current

variadic positional

β€”

0.1.0β€”current

plugin APIs

__instancecheck_str__

β€”

0.17.0β€”current

shell variables

${BEARTYPE_IS_COLOR}

β€”

0.16.0β€”current

static checkers

mypy

β€”

0.6.0β€”current

pyright

β€”

0.11.0β€”current

pytype

none

none

Pyre

none

none

beartype

beartype()

β€”

0.1.0β€”current

BeartypeConf

β€”

0.10.0β€”current

BeartypeStrategy

β€”

0.10.0β€”current

beartype.abby

die_if_unbearable

β€”

0.10.0β€”0.10.4

is_bearable

β€”

0.10.0β€”0.10.4

beartype.claw

beartype_all()

β€”

0.15.0β€”current

beartype_package()

β€”

0.15.0β€”current

beartype_packages()

β€”

0.15.0β€”current

beartype_this_package()

β€”

0.15.0β€”current

beartyping()

β€”

0.15.0β€”current

beartype.bite

infer_hint()

β€”

0.22.0β€”current

beartype.door

TypeHint

β€”

0.11.0β€”current

AnnotatedTypeHint

β€”

0.11.0β€”current

AnyTypeHint

β€”

0.20.0β€”current

CallableTypeHint

β€”

0.11.0β€”current

GenericTypeHint

β€”

0.20.0β€”current

LiteralTypeHint

β€”

0.11.0β€”current

NewTypeTypeHint

β€”

0.11.0β€”current

TupleFixedTypeHint

β€”

0.19.0β€”current

TupleVariableTypeHint

β€”

0.19.0β€”current

TypeVarTypeHint

β€”

0.11.0β€”current

UnionTypeHint

β€”

0.11.0β€”current

die_if_unbearable()

β€”

0.11.0β€”current

infer_hint()

β€”

0.19.0β€”0.21.0

is_bearable()

β€”

0.11.0β€”current

is_subhint()

β€”

0.11.0β€”current

beartype.peps

resolve_pep563()

β€”

0.11.0β€”current

beartype.typing

all

β€”

0.10.0β€”current

beartype.vale

Is

β€”

0.7.0β€”current

IsAttr

β€”

0.7.0β€”current

IsEqual

β€”

0.7.0β€”current

IsInstance

β€”

0.10.0β€”current

IsSubclass

β€”

0.9.0β€”current

builtins

None

β€”

0.6.0β€”current

NotImplemented

β€”

0.7.1β€”current

dict

β€”

0.18.0β€”current

frozenset

β€”

0.19.0β€”current

list

β€”

0.5.0β€”current

set

β€”

0.19.0β€”current

tuple

β€”

0.5.0β€”current

type

β€”

0.9.0β€”current

click

all

β€”

0.20.0β€”current

collections

ChainMap

β€”

0.19.0β€”current

Counter

β€”

0.19.0β€”current

OrderedDict

β€”

0.18.0β€”current

defaultdict

β€”

0.18.0β€”current

deque

β€”

0.19.0β€”current

celery.Celery

@task

–

0.22.0β€”current

collections.abc

AsyncGenerator

0.5.0β€”current

none

AsyncIterable

0.5.0β€”current

none

AsyncIterator

0.5.0β€”current

none

Awaitable

0.5.0β€”current

none

Buffer

β€”

0.1.0β€”current

ByteString

β€”

0.5.0β€”current

Callable

0.5.0β€”current

none

Collection

–

0.19.0β€”current

Container

β€”

0.20.0β€”current

Coroutine

0.9.0β€”current

none

Generator

0.5.0β€”current

none

ItemsView

β€”

0.19.0β€”current

Iterable

β€”

0.20.0β€”current

Iterator

0.5.0β€”current

none

KeysView

–

0.19.0β€”current

Mapping

–

0.18.0β€”current

MappingView

0.5.0β€”current

none

MutableMapping

–

0.18.0β€”current

MutableSequence

β€”

0.5.0β€”current

MutableSet

β€”

0.19.0β€”current

Reversible

β€”

0.20.0β€”current

Sequence

β€”

0.5.0β€”current

Set

β€”

0.19.0β€”current

ValuesView

β€”

0.19.0β€”current

contextlib

AbstractAsyncContextManager

0.5.0β€”current

none

AbstractContextManager

0.5.0β€”current

none

asynccontextmanager

β€”

0.20.0β€”current

contextmanager

β€”

0.15.0β€”current

dataclasses

InitVar

β€”

0.10.0β€”current

dataclass

0.10.0β€”current

none

enum

Enum

0.16.0β€”current

none

StrEnum

0.16.0β€”current

none

equinox

Module

β€”

0.17.0β€”0.19.0

@filter_jit

β€”

0.19.0β€”current

gradio

all

–

0.22.7β€”current

inspect

isasyncgenfunction

–

0.22.7β€”current

isgeneratorfunction

–

0.22.6β€”current

jax

@jit

β€”

0.19.0β€”current

jaxtyping

@jaxtyped

β€”

0.22.0β€”current

langchain

most

0.20.0β€”current

none

langchain_core.runnables

@chain

–

0.22.0β€”current

functools

lru_cache

β€”

0.15.0β€”current

nuitka

all

β€”

0.12.0β€”current

numba

@njit

β€”

0.19.0β€”current

nptyping

all

β€”

0.17.0β€”current

numpy.typing

numpy.typing.NDArray

β€”

0.8.0β€”current

os

PathLike

0.17.0β€”current

none

PyInstaller

all

β€”

0.22.9β€”current

pandera

all

β€”

0.13.0β€”current

pydantic

all

0.20.0β€”current

none

re

Match

0.5.0β€”current

none

Pattern

0.5.0β€”current

none

redis

redis.Redis

β€”

0.22.3β€”current

rich_click

all

β€”

0.20.1β€”current

sphinx

sphinx.ext.autodoc

β€”

0.9.0β€”current

typing

AbstractSet

β€”

0.19.0β€”current

Annotated

β€”

0.4.0β€”current

Any

β€”

0.2.0β€”current

AnyStr

0.4.0β€”current

none

AsyncContextManager

0.4.0β€”current

none

AsyncGenerator

0.2.0β€”current

none

AsyncIterable

0.2.0β€”current

none

AsyncIterator

0.2.0β€”current

none

Awaitable

0.2.0β€”current

none

BinaryIO

β€”

0.10.0β€”current

ByteString

β€”

0.2.0β€”current

Callable

0.2.0β€”current

none

ChainMap

β€”

0.19.0β€”current

ClassVar

none

none

Collection

β€”

0.19.0β€”current

Concatenate

none

none

Container

β€”

0.20.0β€”current

ContextManager

0.4.0β€”current

none

Coroutine

0.9.0β€”current

none

Counter

β€”

0.19.0β€”current*

DefaultDict

β€”

0.18.0β€”current

Deque

β€”

0.19.0β€”current

Dict

β€”

0.18.0β€”current*

Final

0.13.0β€”current

none

ForwardRef

β€”

0.16.0β€”current

FrozenSet

β€”

0.19.0β€”current

Generator

0.2.0β€”current

none

Generic

β€”

0.4.0β€”current

Hashable

0.2.0β€”current

none

IO

β€”

0.10.0β€”current

ItemsView

β€”

0.19.0β€”current

Iterable

β€”

0.20.0β€”current

Iterator

0.2.0β€”current

none

KeysView

β€”

0.19.0β€”current

List

β€”

0.3.0β€”current

Literal

β€”

0.7.0β€”current

LiteralString

0.14.0β€”current

none

Mapping

–

0.18.0β€”current*

MappingView

0.2.0β€”current

none

Match

0.4.0β€”current

none

MutableMapping

–

0.18.0β€”current

MutableSequence

β€”

0.3.0β€”current

MutableSet

β€”

0.19.0β€”current

NamedTuple

β€”

0.12.0β€”current

NewType

β€”

0.4.0β€”current

NoDefault

β€”

0.22.0β€”current

NoReturn

β€”

0.4.0β€”current

Optional

β€”

0.2.0β€”current

OrderedDict

–

0.18.0β€”current

ParamSpec

none

none

ParamSpecArgs

0.19.0β€”current

none

ParamSpecKwargs

0.19.0β€”current

none

Pattern

0.4.0β€”current

none

Protocol

β€”

0.4.0β€”current

ReadOnly

none

none

Reversible

β€”

0.20.0β€”current

Self

β€”

0.14.0β€”current

Sequence

β€”

0.3.0β€”current

Set

β€”

0.190β€”current

Sized

β€”

0.2.0β€”current

SupportsAbs

β€”

0.4.0β€”current

SupportsBytes

β€”

0.4.0β€”current

SupportsComplex

β€”

0.4.0β€”current

SupportsFloat

β€”

0.4.0β€”current

SupportsIndex

β€”

0.4.0β€”current

SupportsInt

β€”

0.4.0β€”current

SupportsRound

β€”

0.4.0β€”current

Text

β€”

0.1.0β€”current

TextIO

β€”

0.10.0β€”current

Tuple

β€”

0.4.0β€”current

Type

β€”

0.9.0β€”current

TypeAlias

β€”

0.18.0β€”current

TypeGuard

β€”

0.13.0β€”current

TypeIs

β€”

0.20.0β€”current

TypedDict

0.9.0β€”current

none

TypeVar

0.4.0β€”current

none

TypeVarTuple

0.19.0β€”current

none

Union

β€”

0.2.0β€”current

Unpack

0.19.0β€”current

none

ValuesView

β€”

0.19.0β€”current

TYPE_CHECKING

β€”

0.5.0β€”current

final

none

none

no_type_check

β€”

0.5.0β€”current

override

none

none

typing_extensions

all attributes

β€”

0.8.0β€”current

xarray

all

0.20.0β€”current

none

weakref

ref

0.17.0β€”current

none