Hi! What is the equivalent of using a json prefect...
# prefect-community
a
Hi! What is the equivalent of using a json prefect secret in the cloud, if I want to do this in the local secret (.prefect/config.toml)?
a
here is one example
Copy code
export PREFECT__CONTEXT__SECRETS__JSON_SECRET="{'a': 1, 'b': 2}"
👍 1
to test it:
Copy code
from prefect.tasks.secrets import PrefectSecret

x = PrefectSecret("JSON_SECRET").run()
print(x)
a
for the .toml file this seems to work as well which is more inline with what I wanted:
Copy code
[context.secrets.json_secret]
a = 1
b = 2
👍 1