Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I am using the search function in the Dropbox API for Python, and I need to be able to extract the path_lower variable from the SearchV2Result. Hopefully someone can help me with this.
SearchV2Result(cursor=NOT_SET, has_more=False, matches=[SearchMatchV2(highlight_spans=NOT_SET, match_type=SearchMatchTypeV2('filename', None), metadata=MetadataV2('metadata', FolderMetadata(id='id:CMgvcnxDzGAAAAAAAAAAVA', name='Test', parent_shared_folder_id=NOT_SET, path_display='/wyss-predictive-bioanalytics/Yianni/Test', path_lower='/wyss-predictive-bioanalytics/yianni/test', property_groups=NOT_SET, shared_folder_id=NOT_SET, sharing_info=FolderSharingInfo(no_access=False, parent_shared_folder_id='9501352096', read_only=False, shared_folder_id=NOT_SET, traverse_only=False))))])
Again, I would like to extract the path_lower variable, so in this case, it would be '/wyss-predictive-bioanalytics/yianni/test'. Thanks!
The files_search_v2 method returns a SearchV2Result, which has a list of SearchMatchV2 in its 'matches' variable. Each SearchMatchV2 has a MetadataV2 object in its 'metadata' variable, so you can access the Metadata object and its variables, such as 'path_lower', like this:
search_result = dbx.files_search_v2('Test')
for match in search_result.matches:
# handling for other types here
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!