I am trying to let @asset read the API itself ,so ...
# ask-community
u
I am trying to let @asset read the API itself ,so I don't have to write the URL into code everything
t
Hi! There are a couple options for this, given your needs. If the URL is static, then cleanest option is creating a constant in this file or a separate file, and referencing that. If it's dynamic across environments, I'd set it as an environment variable and access with
os.getenv
If it's dynamic across runs, you might want to consider making a ConfigurableResource for connecting to the API, so you swap out the URL depending on the context.