Skip to content

Commit beb5212

Browse files
authored
Add migration guide and make small updates (#314)
* Add migration guide and make small updates * Update src/py/README.md * Update src/py/README.md
1 parent ce67589 commit beb5212

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

src/py/README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,40 @@
88

99
# Pre-Launch Kaleido v1.0.0
1010

11-
**NOTE: New api versions of Kaleido v1.0.0rc1+ are only available through github.**
12-
This will change once [plotly.py](https://www.github.com/plotly/plotly.py)
13-
finishes its integration with the new api.
11+
Kaleido allows you to convert plotly figures to images. Kaleido v1 is currently available as a release candidate.
1412

15-
```bash
16-
$ pip install git+https://github.com/plotly/kaleido@latest-tag#subdirectory=src/py
13+
## Migrating from v0 to v1
1714

18-
# also works with `uv add` and `uv run --with PACKAGE`
19-
```
15+
Kaleido v1 introduces a new API. If you're currently using v0, you'll need to make changes to your code and environment where you are running Kaleido.
16+
17+
- Chrome is no longer included with Kaleido. Kaleido will look for an existing Chrome installation, but also provides commands for installing Chrome. If you don't have Chrome, you'll need to install it. See the following installation section for more details.
18+
- `kaleido.scopes.plotly` has been removed in v1. Kaleido v1 provides `write_fig` and `write_fig_sync` for exporting Plotly figures.
19+
```
20+
from kaleido import write_fig_sync
21+
import plotly.graph_objects as go
22+
23+
fig = go.Figure(data=[go.Scatter(y=[1, 3, 2])])
24+
kaleido.write_fig_sync(fig, path="figure.png")
25+
```
26+
See the Quickstart section below for more details on usage for v1.
2027

21-
# Kaleido
28+
Note: Kaleido v1 works with Plotly v6.1.0 and later.
2229

23-
Kaleido allows you to convert plotly figures to images.
30+
## Installation
31+
32+
To install the Kaleido release candidate:
2433

2534
```bash
26-
$ pip install kaleido
35+
$ pip install kaleido --upgrade --pre
2736
```
2837

29-
Kaleido's strategy has changed: `chrome` is no longer included. On the other hand,
30-
it's *much* faster and supports parallel processing and memory-saving techniques.
31-
32-
Kaleido will try to use your own platform's `chrome`, but we recommend the following:
38+
To install Chrome, we recommend using Kaleido's CLI command:
3339

3440
```bash
3541
$ kaleido_get_chrome
3642
```
3743

38-
or
44+
or functions in Python:
3945

4046
```python
4147

@@ -104,8 +110,6 @@ my_page = kaleido.PageGenerator(
104110

105111
There are plenty of doc strings in the source code.
106112

107-
See the [Plotly static image export documentation][plotly-export] for more information.
108-
109113
[choreographer]: https://pypi.org/project/choreographer/
110114
[plotly]: https://plotly.com/
111115
[plotly-export]: https://plotly.com/python/static-image-export/

0 commit comments

Comments
 (0)