Dear Colleagues, How to set up Prefect in GoogleCo...
# prefect-ui
d
Dear Colleagues, How to set up Prefect in GoogleColab correctly?
b
Hey Denis! Interesting question, I was able to get a small example started. You'll want to run this to install prefect:
!pip install prefect
Then set up your prefect profile (this is assuming you're using Prefect Cloud)
!prefect config set PREFECT_API_KEY='PASTE-YOUR-API-KEY-HERE'
!prefect config set PREFECT_API_URL='<https://api.prefect.cloud/api/accounts/YOUR-ACCOUNT-ID/workspaces/YOUR-WORKSPACE-ID>'
Then you should be able to run:
Copy code
from prefect import flow
@flow(log_prints=True)
def google_colab():
   print("Hello from google colab!")

if __name__ == "__main__":
    google_colab()
Screenshot 2024-12-12 at 4.01.48 PM.png