Repository navigation
Add support for custom chromium commandline arguments - #53
Conversation
|
🎉 |
|
how to use this branch with pipenv? |
|
There isn't a convenient way to install kaleido from a branch due to the need to compile Chromium. I'll publish a new alpha version with these changes to PyPI later today. |
|
These changes are now released in 0.1.0a3 on PyPI (https://pypi.org/project/kaleido/0.1.0a3/). The final release probably won't happen until early November, so please let us know if you run any (especially new) issues. |
Closes #45
This PR adds support for fully customizing the chromium flags used by the kaleido process. It also adds
--disable-dev-shm-usageto the list of default arguments. This is helpful in certain docker configurations with limited/dev/shmsize and it is also the default for puppeteer.The default arguments are returned by the
default_chromium_argsclass method. e.g.A custom tuple/list of arguments can be provided using the
chromium_argsargument in the scope constructor, and a tuple of the active chromium arguments can be accessed using thechromium_argspropertyFor an already constructed scope (as in the case of the scope that plotly.py constructs at
plotly.io.kaleido.scope), the arguments can be set using the property setter. This will automatically shut down any running kaleido process so that the arguments are ineffect the next time a transform is applied.
For example, to add the
--single-processargument to the list of defaults for use by plotly.py:cc @aschmied