I want to upload XML files through Python code. Is there any special interface or other solution?

ODK Aggregate form upload via commandline (curl) has some examples in curl.

https://docs.opendatakit.org/openrosa is the API and if you need an example in Java https://github.com/opendatakit/briefcase has Java code that does that.