prefect.variables
¶
get
async
¶
Get a variable by name. If doesn't exist return the default.
from prefect import variables
@flow
def my_flow():
var = variables.get("my_var")
from prefect import variables
@flow
async def my_flow():
var = await variables.get("my_var")
Source code in prefect/variables.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|