--- id: types-attrs version: "19.1.0" license: Apache-2.0 license license_treatment: permissive maintenance: active --- # types-attrs — Typing stubs for attrs License: permissive · Maintenance: active · Downloads: 194.6K/mo ## What it is and what it does types-attrs is a PEP 561 type stub package auto-generated from typeshed that provides type information for the attrs library. It allows static type checkers—mypy, PyCharm, pytype, and others—to understand and validate code that uses attrs, catching type errors before runtime. The package has no runtime dependencies and installs as a pure wheel. However, the description notes that attrs itself has included type annotations since version 18.2.0, making this stub package potentially unnecessary for users on newer attrs versions. The package has not been updated since 2021-06-06, which aligns with its role as a legacy compatibility shim. Use it for: - Type-check attrs-based code with mypy or other PEP 561-compatible type checkers when using older attrs versions. - Provide IDE type hints in PyCharm or other editors for attrs classes and decorators. - Validate attrs usage in a codebase that requires strict static type analysis. - Support type checking in projects pinned to attrs versions before 18.2.0. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides PEP 561 type stubs for the attrs package, enabling type checkers like mypy and PyCharm to validate code using attrs. No—install this only if you are using attrs before version 18.2.0. For modern attrs (18.2.0 and later), uninstall this package and rely on attrs' native type annotations instead. The description explicitly recommends this approach. ## Install pip install types-attrs uv add types-attrs poetry add types-attrs ## Installing types-attrs Before you install: Low install friction with a pure-wheel distribution. Maintenance is active with recent repository commits, though the package itself has not been updated since 2021-06-06; this is expected for a stub package that tracks typeshed. License in practice: Apache-2.0 permissive license allows use in most projects without restriction. Quickstart: pip install types-attrs Then use with mypy or other PEP 561-compatible type checkers in your project configuration. Only needed for attrs versions before 18.2.0; attrs 18.2.0 and later include native type annotations. Verify before relying: - Whether this stub package remains actively maintained in typeshed for modern attrs versions. - Compatibility matrix with current attrs releases and whether native annotations have fully superseded this package. ## Package facts - License: Apache-2.0 license (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 194.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs for attrs, attrs type checking, mypy attrs support, pep 561 type stubs, attrs typing annotations, static type checking attrs, type-stubs, typing [View on SkillFed](https://skillfed.io/packages/types-attrs) · [View on PyPI](https://pypi.org/project/types-attrs/)