Skip to main content
paradime.admin.environment_variables manages the environment variables of a workspace, or of one of its Bolt or agent environments when you pass environment_slug. Values are write-only: only reveal reads one. For the GraphQL operations, see Environment variables.
Prerequisites
  • These operations are part of the Enterprise plan. On other plans, they raise AdminPlanUpgradeRequiredException.
  • Your API key needs the Environment variables admin capability group. To read a value with reveal, the key needs Environment variable values viewer.
  • The admin client of the paradime-io package. See Admin client.
The examples on this page use this client:
Every method takes environment_slug. Leave it out for the workspace’s own variables. Pass an environment’s slug for that environment’s variables. An empty slug raises ValueError.

List variables

Iterates over the variables’ names, ordered by name. Values are never returned.
Optional[str]
default:"None"
An environment’s slug, for its variables. Leave it out for the workspace’s own variables.
Optional[str]
default:"None"
The workspace to read, for a company API key.
int
default:"100"
How many variables to read per request, at most 500.
Iterator[EnvironmentVariable]
The variables, read one page at a time.

Set variables

Sets variables in one call. Sending the same variables again changes nothing. A change to the workspace’s variables or a Bolt environment’s variables redeploys the Bolt schedules. A change to the workspace’s variables also rewrites the workspace’s editor settings.
Mapping[str, str]
required
Names and values. A value can’t be empty: delete a variable with delete.
Optional[str]
default:"None"
An environment’s slug, to set its variables.
bool
default:"False"
Make these the scope’s only variables, and delete the others.
Optional[str]
default:"None"
The workspace to change, for a company API key.
SetEnvironmentVariablesResult
The names that were added, changed or deleted (changed_names), and how many variables the scope holds now (total_count).
With replace=True, every variable of the scope that is not in variables is deleted.

Delete variables

Deletes variables, with the same redeploys as set. Names that don’t exist are ignored.
List[str]
required
The names to delete.
Optional[str]
default:"None"
An environment’s slug, to delete its variables.
Optional[str]
default:"None"
The workspace to change, for a company API key.
List[str]
The names that existed and were deleted.

Rename a variable

Renames a variable and keeps its value, with the same redeploys as set. Retrying a rename that already finished succeeds.
str
required
The variable’s current name.
str
required
Its new name. No other variable of the scope may have it.
Optional[str]
default:"None"
An environment’s slug, for its variables.
Optional[str]
default:"None"
The workspace to change, for a company API key.
EnvironmentVariable
The variable, with its new name.

Reveal a variable

Reads a variable’s value. Needs the Environment variable values viewer capability group. Paradime writes every reveal to the audit log.
str
required
The variable’s name.
Optional[str]
default:"None"
An environment’s slug, for its variables.
Optional[str]
default:"None"
The workspace to read, for a company API key.
str
The value.

Types

Import the models from paradime.apis.admin.environment_variables.types.
model
model