You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After this discussion (with adding _wait_for_ready() and _configure() to the top level class), DBContainer would only contain this:
...
Anyway: I would appreciate if this conversation could be moved to a separate issue :-)
The text was updated successfully, but these errors were encountered:
fromabcimportABC, abstractmethodclassDBContainer(ABC):
@abstractmethoddefget_connection_url(self, *, **kwargs): # psycopg v3 cannot handle sqla style URLs, so it needs a driver=None :-("""Get a DB connection URL which can be used to connect to the DB."""def_create_connection_url( ... asnow ...):
"""Helper to create a DB API connection URL."""
I'm not sure if this is worth a extra class in the hierarchy, especially because it's unclear to me if that URL can be useful for all DB container or only the ones which are based on the python DB API (=RDBMS ones, not stuff like mongodb or redis): I've no clue if they also can be connected to with a single URL (kafka can not, I think).
Given that each container would need to implement the method anyway, one could also make _create_connection_url() a pure function and let each container just declare the method themselves...
from #445 (comment)
The text was updated successfully, but these errors were encountered: