# coding:utf-8
from __future__ import print_function
from volcengine.imagex.ImageXService import ImageXService

if __name__ == '__main__':
    imagex_service = ImageXService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    imagex_service.set_ak('ak')
    imagex_service.set_sk('sk')

    resp = imagex_service.delete_images("imagex service id", ["image uri 1"])
    print(resp)
Beispiel #2
0
# coding:utf-8
from __future__ import print_function
from volcengine.imagex.ImageXService import ImageXService

if __name__ == '__main__':
    imagex_service = ImageXService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    imagex_service.set_ak('your ak')
    imagex_service.set_sk('your sk')

    params = dict()
    params['ServiceId'] = "xx"
    params['Scene'] = "license"
    params['StoreUri'] = "xx"

    resp = imagex_service.get_image_ocr("GetImageOCR", params)
    print(resp)
# coding:utf-8
from __future__ import print_function

from volcengine.imagex.ImageXService import ImageXService

if __name__ == '__main__':
    imagex_service = ImageXService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    imagex_service.set_ak('ak')
    imagex_service.set_sk('sk')

    # service id list allowed to do upload, set to empty if no restriction
    service_ids = ['imagex service id']

    resp = imagex_service.get_upload_auth(service_ids)
    print(resp)
# coding:utf-8
from __future__ import print_function
from volcengine.imagex.ImageXService import ImageXService

if __name__ == '__main__':
    imagex_service = ImageXService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    imagex_service.set_ak('ak')
    imagex_service.set_sk('sk')

    params = dict()
    params['ServiceId'] = 'imagex service id'

    file_paths = ['image file path 1']
    resp = imagex_service.upload_image(params, file_paths)
    print(resp)

    img_datas = ['image data 1']
    resp = imagex_service.upload_image_data(params, img_datas)
    print(resp)
Beispiel #5
0
# coding:utf-8
from __future__ import print_function

from volcengine.imagex.ImageXService import ImageXService

if __name__ == '__main__':
    imagex_service = ImageXService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    imagex_service.set_ak('ak')
    imagex_service.set_sk('sk')

    params = dict()
    params['ServiceId'] = 'imagex service id'

    resp = imagex_service.get_upload_auth_token(params)
    print(resp)
Beispiel #6
0
# coding:utf-8
from __future__ import print_function

from volcengine.imagex.ImageXService import ImageXService

if __name__ == '__main__':
    imagex_service = ImageXService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    imagex_service.set_ak('ak')
    imagex_service.set_sk('sk')

    resp = imagex_service.get_image_info('imagex service id', 'image uri')
    print(resp)
Beispiel #7
0
# coding:utf-8
from __future__ import print_function

from volcengine.imagex.ImageXService import ImageXService

if __name__ == '__main__':
    imagex_service = ImageXService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    imagex_service.set_ak('ak')
    imagex_service.set_sk('sk')

    service_id = 'imagex service id'
    urls = ['image url 1']

    resp = imagex_service.update_image_urls(service_id, urls)
    print(resp)
Beispiel #8
0
# coding:utf-8
from __future__ import print_function
from volcengine.imagex.ImageXService import ImageXService

if __name__ == '__main__':
    imagex_service = ImageXService()

    # call below method if you dont set ak and sk in $HOME/.volc/config
    imagex_service.set_ak('ak')
    imagex_service.set_sk('sk')

    params = dict()
    params['ServiceId'] = 'imagex service id'
    params['StoreUri'] = 'image uri'

    resp = imagex_service.imagex_get('GetImageUploadFile', params)
    print(resp)