--- id: types-tensorflow version: "2.18.0.20260730" license: Apache-2.0 license_treatment: permissive maintenance: active --- # types-tensorflow — Typing stubs for tensorflow License: permissive · Maintenance: active · Downloads: 407.6K/mo ## What it is and what it does types-tensorflow is a type stub package that provides type annotations for TensorFlow 2.18.0. It allows static type checkers like mypy, pyright, and ty to understand and validate TensorFlow code without requiring TensorFlow itself to be installed during type checking. The stubs are partially generated from TensorFlow's protobuf definitions using mypy-protobuf and tested against multiple type checkers. The package is part of the typeshed project and marked as partial, meaning some annotations may be incomplete. It depends on numpy, types-protobuf, and requests—lightweight dependencies that support the type information layer. Use it when you want IDE autocompletion and static type validation for TensorFlow code in your editor or CI pipeline. Use it for: - Enable mypy or pyright to type-check TensorFlow code in CI/CD without installing the full TensorFlow package. - Get IDE autocompletion and hover documentation for TensorFlow APIs in editors that support type stubs. - Validate TensorFlow function signatures and argument types during development without runtime overhead. - Support type-aware refactoring tools that rely on accurate type information for TensorFlow modules. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides type hints for TensorFlow 2.18.0, enabling static type checkers to validate code that uses TensorFlow without requiring the full TensorFlow package to be installed. Yes, if you use a static type checker with TensorFlow code. Install it as a dev dependency to enable type validation and IDE support. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. Be aware it is a partial stub package—some annotations may be missing, and it targets TensorFlow 2.18.0 specifically. ## Install pip install types-tensorflow uv add types-tensorflow poetry add types-tensorflow ## Installing types-tensorflow Before you install: Low install friction with stable maintenance. Released 15 days ago with active repository status. Depends on numpy, types-protobuf, and requests—all common, well-maintained packages. License in practice: Apache-2.0 permissive license allows use in most projects without restriction, including commercial and proprietary software. Quickstart: pip install types-tensorflow import tensorflow as tf # Type checkers now understand tensorflow's API Requires Python 3.10 or later. Intended for use with a type checker (mypy, pyright, or ty); does not provide runtime functionality. Verify before relying: - Coverage completeness: the package is marked as partial; extent of missing annotations for TensorFlow 2.18.0 is not specified. - Compatibility with TensorFlow versions beyond 2.18.0 or with older versions is not documented in the excerpt. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 407.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags tensorflow type stubs, tensorflow type hints, type checking tensorflow, tensorflow mypy support, tensorflow static typing, tensorflow type annotations, tensorflow pyright stubs, type-stubs, static-typing [View on SkillFed](https://skillfed.io/packages/types-tensorflow) · [View on PyPI](https://pypi.org/project/types-tensorflow/)