plotly-stubs
Type stubs for plotly.
What it is and what it does
plotly-stubs is a stub-only package that adds type annotations to plotly, the popular Python visualization library. It contains no runtime code—only `.pyi` files that tell type checkers like mypy what types plotly's functions and classes expect and return. When installed alongside plotly, it enables your IDE to provide accurate autocompletion and allows type checkers to catch type errors before runtime.
The package is designed for developers who use plotly with modern Python versions (3.11 through 3.14) and want static type safety. It has no runtime dependencies, so it adds no overhead to your environment—it only improves the development experience by making plotly's API surface visible to type-aware tools.
Use it for:
- Enable mypy or pyright type checking on code that uses plotly for data visualization.
- Get IDE autocompletion and parameter hints when writing plotly chart code.
- Catch type mismatches in plotly function calls before running your code.
- Integrate plotly into a strictly typed Python project without losing type safety.
- Document plotly API expectations in a codebase using type annotations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides static type annotations (stubs) for the plotly library, enabling type checking and IDE autocompletion when using plotly in Python projects.
Yes, if you use plotly and want type checking support. The package is lightweight (no dependencies), actively maintained, and carries a permissive MIT license. Install it alongside plotly to unlock IDE autocompletion and type-checker integration with zero runtime cost. Only skip it if you do not use type checking or do not use plotly.
Install
plotly-stubs on PyPI
pip
pip install plotly-stubsuv
uv add plotly-stubspoetry
poetry add plotly-stubsInstalling plotly-stubs
Before you install
Low friction to install—a pure stub package with no runtime dependencies. Actively maintained as of the last commit on 2026-08-14, with regular releases since first release on 2025-02-18.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions, making it safe to add to any project without licensing concerns.
Quickstart
pip install plotly-stubs
# In your code, plotly imports now have type hints:
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Scatter(x=[1, 2], y=[3, 4]))
fig.show()
Requires plotly to be installed separately; stubs alone do not provide plotly functionality, only type information.
Verify before relying
- Coverage and completeness of type stubs relative to the full plotly API surface.
- Compatibility with specific plotly versions or version ranges.
- Whether stubs are kept in sync with plotly releases automatically or manually.
Package facts
| License | MIT License Copyright (c) 2026 Claas Rostock Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 125 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 257,522/month — #8,443 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: plotly_stubs-0.1.3-py3-none-any.whl
Keywords: plotly, stubs, types
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
types-sqlalchemy-utilsProvides type stubs for sqlalchemy-utils,…
copyleft · top 5,000 on PyPI
types-smorestProvides type stubs for flask-smorest, enabling…
copyleft · top 5,000 on PyPI
types-pysaml2Provides type annotations (stubs) for the…
copyleft · top 15,000 on PyPI
streamlit-plotly-eventsCaptures click, select, and hover events from…
unclear · top 15,000 on PyPI
plotlyPlotly is an interactive, browser-based…
permissive · top 1,000 on PyPI
plotly-expressPlotly Express is now a compatibility shim that…
permissive · top 5,000 on PyPI
j2lintj2lint validates Jinja2 template syntax and…
permissive · top 15,000 on PyPI
flake8-typing-importsA flake8 plugin that detects unguarded typing…
permissive · top 15,000 on PyPI
dash-core-componentsProvides a suite of React components for…
permissive · top 5,000 on PyPI
shellcheck-pyProvides a pip-installable shellcheck binary…
permissive · top 5,000 on PyPI