that shows how to do it with the command line but how do I do it in python?
m
Mason Menges
09/13/2022, 8:30 PM
prefect.client.get_client()
is specifically looking for these 2 environment variables
• PREFECT_API_URL
• PREFECT_API_KEY
As long as those are set whether you set them in you're python code or through the cli it'll return a client connected to Prefect Cloud based on those values, if they aren't set then it returns a client tied to an Ephemeral API.
So something like this should work
the profile serves as a base configuration in your environment but you can still set the variables manually which overwrites anything in the profile.
Mason Menges
09/13/2022, 8:32 PM
Basically you can configure those variables however you'd like, Profiles is a convenient way to store a consistent configuration but as long as those environment variables are set then regardless of how they're set it should function correctly
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.