variables
Variables module.
variables module
Variables module.
class Variable
Bases: TypedDict
Represents a variable.
key : str
The unique key that identifies 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.
class CreateVariableParams
Bases: TypedDict
Parameters for creating a variable.
key : str
The unique key that identifies 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.
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(key)
Delete a variable.
- Parameters: key (str) – The unique key that identifies the variable to be deleted.
- Return type: None
async async_delete(key)
Delete a variable.
- Parameters: key (str) – The unique key that identifies the variable to be deleted.
- Return type: None
update(key, params)
Update a variable.
- Parameters:
- key (str) – The unique key that identifies the variable to be updated.
- params (UpdateVariableParams) – The new parameters for updating the variable.
- Returns: The updated variable.
- Return type: Variable
async async_update(key, params)
Update a variable.
- Parameters:
- key (str) – The unique key that identifies 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]