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

Add API for preregistering Extensions #96

Merged
merged 3 commits into from
Jun 29, 2022
Merged

Add API for preregistering Extensions #96

merged 3 commits into from
Jun 29, 2022

Conversation

ahopkins
Copy link
Member

It can be somewhat difficult to add an extension if app.extend is not being explicitly called. This PR enables the API as seen here which makes it much easier for extensions to be added:

app = Sanic(__name__)
Extend.register(
    MayimExtension(
        executors=[CityExecutor], dsn="postgres://..."
    )
)

@ahopkins ahopkins merged commit 943ef07 into main Jun 29, 2022
@ahopkins ahopkins deleted the extension-api branch June 29, 2022 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant