client.apply(...) -> AsyncHttpResponse[TrueFoundryApplyResponse]
-
-
-
Applies a given manifest to create or update resources of specific types, such as provider-account, cluster, workspace, or ml-repo.
-
-
-
from truefoundry_sdk import Collaborator, MlRepoManifest, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.apply( manifest=MlRepoManifest( name="name", storage_integration_fqn="storage_integration_fqn", collaborators=[ Collaborator( subject="subject", role_id="role_id", ) ], ), )
-
-
-
manifest:
TrueFoundryApplyRequestManifest— manifest of the resource to be created or updated
-
dry_run:
typing.Optional[bool]— Dry run the apply operation without actually applying
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.delete(...) -> AsyncHttpResponse[None]
-
-
-
Deletes resources of specific types, such as provider-account, cluster, workspace, or application.
-
-
-
from truefoundry_sdk import Collaborator, MlRepoManifest, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.delete( manifest=MlRepoManifest( name="name", storage_integration_fqn="storage_integration_fqn", collaborators=[ Collaborator( subject="subject", role_id="role_id", ) ], ), )
-
-
-
manifest:
TrueFoundryDeleteRequestManifest— manifest of the resource to be deleted
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.get_id_from_fqn(...) -> AsyncHttpResponse[typing.Dict[str, typing.Any]]
-
-
-
Get IDs associated with the FQN for various entity types, such as deployment, application, workspace, or cluster.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.get_id_from_fqn( type="type", fqn="fqn", )
-
-
-
type:
str— Entity Type
-
fqn:
str— Entity FQN
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.users.list(...) -> AsyncPager[User, ListUsersResponse]
-
-
-
List all users of tenant filtered by query and showInvalidUsers. Pagination is available based on query parameters.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.users.list( limit=10, offset=0, query="query", show_invalid_users=True, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
query:
typing.Optional[str]
-
show_invalid_users:
typing.Optional[bool]— Show Deactivated users
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.users.pre_register_users(...) -> AsyncHttpResponse[RegisterUsersResponse]
-
-
-
This endpoint allows tenant administrators to register users within their tenant.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.users.pre_register_users( email="email", )
-
-
-
email:
str— Email of the user
-
send_invite_email:
typing.Optional[bool]— Send invite email if user does not exist
-
skip_if_user_exists:
typing.Optional[bool]— Fail if user exists
-
dry_run:
typing.Optional[bool]— Dry run
-
accept_invite_client_url:
typing.Optional[str]— Url to redirect when invite is accepted
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.users.update_roles(...) -> AsyncHttpResponse[UpdateUserRolesResponse]
-
-
-
This endpoint allows tenant administrators to update the roles of a user within their tenant.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.users.update_roles( email="email", roles=["roles"], )
-
-
-
email:
str— Email of the user
-
roles:
typing.Sequence[str]— Role names for the user
-
resource_type:
typing.Optional[str]— Resource Type
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.users.get(...) -> AsyncHttpResponse[GetUserResponse]
-
-
-
Get User associated with provided User id
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.users.get( id="id", )
-
-
-
id:
str— User Id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.users.delete(...) -> AsyncHttpResponse[DeleteUserResponse]
-
-
-
Delete user if they are not a collaborator in any resource and not part of any team other than everyone.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.users.delete( id="id", )
-
-
-
id:
str— User Id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.users.invite_user(...) -> AsyncHttpResponse[InviteUserResponse]
-
-
-
Invite a user to the tenant
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.users.invite_user( accept_invite_client_url="<control plane url>/invite-accept", email="email", )
-
-
-
accept_invite_client_url:
str— Url to redirect when invite is accepted
-
email:
str— Email of user
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.users.deactivate(...) -> AsyncHttpResponse[DeactivateUserResponse]
-
-
-
Deactivate user associated with the provided email within the tenant.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.users.deactivate( email="email", )
-
-
-
email:
str— Email of the user
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.users.activate(...) -> AsyncHttpResponse[ActivateUserResponse]
-
-
-
Activate user associated with the provided email within the tenant.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.users.activate( email="email", )
-
-
-
email:
str— Email of the user
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.users.change_password(...) -> AsyncHttpResponse[ChangePasswordResponse]
-
-
-
Change password for the authenticated user. Requires clientId and loginId in the request body.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.users.change_password( login_id="loginId", new_password="newPassword", old_password="oldPassword", )
-
-
-
login_id:
str— login id of the user(email)
-
new_password:
str— New password
-
old_password:
str— Old password
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.users.get_resources(...) -> AsyncHttpResponse[GetUserResourcesResponse]
-
-
-
Get all resources associated with a user.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.users.get_resources( id="id", )
-
-
-
id:
str— User Id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.users.get_teams(...) -> AsyncHttpResponse[GetUserTeamsResponse]
-
-
-
Get all manual teams associated with a user.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.users.get_teams( id="id", )
-
-
-
id:
str— User Id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.teams.list(...) -> AsyncPager[Team, ListTeamsResponse]
-
-
-
Retrieve all teams associated with the authenticated user. If the user is a tenant admin, returns all teams for the tenant. Pagination is available based on query parameters
-
-
-
from truefoundry_sdk import TrueFoundry from truefoundry_sdk.teams import TeamsListRequestType client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.teams.list( limit=10, offset=0, type=TeamsListRequestType.TEAM, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
type:
typing.Optional[TeamsListRequestType]— Filter teams by type
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.teams.create_or_update(...) -> AsyncHttpResponse[GetTeamResponse]
-
-
-
Creates a new team or updates an existing team. It ensures that the team name is unique, valid, and that the team has at least one member. The members of the team are added or updated based on the provided emails.
-
-
-
from truefoundry_sdk import TeamManifest, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.teams.create_or_update( manifest=TeamManifest( name="name", members=["members"], ), )
-
-
-
manifest:
TeamManifest— Team manifest
-
dry_run:
typing.Optional[bool]— Dry run
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.teams.get(...) -> AsyncHttpResponse[GetTeamResponse]
-
-
-
Get Team associated with provided team id
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.teams.get( id="id", )
-
-
-
id:
str— Team Id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.teams.delete(...) -> AsyncHttpResponse[DeleteTeamResponse]
-
-
-
Deletes the Team associated with the provided Id.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.teams.delete( id="id", )
-
-
-
id:
str— Team Id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.personal_access_tokens.list(...) -> AsyncPager[VirtualAccount, ListPersonalAccessTokenResponse]
-
-
-
List Personal Access Tokens created by the user in the current tenant.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.personal_access_tokens.list( limit=10, offset=0, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.personal_access_tokens.create(...) -> AsyncHttpResponse[CreatePersonalAccessTokenResponse]
-
-
-
Create Personal Access Token
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.personal_access_tokens.create( name="name", )
-
-
-
name:
str— serviceaccount name
-
expiration_date:
typing.Optional[str]— Expiration date in ISO format (e.g. 2025-08-01T12:00)
-
account_name:
typing.Optional[str]— Account name that owns this PAT
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.personal_access_tokens.revoke_all(...) -> AsyncHttpResponse[RevokeAllPersonalAccessTokenResponse]
-
-
-
Revoke All Personal Access Tokens for the user with the given email
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.personal_access_tokens.revoke_all( email="email", )
-
-
-
email:
str— Email of the user to revoke all Personal Access Tokens for
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.personal_access_tokens.delete(...) -> AsyncHttpResponse[DeletePersonalAccessTokenResponse]
-
-
-
Delete Personal Access Token associated with the provided serviceAccountId
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.personal_access_tokens.delete( id="id", )
-
-
-
id:
str— serviceaccount id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.personal_access_tokens.get(...) -> AsyncHttpResponse[GetOrCreatePersonalAccessTokenResponse]
-
-
-
Get an existing Personal Access Token by name, if it doesn't exist, it will create a new one and return the PAT data along with a fresh token.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.personal_access_tokens.get( name="name", )
-
-
-
name:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.virtual_accounts.list(...) -> AsyncPager[VirtualAccount, ListVirtualAccountResponse]
-
-
-
List virtual accounts for the tenant.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.virtual_accounts.list( limit=10, offset=0, name_search_query="nameSearchQuery", ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
name_search_query:
typing.Optional[str]— Return virtual accounts with names that contain this string
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.virtual_accounts.create_or_update(...) -> AsyncHttpResponse[GetVirtualAccountResponse]
-
-
-
Creates a new virtual account or updates an existing one based on the provided manifest.
-
-
-
from truefoundry_sdk import Permissions, TrueFoundry, VirtualAccountManifest client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.virtual_accounts.create_or_update( manifest=VirtualAccountManifest( name="name", permissions=[ Permissions( resource_fqn="resource_fqn", resource_type="resource_type", role_id="role_id", ) ], ), )
-
-
-
manifest:
VirtualAccountManifest— Virtual account manifest
-
dry_run:
typing.Optional[bool]— Dry run
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.virtual_accounts.get(...) -> AsyncHttpResponse[GetVirtualAccountResponse]
-
-
-
Get virtual account by id
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.virtual_accounts.get( id="id", )
-
-
-
id:
str— serviceaccount id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.virtual_accounts.delete(...) -> AsyncHttpResponse[DeleteVirtualAccountResponse]
-
-
-
Delete a virtual account associated with the provided virtual account id.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.virtual_accounts.delete( id="id", )
-
-
-
id:
str— serviceaccount id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.virtual_accounts.get_token(...) -> AsyncHttpResponse[GetTokenForVirtualAccountResponse]
-
-
-
Get token for a virtual account by id
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.virtual_accounts.get_token( id="id", )
-
-
-
id:
str— serviceaccount id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.virtual_accounts.sync_to_secret_store(...) -> AsyncHttpResponse[SyncVirtualAccountTokenResponse]
-
-
-
Syncs the virtual account token to the configured secret store. Returns the updated JWT with sync metadata including timestamp and error (if any).
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.virtual_accounts.sync_to_secret_store( id="id", )
-
-
-
id:
str— serviceaccount id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.virtual_accounts.regenerate_token(...) -> AsyncHttpResponse[GetTokenForVirtualAccountResponse]
-
-
-
Regenerate token for a virtual account by id. The old token will remain valid for the specified grace period.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.virtual_accounts.regenerate_token( id="id", grace_period_in_days=30.0, )
-
-
-
id:
str— serviceaccount id
-
grace_period_in_days:
float— Grace period in days for which the old token will remain valid after regeneration
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.virtual_accounts.delete_jwt(...) -> AsyncHttpResponse[None]
-
-
-
Delete a JWT for a virtual account by id
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.virtual_accounts.delete_jwt( id="id", jwt_id="jwtId", )
-
-
-
id:
str— virtual account id
-
jwt_id:
str— JWT id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.clusters.list(...) -> AsyncPager[Cluster, ListClustersResponse]
-
-
-
Retrieves a list of all latest Clusters. Pagination is available based on query parameters.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.clusters.list( limit=10, offset=0, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.clusters.create_or_update(...) -> AsyncHttpResponse[GetClusterResponse]
-
-
-
Create or Update cluster with provided manifest
-
-
-
from truefoundry_sdk import ( ClusterManifest, ClusterManifestClusterType, Collaborator, TrueFoundry, ) client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.clusters.create_or_update( manifest=ClusterManifest( name="name", cluster_type=ClusterManifestClusterType.AWS_EKS, environment_names=["environment_names"], collaborators=[ Collaborator( subject="subject", role_id="role_id", ) ], ), )
-
-
-
manifest:
ClusterManifest— Cluster manifest
-
dry_run:
typing.Optional[bool]— Dry run the cluster creation/update
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.clusters.get(...) -> AsyncHttpResponse[GetClusterResponse]
-
-
-
Get cluster associated with provided id
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.clusters.get( id="id", )
-
-
-
id:
str— Cluster id of the cluster
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.clusters.delete(...) -> AsyncHttpResponse[ClustersDeleteResponse]
-
-
-
Delete cluster associated with provided cluster id
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.clusters.delete( id="id", )
-
-
-
id:
str— Cluster id of the cluster
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.clusters.get_addons(...) -> AsyncHttpResponse[ListClusterAddonsResponse]
-
-
-
List addons for the provided cluster. Pagination is available based on query parameters.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.clusters.get_addons( id="id", limit=10, offset=0, )
-
-
-
id:
str— Cluster id of the cluster
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.clusters.is_connected(...) -> AsyncHttpResponse[IsClusterConnectedResponse]
-
-
-
Get the status of provided cluster
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.clusters.is_connected( id="id", )
-
-
-
id:
str— Cluster id of the cluster
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.environments.list(...) -> AsyncPager[Environment, ListEnvironmentsResponse]
-
-
-
List environments, if no environments are found, default environments are created and returned. Pagination is available based on query parameters
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.environments.list( limit=10, offset=0, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.environments.create_or_update(...) -> AsyncHttpResponse[GetEnvironmentResponse]
-
-
-
Creates a new Environment or updates an existing Environment.
-
-
-
from truefoundry_sdk import ( EnvironmentColor, EnvironmentManifest, EnvironmentOptimizeFor, TrueFoundry, ) client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.environments.create_or_update( manifest=EnvironmentManifest( name="name", color=EnvironmentColor(), is_production=True, optimize_for=EnvironmentOptimizeFor.COST, ), )
-
-
-
manifest:
EnvironmentManifest— Environment Manifest
-
dry_run:
typing.Optional[bool]— Dry run
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.environments.get(...) -> AsyncHttpResponse[GetEnvironmentResponse]
-
-
-
Get Environment associated with the provided id.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.environments.get( id="id", )
-
-
-
id:
str— Environment id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.environments.delete(...) -> AsyncHttpResponse[bool]
-
-
-
Delete Environment associated with the provided id.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.environments.delete( id="id", )
-
-
-
id:
str— Environment id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.applications.list(...) -> AsyncPager[Application, ListApplicationsResponse]
-
-
-
Retrieves a list of all latest applications. Supports filtering by application ID, name, type, and other parameters. Pagination is available based on query parameters.
-
-
-
from truefoundry_sdk import TrueFoundry from truefoundry_sdk.applications import ( ApplicationsListRequestDeviceTypeFilter, ApplicationsListRequestLifecycleStage, ) client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.applications.list( limit=10, offset=0, application_id="applicationId", workspace_id="workspaceId", application_name="applicationName", fqn="fqn", workspace_fqn="workspaceFqn", application_type="applicationType", name_search_query="nameSearchQuery", environment_id="environmentId", cluster_id="clusterId", application_set_id="applicationSetId", paused=True, device_type_filter=ApplicationsListRequestDeviceTypeFilter.CPU, last_deployed_by_subjects="lastDeployedBySubjects", lifecycle_stage=ApplicationsListRequestLifecycleStage.ACTIVE, is_recommendation_present_and_visible=True, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
application_id:
typing.Optional[str]— Application id of the application
-
workspace_id:
typing.Optional[str]— Workspace id of the application (comma separated for multiple)
-
application_name:
typing.Optional[str]— Name of application
-
fqn:
typing.Optional[str]— Fully qualified name (FQN) of the application
-
workspace_fqn:
typing.Optional[str]— Fully qualified name (FQN) of the workspace
-
application_type:
typing.Optional[str]— Type of application (comma separated for multiple). Allowed Values: async-service, service, job, spark-job, helm, notebook, codeserver, rstudio, ssh-server, volume, application, application-set, intercept, workflow
-
name_search_query:
typing.Optional[str]— Search query for application name
-
environment_id:
typing.Optional[str]— Filter by Environment ids of the application (comma separated for multiple)
-
cluster_id:
typing.Optional[str]— Filter by Cluster ids of the application (comma separated for multiple)
-
application_set_id:
typing.Optional[str]— Filter by Application Set id of the application
-
paused:
typing.Optional[bool]— Filter by Application Paused status
-
device_type_filter:
typing.Optional[ApplicationsListRequestDeviceTypeFilter]— Filter by device type of the application. Allowed values: cpu, nvidia_gpu, aws_inferentia, nvidia_mig_gpu, nvidia_timeslicing_gpu, gcp_tpu
-
last_deployed_by_subjects:
typing.Optional[str]— Filter by last deployed by specific users
-
lifecycle_stage:
typing.Optional[ApplicationsListRequestLifecycleStage]— Filter by application lifecycle state
-
is_recommendation_present_and_visible:
typing.Optional[bool]— Filter out applications with recommendations that are allowed to be shown
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.applications.create_or_update(...) -> AsyncHttpResponse[GetApplicationDeploymentResponse]
-
-
-
Create a new Application Deployment based on the provided manifest.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.applications.create_or_update( manifest={"key": "value"}, )
-
-
-
manifest:
typing.Dict[str, typing.Any]— Manifest of application
-
dry_run:
typing.Optional[bool]— Dry run
-
force_deploy:
typing.Optional[bool]— Cancels any ongoing deployments
-
trigger_on_deploy:
typing.Optional[bool]— Trigger on deploy
-
workspace_id:
typing.Optional[str]— workspace id of the workspace
-
application_id:
typing.Optional[str]— Id of the application
-
name:
typing.Optional[str]— Name of application
-
application_set_id:
typing.Optional[str]— Application Set Id
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.applications.get(...) -> AsyncHttpResponse[GetApplicationResponse]
-
-
-
Get Application associated with the provided application ID.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.applications.get( id="id", )
-
-
-
id:
str— Id of the application
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.applications.delete(...) -> AsyncHttpResponse[DeleteApplicationResponse]
-
-
-
Delete Application associated with the provided application ID.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.applications.delete( id="id", )
-
-
-
id:
str— Id of the application
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.applications.redeploy(...) -> AsyncHttpResponse[GetApplicationDeploymentResponse]
-
-
-
Creates a new deployment with the same manifest as the given deployment.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.applications.redeploy( id="id", deployment_id="deploymentId", )
-
-
-
id:
str— Application id of the application
-
deployment_id:
str— Deployment id of the deployment
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.applications.scale_to_zero(...) -> AsyncHttpResponse[None]
-
-
-
Pause a running application by scaling to 0 replicas
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.applications.scale_to_zero( id="id", )
-
-
-
id:
str— Id of the application
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.applications.scale_to_original(...) -> AsyncHttpResponse[Deployment]
-
-
-
Resume a paused application by scaling back to the original number of replicas
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.applications.scale_to_original( id="id", )
-
-
-
id:
str— Id of the application
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.applications.cancel_deployment(...) -> AsyncHttpResponse[ApplicationsCancelDeploymentResponse]
-
-
-
Cancel an ongoing deployment associated with the provided application ID and deployment ID.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.applications.cancel_deployment( id="id", deployment_id="deploymentId", )
-
-
-
id:
str— Application id of the application
-
deployment_id:
str— Deployment id of the deployment
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.application_versions.list(...) -> AsyncPager[Deployment, ListApplicationDeploymentsResponse]
-
-
-
Fetch all deployments for a given application ID with optional filters such as deployment ID or version. Supports pagination.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.application_versions.list( id="id", limit=10, offset=0, version="1", deployment_id="deployment123", ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
id:
str— Id of the application
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
version:
typing.Optional[str]— Deployment version. Filter deployments by version.
-
deployment_id:
typing.Optional[str]— Deployment ID. Filter deployments by a specific ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.application_versions.get(...) -> AsyncHttpResponse[GetApplicationDeploymentResponse]
-
-
-
Get Deployment associated with the provided application ID and deployment ID.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.application_versions.get( id="id", deployment_id="deploymentId", )
-
-
-
id:
str— Application id of the application
-
deployment_id:
str— Deployment id of the deployment
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.jobs.list_runs(...) -> AsyncPager[JobRun, ListJobRunResponse]
-
-
-
List Job Runs for provided Job Id. Filter the data based on parameters passed in the query
-
-
-
from truefoundry_sdk import JobRunsSortBy, SortDirection, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.jobs.list_runs( job_id="jobId", limit=10, offset=0, search_prefix="searchPrefix", sort_by=JobRunsSortBy.START_TIME, order=SortDirection.ASC, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
job_id:
str— Job id of the application
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
search_prefix:
typing.Optional[str]— Prefix used to search for job runs by name or identifier
-
sort_by:
typing.Optional[JobRunsSortBy]— Attribute to sort by
-
order:
typing.Optional[SortDirection]— Sorting order
-
triggered_by:
typing.Optional[typing.Union[str, typing.Sequence[str]]]— Array of subject slugs
-
status:
typing.Optional[typing.Union[JobRunStatus, typing.Sequence[JobRunStatus]]]— Status of the job run
-
version_numbers:
typing.Optional[typing.Union[float, typing.Sequence[float]]]— Version number of the deployment
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.jobs.get_run(...) -> AsyncHttpResponse[GetJobRunResponse]
-
-
-
Get Job Run for provided jobRunName and jobId
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.jobs.get_run( job_id="jobId", job_run_name="jobRunName", )
-
-
-
job_id:
str— Application Id of JOB
-
job_run_name:
str— Job run name of the application
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.jobs.delete_run(...) -> AsyncHttpResponse[DeleteJobRunResponse]
-
-
-
Delete Job Run for provided jobRunName and jobId
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.jobs.delete_run( job_id="jobId", job_run_name="jobRunName", )
-
-
-
job_id:
str— Application Id of JOB
-
job_run_name:
str— Job run name of the application
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.jobs.trigger(...) -> AsyncHttpResponse[TriggerJobRunResponse]
-
-
-
Trigger Job for provided deploymentId or applicationId
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.jobs.trigger()
-
-
-
deployment_id:
typing.Optional[str]— Deployment Id of the job
-
application_id:
typing.Optional[str]— Application Id of the job
-
input:
typing.Optional[TriggerJobRequestInput]— Job trigger input
-
metadata:
typing.Optional[Metadata]— Metadata for the job run including job_alias_name
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.jobs.terminate(...) -> AsyncHttpResponse[TerminateJobResponse]
-
-
-
Terminate Job for provided deploymentId and jobRunName
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.jobs.terminate( deployment_id="deploymentId", job_run_name="jobRunName", )
-
-
-
deployment_id:
str— Deployment Id of the Deployment
-
job_run_name:
str— Job Run name
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.workspaces.list(...) -> AsyncPager[Workspace, ListWorkspacesResponse]
-
-
-
List workspaces associated with the user. Optional filters include clusterId, fqn, and workspace name. Pagination is available based on query parameters.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.workspaces.list( limit=10, offset=0, cluster_id="clusterId", name="name", fqn="fqn", ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
cluster_id:
typing.Optional[str]— ClusterId of the Cluster
-
name:
typing.Optional[str]— Workspace Name
-
fqn:
typing.Optional[str]— Workspace FQN
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.workspaces.create_or_update(...) -> AsyncHttpResponse[GetWorkspaceResponse]
-
-
-
Creates a new workspace or updates an existing one based on the provided manifest.
-
-
-
from truefoundry_sdk import TrueFoundry, WorkspaceManifest client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.workspaces.create_or_update( manifest=WorkspaceManifest( cluster_fqn="cluster_fqn", name="name", ), )
-
-
-
manifest:
WorkspaceManifest— Workspace manifest
-
dry_run:
typing.Optional[bool]— Dry run the request
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.workspaces.get(...) -> AsyncHttpResponse[GetWorkspaceResponse]
-
-
-
Get workspace associated with provided workspace id
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.workspaces.get( id="id", )
-
-
-
id:
str— Workspace id of the space
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.workspaces.delete(...) -> AsyncHttpResponse[WorkspacesDeleteResponse]
-
-
-
Deletes the workspace with the given workspace ID. - Removes the associated namespace from the cluster. - Deletes the corresponding authorization entry.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.workspaces.delete( id="id", )
-
-
-
id:
str— Workspace id of the space
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.secrets.list(...) -> AsyncPager[Secret, ListSecretsResponse]
-
-
-
List secrets associated with a user filtered with optional parameters passed in the body.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.secrets.list() for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
secret_fqns:
typing.Optional[typing.Sequence[str]]— Array of FQNs
-
secret_group_id:
typing.Optional[str]— Secret Group Id of the secret gourp.
-
with_value:
typing.Optional[bool]— Whether to include the secret values in the response. Defaults to false.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.secrets.get(...) -> AsyncHttpResponse[GetSecretResponse]
-
-
-
Get Secret associated with provided id. The secret value is not returned if the control plane has
DISABLE_SECRET_VALUE_VIEWset
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.secrets.get( id="id", )
-
-
-
id:
str— Secret Id of the secret.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.secrets.delete(...) -> AsyncHttpResponse[float]
-
-
-
Deletes a secret and its versions along with its values.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.secrets.delete( id="id", force_delete=True, )
-
-
-
id:
str— Secret Id of the secret.
-
force_delete:
typing.Optional[bool]— Whether to force delete the secret.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.secret_groups.list(...) -> AsyncPager[SecretGroup, ListSecretGroupResponse]
-
-
-
List the secret groups associated with a user along with the associated secrets for each group. Filtered with the options passed in the query fields. Note: This method does not return the secret values of the associatedSecrets in the response. A separate API call to
/v1/secrets/{id}should be made to fetch the associated secret value.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.secret_groups.list( limit=10, offset=0, fqn="fqn", search="search", ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
limit:
typing.Optional[int]— Number of items per page
-
offset:
typing.Optional[int]— Number of items to skip
-
fqn:
typing.Optional[str]— Fqn of secret group.
-
search:
typing.Optional[str]— Search query - filters by secret group names that contain the search string
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.secret_groups.create(...) -> AsyncHttpResponse[GetSecretGroupResponse]
-
-
-
Creates a secret group with secrets in it. A secret version for each of the created secret is created with version number as 1. The returned secret group does not have any secret values in the associatedSecrets field. A separate API call to
/v1/secrets/{id}should be made to fetch the associated secret value.
-
-
-
from truefoundry_sdk import SecretInput, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.secret_groups.create( name="name", integration_id="integrationId", secrets=[ SecretInput( key="key", value="value", ) ], )
-
-
-
name:
str— Name of the secret group.
-
integration_id:
str— Id of the provider integration.
-
secrets:
typing.Sequence[SecretInput]— The secrets to be associated with the secret group
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.secret_groups.create_or_update(...) -> AsyncHttpResponse[GetSecretGroupResponse]
-
-
-
Creates a new secret group or updates an existing one based on the provided manifest.
-
-
-
from truefoundry_sdk import Collaborator, SecretGroupManifest, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.secret_groups.create_or_update( manifest=SecretGroupManifest( name="name", integration_fqn="integration_fqn", collaborators=[ Collaborator( subject="subject", role_id="role_id", ) ], ), )
-
-
-
manifest:
SecretGroupManifest— Secret Group Manifest
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.secret_groups.get(...) -> AsyncHttpResponse[GetSecretGroupResponse]
-
-
-
Get Secret Group by id. This method does not return the secret values of the associatedSecrets in the response. A separate API call to
/v1/secrets/{id}should be made to fetch the associated secret value.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.secret_groups.get( id="id", )
-
-
-
id:
str— Secret Id of the secret group.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.secret_groups.update(...) -> AsyncHttpResponse[GetSecretGroupResponse]
-
-
-
Updates the secrets in a secret group with new values. A new secret version is created for every secret that has a modified value and any omitted secrets are deleted. The returned updated secret group does not have any secret values in the associatedSecrets field. A separate API call to
/v1/secrets/{id}should be made to fetch the associated secret value.
-
-
-
from truefoundry_sdk import TrueFoundry, UpdateSecretInput client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.secret_groups.update( id="id", secrets=[ UpdateSecretInput( key="key", ) ], )
-
-
-
id:
str— Secret Id of the secret group.
-
secrets:
typing.Sequence[UpdateSecretInput]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.secret_groups.delete(...) -> AsyncHttpResponse[DeleteSecretGroupResponse]
-
-
-
Deletes the secret group, its associated secrets and secret versions of those secrets.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.secret_groups.delete( id="id", )
-
-
-
id:
str— Secret Id of the secret group.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.events.get(...) -> AsyncHttpResponse[GetEventsResponse]
-
-
-
Get Events for Pod, Job Run, Application. The events are sourced from Kubernetes as well as events captured by truefoundry. Optional query parameters include startTs, endTs for filtering.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.events.get( start_ts="startTs", end_ts="endTs", application_id="applicationId", application_fqn="applicationFqn", job_run_name="jobRunName", )
-
-
-
start_ts:
typing.Optional[str]— Start timestamp (ISO format) for querying events
-
end_ts:
typing.Optional[str]— End timestamp (ISO format) for querying events
-
application_id:
typing.Optional[str]— Application ID
-
application_fqn:
typing.Optional[str]— Application FQN
-
pod_names:
typing.Optional[typing.Union[str, typing.Sequence[str]]]— Name of the pods
-
job_run_name:
typing.Optional[str]— Job run name
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.alerts.list(...) -> AsyncHttpResponse[GetAlertsResponse]
-
-
-
Get alerts for a given application or cluster filtered by start and end timestamp
-
-
-
from truefoundry_sdk import AlertStatus, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.alerts.list( start_ts="startTs", end_ts="endTs", cluster_id="clusterId", application_id="applicationId", alert_status=AlertStatus.FIRING, )
-
-
-
start_ts:
typing.Optional[str]— Start timestamp (ISO format) for querying events
-
end_ts:
typing.Optional[str]— End timestamp (ISO format) for querying events
-
cluster_id:
typing.Optional[str]— Cluster id
-
application_id:
typing.Optional[str]— Application id
-
alert_status:
typing.Optional[AlertStatus]— Alert status
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.logs.get(...) -> AsyncHttpResponse[GetLogsResponse]
-
-
-
Fetch logs for various workload components, including Services, Jobs, Workflows, Job Runs, and Pods. Logs are filtered based on the provided query parameters.
-
-
-
from truefoundry_sdk import ( LogsSearchFilterType, LogsSearchOperatorType, LogsSortingDirection, TrueFoundry, ) client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.logs.get( start_ts=1000000, end_ts=1000000, limit=1, direction=LogsSortingDirection.ASC, num_logs_to_ignore=1, application_id="applicationId", application_fqn="applicationFqn", deployment_id="deploymentId", job_run_name="jobRunName", pod_name="podName", container_name="containerName", pod_names_regex="podNamesRegex", search_filters="searchFilters", search_string="searchString", search_type=LogsSearchFilterType.REGEX, search_operator=LogsSearchOperatorType.EQUAL, )
-
-
-
start_ts:
typing.Optional[int]— Start timestamp for querying logs, in nanoseconds from the Unix epoch.
-
end_ts:
typing.Optional[int]— End timestamp for querying logs, in nanoseconds from the Unix epoch.
-
limit:
typing.Optional[int]— Max number of log lines to fetch
-
direction:
typing.Optional[LogsSortingDirection]— Direction of sorting logs. Can beascordesc
-
num_logs_to_ignore:
typing.Optional[int]— Number of logs corresponding to the starting timestamp to be ignored.
-
application_id:
typing.Optional[str]— Application ID
-
application_fqn:
typing.Optional[str]— Application FQN
-
deployment_id:
typing.Optional[str]— Deployment ID
-
job_run_name:
typing.Optional[str]— Name of the Job Run for which to fetch logs.
-
pod_name:
typing.Optional[str]— Name of Pod for which to fetch logs.
-
container_name:
typing.Optional[str]— Name of the Container for which to fetch logs.
-
pod_names:
typing.Optional[typing.Union[str, typing.Sequence[str]]]— List of pod names for which to fetch logs.
-
pod_names_regex:
typing.Optional[str]— Regex pattern for pod names to fetch logs.
-
search_filters:
typing.Optional[str]— JSON string containing array of search filters with string, type and operator
-
search_string:
typing.Optional[str]— String that needs to be matched
-
search_type:
typing.Optional[LogsSearchFilterType]— Query filter type,regexsubstringignore_case_substring
-
search_operator:
typing.Optional[LogsSearchOperatorType]— Comparison operator for filter.equalornot_equal
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.ml_repos.create_or_update(...) -> AsyncHttpResponse[GetMlRepoResponse]
-
-
-
Creates or updates an MLRepo entity based on the provided manifest.
-
-
-
from truefoundry_sdk import Collaborator, MlRepoManifest, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.ml_repos.create_or_update( manifest=MlRepoManifest( name="name", storage_integration_fqn="storage_integration_fqn", collaborators=[ Collaborator( subject="subject", role_id="role_id", ) ], ), )
-
-
-
manifest:
MlRepoManifest— MLRepo manifest
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.ml_repos.get(...) -> AsyncHttpResponse[GetMlRepoResponse]
-
-
-
Get a ml repo by id Args: id: Unique identifier of the ml repo to get user_info: Authenticated user information
Returns: GetMLRepoResponse: The ml repo
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.ml_repos.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.ml_repos.delete(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
Delete a ml repo Args: id: Unique identifier of the ml repo to delete user_info: Authenticated user information
Returns: EmptyResponse: Empty response indicating successful deletion
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.ml_repos.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.ml_repos.list(...) -> AsyncPager[MlRepo, ListMlReposResponse]
-
-
-
List ml repos Args: filters: Filters for the ml repos user_info: Authenticated user information
Returns: ListMLReposResponse: List of ml repos
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.ml_repos.list( name="name", limit=1, offset=1, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
name:
typing.Optional[str]
-
limit:
typing.Optional[int]
-
offset:
typing.Optional[int]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.traces.query_spans(...) -> AsyncPager[TraceSpan, QuerySpansResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.traces.query_spans( start_time="startTime", ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
start_time:
str— Start time in ISO 8601 format (e.g., 2025-03-12T00:00:09.872Z)
-
end_time:
typing.Optional[str]— End time in ISO 8601 format (e.g., 2025-03-12T00:10:00.000Z). Defaults to current time if not provided.
-
trace_ids:
typing.Optional[typing.Sequence[str]]— Array of trace IDs to filter by
-
span_ids:
typing.Optional[typing.Sequence[str]]— Array of span IDs to filter by
-
parent_span_ids:
typing.Optional[typing.Sequence[str]]— Array of parent span IDs to filter by
-
created_by_subject_types:
typing.Optional[typing.Sequence[SubjectType]]— Array of subject types to filter by
-
created_by_subject_slugs:
typing.Optional[typing.Sequence[str]]— Array of subject slugs to filter by
-
application_names:
typing.Optional[typing.Sequence[str]]— Array of application names to filter by
-
limit:
typing.Optional[int]— The maximum number of spans to return per page. Defaults to 200 if not provided.
-
sort_direction:
typing.Optional[SortDirection]— Sort direction for results based on time. Defaults to descending (latest first)
-
page_token:
typing.Optional[str]— An opaque string that should be passed as-is from previous response for fetching the next page. Pass$response.pagination.nextPageTokenfrom previous response for fetching the next page.
-
tracing_project_fqn:
typing.Optional[str]— Tracing project FQN (e.g., truefoundry:tracing-project:tfy-default)
-
data_routing_destination:
typing.Optional[str]— Data Routing Destination. One of tracingProjectFqn or dataRoutingDestination is required.
-
filters:
typing.Optional[typing.Sequence[QuerySpansRequestFiltersItem]]— Array of filters
-
include_feedbacks:
typing.Optional[bool]— When true, feedback data is included in the response. When false, feedback data is excluded (returns empty array).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifacts.get(...) -> AsyncHttpResponse[GetArtifactResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.artifacts.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifacts.delete(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.artifacts.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifacts.list(...) -> AsyncPager[Artifact, ListArtifactsResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.artifacts.list( fqn="fqn", ml_repo_id="ml_repo_id", name="name", offset=1, limit=1, run_id="run_id", include_empty_artifacts=True, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
fqn:
typing.Optional[str]
-
ml_repo_id:
typing.Optional[str]
-
name:
typing.Optional[str]
-
offset:
typing.Optional[int]
-
limit:
typing.Optional[int]
-
run_id:
typing.Optional[str]
-
include_empty_artifacts:
typing.Optional[bool]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifacts.create_or_update(...) -> AsyncHttpResponse[GetArtifactVersionResponse]
-
-
-
from truefoundry_sdk import ( ArtifactManifest, TrueFoundry, TrueFoundryManagedSource, ) client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.artifacts.create_or_update( manifest=ArtifactManifest( name="name", metadata={"key": "value"}, ml_repo="ml_repo", source=TrueFoundryManagedSource(), ), )
-
-
-
manifest:
ArtifactManifest
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.prompts.get(...) -> AsyncHttpResponse[GetPromptResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.prompts.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.prompts.delete(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.prompts.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.prompts.list(...) -> AsyncPager[Prompt, ListPromptsResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.prompts.list( fqn="fqn", ml_repo_id="ml_repo_id", name="name", offset=1, limit=1, include_empty_prompts=True, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
fqn:
typing.Optional[str]
-
ml_repo_id:
typing.Optional[str]
-
name:
typing.Optional[str]
-
offset:
typing.Optional[int]
-
limit:
typing.Optional[int]
-
include_empty_prompts:
typing.Optional[bool]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.prompts.create_or_update(...) -> AsyncHttpResponse[GetPromptVersionResponse]
-
-
-
from truefoundry_sdk import ChatPromptManifest, SystemMessage, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.prompts.create_or_update( manifest=ChatPromptManifest( name="name", metadata={"key": "value"}, ml_repo="ml_repo", messages=[ SystemMessage( content="content", ) ], ), )
-
-
-
manifest:
ChatPromptManifest
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.models.get(...) -> AsyncHttpResponse[GetModelResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.models.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.models.delete(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.models.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.models.list(...) -> AsyncPager[Model, ListModelsResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.models.list( fqn="fqn", ml_repo_id="ml_repo_id", name="name", offset=1, limit=1, run_id="run_id", include_empty_models=True, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
fqn:
typing.Optional[str]
-
ml_repo_id:
typing.Optional[str]
-
name:
typing.Optional[str]
-
offset:
typing.Optional[int]
-
limit:
typing.Optional[int]
-
run_id:
typing.Optional[str]
-
include_empty_models:
typing.Optional[bool]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.models.create_or_update(...) -> AsyncHttpResponse[GetModelVersionResponse]
-
-
-
from truefoundry_sdk import ModelManifest, TrueFoundry, TrueFoundryManagedSource client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.models.create_or_update( manifest=ModelManifest( name="name", metadata={"key": "value"}, ml_repo="ml_repo", source=TrueFoundryManagedSource(), ), )
-
-
-
manifest:
ModelManifest
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifact_versions.apply_tags(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.artifact_versions.apply_tags( artifact_version_id="artifact_version_id", tags=["tags"], )
-
-
-
artifact_version_id:
str
-
tags:
typing.Sequence[str]
-
force:
typing.Optional[bool]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifact_versions.get(...) -> AsyncHttpResponse[GetArtifactVersionResponse]
-
-
-
Get artifact version API
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.artifact_versions.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifact_versions.delete(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
Delete artifact versions API
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.artifact_versions.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifact_versions.list(...) -> AsyncPager[ArtifactVersion, ListArtifactVersionsResponse]
-
-
-
List artifact version API
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.artifact_versions.list( tag="tag", fqn="fqn", artifact_id="artifact_id", ml_repo_id="ml_repo_id", name="name", version=1, offset=1, limit=1, include_internal_metadata=True, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
tag:
typing.Optional[str]
-
fqn:
typing.Optional[str]
-
artifact_id:
typing.Optional[str]
-
ml_repo_id:
typing.Optional[str]
-
name:
typing.Optional[str]
-
version:
typing.Optional[int]
-
run_ids:
typing.Optional[typing.Union[str, typing.Sequence[str]]]
-
run_steps:
typing.Optional[typing.Union[int, typing.Sequence[int]]]
-
offset:
typing.Optional[int]
-
limit:
typing.Optional[int]
-
include_internal_metadata:
typing.Optional[bool]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifact_versions.get_signed_urls(...) -> AsyncHttpResponse[GetSignedUrLsResponse]
-
-
-
from truefoundry_sdk import Operation, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.artifact_versions.get_signed_urls( id="id", paths=["paths"], operation=Operation.READ, )
-
-
-
id:
str
-
paths:
typing.Sequence[str]
-
operation:
Operation
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifact_versions.create_multi_part_upload(...) -> AsyncHttpResponse[MultiPartUploadResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.artifact_versions.create_multi_part_upload( id="id", path="path", num_parts=1, )
-
-
-
id:
str
-
path:
str
-
num_parts:
int
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifact_versions.stage(...) -> AsyncHttpResponse[StageArtifactResponse]
-
-
-
from truefoundry_sdk import ModelManifest, TrueFoundry, TrueFoundryManagedSource client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.artifact_versions.stage( manifest=ModelManifest( name="name", metadata={"key": "value"}, ml_repo="ml_repo", source=TrueFoundryManagedSource(), ), )
-
-
-
manifest:
StageArtifactRequestManifest
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifact_versions.list_files(...) -> AsyncPager[FileInfo, ListFilesResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.artifact_versions.list_files( id="id", ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
id:
str
-
path:
typing.Optional[str]
-
limit:
typing.Optional[int]
-
page_token:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.artifact_versions.mark_stage_failure(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.artifact_versions.mark_stage_failure( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.model_versions.apply_tags(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.model_versions.apply_tags( model_version_id="model_version_id", tags=["tags"], )
-
-
-
model_version_id:
str
-
tags:
typing.Sequence[str]
-
force:
typing.Optional[bool]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.model_versions.get(...) -> AsyncHttpResponse[GetModelVersionResponse]
-
-
-
Get model version API
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.model_versions.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.model_versions.delete(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
Delete model versions API
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.model_versions.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.model_versions.list(...) -> AsyncPager[ModelVersion, ListModelVersionsResponse]
-
-
-
List model version API
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.model_versions.list( tag="tag", fqn="fqn", model_id="model_id", ml_repo_id="ml_repo_id", name="name", version=1, offset=1, limit=1, include_internal_metadata=True, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
tag:
typing.Optional[str]
-
fqn:
typing.Optional[str]
-
model_id:
typing.Optional[str]
-
ml_repo_id:
typing.Optional[str]
-
name:
typing.Optional[str]
-
version:
typing.Optional[int]
-
run_ids:
typing.Optional[typing.Union[str, typing.Sequence[str]]]
-
run_steps:
typing.Optional[typing.Union[int, typing.Sequence[int]]]
-
offset:
typing.Optional[int]
-
limit:
typing.Optional[int]
-
include_internal_metadata:
typing.Optional[bool]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.prompt_versions.apply_tags(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.prompt_versions.apply_tags( prompt_version_id="prompt_version_id", tags=["tags"], )
-
-
-
prompt_version_id:
str
-
tags:
typing.Sequence[str]
-
force:
typing.Optional[bool]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.prompt_versions.get(...) -> AsyncHttpResponse[GetPromptVersionResponse]
-
-
-
Get prompt version API
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.prompt_versions.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.prompt_versions.delete(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
Delete prompt versions API
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.prompt_versions.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.prompt_versions.list(...) -> AsyncPager[PromptVersion, ListPromptVersionsResponse]
-
-
-
List prompt version API
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.prompt_versions.list( tag="tag", fqn="fqn", prompt_id="prompt_id", ml_repo_id="ml_repo_id", name="name", version=1, offset=1, limit=1, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
tag:
typing.Optional[str]
-
fqn:
typing.Optional[str]
-
prompt_id:
typing.Optional[str]
-
ml_repo_id:
typing.Optional[str]
-
name:
typing.Optional[str]
-
version:
typing.Optional[int]
-
offset:
typing.Optional[int]
-
limit:
typing.Optional[int]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.data_directories.get(...) -> AsyncHttpResponse[GetDataDirectoryResponse]
-
-
-
Get a data directory by its ID.
Args: id (str): The ID of the data directory to retrieve user_info: Current authenticated user info
Returns: DataDirectoryResponse: Response containing the retrieved data directory
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.data_directories.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.data_directories.delete(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
Delete a data directory and optionally its contents.
Args: id: Unique identifier of the data directory to delete delete_contents: If True, also deletes the data directory's contents user_info: Authenticated user information
Returns: EmptyResponse: Empty response indicating successful deletion
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.data_directories.delete( id="id", delete_contents=True, )
-
-
-
id:
str
-
delete_contents:
typing.Optional[bool]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.data_directories.list(...) -> AsyncPager[DataDirectory, ListDataDirectoriesResponse]
-
-
-
List all data directories with optional filtering and pagination.
Args: filters: Query parameters for filtering and pagination - ml_repo_id: Filter data directories by ml repo ID - name: Optional filter data directories by name - limit: Optional maximum number of data directories to return - offset: Optional number of data directories to skip user_info: Authenticated user information
Returns: ListDataDirectoriesResponse: List of data directories and pagination info
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.data_directories.list( fqn="fqn", ml_repo_id="ml_repo_id", name="name", limit=1, offset=1, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
fqn:
typing.Optional[str]
-
ml_repo_id:
typing.Optional[str]
-
name:
typing.Optional[str]
-
limit:
typing.Optional[int]
-
offset:
typing.Optional[int]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.data_directories.create_or_update(...) -> AsyncHttpResponse[GetDataDirectoryResponse]
-
-
-
from truefoundry_sdk import ( DataDirectoryManifest, TrueFoundry, TrueFoundryManagedSource, ) client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.data_directories.create_or_update( manifest=DataDirectoryManifest( name="name", ml_repo="ml_repo", metadata={"key": "value"}, source=TrueFoundryManagedSource(), ), )
-
-
-
manifest:
DataDirectoryManifest
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.data_directories.list_files(...) -> AsyncPager[FileInfo, ListFilesResponse]
-
-
-
List files in a dataset.
Args: request_dto: Request containing dataset ID, path, page token and limit user_info: Authenticated user information
Returns: ListFilesResponse: Response containing files and pagination info
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.data_directories.list_files( id="id", ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
id:
str
-
path:
typing.Optional[str]
-
limit:
typing.Optional[int]
-
page_token:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.data_directories.delete_files(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
Delete files from the dataset.
Args: request_dto: Request containing dataset ID and paths user_info: Authenticated user information
Returns: EmptyResponse: Empty response indicating successful deletion
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.data_directories.delete_files( id="id", paths=["paths"], )
-
-
-
id:
str
-
paths:
typing.Sequence[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.data_directories.get_signed_urls(...) -> AsyncHttpResponse[GetSignedUrLsResponse]
-
-
-
Get signed URLs for a dataset.
Args: request_dto: Request containing dataset ID, paths and operation user_info: Authenticated user information
Returns: GetSignedURLsResponse: Response containing signed URLs
-
-
-
from truefoundry_sdk import Operation, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.data_directories.get_signed_urls( id="id", paths=["paths"], operation=Operation.READ, )
-
-
-
id:
str
-
paths:
typing.Sequence[str]
-
operation:
Operation
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.data_directories.create_multipart_upload(...) -> AsyncHttpResponse[MultiPartUploadResponse]
-
-
-
Create a multipart upload for a dataset
Args: request_dto: Request containing dataset ID, path and number of parts user_info: Authenticated user information
Returns: MultiPartUploadResponse: Response containing multipart upload info
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.data_directories.create_multipart_upload( id="id", path="path", num_parts=1, )
-
-
-
id:
str
-
path:
str
-
num_parts:
int
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.users.get_info() -> AsyncHttpResponse[Session]
-
-
-
Get the user session details for the currently authenticated user
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.users.get_info()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.ai_gateway.get_gateway_config(...) -> AsyncHttpResponse[GatewayConfiguration]
-
-
-
Get Gateway configuration based on type for the tenant.
-
-
-
from truefoundry_sdk import TrueFoundry from truefoundry_sdk.internal.ai_gateway import ( AiGatewayGetGatewayConfigRequestType, ) client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.ai_gateway.get_gateway_config( type=AiGatewayGetGatewayConfigRequestType.GATEWAY_RATE_LIMITING_CONFIG, )
-
-
-
type:
AiGatewayGetGatewayConfigRequestType— Type of Config
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.clusters.get_autoprovisioning_state(...) -> AsyncHttpResponse[GetAutoProvisioningStateResponse]
-
-
-
Get the auto provisioning status for the provided cluster
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.clusters.get_autoprovisioning_state( id="id", )
-
-
-
id:
str— Cluster id of the cluster
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.deployments.get_deployment_statuses(...) -> AsyncHttpResponse[typing.List[DeploymentStatus]]
-
-
-
This endpoint returns all statuses for a specific deployment in a given application.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.deployments.get_deployment_statuses( id="id", deployment_id="deploymentId", )
-
-
-
id:
str— Application id of the application
-
deployment_id:
str— Deployment id of the deployment
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.deployments.get_builds(...) -> AsyncHttpResponse[typing.List[DeploymentBuild]]
-
-
-
This endpoint returns all build details associated with a specific deployment in a given application.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.deployments.get_builds( id="id", deployment_id="deploymentId", )
-
-
-
id:
str— Application id of the application
-
deployment_id:
str— Deployment id of the deployment
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.deployments.get_code_upload_url(...) -> AsyncHttpResponse[PresignedUrlObject]
-
-
-
Generate presigned URL to upload code for given serviceName and workspaceFqn
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.deployments.get_code_upload_url( service_name="serviceName", workspace_fqn="workspaceFqn", )
-
-
-
service_name:
str— ServiceName of the deployment
-
workspace_fqn:
str— WorkSpaceFQN of the workspace
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.deployments.get_suggested_endpoint(...) -> AsyncHttpResponse[GetSuggestedDeploymentEndpointResponse]
-
-
-
Generate deployment endpoint based on the provided query parameters.
-
-
-
from truefoundry_sdk import ApplicationType, TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.deployments.get_suggested_endpoint( application_type=ApplicationType.ASYNC_SERVICE, application_name="applicationName", workspace_id="workspaceId", base_domain="baseDomain", port="port", prefer_wildcard=True, )
-
-
-
application_type:
ApplicationType— Application Type
-
application_name:
str— Application name
-
workspace_id:
str— Workspace id
-
base_domain:
typing.Optional[str]— Base domain
-
port:
typing.Optional[str]— Port
-
prefer_wildcard:
typing.Optional[bool]— Prefer wildcard
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.applications.promote_rollout(...) -> AsyncHttpResponse[None]
-
-
-
Promote an application rollout for canary and blue-green.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.applications.promote_rollout( id="id", full=True, )
-
-
-
id:
str— Id of the application
-
full:
typing.Optional[bool]— Whether to promote a rollout to full
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.applications.get_pod_template_hash_to_deployment_version(...) -> AsyncHttpResponse[typing.Dict[str, float]]
-
-
-
This endpoint fetches the pod template hash to deployment version map for a specific application.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.applications.get_pod_template_hash_to_deployment_version( id="id", pod_template_hashes="podTemplateHashes", )
-
-
-
id:
str— Id of the application
-
pod_template_hashes:
typing.Optional[str]— Pod Template Hashes (comma separated for multiple)
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.metrics.get_charts(...) -> AsyncHttpResponse[GetChartsResponse]
-
-
-
List charts for a given Application based on parameters passed in the query.
-
-
-
from truefoundry_sdk import TrueFoundry from truefoundry_sdk.internal.metrics import MetricsGetChartsRequestFilterEntity client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.metrics.get_charts( workspace_id="workspaceId", application_id="applicationId", start_ts="startTs", end_ts="endTs", filter_entity=MetricsGetChartsRequestFilterEntity.APPLICATION, filter_query="filterQuery", )
-
-
-
workspace_id:
str
-
application_id:
str
-
filter_entity:
MetricsGetChartsRequestFilterEntity
-
start_ts:
typing.Optional[str]— Start Timestamp
-
end_ts:
typing.Optional[str]— End Timestamp
-
filter_query:
typing.Optional[str]— Query params to filter metrics
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.vcs.get_repository_details(...) -> AsyncHttpResponse[GitRepositoryExistsResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.vcs.get_repository_details( repo_url="repoURL", )
-
-
-
repo_url:
str— The URL of the repository
-
id:
typing.Optional[str]— The integration id of the repository
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.vcs.get_authenticated_url(...) -> AsyncHttpResponse[GetAuthenticatedVcsurlResponse]
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.vcs.get_authenticated_url( repo_url="repoURL", )
-
-
-
repo_url:
str— Repository URL (e.g., https://github.com/user/repo, https://bitbucket.org/user/repo)
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.docker_registries.create_repository(...) -> AsyncHttpResponse[DockerRegistriesCreateRepositoryResponse]
-
-
-
Create a docker repository in the provided workspace.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.docker_registries.create_repository( fqn="fqn", application_name="applicationName", workspace_fqn="workspaceFqn", )
-
-
-
fqn:
str— Docker registry FQN
-
application_name:
str— Application Name for the image being built
-
workspace_fqn:
str— FQN for the workspace of application
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.docker_registries.get_credentials(...) -> AsyncHttpResponse[DockerRegistriesGetCredentialsResponse]
-
-
-
Get docker registry credentials for building and pushing an image.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.docker_registries.get_credentials( fqn="fqn", cluster_id="clusterId", )
-
-
-
fqn:
typing.Optional[str]— Docker registry FQN
-
cluster_id:
typing.Optional[str]— Cluster Id if provided will fetch the default docker registry for the cluster
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.workflows.execute_workflow(...) -> AsyncHttpResponse[WorkflowsExecuteWorkflowResponse]
-
-
-
Execute a workflow for the specified application
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.workflows.execute_workflow( application_id="applicationId", )
-
-
-
application_id:
str— Id of the application
-
inputs:
typing.Optional[typing.Dict[str, typing.Any]]— Workflow inputs
-
inputs_literal_map:
typing.Optional[typing.Dict[str, typing.Any]]— Workflow inputs literal map
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.build_logs.get(...) -> AsyncHttpResponse[LogsResponse]
-
-
-
Get logs for a given pipeline run by its name, with optional filters and time range.
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.build_logs.get( pipeline_run_name="pipelineRunName", start_ts="1635467890123456789", end_ts="1635467891123456789", limit="limit", direction="direction", num_logs_to_ignore=1.1, )
-
-
-
pipeline_run_name:
str— PipelineRun Name
-
start_ts:
typing.Optional[str]— Start timestamp for querying logs, in nanoseconds from the Unix epoch.
-
end_ts:
typing.Optional[str]— End timestamp for querying logs, in nanoseconds from the Unix epoch.
-
limit:
typing.Optional[str]— Max number of log lines to fetch
-
direction:
typing.Optional[str]— Direction of sorting logs. Can beascordesc
-
filter_query:
typing.Optional[LogsFilterQuery]— Query to filter logs
-
num_logs_to_ignore:
typing.Optional[float]— Number of logs corresponding to the starting timestamp to be ignored.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.artifact_versions.list(...) -> AsyncPager[
InternalListArtifactVersionsResponseDataItem,
InternalListArtifactVersionsResponse,
]
-
-
-
List artifact version API
-
-
-
from truefoundry_sdk import TrueFoundry client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) response = client.internal.artifact_versions.list( tag="tag", fqn="fqn", artifact_id="artifact_id", ml_repo_id="ml_repo_id", name="name", version=1, offset=1, limit=1, include_internal_metadata=True, include_model_versions=True, ) for item in response: yield item # alternatively, you can paginate page-by-page for page in response.iter_pages(): yield page
-
-
-
tag:
typing.Optional[str]
-
fqn:
typing.Optional[str]
-
artifact_id:
typing.Optional[str]
-
ml_repo_id:
typing.Optional[str]
-
name:
typing.Optional[str]
-
version:
typing.Optional[int]
-
run_ids:
typing.Optional[typing.Union[str, typing.Sequence[str]]]
-
run_steps:
typing.Optional[typing.Union[int, typing.Sequence[int]]]
-
offset:
typing.Optional[int]
-
limit:
typing.Optional[int]
-
include_internal_metadata:
typing.Optional[bool]
-
include_model_versions:
typing.Optional[bool]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.ml.apply(...) -> AsyncHttpResponse[ApplyMlEntityResponse]
-
-
-
from truefoundry_sdk import ModelManifest, TrueFoundry, TrueFoundryManagedSource client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.ml.apply( manifest=ModelManifest( name="name", metadata={"key": "value"}, ml_repo="ml_repo", source=TrueFoundryManagedSource(), ), )
-
-
-
manifest:
ApplyMlEntityRequestManifest
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.internal.ml.delete(...) -> AsyncHttpResponse[EmptyResponse]
-
-
-
from truefoundry_sdk import ModelManifest, TrueFoundry, TrueFoundryManagedSource client = TrueFoundry( api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", ) client.internal.ml.delete( manifest=ModelManifest( name="name", metadata={"key": "value"}, ml_repo="ml_repo", source=TrueFoundryManagedSource(), ), )
-
-
-
manifest:
DeleteMlEntityRequestManifest
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-