MCPcopy Index your code
hub / github.com/diffgram/diffgram / fetch_data

Method fetch_data

shared/connection/s3_connector.py:600–627  ·  view source on GitHub ↗

This function routes any action_type to the correct S3 connector actions. :return: Object

(self, opts)

Source from the content-addressed store, hash-verified

598
599 @with_connection
600 def fetch_data(self, opts):
601 """
602 This function routes any action_type to the correct S3 connector actions.
603 :return: Object
604 """
605 if 'action_type' not in opts:
606 raise Exception('Provide action_type key.')
607 if 'event_data' not in opts:
608 raise Exception('Provide event_data key.')
609 action_type = opts.pop('action_type')
610 if action_type == 'fetch_object':
611 return self.__fetch_object(opts)
612 if action_type == 'get_string_data':
613 return self.__get_string_data(opts)
614 if action_type == 'list_objects':
615 return self.__fetch_object(opts)
616 if action_type == 'count_objects':
617 return self.__count_objects(opts)
618 if action_type == 'fetch_folder':
619 return self.__start_folder_fetch(opts)
620 if action_type == 'list_buckets':
621 return self.__list_buckets(opts)
622 if action_type == 'get_folder_contents':
623 return self.__get_folder_contents(opts)
624 if action_type == 'get_pre_signed_url':
625 return self.__get_pre_signed_url(opts)
626 if action_type == 'custom_image_upload_url':
627 return self.__custom_image_upload_url(opts)
628
629 @with_connection
630 def put_data(self, opts):

Callers 7

get_labelbox_frontendMethod · 0.45
fetch_dataFunction · 0.45
get_from_connectorFunction · 0.45
execute_actionMethod · 0.45

Calls 9

__fetch_objectMethod · 0.95
__get_string_dataMethod · 0.95
__count_objectsMethod · 0.95
__start_folder_fetchMethod · 0.95
__list_bucketsMethod · 0.95
__get_folder_contentsMethod · 0.95
__get_pre_signed_urlMethod · 0.95
popMethod · 0.45

Tested by 1