https://prefect.io logo
j

Javier Ochoa

06/30/2023, 3:57 PM
This message contains interactive elements.
1
n

Nate

06/30/2023, 4:02 PM
hey @Javier Ochoa you can use the python sdk to create / save blocks like
Copy code
from prefect.blocks.system import Secret

my_secret = Secret(value="secretsecret")

my_secret.save("my-secret-name") # can also use overwrite=True if already exists
and this secret will be saved on whichever server you're running against (like your cloud workspace) then you can load it again like
Copy code
my_secret = Secret.load("my-secret-name")
j

Javier Ochoa

06/30/2023, 4:51 PM
Worked just fine, thanks a lo @Nate
n

Nate

06/30/2023, 4:58 PM
sure thing!
2 Views