ImageKit.io list just the url of all pictures existing in a folder

451 Views Asked by At

I'm trying to list just the URLs of all the pictures I have in the "zoz" folder in my imagekit.io account. I have tried doing it with list_files['url'] but I got a KeyError

from imagekitio import ImageKit
import os
PRIVATE_KEY = os.environ.get('PRIVATE_KEY')
PUBLIC_KEY = os.environ.get('PUBLIC_KEY')

imagekit = ImageKit(
    private_key=PRIVATE_KEY,
    public_key='PUBLIC_KEY',
    url_endpoint='https://ik.imagekit.io/ShaiTestingPython'
)

list_files = imagekit.list_files({"path": "zoz"})

The type of list_files is dict but I still cant get the key value for some reason

0

There are 0 best solutions below