Image service

This is description how to use our internal image service. First you need to initialize wit api_key which is stored on Dataplatform backend associated with user. Note that we don’t have have UEX yet to create/show/find it.

dphelper = DPHelper(api_key='ADD_YOUR_KEY_TO_TEST')

After authorizing with DPHelper, you can now use image service. To upload single image:

dphelper.upload_image_from_url('https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png')

To upload multiple images by url

 dphelper = DPHelper(api_key='ADD_YOUR_KEY_TO_TEST')
   image_urls = [
     'https://google.com/image1.png',
     'https://google.com/image2.png',
    ]
    results = dphelper.upload_all_images(image_urls, max_concurrent=10)

Note: API is permissive, i.e. does not throw if some of the imags are already downloaded

Leave a Reply

Your email address will not be published. Required fields are marked *