Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

Error While reading files from a box folder using JWT method in python

Answered
New post

Comments

1 comment

  • mwiller

     The behavior of this method changed in v2.0.0 of the Python SDK — it now returns an iterator that will automatically get all the items in the folder for you if you iterate over it.  If you just want a list of the first 100 items in the folder, you can simply read them out of the iterator that you get back from that method.  Something like this should work for you:

     

    items_iter = client.folder(folder_id='folder_id').get_items(limit=100, offset=0)
    
    items = []
    for x in range(100):
        items.append(items_iter.next())
    0
    Comment actions Permalink

Please sign in to leave a comment.