Skip to content

Commit 653c3a0

Browse files
committed
Update README.md
1 parent bd4f304 commit 653c3a0

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

src/py/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1+
# Launch Kaleido v1.0.0
2+
3+
Right now, Kaledio v1.0.0 is available as a release candidate:
4+
5+
* download `v1.0.0rc1` explicitly
6+
* enable whatever installer you use (`pip --pre`?) to use release candidates
7+
8+
Kaleido's strategy has changed: `chrome` is no longer included. On the other hand,
9+
it's *much* faster and supports parallel processing and memory-saving techniques.
10+
11+
Kaleido will try to use your own platform's `chrome`, but we recommend the following:
12+
13+
```
14+
$ kaleido_get_chrome
15+
```
16+
17+
or
18+
19+
```python
20+
21+
import kaleido
22+
await kaleido.get_chrome()
23+
# or
24+
# kaleido.get_chrome_sync()
25+
```
26+
27+
## Quickstart
28+
29+
```python
30+
import kaleido
31+
32+
# fig is a plotly figure or an iterable of plotly figures
33+
34+
async with kaleido.Kaleido(n=4, timeout=60) as k: # Those are the defaults! 4 processes, 60 seconds.
35+
await k.write_fig(fig, path="./", opts={"format":"jpg"}) # default format is `png`
36+
```
37+
38+
If you have to print thousands of graphs, fig can be a generator to save memory.
39+
It can also just be a single graph.
40+
41+
There is a shortcut function:
42+
43+
```
44+
import asyncio
45+
import kaleido
46+
asyncio.run(kaleido.write_fig(fig, path="./", n=4))
47+
# this will spin the kaleido process for you with 4 processors
48+
```
49+
50+
If you're not using async/await, wrap it all in an async function and:
51+
```
52+
asyncio.run(my_async_wrapper())
53+
```
54+
55+
#### Older Readme Below ####
56+
157
# Kaleido
258

359
Kaleido is a cross-platform library for generating static images for [Plotly][plotly]'s

0 commit comments

Comments
 (0)