Library / SDK
plotly/plotly.py avatar
plotly/plotly.py

plotly/plotly.py: a browser document in Python, and a browser on your machine for a PNG

The interactive graphing library for Python :sparkles:

18,899 stars2,896 forksPythonMIT

At a glance

What is it?
plotly.py is a high level declarative charting library whose output is a browser document, and two consequences fall out of that. The in notebook widget needs two extra packages, and static image export needs kaleido plus a Chrome or Chromium install on the machine. Meanwhile the base install has exactly two dependencies, one of which is a dataframe interchange layer.
Who is it for?
Use plotly.py if you need interactive figures that a reader can pan and zoom, in a notebook, in a standalone HTML file, or inside a Dash application, because that is the artifact it produces and the thing it is good at. Do not adopt it for a pipeline that needs images, because exporting a PNG means installing kaleido and a browser on the machine running the code, which is a real constraint in a container.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • plotly/plotly.py18,899 ★ · +102
Star history
Repository2026-09-212026-11-14
plotly/plotly.py18.8k18.9k

102 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The base install has two dependencies, and one of them is a dataframe layer

The dependency list in the manifest is short enough to read in one glance:

code
dependencies = [
    "narwhals>=1.15.1",
    "packaging"
]

That is the whole base install. No dataframe library and no numeric library appear in it. Numeric support arrives through an extra, where the express group adds numpy at 1.22 or newer.

The more consequential entry is the first one. A library called narwhals is a dataframe interchange layer, and its presence as a hard dependency of the base package is a statement about how the library consumes data: the chart call is written against an interchange protocol rather than against one dataframe implementation, which is why nothing here names pandas, polars or pyarrow.

Two consequences. First, the version of that interchange layer is a compatibility surface of its own, so a plotly upgrade can move it, and a lockfile pins both. Second, the base install is genuinely small, which is the argument for the extras model, but it also means the difference between a working install and a broken one is often one optional package.

A PNG requires kaleido and a Chrome or Chromium on the same machine

The static image export section is the one that surprises people building in a container. The export path uses a separate package, kaleido, and then it says what kaleido needs: Chrome or Chromium, to generate the images. By default kaleido uses the version already installed on your system, and if there is none, or kaleido cannot find it, the README tells you to run a command on your command line:

code
plotly_get_chrome

So a figure that is interactive everywhere is a PNG only where a browser is installed, and the library ships the command that installs one rather than bundling it.

The install commands for the exporter itself are given both ways, with pip and with conda, and conda uses a differently named package:

code
pip install -U kaleido
code
conda install -c conda-forge python-kaleido

For a notebook or a desktop script that is a one time cost. For a build server producing images from a queue it is a hard requirement, and a headless base image without a browser cannot do it at all. That is worth knowing before you choose this library for a reporting pipeline rather than discovering it in the first job that runs.

The prose promises kaleido 1.0 and the extra pins 1.3

There is a small inconsistency between the two places the exporter version appears, and it is the kind of thing that only shows up in a lockfile.

The prose in the static image export section says the export is supported using the kaleido package, version 1.0 or greater. The optional dependency group in the manifest says kaleido at 1.3.0 or greater.

Neither is wrong on its own, and the direction of the difference is the safe one: installing the extra gives you a newer Kaleido than the prose promises. The risk is for a project that reads the prose, pins 1.0, and then finds a later change of behaviour, or for a build that resolves the extra automatically and ends up on a major bump of the exporter that the documentation sentence never mentioned.

The lesson is the boring one. For anything in this ecosystem where two layers can drift, install by extra rather than by number, so the library and the exporter move together, and let the manifest be the version of record.

The figure is a browser document, and there are four places to look at it

The overview calls plotly.py an interactive, open-source and browser-based graphing library, and that adjective governs everything else. It is built on top of plotly.js and described as a high level declarative charting library, and plotly.js is where the chart types come from, more than thirty of them, including scientific charts, 3D graphs, statistical charts, SVG maps and financial charts.

Then the README lists where a figure can be viewed, and the list is the deployment decision in miniature: Jupyter notebooks, other Python notebook software such as marimo, standalone HTML files, or integrated into Dash applications.

Three of those four run a browser. A standalone HTML file carries the chart with it. So the artifact plotly.py produces is an HTML document with a JavaScript charting library in it, and it is fully interactive exactly where a browser executes it. Anything that needs a picture rather than a document is leaving that world, which is what the next two sections are about.

The in notebook widget is a second install, not part of the library

The Jupyter widget support section is four lines long and they are an install command.

code
pip install jupyter anywidget

with the conda equivalent given right after it, using the same two package names.

