PlotlyShare v2 (🚀 -> 🌥)
The purpose of this package is to provide a seamless way to share interactive plotly plots, providing a similar experience to google docs/etc.
The idea is to preserve the interactivity and responsiveness of plotly plots with the ease of link-based sharing and without all the hassle of sending an html file, or worse, a static image/document. Two examples:
Installation
uv add "plotlyshare>=2"
pip install "plotlyshare>=2"
First Time Setup
To use this, run uv run -m plotlyshare setup/python -m plotlyshare setup and set your ==CLI Token== as follows:
Log in to https://plotlyshare.pages.dev
Click on your profile icon, here you will see a ==CLI Token== section. Click on that to reveal it and copy the token with the copy button.
Enter that value for the CLI_TOKEN in the setup prompt, then it will test the connection and report back.
Usage
And then whenever making a plot, simply import plotlyshare (import order doesn't matter) and set renderer='plotlyshare' when calling fig.show() like below:
|
With |
With |
import plotly.express as px
import plotlyshare
...
fig = px.line(...)
...
fig.show(renderer='plotlyshare')
|
import plotly.graph_objects as go
import plotlyshare
...
fig = go.Figure(...)
...
fig.show(renderer='plotlyshare')
|
And that's it, the package will upload your plot to plotlyshare and assign it a randomly generated name with a date like mushy pancake 24th Jul.
It will display the name and the direct link to the plot, ready to share with anyone. Additionally, it also tells you how big the plot was so you can keep track of storage (unlikely to be a problem).
Plots are private by default and you can change the privacy for each plot from the dashboard.
Misc
Change your plot's name:
To add a title to your plot (instead of the default randomly generated one), you can edit it from
- your online dashboard
- the plot's page
- or even set it directly when uploading:
fig.show(renderer='plotlyshare', plot_name='this plot has a fancy name')
Screenshots:
Metadata
Release files for plotlyshare 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| plotlyshare-2.0.1.tar.gz | 7.0 kB | Without provenance | Details for plotlyshare-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plotlyshare-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for plotlyshare-2.0.1-py3-none-any.whl |
Total release size: 15.1 kB
Security for plotlyshare 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.