https://prefect.io logo
Title
i

iñigo

10/18/2022, 3:57 PM
Hello, Is it possible to launch Orion within python?
1
k

Khuyen Tran

10/18/2022, 3:59 PM
You can use
os.system
to run the command
prefect agent start
. I wonder why you’d like to launch Orion within Python?
z

Zanie

10/18/2022, 4:08 PM
Minor note, you’d want to run
prefect orion start
— I am also curious why you want to launch it in Python though.
j

Jarvis Stubblefield

10/19/2022, 7:28 PM
To throw it out there the
prefect
command itself is written in Python … so theoretically yes, but your use case would likely help determine what might be the best approach (solution) to your particular needs.
👍 1
@Andrew Brookins put this repository together for me, and it might be useful to peruse in your investigation. It runs all the
prefect
CLI commands through a Django Management Command. Here’s the specific Management Command: https://github.com/abrookins/django-prefect-example/blob/main/workflows/management/commands/prefectcli.py
i

iñigo

10/20/2022, 7:40 AM
thank you for all of your answers, I was a bit stuck in the environment in my job. I wasn't able to install prefect in a virtual environment or even in the python itself. thank you very much.