pydent.interfaces.UtilityInterface¶
-
class
pydent.interfaces.
UtilityInterface
(aqhttp, session)[source]¶ Bases:
pydent.interfaces.CRUDInterface
Miscellaneous and specialized requests for creating, updating, etc.
Initializer for SessionInterface.
- Parameters
-
__init__
(aqhttp, session)¶ Initializer for SessionInterface.
Methods
__init__
(aqhttp, session)Initializer for SessionInterface.
batch_operations
(operation_ids)Batches operations from a list of operation_ids.
compatible_items
(sample_id, object_type_id)Find items compatible with the field value.
create_data_association
(model_inst, key, value)create_items
(items)create_samples
(samples)create_upload
(upload)estimate_plan_cost
(plan)Estimates the plan cost.
job_debug
(job_id)Runs debug on a job with id=job_id.
json_delete
(model_name, model_data[, …])json_post
(model_name, model_data[, …])json_save
(model_name, model_data[, …])- rtype
dict
model_create
(table, data[, params])model_delete
(table, model_id[, params])model_update
(table, model_id, data[, params])replan
(plan_id)Copies a plan.
set_operation_status
(operation_id, status)Sets an operation’s status.
start_job
(job_id)step_plan
(plan_id)submit_plan
(plan, user, budget)Submits a plan.
unbatch_operations
(operation_ids)Unbatches operations from a list of operation_ids.
update_code
(code)Updates code for a operation_type.
Attributes
aqhttp
session
-
_json_controller
(method, model_name, model_data, record_methods=None, record_getters=None)¶ Method for creating, updating, and deleting models using Aquarium’s JSON controller.
- Parameters
method (basestring) – Method name (e.g. “save”, “delete”)
model_name (basestring) – Model name
model_data (dict) – Additional model and method data
record_methods (dict) – Optional ‘record_methods’ key
record_getters (dict) – Optional ‘record_getters’ key
- Returns
json formatter response
- Return type
basestring
-
_model_controller
(method, table, model_id, data, params=None)¶ Method for creating, updating, and deleting models.
- Parameters
method (
str
) – Request method name (one of ‘put’, ‘post’, ‘delete’table (
str
) – Table name of model (e.g. ‘samples’ or ‘data_associations’)model_id (
Union
[str
,int
,None
]) – Optional model_id (not required for ‘post’)data (
Optional
[dict
]) – dataparams – controller parameters
- Returns
json formatted server response
- Return type
dict