-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Load SQL engine backends via entrypoints
#41728
Comments
@xhochy can you please clarify for me, in this scenario that we will load SQL engine backends via entrypoints, what exactly does the SQL backend library need to provide to be compatible? I see you wrote here that it needs to add this to its entry_points={"pandas_sql_engine": ["turbodbc = turbodbc.TurbodbcPandasEngine"]} but what does |
Actually some good reading here:
Appears that the entry_points={"pandas.sql.engine": ["turbodbc = turbodbc.TurbodbcPandasEngine"]} |
Looking around, we can potentially reuse some of the plugin approaches that other popular libraries use. Some examples that come to mind: Pytest
Flake8 |
And maybe we should centralize all plugin loading into a single module with common functions, and that can be invoked from the specific places that need it like plotting, sql engine, etc. Would make adding more plugins easier |
happy to get something to work then move to a more formal plugin structure |
Sounds good, working on it. @xhochy how do we enforce that the sql engine has the correct interface? Or do we not do so, we just let the user select an engine and it's up to the engine library to create a function that has the correct signature, and if it fails, it fails? Should an engine library import the base abstract SqlEngine class to subclass from, or is that too strong of a dependency? Trying to understand what the expectations are for these kinds of loosly coupled dependencies... |
take |
@xhochy surfacing this again, are you able to provide some guidance around this? |
Follow up to #36893. Per @xhochy's suggestion we should use
entrypoints
as a mechanism for loading alternate SQL engine backends, similar to what we do with plotting backends. Creating a new issue for it per the comment here.The text was updated successfully, but these errors were encountered: