AsyncApiClient¶
- class baseten.client.sandboxapi.AsyncApiClient(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:
- async delete_drives_mount(*, mount_path)¶
Detach a drive from a local path
- Parameters:
mount_path (str)
- Return type:
- async delete_filesystem(*, path, params=None)¶
Delete file or directory
- Parameters:
path (str)
params (DeleteFilesystemParams | None)
- Return type:
- async delete_filesystem_multipart_abort(*, upload_id)¶
Abort multipart upload
- Parameters:
upload_id (str)
- Return type:
- async delete_filesystem_tree(*, path, params=None)¶
Delete directory tree
- Parameters:
path (str)
params (DeleteFilesystemTreeParams | None)
- Return type:
- async delete_network_process_monitor(*, pid)¶
Stop monitoring ports for a process
- Parameters:
pid (str)
- Return type:
- async delete_network_tunnel()¶
Disconnect tunnel
- Return type:
- async delete_process_stdin(*, identifier)¶
Close a process’s stdin
- Parameters:
identifier (str)
- Return type:
- async get_archive_status()¶
Get the archive status
- Return type:
- async get_codegen_reranking(*, path, params)¶
Code reranking/semantic search
- Parameters:
path (str)
params (GetCodegenRerankingParams)
- Return type:
- async get_drives_mount()¶
List currently mounted drives
- Return type:
- async get_filesystem(*, path, params=None)¶
Get file or directory information
- Parameters:
path (str)
params (GetFilesystemParams | None)
- Return type:
- async get_filesystem_content_search(*, path, params)¶
Search for text content in files
- Parameters:
path (str)
params (GetFilesystemContentSearchParams)
- Return type:
- async get_filesystem_find(*, path, params=None)¶
Find files and directories
- Parameters:
path (str)
params (GetFilesystemFindParams | None)
- Return type:
- async get_filesystem_multipart()¶
List multipart uploads
- Return type:
- async get_filesystem_multipart_parts(*, upload_id)¶
List parts
- Parameters:
upload_id (str)
- Return type:
- async 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
- async get_filesystem_search(*, path, params=None)¶
Fuzzy search for files and directories
- Parameters:
path (str)
params (GetFilesystemSearchParams | None)
- Return type:
- async get_filesystem_tree(*, path, params=None)¶
Get directory tree
- Parameters:
path (str)
params (GetFilesystemTreeParams | None)
- Return type:
- async get_health()¶
Health check
- Return type:
- async get_network_process_ports(*, pid)¶
Get open ports for a process
- Parameters:
pid (str)
- Return type:
- async get_process()¶
List all processes
- Return type:
- async get_process_identifier(*, identifier)¶
Get process by identifier
- Parameters:
identifier (str)
- Return type:
- async 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.
- async 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
- async 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
- async post_archive_export(*, request)¶
Export the filesystem changes to a presigned URL
- Parameters:
request (ExportOptions)
- Return type:
- async post_archive_resume()¶
Lift the archive freeze
- Return type:
- async post_drives_mount(*, request)¶
Attach a drive to a local path
- Parameters:
request (DriveMountRequest)
- Return type:
- async post_environment_reload()¶
Reload environment from guest metadata
- Return type:
- async post_filesystem_multipart_complete(*, upload_id, request)¶
Complete multipart upload
- Parameters:
upload_id (str)
request (MultipartCompleteRequest)
- Return type:
- async post_filesystem_multipart_initiate(*, path, request)¶
Initiate multipart upload
- Parameters:
path (str)
request (MultipartInitiateRequest)
- Return type:
- async post_network_process_monitor(*, pid, request)¶
Start monitoring ports for a process
- Parameters:
pid (str)
request (PortMonitorRequest)
- Return type:
- async post_process(*, request)¶
Execute a command
- Parameters:
request (ProcessRequest)
- Return type:
- async 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
- async post_process_stdin(*, identifier, content)¶
Write to a process’s stdin
- Parameters:
- Return type:
- async post_upgrade(*, request)¶
Upgrade the sandbox-api
- Parameters:
request (UpgradeRequest)
- Return type:
- async put_codegen_fastapply(*, path, request)¶
Apply code edit
- Parameters:
path (str)
request (ApplyEditRequest)
- Return type:
- async put_filesystem(*, path, request)¶
Create or update a file or directory
- Parameters:
path (str)
request (FileRequest)
- Return type:
- async 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:
- async put_filesystem_tree(*, path, request)¶
Create or update directory tree
- Parameters:
path (str)
request (TreeRequest)
- Return type:
- async put_network_tunnel_config(*, request)¶
Update tunnel configuration
- Parameters:
request (TunnelConfigRequest)
- Return type: