Skip to content
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

Ability to register adapter in-process #181

Closed
cancan101 opened this issue Feb 22, 2022 · 1 comment · Fixed by #268
Closed

Ability to register adapter in-process #181

cancan101 opened this issue Feb 22, 2022 · 1 comment · Fixed by #268

Comments

@cancan101
Copy link
Collaborator

cancan101 commented Feb 22, 2022

Add an ability to register a new adapter in-process, along the lines of how sqlalchemy allows registering new dialect in-process. Currently it looks like the only way to add an adapter to shillelagh is through an entrypoint.

@betodealmeida
Copy link
Owner

Looks like it's possible to do it at runtime via pkg_resources: https://stackoverflow.com/a/48666503/807118

There's also a 3rd-party library that helps: https://prybar.readthedocs.io/en/stable/

But it might be easier to use a singleton for the registry as the source of truth, and populate it from iter_entry_points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants