Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt

Use this file to discover all available pages before exploring further.

Methods

List environments, if no environments are found, default environments are created and returned. Pagination is available based on query parameters

Parameters

limit
typing.Optional[int]
Number of items per page
offset
typing.Optional[int]
Number of items to skip

Returns

SyncPager[Environment, ListEnvironmentsResponse]
SyncPager[Environment, ListEnvironmentsResponse]
🔗 ListEnvironmentsResponseReturns a list of environment. If pagination parameters are provided, the response includes paginated data

Usage

from truefoundry import TrueFoundry

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

client.environments.list(
    limit=10,
    offset=10,
)

# Iterate through results
for item in response:
    print(item.name)

# Or paginate page by page
for page in response.iter_pages():
    for item in page:
        print(item.name)
Creates a new Environment or updates an existing Environment.

Parameters

manifest
EnvironmentManifest
required
🔗 EnvironmentManifestEnvironment Manifest
dry_run
typing.Optional[bool]
Dry run

Returns

GetEnvironmentResponse
GetEnvironmentResponse
🔗 GetEnvironmentResponseReturns the created or updated Environment

Usage

from truefoundry import TrueFoundry

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

client.environments.create_or_update(
    manifest={"key": "value"},
    dry_run=False,
)
Get Environment associated with the provided id.

Parameters

id
str
required
Environment id

Returns

GetEnvironmentResponse
GetEnvironmentResponse
🔗 GetEnvironmentResponseReturns the Environment associated with the provided id

Usage

from truefoundry import TrueFoundry

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

client.environments.get(
    id="id_value",
)
Delete Environment associated with the provided id.

Parameters

id
str
required
Environment id

Returns

bool
bool
Returns true if the Environment is deleted successfully

Usage

from truefoundry import TrueFoundry

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

client.environments.delete(
    id="id_value",
)