Skip to content

Commit ec7a4ed

Browse files
committed
feat(sdk): Phase 1 - expand public SDK API with comprehensive exports
1 parent cf1d816 commit ec7a4ed

1 file changed

Lines changed: 82 additions & 1 deletion

File tree

src/terrapyne/__init__.py

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,85 @@
1+
"""Terrapyne - Python SDK for Terraform Cloud / Enterprise.
2+
3+
Terrapyne is a comprehensive Python SDK and CLI tool for interacting with
4+
Terraform Cloud and Terraform Enterprise. It provides both programmatic
5+
access (library) and command-line interfaces for common operations.
6+
7+
Library Usage:
8+
from terrapyne import TFCClient, RunsAPI
9+
10+
client = TFCClient(organization="my-org")
11+
runs_api = RunsAPI(client)
12+
runs, total = runs_api.list(workspace_id="ws-123")
13+
14+
CLI Usage:
15+
$ tfc run list --workspace my-workspace
16+
$ tfc workspace show my-workspace
17+
$ tfc vcs show
18+
"""
19+
20+
__version__ = "0.0.1"
21+
122
from . import exceptions
23+
24+
# Core Client
25+
from .api.client import TFCClient
26+
from .api.projects import ProjectAPI
27+
28+
# API Managers
29+
from .api.runs import RunsAPI
30+
from .api.teams import TeamsAPI
31+
from .api.vcs import VCSAPI
32+
from .api.workspaces import WorkspaceAPI
33+
34+
# Core Infrastructure
35+
from .core.backend import RemoteBackend
36+
from .core.credentials import TerraformCredentials
37+
38+
# Models - Data Structures
39+
from .models.plan import Plan
40+
from .models.project import Project
41+
from .models.run import Run
42+
from .models.team import Team
43+
from .models.team_access import TeamProjectAccess
44+
from .models.variable import WorkspaceVariable
45+
from .models.vcs import VCSConnection
46+
from .models.workspace import Workspace, WorkspaceVCS
247
from .terrapyne import Terraform
348

4-
__all__ = ["Terraform", "exceptions"]
49+
# Utilities
50+
from .utils.browser import get_run_url, get_workspace_url
51+
from .utils.context import resolve_organization, resolve_workspace
52+
53+
__all__ = [
54+
# Version
55+
"__version__",
56+
# Exceptions
57+
"exceptions",
58+
# Core Client
59+
"TFCClient",
60+
# API Managers
61+
"RunsAPI",
62+
"WorkspaceAPI",
63+
"ProjectAPI",
64+
"TeamsAPI",
65+
"VCSAPI",
66+
# Models
67+
"Plan",
68+
"Project",
69+
"Run",
70+
"Team",
71+
"TeamProjectAccess",
72+
"Terraform",
73+
"WorkspaceVariable",
74+
"VCSConnection",
75+
"Workspace",
76+
"WorkspaceVCS",
77+
# Core
78+
"RemoteBackend",
79+
"TerraformCredentials",
80+
# Utilities
81+
"get_run_url",
82+
"get_workspace_url",
83+
"resolve_organization",
84+
"resolve_workspace",
85+
]

0 commit comments

Comments
 (0)