{"id":138,"date":"2024-05-17T09:46:37","date_gmt":"2024-05-17T09:46:37","guid":{"rendered":"https:\/\/blog.dataplatform.lt\/?p=138"},"modified":"2024-05-17T09:46:37","modified_gmt":"2024-05-17T09:46:37","slug":"image-service","status":"publish","type":"post","link":"https:\/\/blog.dataplatform.lt\/?p=138","title":{"rendered":"Image service"},"content":{"rendered":"\n<p>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&#8217;t have have UEX yet to create\/show\/find it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dphelper = DPHelper(api_key='ADD_YOUR_KEY_TO_TEST')<\/code><\/pre>\n\n\n\n<p>After authorizing with DPHelper, you can now use image service. To upload single image:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dphelper.upload_image_from_url('https:\/\/www.google.com\/images\/branding\/googlelogo\/2x\/googlelogo_color_92x30dp.png')<\/code><\/pre>\n\n\n\n<p>To upload multiple images by url<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> dphelper = DPHelper(api_key='ADD_YOUR_KEY_TO_TEST')\n   image_urls = &#91;\n     'https:\/\/google.com\/image1.png',\n     'https:\/\/google.com\/image2.png',\n    ]\n    results = dphelper.upload_all_images(image_urls, max_concurrent=10)<\/code><\/pre>\n\n\n\n<p>Note: API is permissive, i.e. does not throw if some of the imags are already downloaded<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;t have have UEX yet to create\/show\/find it. After authorizing with DPHelper, you can now use image service. To upload single image: To upload multiple images &hellip; <a href=\"https:\/\/blog.dataplatform.lt\/?p=138\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Image service&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-138","post","type-post","status-publish","format-standard","hentry","category-helper-library-dphelper"],"_links":{"self":[{"href":"https:\/\/blog.dataplatform.lt\/index.php?rest_route=\/wp\/v2\/posts\/138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.dataplatform.lt\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.dataplatform.lt\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.dataplatform.lt\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.dataplatform.lt\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=138"}],"version-history":[{"count":1,"href":"https:\/\/blog.dataplatform.lt\/index.php?rest_route=\/wp\/v2\/posts\/138\/revisions"}],"predecessor-version":[{"id":139,"href":"https:\/\/blog.dataplatform.lt\/index.php?rest_route=\/wp\/v2\/posts\/138\/revisions\/139"}],"wp:attachment":[{"href":"https:\/\/blog.dataplatform.lt\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.dataplatform.lt\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.dataplatform.lt\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}