Your workflow is unique šØāš» - tell us how you use Dropbox here.
Forum Discussion
yiannimercer
4 years agoNew member | Level 2
Extracting variable from SearchMatchV2 Result
Hello,
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. ...
Greg-DB
Dropbox Community Moderator
4 years agoThe 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:
if match.metadata.is_metadata():
print(match.metadata.get_metadata().path_lower)
else:
# handling for other types here
pass
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!