https://kedro.org/ logo
#questions
Title
# questions
a

Andrew Stewart

11/16/2023, 12:34 AM
Is it possible to programmatically call kedro plugins, like
kedro viz
?
n

Nok Lam Chan

11/16/2023, 2:39 AM
Can you explains more what do you need?
You can always do subprocess run. For each plugins it will be different, viz comes with a Jupyter magic %run_viz that you can call from a notebook
a

Andrew Stewart

11/16/2023, 5:10 AM
I don't want to go through subprocess. I just want to call kedro viz the same way that the CLI
kedro viz
is (not from jupyter either).
Let's say just from a regular python script
n

Nok Lam Chan

11/16/2023, 5:39 AM
viz itself is an application, if you are launching it as the same way as the CLI, I think it will block the program?
The Jupyter magic has the recipes to get around this
From an application point of view, it’s also weird to have a python program launching another application, could you explains more what are you trying to do?
a

Andrew Stewart

11/16/2023, 5:23 PM
Right, that would be weird πŸ˜„ but I'm just trying to programmatically trigger the startup of the server, not run it from another application.
πŸ‘πŸΌ 1
could you explains more what are you trying to do?
@Nok Lam Chan tbh I'm not trying to create anything specific, I'm more just trying to figure out to what extent kedro-viz can be incorporated into various "outer layers". I'm using Streamlit as such an "outer layer", but could apply to others. Another thought here btw is to use the
@quantumblack/kedro-viz
react component to create a Streamlit component ( https://docs.streamlit.io/library/components/components-api )
K 1
n

Nok Lam Chan

11/18/2023, 5:16 AM
Interesting! Let us know how does it go
a

Andrew Stewart

11/20/2023, 5:58 PM
My frontend knowledge is not very good - particularly react etc, so I might have some questions on how to use the kedro-viz react component
I think I can basically follow this tutorial here: https://blog.streamlit.io/how-to-build-your-own-streamlit-component/
πŸ‘πŸΌ 1
n

Nero Okwa

11/29/2023, 11:52 AM
Thanks for the question @Andrew Stewart. What are you trying to do with your Kedro-Viz/Streamlit workflow that you can't currently do with just Kedro-Viz?