Documentation Index
Fetch the complete documentation index at: https://docs.prefect.io/llms.txt
Use this file to discover all available pages before exploring further.
prefect.server.models.variables
Functions
create_variable
create_variable(db: PrefectDBInterface, session: AsyncSession, variable: VariableCreate) -> orm_models.Variable
Create a variable
Args:
session: async database session
variable: variable to create
Returns:
read_variable
read_variable(db: PrefectDBInterface, session: AsyncSession, variable_id: UUID) -> Optional[orm_models.Variable]
Reads a variable by id.
read_variable_by_name
read_variable_by_name(db: PrefectDBInterface, session: AsyncSession, name: str) -> Optional[orm_models.Variable]
Reads a variable by name.
read_variables
read_variables(db: PrefectDBInterface, session: AsyncSession, variable_filter: Optional[filters.VariableFilter] = None, sort: sorting.VariableSort = sorting.VariableSort.NAME_ASC, offset: Optional[int] = None, limit: Optional[int] = None) -> Sequence[orm_models.Variable]
Read variables, applying filers.
count_variables
count_variables(db: PrefectDBInterface, session: AsyncSession, variable_filter: Optional[filters.VariableFilter] = None) -> int
Count variables, applying filters.
update_variable
update_variable(db: PrefectDBInterface, session: AsyncSession, variable_id: UUID, variable: VariableUpdate) -> bool
Updates a variable by id.
update_variable_by_name
update_variable_by_name(db: PrefectDBInterface, session: AsyncSession, name: str, variable: VariableUpdate) -> bool
Updates a variable by name.
delete_variable
delete_variable(db: PrefectDBInterface, session: AsyncSession, variable_id: UUID) -> bool
Delete a variable by id.
delete_variable_by_name
delete_variable_by_name(db: PrefectDBInterface, session: AsyncSession, name: str) -> bool
Delete a variable by name.