qiskit_serverless.core.ServerlessClient¶
- class ServerlessClient(name=None, host=None, version=None, token=None, verbose=False)[source]¶
A client for connecting to a specified host.
Example
>>> client = ServerlessClient( >>> name="<NAME>", >>> host="<HOST>", >>> token="<TOKEN>", >>> )
Initializes the ServerlessClient instance.
- Parameters:
name (
Optional
[str
]) – name of clienthost (
Optional
[str
]) – host of gatewayversion (
Optional
[str
]) – version of gatewaytoken (
Optional
[str
]) – authorization token
- __init__(name=None, host=None, version=None, token=None, verbose=False)[source]¶
Initializes the ServerlessClient instance.
- Parameters:
name (
Optional
[str
]) – name of clienthost (
Optional
[str
]) – host of gatewayversion (
Optional
[str
]) – version of gatewaytoken (
Optional
[str
]) – authorization token
Methods
__init__
([name, host, version, token, verbose])Initializes the ServerlessClient instance.
file_delete
(file[, provider])Deletes file uploaded or produced by the programs,
file_download
(file[, target_name, ...])Download file.
file_upload
(file[, provider])Upload file.
files
([provider])Returns list of available files produced by programs to download.
filtered_logs
(job_id, **kwargs)Returns logs of the job.
from_dict
(dictionary)Converts dict to object.
function
(title[, provider])Returns program based on parameters.
functions
(**kwargs)Returns list of available programs.
get
(title[, provider])Returns program based on parameters.
get_job_by_id
(job_id)Returns job by job id.
get_jobs
(**kwargs)Return list of jobs.
job
(job_id)Returns job by job id.
jobs
(**kwargs)Return list of jobs.
list
(**kwargs)Returns list of available programs.
logs
(job_id)Return logs.
result
(job_id)Return results.
run
(program[, arguments, config, provider])Run a function and return its job.
status
(job_id)Check status.
stop
(job_id[, service])Stops job/program.
to_dict
()Converts class to dict.
upload
(program)Uploads program.
widget
()Widget for information about provider and jobs.