Hi Andrey
Interesting question. Let me think a bit about it:
Embeded: means bound to locally installed application.
This means, the data storage shall be located somewhere close to the app itself, I would think of subdirectory.
BaseX can be installed on multiple places on one box. The only concern is about not conflicting port numbers (in case, you are going to use it as server).
Python API is communicating over TCP IP, so running BaseX server would be needed for this purpose. This could be a bit unconfortable (as you never know, if port conflict would happen and other clients could theoretically connect to your server).
Other way of using BaseX is using basex console, this could work without need to run a server, but you would have to handle command line calls from Python.
My conclusion:
Trying to use BaseX as embeded data storage for Python app is not easy.
I would think either of using BaseX server (this works for me quite well) or using some other embeded data storage (SQLite...), depending on your type of app and data.
With best regards
Jan