ApiClient¶
- class baseten.client.sandboxapi.ApiClient(http_client, *, base_url=None, auth=None, headers=None, timeout=None)¶
Bases:
objectGenerated HTTP client for the Baseten API.
Methods on this client are generated from the OpenAPI specification and are NOT covered by any stability or compatibility guarantees. They may change without notice between versions.
- Parameters:
- delete_drives_mount(*, mount_path)¶
Detach a drive from a local path
- Parameters:
mount_path (str)
- Return type:
- delete_filesystem(*, path, params=None)¶
Delete file or directory
- Parameters:
path (str)
params (DeleteFilesystemParams | None)
- Return type:
- delete_filesystem_multipart_abort(*, upload_id)¶
Abort multipart upload
- Parameters:
upload_id (str)
- Return type:
- delete_filesystem_tree(*, path, params=None)¶
Delete directory tree
- Parameters:
path (str)
params (DeleteFilesystemTreeParams | None)
- Return type:
- delete_network_process_monitor(*, pid)¶
Stop monitoring ports for a process
- Parameters:
pid (str)
- Return type:
- delete_network_tunnel()¶
Disconnect tunnel
- Return type:
- delete_process_stdin(*, identifier)¶
Close a process’s stdin
- Parameters:
identifier (str)
- Return type:
- get_archive_status()¶
Get the archive status
- Return type:
- get_codegen_reranking(*, path, params)¶
Code reranking/semantic search
- Parameters:
path (str)
params (GetCodegenRerankingParams)
- Return type:
- get_drives_mount()¶
List currently mounted drives
- Return type:
- get_filesystem(*, path, params=None)¶
Get file or directory information
- Parameters:
path (str)
params (GetFilesystemParams | None)
- Return type:
- get_filesystem_content_search(*, path, params)¶
Search for text content in files
- Parameters:
path (str)
params (GetFilesystemContentSearchParams)
- Return type:
- get_filesystem_find(*, path, params=None)¶
Find files and directories
- Parameters:
path (str)
params (GetFilesystemFindParams | None)
- Return type:
- get_filesystem_multipart()¶
List multipart uploads
- Return type:
- get_filesystem_raw(*, path, params=None, accept)¶
Get file or directory information. Returns the response unread, in the requested content type. The caller must close the response.
- Parameters:
path (str)
params (GetFilesystemParams | None)
accept (Literal['application/json', 'application/octet-stream'])
- Return type:
Response
- get_filesystem_search(*, path, params=None)¶
Fuzzy search for files and directories
- Parameters:
path (str)
params (GetFilesystemSearchParams | None)
- Return type:
- get_filesystem_tree(*, path, params=None)¶
Get directory tree
- Parameters:
path (str)
params (GetFilesystemTreeParams | None)
- Return type:
- get_health()¶
Health check
- Return type:
- get_process()¶
List all processes
- Return type:
- get_process_identifier(*, identifier)¶
Get process by identifier
- Parameters:
identifier (str)
- Return type:
- get_process_logs_stream(*, identifier, accept)¶
Stream process logs in real time. Returns the response unread, in the requested content type. The caller must close the response.
- get_watch_filesystem(*, path, params=None)¶
Stream file modification events in a directory. Returns the response unread. The caller must close the response.
- Parameters:
path (str)
params (GetWatchFilesystemParams | None)
- Return type:
Response
- head_filesystem(*, path)¶
Stat a file or directory. Returns the response unread, since its headers are the result. The caller must close the response.
- Parameters:
path (str)
- Return type:
Response
- post_archive_export(*, request)¶
Export the filesystem changes to a presigned URL
- Parameters:
request (ExportOptions)
- Return type:
- post_archive_resume()¶
Lift the archive freeze
- Return type:
- post_drives_mount(*, request)¶
Attach a drive to a local path
- Parameters:
request (DriveMountRequest)
- Return type:
- post_environment_reload()¶
Reload environment from guest metadata
- Return type:
- post_filesystem_multipart_complete(*, upload_id, request)¶
Complete multipart upload
- Parameters:
upload_id (str)
request (MultipartCompleteRequest)
- Return type:
- post_filesystem_multipart_initiate(*, path, request)¶
Initiate multipart upload
- Parameters:
path (str)
request (MultipartInitiateRequest)
- Return type:
- post_network_process_monitor(*, pid, request)¶
Start monitoring ports for a process
- Parameters:
pid (str)
request (PortMonitorRequest)
- Return type:
- post_process(*, request)¶
Execute a command
- Parameters:
request (ProcessRequest)
- Return type:
- post_process_raw(*, request, accept)¶
Execute a command. Returns the response unread, in the requested content type. The caller must close the response.
- Parameters:
request (ProcessRequest)
accept (Literal['application/json', 'application/x-ndjson'])
- Return type:
Response
- post_process_stdin(*, identifier, content)¶
Write to a process’s stdin
- post_upgrade(*, request)¶
Upgrade the sandbox-api
- Parameters:
request (UpgradeRequest)
- Return type:
- put_codegen_fastapply(*, path, request)¶
Apply code edit
- Parameters:
path (str)
request (ApplyEditRequest)
- Return type:
- put_filesystem(*, path, request)¶
Create or update a file or directory
- Parameters:
path (str)
request (FileRequest)
- Return type:
- put_filesystem_multipart_part(*, upload_id, params, files)¶
Upload part. files is sent as httpx
files.- Parameters:
upload_id (str)
params (PutFilesystemMultipartPartParams)
files (Any)
- Return type:
- put_filesystem_tree(*, path, request)¶
Create or update directory tree
- Parameters:
path (str)
request (TreeRequest)
- Return type:
- put_network_tunnel_config(*, request)¶
Update tunnel configuration
- Parameters:
request (TunnelConfigRequest)
- Return type: