selinon.storages.s3 module¶
Selinon adapter for Amazon S3 storage.
-
class
selinon.storages.s3.
S3
(bucket, location=None, endpoint_url=None, use_ssl=None, aws_access_key_id=None, aws_secret_access_key=None, region_name=None, serialize_json=False)[source]¶ Bases:
selinon.data_storage.DataStorage
Amazon S3 storage adapter.
For credentials configuration see boto3 library configuration https://github.com/boto/boto3
-
delete
(flow_name, task_name, task_id)[source]¶ Delete result stored in storage.
Parameters: - flow_name – flow name in which task was executed
- task_name – task name that result is going to be retrieved
- task_id – id of the task that result is going to be retrieved
-
retrieve
(flow_name, task_name, task_id)[source]¶ Retrieve result stored in storage.
Parameters: - flow_name – flow name in which task was executed
- task_name – task name that result is going to be retrieved
- task_id – id of the task that result is going to be retrieved
Returns: task result
-
store
(node_args, flow_name, task_name, task_id, result)[source]¶ Store result stored in storage.
Parameters: - node_args – arguments that were passed to node
- flow_name – flow name in which task was executed
- task_name – task name that result is going to be stored
- task_id – id of the task that result is going to be stored
- result – result that should be stored
Returns: unique ID of stored record
-
store_error
(node_args, flow_name, task_name, task_id, exc_info)[source]¶ Store information about task error.
Parameters: - node_args – arguments that were passed to node
- flow_name – flow name in which task was executed
- task_name – task name that result is going to be stored
- task_id – id of the task that result is going to be stored
- exc_info – information about exception - tuple (type, value, traceback) as returned by sys.exc_info()
Returns: unique ID of stored record
-