client
AsyncClient
Create a client instance.
Usage:
>>> from sfapi_client import AsyncClient
>>> async with AsyncClient(client_id, client_secret) as client:
>>> # Use client
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client_id |
Optional[str]
|
The client ID |
None
|
secret |
Optional[str]
|
The client secret |
None
|
Returns:
Type | Description |
---|---|
AsyncClient
|
The client instance |
Source code in sfapi_client/_async/client.py
api: AsyncApi
property
API related information.
resources: AsyncResources
property
Resource related information.
token: str
async
property
Bearer token string which can be helpful for debugging through swagger UI.
close()
async
compute(machine)
async
Create a compute site to submit jobs or view jobs in the queue
Parameters:
Name | Type | Description | Default |
---|---|---|---|
machine |
Union[Machine, str]
|
Name of the compute machine to use |
required |
Returns:
Type | Description |
---|---|
AsyncCompute
|
Compute object that can be used to start jobs, view the queue on the system, or list files and directories. |
Source code in sfapi_client/_async/client.py
group(name)
async
Get a group.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The group name |
required |
Returns:
Type | Description |
---|---|
AsyncGroup
|
The group |