About Documentum 5.2, it's impossible by DFS, even DFC if i'm not mistaken.
But 6.3 DFS could works.
I suggest you use the idql(32).exe or iapi(32).exe
(*.sh if linux) CMD program inside the Content Server Machine (<DOCUMENTUM_HOME>\product\<6.3|5.3>\bin\*.*
).
You can even copy it to another machine, but probably you will need some extra DLLs also.
So, encapsulate this program using python, passing all necessary parameters.
Ex.: Calling an external command in Python
check their sintaxs below:
idql <docbase> [-U<user>] [-D<domain>] [-P<password>] [-K<secure flag>] [-R<input file>] [-n] [-l<error level>] [-X] [-z] [-w<display width>]
iapi <docbase> [-U<username>] [-P<password>] [-D<domain>] [-K<secure flag>] [-R<input file>] [-i|-I] [-v] [-l<log file>] [-Q] [-F<failure level>] [-X] [-z] [-Sapi] [-w<column width>]
I dont remember if Documentum 5.3 is "dmbasic.exe" program instead "idql", but i'm pretty sure that "iapi" is there.
If works, you can not only execute querys, but even download a file from repository using iapi... totally old-school, but is possible. Search for "Content Server API Reference
Manual Version 5.3 guide to see what is possible to do.
I have a copy with me for emergencies. If you want i can send you by email.
Good luck.