Good addition, a few nitpicks below but otherwise LGTM.
Other than a couple minor flake8 issues, `make check` passes.
Would you be willing to write a test case to go along with this? We have test_new_connection() that verifies that the login_with() call gets invoked, what we'd need is something analogous to that but that sets the environment variable and verifies that Credentials.from_string() gets invoked instead, and login_with() does NOT get invoked.
Good addition, a few nitpicks below but otherwise LGTM.
Other than a couple minor flake8 issues, `make check` passes.
Would you be willing to write a test case to go along with this? We have test_new_ connection( ) that verifies that the login_with() call gets invoked, what we'd need is something analogous to that but that sets the environment variable and verifies that Credentials. from_string( ) gets invoked instead, and login_with() does NOT get invoked.