The main client for TrueFoundry SDK operations. This client provides access to all SDK functionality through organized sub-clients.

Initialization

from truefoundry import TrueFoundry

# Initialize the client
client = TrueFoundry(
    base_url="https://api.truefoundry.com",
    api_key="your_api_key"
)

Client Properties

Access different SDK modules through the client properties:

apply

Applies a given manifest to create or update resources of specific types, such as provider-account, cluster, workspace, or ml-repo. Parameters:
manifest
TrueFoundryApplyRequestManifest
required
manifest of the resource to be created or updatedType Details: TrueFoundryApplyRequestManifest
dry_run
typing.Optional[bool]
Dry run the apply operation without actually applying
Returns:
TrueFoundryApplyResponse
TrueFoundryApplyResponse
The resource has been successfully created or updated.Type Details: TrueFoundryApplyResponse
Example:
from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.apply(
    manifest={"key": "value"},
    dry_run=False,
)

delete

Deletes resources of specific types, such as provider-account, cluster, workspace, or application. Parameters:
manifest
TrueFoundryDeleteRequestManifest
required
manifest of the resource to be deletedType Details: TrueFoundryDeleteRequestManifest
Returns:
None
None
Example:
from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.delete(
    manifest={"key": "value"},
)