Install & Compatibility
Where this runs
tested against v0.10.0.20260508 · 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
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 65.8MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
65MB installed
● package 65MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
tabulate
✓ from tabulate_stubs import tabulate
✗ from tabulate_stubs import tabulate
This quickstart demonstrates basic usage of the `tabulate` library for which `types-tabulate` provides typing information. It shows how to create a formatted table from a list of lists and a list of dictionaries, using different table formats like 'grid' and 'fancy_grid'.
from tabulate import tabulate
data = [
["Name", "Age", "City"],
["Alice", 30, "New York"],
["Bob", 24, "Los Angeles"],
["Charlie", 35, "Chicago"]
]
# Print with headers from the first row
print(tabulate(data, headers="firstrow", tablefmt="grid"))
print("\n---\n")
# Or from a list of dictionaries
data_dicts = [
{"Item": "Pizza", "Price": 850},
{"Item": "Burger", "Price": 500},
{"Item": "Salad", "Price": 475}
]
print(tabulate(data_dicts, headers="keys", tablefmt="fancy_grid"))
Debug
Known issues
breaking`types-tabulate` is designed to provide accurate type annotations for a specific major version range of the runtime `tabulate` library. For example, `types-tabulate==0.10.0.20260308` targets `tabulate==0.10.*`. However, the `tabulate` library itself released version `0.11.0` in March 2026, which includes API changes (e.g., dropping the `youtrack` format, adding `Decimal` support). Previous major version `0.10.0` dropped Python 3.7-3.9 support and replaced the `PRESERVE_STERILITY` global with a function argument. If your installed `tabulate` runtime version (e.g., `0.11.0`) differs from the version `types-tabulate` is designed for (e.g., `0.10.*`), your type checker may report incorrect errors or fail to catch actual runtime type issues.fixAlways check the `types-tabulate` PyPI page or `typeshed` project for the exact `tabulate` version range it targets. Ensure your installed `tabulate` runtime package's major version is compatible with the `types-tabulate` stubs you are using. If using a newer `tabulate` version than officially supported by the latest `types-tabulate`, you might need to wait for an update to `types-tabulate` or consider temporary type ignore comments.
affects: All `types-tabulate` versions when `tabulate` runtime version is mismatched (e.g., `types-tabulate==0.10.*` with `tabulate>=0.11.0`).
gotcha`types-tabulate` is a stub-only package (`.pyi` files) and contains no runtime code. It's solely for static type checking purposes (e.g., with MyPy or Pyright). Attempting to import or use `types-tabulate` directly at runtime will result in an `ImportError` or `AttributeError` if you try to call functions from it, as the actual executable code resides in the `tabulate` package.fixAlways import `tabulate` (e.g., `from tabulate import tabulate`) for runtime functionality. `types-tabulate` is implicitly used by your type checker and does not need to be explicitly imported or referenced in your runtime code.
affects: All versions of `types-tabulate`.
gotchaOlder versions of type checkers (like MyPy or Pyright) might bundle an older copy of `typeshed`, the repository where `types-tabulate` stubs originate. This can lead to them not recognizing newer typing features or annotations introduced in more recent `types-tabulate` releases. As a result, your type checker might silently infer `Any` types for parts of `tabulate`'s API or produce unexpected type errors, reducing the effectiveness of static analysis.fixKeep your type checker (e.g., `mypy`, `pyright`) updated to its latest stable version to ensure full compatibility with the latest `types-tabulate` stubs. If issues persist, consider explicitly specifying the `types-tabulate` version or using features like `mypy`'s `--package` flag to manage `typeshed`'s usage.
affects: All `types-tabulate` versions when used with outdated type checkers.
Upgrade
Version history
0.10.0.20260508latest on PyPI · released May 8, 2026
Audit
Dependencies
tabulaterequiredThis package provides type stubs for the `tabulate` runtime library. `tabulate` must be installed separately for actual program execution.