Hamza Kazmi
01/20/2023, 10:40 AMfrom prefect import config
what do we use in prefect 2 ?Mark NS
01/20/2023, 11:10 AMprefect.cli.config.py
you'll see:
context = prefect.context.get_settings_context()
# Get settings at each level, converted to a flat dictionary for easy comparison
default_settings = prefect.settings.get_default_settings()
env_settings = prefect.settings.get_settings_from_env()
current_profile_settings = context.settings
Hamza Kazmi
01/20/2023, 11:31 AMMark NS
01/20/2023, 11:38 AMZanie
01/20/2023, 4:28 PMHamza Kazmi
01/23/2023, 5:22 AM[myprofile]
remote_path = "some_path"
host = "my_host"
port = 89
earliest_date = "2015-06-01"
Now i am upgrading to prefect2 how can i use this configuration in prefect2
This how I am reading them currently
from prefect import config
#read config
print(config.myprofile.host)
Zanie
01/23/2023, 5:10 PM