variables
Variables module.
variables module
Variables module.
class Variable
Bases: TypedDict
Represents a variable.
name : str
The name of the variable.
key : str
The key of the variable.
value : str
The value of the variable. This is an empty string if the variable is a secret.
secret : bool
Indicates whether this variable is a secret.
created_at : str
The timestamp when the variable was created.
updated_at : str | None
The timestamp when the variable was last updated.
class CreateVariableParams
Bases: TypedDict
Parameters for creating a variable.
name : str
The name of the variable.
key : str
The key of the variable.
value : str
The value of the variable.
secret : bool
Represents whether the variable’s value should be treated as a secret. The values of secrets are not returned.
class UpdateVariableParams
Bases: TypedDict
Parameters for updating a variable.
value : NotRequired[str]
The new value of the variable.
key : NotRequired[str]
The new key of the variable.
class Variables(api)
Bases: Resource
Initializes the Resource with an API instance.
- Parameters: api (API) – An instance of the API class.
create(params)
Create a new variable.
- Parameters: params (CreateVariableParams) – Parameters for creating the variable.
- Returns: The created variable.
- Return type: Variable
async async_create(params)
Create a new variable.
- Parameters: params (CreateVariableParams) – Parameters for creating the variable.
- Returns: The created variable.
- Return type: Variable
delete(name)
Delete a variable.
- Parameters: name (str) – The name of the variable to be deleted.
- Return type: None
async async_delete(name)
Delete a variable.
- Parameters: name (str) – The name of the variable to be deleted.
- Return type: None
update(name, params)
Update a variable.
- Parameters:
- name (str) – The name of the variable to be updated.
- params (UpdateVariableParams) – The new parameters for updating the variable.
- Returns: The updated variable.
- Return type: Variable
async async_update(name, params)
Update a variable.
- Parameters:
- name (str) – The name of the variable to be updated.
- params (UpdateVariableParams) – The new parameters for updating the variable.
- Returns: The updated variable.
- Return type: Variable
list(pagination_options=None)
List variables.
- Parameters: pagination_options (PaginationOptions | None) – Optional settings to control pagination behavior.
- Returns: Paginated response containing variables and navigation metadata.
- Return type: PaginatedResponse[Variable]
async async_list(pagination_options=None)
List variables.
- Parameters: pagination_options (PaginationOptions | None) – Optional settings to control pagination behavior.
- Returns: Paginated response containing variables and navigation metadata.
- Return type: PaginatedResponse[Variable]