Skip to content

Add inspect and prepare_sanic hooks#437

Closed
russss wants to merge 1 commit intosimonw:masterfrom
russss:more-hooks
Closed

Add inspect and prepare_sanic hooks#437
russss wants to merge 1 commit intosimonw:masterfrom
russss:more-hooks

Conversation

@russss
Copy link
Contributor

@russss russss commented Apr 28, 2019

This adds two new plugin hooks:

The inspect hook allows plugins to add data to the inspect dictionary.

The prepare_sanic hook allows plugins to hook into the web router. I've attached a warning to this hook in the docs in light of #272 but I want this hook now...

On quick inspection, I don't think it's worthwhile to try and make this hook independent of the web framework (but it looks like Starlette would make the hook implementation a bit nicer).

Ref #14

@russss
Copy link
Contributor Author

russss commented Apr 29, 2019

I've just spotted that this implements #215.

This adds two new plugin hooks:

The `inspect` hook allows plugins to add data to the inspect
dictionary.

The `prepare_sanic` hook allows plugins to hook into the web
router. I've attached a warning to this hook in the docs in light
of simonw#272 but I want this hook now...

On quick inspection, I don't think it's worthwhile to try and make
this hook independent of the web framework (but it looks like Starlette
would make the hook implementation a bit nicer).

Ref simonw#14
@simonw
Copy link
Owner

simonw commented Jun 24, 2019

Closing this because it doesn't really fit the new model of inspect (though we should discuss in #465 how to further evolve this feature) and because as-of #272 we no longer use Sanic - though #520 will implement the equivalent of prepare_sanic against ASGI.

@simonw simonw closed this Jun 24, 2019
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.

2 participants