Fixed reconnect if mysql closed the connection
Added HTTP basic auth. toPython is now classmethods since they are only used when decoding json. Adjusted URL, port is part of server. Removed some debug code
Decode from json->python, before encoding to database specific format.