diff --git a/examples/variable_sets.py b/examples/variable_sets.py index 85749f91..4a6ca505 100644 --- a/examples/variable_sets.py +++ b/examples/variable_sets.py @@ -15,7 +15,8 @@ import os -from pytfe.types import ( +from pytfe import TFEClient, TFEConfig +from pytfe.models import ( CategoryType, Parent, Project, @@ -24,6 +25,7 @@ VariableSetCreateOptions, VariableSetIncludeOpt, VariableSetListOptions, + VariableSetReadOptions, VariableSetRemoveFromProjectsOptions, VariableSetRemoveFromWorkspacesOptions, VariableSetUpdateOptions, @@ -31,10 +33,9 @@ VariableSetVariableListOptions, VariableSetVariableUpdateOptions, Workspace, + WorkspaceListOptions, ) -from pytfe import TFEClient, TFEConfig - def variable_set_example(): """Demonstrate Variable Set operations.""" @@ -193,8 +194,6 @@ def variable_set_example(): print("7. Workspace operations example...") try: # List some workspaces first - from pytfe.types import WorkspaceListOptions - workspace_options = WorkspaceListOptions(page_size=5) workspaces = list( client.workspaces.list(org_name, options=workspace_options) @@ -272,8 +271,6 @@ def variable_set_example(): # 9. Read the variable set with includes print("9. Reading variable set with includes...") - from pytfe.types import VariableSetReadOptions - read_options = VariableSetReadOptions( include=[VariableSetIncludeOpt.VARS, VariableSetIncludeOpt.WORKSPACES] ) diff --git a/src/pytfe/models/__init__.py b/src/pytfe/models/__init__.py index a702bd2f..66842d14 100644 --- a/src/pytfe/models/__init__.py +++ b/src/pytfe/models/__init__.py @@ -279,12 +279,33 @@ # Variables from .variable import ( + CategoryType, Variable, VariableCreateOptions, VariableListOptions, VariableUpdateOptions, ) +# ── Variable Sets ────────────────────────────────────────────────────────────── +from .variable_set import ( + Parent, + VariableSet, + VariableSetApplyToProjectsOptions, + VariableSetApplyToWorkspacesOptions, + VariableSetCreateOptions, + VariableSetIncludeOpt, + VariableSetListOptions, + VariableSetReadOptions, + VariableSetRemoveFromProjectsOptions, + VariableSetRemoveFromWorkspacesOptions, + VariableSetUpdateOptions, + VariableSetUpdateWorkspacesOptions, + VariableSetVariable, + VariableSetVariableCreateOptions, + VariableSetVariableListOptions, + VariableSetVariableUpdateOptions, +) + # Workspaces from .workspace import ( LockedByChoice, @@ -442,6 +463,7 @@ "Tag", "TagBinding", "TagList", + "CategoryType", "Variable", "VariableCreateOptions", "VariableListOptions", @@ -567,4 +589,21 @@ "PolicySetUpdateOptions", "PolicyKind", "EnforcementLevel", + # Variable Sets + "Parent", + "VariableSet", + "VariableSetApplyToProjectsOptions", + "VariableSetApplyToWorkspacesOptions", + "VariableSetCreateOptions", + "VariableSetIncludeOpt", + "VariableSetListOptions", + "VariableSetReadOptions", + "VariableSetRemoveFromProjectsOptions", + "VariableSetRemoveFromWorkspacesOptions", + "VariableSetUpdateOptions", + "VariableSetUpdateWorkspacesOptions", + "VariableSetVariable", + "VariableSetVariableCreateOptions", + "VariableSetVariableListOptions", + "VariableSetVariableUpdateOptions", ]