{"library":"plotly-stubs","title":"Plotly Type Stubs","description":"plotly-stubs is a stub-only package providing static type annotations for the Plotly Python graphing library. It enables type checkers like Mypy to validate Plotly-related code, improving code quality and maintainability. Currently, it is in 'Beta' development status.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install plotly-stubs"],"cli":null},"imports":["from plotly.graph_objects import Figure","import pandas as pd\nfrom pandas import DataFrame","import plotly.express as px"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import plotly.express as px\nimport pandas as pd\nfrom plotly.graph_objects import Figure # Type hint for the return\n\ndef create_population_chart(df: pd.DataFrame) -> Figure:\n    \"\"\"Creates a population scatter plot using Plotly Express.\"\"\"\n    fig = px.scatter(\n        df,\n        x=\"gdpPercap\",\n        y=\"lifeExp\",\n        size=\"pop\",\n        color=\"continent\",\n        hover_name=\"country\",\n        log_x=True,\n        size_max=60\n    )\n    return fig\n\n# Example usage (assuming 'gapminder' dataset is available, e.g., from px.data.gapminder())\n# df_gapminder = px.data.gapminder()\n# fig = create_population_chart(df_gapminder)\n# fig.show()","lang":"python","description":"To use plotly-stubs, simply install it alongside `plotly`. Type checkers will automatically pick up the stub files. The example demonstrates a function that creates a Plotly figure with type hints, leveraging the stubs for static analysis.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":"0.0.6","pypi_latest":"0.1.3","is_stale":true,"summary":{"python_range":"3.10–3.9","success_rate":80,"avg_install_s":1.5,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"plotly-stubs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"18.9M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"plotly-stubs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.6,"import_time_s":null,"mem_mb":null,"disk_size":"19M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"plotly-stubs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"20.7M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"plotly-stubs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.6,"import_time_s":null,"mem_mb":null,"disk_size":"21M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"plotly-stubs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"12.6M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"plotly-stubs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.4,"import_time_s":null,"mem_mb":null,"disk_size":"13M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"plotly-stubs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"12.3M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"plotly-stubs","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"13M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"plotly-stubs","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"plotly-stubs","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":1.6,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}