We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
yekootmada
6 years agoNew member | Level 2
Python SDK File Uploading - Working with the Response
Hi there, I am new to interfacing with the Dropbox API and am using Python 3.6 I am uploading large files to my account using the following function called dropboxupload (not my own) . I simply ca...
yekootmada
6 years agoNew member | Level 2
Thank you!
That is the part I am struggling with! I cannot find the correct syntax to return the response as data.
I tried
data = dropbox.files.FileMetadata.id
print("THE DATA VARIABLE IS")
print(data)but the result is
THE DATA VARIABLE IS property object at 0x03A82F60
Здравко
6 years agoLegendary | Level 20
If you are newbie, learn some basics of Python syntax, at least. On your question: there is keyword 'return', as in many other languages (like C/C++, Java, Kotlin and others), which denote the returning value. This keyword could be used more than once, whenever the algorithm have a value ready to return. When such function gets called it carries a returned value which could be used directly or assigned to a variable. Follows some pseudo code:
def funcName(param1, param2):
...do some calculations...
if some.check():
return param1+param2
...do something else...
result = param1 * param2
...possible finalization...
return result
resValue = funcName(3, 5)
...do something using resValue here...Hope this casts some extra light.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!