aihwkit.cloud.client.v1.stubs module¶
API stubs for the AIHW Composer API.
-
class
aihwkit.cloud.client.v1.stubs.
ApiStub
(session)¶ Bases:
object
Base API stub for the AIHW Composer.
API stub for use in the client for the AIHW Composer in order to interact with REST endpoints.
Subclasses should inherit from this class, customizing
base_url
and applying any extra changes. By default, the stub assumes three operations for the entities:get
(viaself.get()
): aGET
operation returning a single object from an id.post
(viaself.post()
): aPOST
operation.list
(viaself.list()
): aGET
operation returning multiple objects.
-
base_url
= ''¶ Base url to be used in the endpoints.
-
get
(object_id)¶ Return a single entity by id.
- Parameters
object_id (str) – the id of the entity.
- Returns
A dictionary with the entity.
- Return type
Dict
-
list
()¶ Return a list of entities.
- Returns
A list of entities.
- Return type
Dict
-
post
(content)¶ Create a single entity.
- Parameters
content (Dict) – the content of the entity.
- Returns
A dictionary with the API response.
- Return type
Dict
-
class
aihwkit.cloud.client.v1.stubs.
Endpoint
(url, method)¶ Bases:
tuple
-
property
method
¶ Alias for field number 1
-
property
url
¶ Alias for field number 0
-
property
-
class
aihwkit.cloud.client.v1.stubs.
ExperimentStub
(session)¶ Bases:
aihwkit.cloud.client.v1.stubs.ApiStub
Stub for
experiment
.-
base_url
= 'experiments'¶
-
-
class
aihwkit.cloud.client.v1.stubs.
InputStub
(session)¶ Bases:
aihwkit.cloud.client.v1.stubs.ApiStub
Stub for
input
.-
base_url
= 'inputs'¶
-
-
class
aihwkit.cloud.client.v1.stubs.
JobStub
(session)¶ Bases:
aihwkit.cloud.client.v1.stubs.ApiStub
Stub for
job
.-
base_url
= 'jobs'¶
-
-
class
aihwkit.cloud.client.v1.stubs.
LoginStub
(session)¶ Bases:
aihwkit.cloud.client.v1.stubs.ApiStub
Stub for
login
.-
base_url
= 'token/login'¶
-
-
class
aihwkit.cloud.client.v1.stubs.
OutputStub
(session)¶ Bases:
aihwkit.cloud.client.v1.stubs.ApiStub
Stub for
output
.-
base_url
= 'outputs'¶
-