I suggest that the error handling in the URL parsing for connections needs improvement.
The improvements that I think are important include:
the default value for port should match the default value used by the DAG
the existence of the trust store file should be tested and a specific error message raised if it isn't found and readable
the pattern of the connection string should be tested more stringently with a detailed regex and by testing the contents of the option_dict to verify that required fields are present.
if the connection fails, the library should check to see if connections are being refused by attempting a simple connection to the host and port. If that fails, then the error can be reported as "No server at that address". If that succeeds, it can be reported as "SSL handshake with ${host} failed"
invalid values of the ssl flag should not be accepted. Consider using bool(distutils.util.strtobool(options_dict.get('ssl', ['true'])[0])) instead of a simply comparison.
the split on line 104 should be eliminated and the value of urllib.parse.urlparse(connection_str) should be put into a temp value so that the netloc can be extracted as the URL
I suggest that the error handling in the URL parsing for connections needs improvement.
The improvements that I think are important include:
I can make a pull request for this shortly.
https://github.com/mapr/maprdb-python-client/blob/fcd5f151598ca521fb29ea2a5af69ced24eceafa/mapr/ojai/storage/OJAIConnection.py#L102