Add magdb core python library

Hastily santised for release, untested.