Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cliVersion": "3.10.0",
"cliVersion": "3.54.1",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "4.45.3",
"generatorVersion": "4.54.2",
"generatorConfig": {
"package_name": "truefoundry_sdk",
"pydantic_config": {
Expand All @@ -21,5 +21,6 @@
"Jinja2": ">=3.1.6,<4.0.0",
"numpydoc": ">=1.7.0,<2.0.0"
}
}
},
"sdkVersion": "0.0.0"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ client = TrueFoundry(
)
response = client.applications.with_raw_response.list(...)
print(response.headers) # access the response headers
print(response.status_code) # access the response status code
print(response.data) # access the underlying object
pager = client.users.list(...)
print(pager.response) # access the typed response for the first page
Expand Down
111 changes: 58 additions & 53 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
Expand Down
264 changes: 132 additions & 132 deletions reference.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/truefoundry_sdk/_wrapped_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _get_by_fqn(client: HasListMethod[T, R], *, fqn: str, request_options: Optio
raise NotFoundError(
body=HttpError(
message=f"No entity found with fqn {fqn}",
status_code=404,
statusCode=404,
)
)
return result
Expand All @@ -67,7 +67,7 @@ async def _aget_by_fqn(
raise NotFoundError(
body=HttpError(
message=f"No entity found with fqn {fqn}",
status_code=404,
statusCode=404,
)
)
return result
Expand Down
4 changes: 2 additions & 2 deletions src/truefoundry_sdk/application_versions/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def list(
_get_next = lambda: self.list(
id,
limit=limit,
offset=offset + len(_items),
offset=offset + len(_items or []),
version=version,
deployment_id=deployment_id,
request_options=request_options,
Expand Down Expand Up @@ -256,7 +256,7 @@ async def _get_next():
return await self.list(
id,
limit=limit,
offset=offset + len(_items),
offset=offset + len(_items or []),
version=version,
deployment_id=deployment_id,
request_options=request_options,
Expand Down
4 changes: 2 additions & 2 deletions src/truefoundry_sdk/applications/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def list(
_has_next = True
_get_next = lambda: self.list(
limit=limit,
offset=offset + len(_items),
offset=offset + len(_items or []),
application_id=application_id,
workspace_id=workspace_id,
application_name=application_name,
Expand Down Expand Up @@ -800,7 +800,7 @@ async def list(
async def _get_next():
return await self.list(
limit=limit,
offset=offset + len(_items),
offset=offset + len(_items or []),
application_id=application_id,
workspace_id=workspace_id,
application_name=application_name,
Expand Down
4 changes: 2 additions & 2 deletions src/truefoundry_sdk/artifact_versions/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def list(
version=version,
run_ids=run_ids,
run_steps=run_steps,
offset=offset + len(_items),
offset=offset + len(_items or []),
limit=limit,
include_internal_metadata=include_internal_metadata,
request_options=request_options,
Expand Down Expand Up @@ -886,7 +886,7 @@ async def _get_next():
version=version,
run_ids=run_ids,
run_steps=run_steps,
offset=offset + len(_items),
offset=offset + len(_items or []),
limit=limit,
include_internal_metadata=include_internal_metadata,
request_options=request_options,
Expand Down
4 changes: 2 additions & 2 deletions src/truefoundry_sdk/artifacts/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def list(
fqn=fqn,
ml_repo_id=ml_repo_id,
name=name,
offset=offset + len(_items),
offset=offset + len(_items or []),
limit=limit,
run_id=run_id,
include_empty_artifacts=include_empty_artifacts,
Expand Down Expand Up @@ -437,7 +437,7 @@ async def _get_next():
fqn=fqn,
ml_repo_id=ml_repo_id,
name=name,
offset=offset + len(_items),
offset=offset + len(_items or []),
limit=limit,
run_id=run_id,
include_empty_artifacts=include_empty_artifacts,
Expand Down
4 changes: 2 additions & 2 deletions src/truefoundry_sdk/clusters/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def list(
_has_next = True
_get_next = lambda: self.list(
limit=limit,
offset=offset + len(_items),
offset=offset + len(_items or []),
request_options=request_options,
)
return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
Expand Down Expand Up @@ -496,7 +496,7 @@ async def list(
async def _get_next():
return await self.list(
limit=limit,
offset=offset + len(_items),
offset=offset + len(_items or []),
request_options=request_options,
)

Expand Down
4 changes: 4 additions & 0 deletions src/truefoundry_sdk/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ def __init__(
self._timeout = timeout

def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "truefoundry-sdk/0.0.0",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "truefoundry-sdk",
"X-Fern-SDK-Version": "0.0.0",
**(self.get_custom_headers() or {}),
Expand Down
Loading