Alternate solution without using API's
I was also looking for something similar and thought it shouldn't be that difficult or time taking. That's when I came across "Shortcuts" app which I use for lot of other workflows.
I managed to get it done with 2 simple steps which is already available in iPad or iOs :
1. Create a shortcut app
2. From Pythonista on the right corner top click on share and select "Shortcuts" and your created shortcut.
( File is now received in your dropbox )
To create workflow in Shortcuts
a. Search for "Get Text from Input" and drag the same to your workflow.
b. Search for "Save File" and select "Service" as "Dropbox" (Note : You'll be asked to login to your dropbox once)
That's it. Worked for me like charm.
iPad version : 12.4
P.S. This is only for those lookng for just syncing the files to dropbox from Phythonista not caring about using dropbox apis.