So the widget path, the one where a figure renders inline inside a notebook cell with its own controls, is not included in the plotly package. A base install gives you the library that builds figures, and using figures as a Jupyter widget needs two more packages.

That is not a criticism so much as a shape to plan around. The quickstart is three lines, and the third is `fig.show()`, which is where the divergence shows: in some environments that opens a browser, and the README does not describe how it behaves in each environment.

Version 7 ships with a migration guide, a codegen directory and a hatchling build

The version is 7.1.0, and the tree around it explains what a major number costs you. There is a migration guide at the repository root next to a release document and a change log, and there is a citation file. The classifiers claim a production and stable development status and list Python 3.8 through 3.13, with 3.8 as the floor in the requires field.

The directory names are the other tell. There is a codegen directory, a template generation directory, a JavaScript directory, a directory whose name starts with a private prefix for shared utilities, a commands file, a documentation build directory, and a directory whose name is a test of package initialisation. The build backend is hatchling, at 1.26 or newer.

So a large part of this library is generated rather than written, and the development dependency groups reflect that: one group adds the code generator's own dependency with a comment saying what it is for, another adds a notebook builder, and a build group chains back to a core group. One of them pins the linter to an exact version, with a comment explaining that the pin exists to prevent accidental reformatting in case the tool's defaults are updated.

The practical consequence for a contributor is that changing a chart type is a code generation change, and for a user it is that a major version is a documented migration rather than a surprise.

The code is MIT and the documentation is Creative Commons

The copyright section splits the two things in this repository and gives them different licences. Code and documentation copyright 2026 Plotly, Inc. The code is released under the MIT licence. The documentation is released under a Creative Commons licence, specifically the attribution 4.0 one.

That distinction has a practical use. Vendoring the library into a product, or shipping it inside an image, is covered by the MIT half. Copying documentation prose into an internal wiki or a training course is covered by the other half, which is a share and attribution licence rather than a permissive software one.

The README also points at two things that are not open source. There is a contact for consulting, dashboard development, application integration and feature additions, and a separate page for project maintenance. So the library is free and the company sells time, which is the ordinary arrangement and worth knowing before you assume a feature request will be taken.

The rest of the project's public surface is a user forum, an online documentation site, a contributing guide, a code of conduct, and a change log.

Editorial conclusion

Use plotly.py if you need interactive figures that a reader can pan and zoom, in a notebook, in a standalone HTML file, or inside a Dash application, because that is the artifact it produces and the thing it is good at. Do not adopt it for a pipeline that needs images, because exporting a PNG means installing kaleido and a browser on the machine running the code, which is a real constraint in a container. Check four things before you commit: which extra you need, since the notebook widget wants jupyter and anywidget and the express module wants numpy, none of which is in the base install; that a browser exists for image export, and that you can run `plotly_get_chrome` if it does not; which version you pin, because the 7.x line is a major one and the repository ships a migration guide; and which licence you are relying on, since the code is MIT and the documentation is under a Creative Commons licence. The license for the code is MIT with copyright 2026 Plotly, Inc., and the last push was 2026-11-01.

Frequently asked questions

What is plotly Python used for?

It is an interactive, open-source, browser-based graphing library for Python, described as a high level declarative charting library built on plotly.js. That underlying library ships with over 30 chart types including scientific charts, 3D graphs, statistical charts, SVG maps and financial charts, and figures can be viewed in Jupyter notebooks, other notebook software such as marimo, as standalone HTML files, or inside Dash applications.

Is plotly for free?

The code is released under the MIT licence with code and documentation copyright 2026 Plotly, Inc., while the documentation is released under a Creative Commons licence. The README also lists a contact for consulting, dashboard development, application integration and feature additions, and links a project maintenance page.

What are the disadvantages of using plotly?

The README does not list any. The facts it does state that bear on cost are that the output is a browser-based document, that the in-notebook widget requires jupyter and anywidget to be installed separately, that static image export requires the kaleido package plus Chrome or Chromium present on the system, and that the base install carries only two dependencies with numpy arriving through an extra.

What is plotly and what does it do?

plotly.py is the Python side of the charting stack, a high level declarative library on top of plotly.js. The Plotly Express quickstart is `pip install plotly[express]`, then a bar figure built with plotly.express from three labels and three values, then a call to show, which is where the figure gets rendered or opened depending on the environment.

Official sources

  1. License: MIT
  2. plotly/plotly.py on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/plotly-plotly-py.svg)](https://hysenlabs.com/projects/plotly-plotly-py)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/plotly-plotly-py.svg)](https://hysenlabs.com/projects/plotly-plotly-py)

Was this useful?