You could maybe use 2 methods
1st, make directly sql queries from python to the database but id doubt it doable in easy way as this
is some java based database engine i think is H2, therefore you will require a suitable driver in python
for that database.
2nd method would be that you install NIS locally and then do API calls to NIS from your python code.
this is the method i would use because the API is fully documented here:
https://nemproject.github.io/
and is pretty clear how to interact with NIS and get data out of the DB (blockchain)
also NIS can be found here:
https://bob.nem.ninja/
or if you do not want to setup NIS locally then you can send API calls to some existing public nodes:
http://explorer.ournem.com/#/nodelist
and retrieve data from there.