Registry / type-stubs / types-tqdm

types-tqdm

JSON →
library4.70.0.20260827pypypi✓ verified 25d ago

This package provides machine-readable type hints (stubs) for the popular `tqdm` progress bar library. It enables static type checkers like MyPy, Pyright, or Pylance to validate `tqdm` usage in Python code, catching potential type errors before runtime. As part of the `typeshed` project, `types-tqdm` versions are frequently released, often daily, to track changes and updates in the upstream `tqdm` library.

pip install types-tqdm
INSTALL
IMPORT
SIG · TYPES-TQDM
T
types-tqdm
type-stubspythonv4.70.0.20260827
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.70.0.20260827 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tqdm
from tqdm_stubs import tqdm
from tqdm_stubs import tqdm

This quickstart demonstrates basic `tqdm` usage. Installing `types-tqdm` allows static type checkers (like MyPy, Pyright, or Pylance) to validate the type correctness of your interactions with `tqdm`'s functions and methods, for example, ensuring you pass an iterable to `tqdm` or correctly use its return values. The stubs themselves have no runtime effect; they are purely for static analysis.

from tqdm import tqdm import time def process_items(items): for item in tqdm(items, desc='Processing'): time.sleep(0.01) # Simulate work # Add type-sensitive operations here # For example, if item is expected to be a string: _ = item.upper() if __name__ == '__main__': my_list = list(range(100)) process_items(my_list) # To check types, run a type checker like MyPy: # pip install mypy # mypy your_script_name.py # The 'types-tqdm' package provides the necessary type definitions for 'tqdm'.
Debug
Known issues
gotchaStub packages like `types-tqdm` are for static type checking only. They provide no runtime functionality. You still need to install the actual `tqdm` library (`pip install tqdm`) for your code to execute successfully.
fix
Ensure both `tqdm` and `types-tqdm` are installed in your development environment (`pip install tqdm types-tqdm`).
affects: All versions
gotchaType checking errors can occur if there's a significant version mismatch between your installed `tqdm` library and the `types-tqdm` stub package. `typeshed` stubs generally track the latest stable versions of upstream libraries.
fix
Keep your `tqdm` and `types-tqdm` packages reasonably up-to-date. If you encounter unexpected type errors, try upgrading both packages to their latest versions, or pin `tqdm` to a version compatible with the `types-tqdm` stubs.
affects: All versions
gotchaIf you are using a type checker (e.g., MyPy) in a CI/CD pipeline, remember that `types-tqdm` must be installed in the environment where the type checker runs. It might not be necessary in your final production runtime environment, depending on your deployment strategy.
fix
Add `pip install types-tqdm` to your CI/CD setup script before running the type checking command. Consider adding it to a `requirements-dev.txt` or similar file.
affects: All versions
gotchaSometimes, type checkers might flag valid code due to limitations of the stubs or specific usage patterns. For example, dynamically adding attributes or using highly generic types with `tqdm` might trigger warnings.
fix
Use type checker directives (e.g., `# type: ignore` for MyPy) to suppress specific false-positive errors, but do so judiciously and with comments explaining why.
affects: All versions
Upgrade
Version history
4.70.0.20260827latest on PyPI · released Aug 27, 2026
Audit
Dependencies
tqdmoptionalThis stub package provides type hints for the `tqdm` library. While not a runtime dependency, `types-tqdm` is only useful if `tqdm` is also installed in your environment for actual execution.
Agent activity
39 hits · last 30 days
node
34
OpenAI (training)
1
Resources
types-tqdm — pip install types-tqdm · libregistry