qiskit_serverless.core.BaseClient¶
- class BaseClient(name, host=None, token=None, instance=None, channel=None)[source]¶
A client class for specifying custom compute resources.
Example
>>> client = BaseClient( >>> name="<NAME>", >>> host="<HOST>", >>> token="<TOKEN>", >>> compute_resource=ComputeResource( >>> name="<COMPUTE_RESOURCE_NAME>", >>> host="<COMPUTE_RESOURCE_HOST>" >>> ), >>> )
Initialize a BaseClient instance.
- Parameters:
name (
str) – name of clienthost (
Optional[str]) – host of client a.k.a managers hosttoken (
Optional[str]) – authentication token for managerinstance (
Optional[str]) – IBM Cloud CRN or IQP h/g/pchannel (
Optional[str]) – identifies the method to use to authenticate the user
- __init__(name, host=None, token=None, instance=None, channel=None)[source]¶
Initialize a BaseClient instance.
- Parameters:
name (
str) – name of clienthost (
Optional[str]) – host of client a.k.a managers hosttoken (
Optional[str]) – authentication token for managerinstance (
Optional[str]) – IBM Cloud CRN or IQP h/g/pchannel (
Optional[str]) – identifies the method to use to authenticate the user
Methods
__init__(name[, host, token, instance, channel])Initialize a BaseClient instance.
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([function])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])Run a function and return its job.
runtime_jobs(job_id[, runtime_session])Return associated runtime jobs.
runtime_sessions(job_id)Returns associated runtime sessions if any.
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.