You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kaleido is a cross-platform Python library for generating static images (e.g. png, svg, pdf, etc.)
13
+
for Plotly.js, to be used by Plotly.py.
14
+
15
+
## Pre-Launch Kaleido v1.0.0
10
16
11
17
Kaleido allows you to convert plotly figures to images.
12
18
Kaleido v1 is currently available as a release candidate.
@@ -40,29 +46,32 @@ Note: Kaleido v1 works with Plotly v6.1.0 and later.
40
46
41
47
## Installation
42
48
43
-
To install the Kaleido release candidate:
49
+
Kaleido can be installed from [PyPI](https://pypi.org/project/kaleido) using `pip`:
44
50
45
51
```bash
46
-
$ pip install kaleido --upgrade --pre
52
+
$ pip install kaleido --upgrade
47
53
```
48
54
49
-
To install Chrome, we recommend using Kaleido's CLI command:
55
+
As of version 1.0.0, Kaleido requires Chrome to be installed. If you already have Chrome on your system, Kaleido should find it; otherwise, you can install a compatible Chrome version using the `kaleido_get_chrome` command:
50
56
51
57
```bash
52
58
$ kaleido_get_chrome
53
59
```
54
60
55
-
or functions in Python:
61
+
or function in Python:
56
62
57
63
```python
58
-
59
64
import kaleido
60
-
await kaleido.get_chrome()
61
-
# or
62
-
# kaleido.get_chrome_sync()
65
+
kaleido.get_chrome_sync()
63
66
```
64
67
65
-
## Quickstart
68
+
## Development guide
69
+
70
+
Below are examples of how to use Kaleido directly in your Python program.
71
+
72
+
If you want to export images of Plotly charts, it's not necessary to call Kaleido directly; you can use functions in the Plotly library. [See the Plotly documentation for instructions.](https://plotly.com/python/static-image-export/)
73
+
74
+
### Usage examples
66
75
67
76
```python
68
77
import kaleido
@@ -89,7 +98,7 @@ async with kaleido.Kaleido(n=4, timeout=90) as k:
89
98
# where `fig_objects` is a dict to be expanded to the fig, path, opts arguments.
90
99
```
91
100
92
-
There are shortcut functions if just want dont want to create a `Kaleido()`.
101
+
There are shortcut functions which can be used to generate images without creating a `Kaleido()` object:
93
102
94
103
```python
95
104
import asyncio
@@ -103,7 +112,7 @@ asyncio.run(
103
112
)
104
113
```
105
114
106
-
## PageGenerators
115
+
###PageGenerators
107
116
108
117
The `page` argument takes a `kaleido.PageGenerator()` to customize versions.
109
118
Normally, kaleido looks for an installed plotly as uses that version. You can pass
0 commit comments