prefect.server.models.variables
count_variables(session, variable_filter=None)
async
Count variables, applying filters.
Source code in src/prefect/server/models/variables.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
create_variable(session, variable)
async
Create a variable
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session
|
AsyncSession
|
async database session |
required |
variable
|
VariableCreate
|
variable to create |
required |
Returns:
Type | Description |
---|---|
Variable
|
orm_models.Variable |
Source code in src/prefect/server/models/variables.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
delete_variable(session, variable_id)
async
Delete a variable by id.
Source code in src/prefect/server/models/variables.py
130 131 132 133 134 135 136 137 138 |
|
delete_variable_by_name(session, name)
async
Delete a variable by name.
Source code in src/prefect/server/models/variables.py
141 142 143 144 145 146 147 148 149 |
|
read_variable(session, variable_id)
async
Reads a variable by id.
Source code in src/prefect/server/models/variables.py
32 33 34 35 36 37 38 39 40 41 42 |
|
read_variable_by_name(session, name)
async
Reads a variable by name.
Source code in src/prefect/server/models/variables.py
45 46 47 48 49 50 51 52 53 54 55 |
|
read_variables(session, variable_filter=None, sort=sorting.VariableSort.NAME_ASC, offset=None, limit=None)
async
Read variables, applying filers.
Source code in src/prefect/server/models/variables.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
update_variable(session, variable_id, variable)
async
Updates a variable by id.
Source code in src/prefect/server/models/variables.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
update_variable_by_name(session, name, variable)
async
Updates a variable by name.
Source code in src/prefect/server/models/variables.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|