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

Support initialization directly on Blueprint Group #182

Open
ahopkins opened this issue Jan 26, 2020 · 5 comments
Open

Support initialization directly on Blueprint Group #182

ahopkins opened this issue Jan 26, 2020 · 5 comments

Comments

@ahopkins
Copy link
Owner

#181

@jekel
Copy link

jekel commented Nov 19, 2021

Hello, can you give some suggestion how to implement this logic in the best way?
iterate over all blueprints in BlueprintGroup and initialize jwt on each?
there is also problem - how to access app.config - it is not available directly from group, it could be taken only from any blueprint.. can be in one group blueprints from different apps?

@ahopkins
Copy link
Owner Author

can be in one group blueprints from different apps?

Yes. 🤔

I would love to add this, so if you are interested in working on it, I am happy to help you. TBH, I have not put much thought into this lately. Iterating over each BP might work, but I would wonder what impact that would have. It does raise questions: should they have a shared config or not? where to store the Initialize instance? On the bp.ctx?

@jekel
Copy link

jekel commented Nov 19, 2021

I think, that, for first time, we can make blueprint group support available when only one App is used, otherwise it will be harder to implement and take more time for develop..
i will try to implement it in such way and make pull request next days

@ahopkins
Copy link
Owner Author

I think, that, for first time, we can make blueprint group support available when only one App is used, otherwise it will be harder to implement and take more time for develop..

i will try to implement it in such way and make pull request next days

that seems a fair restriction.

@ahopkins
Copy link
Owner Author

Just make sure that when someone tries to attach to a BP group, we check the Sanic registry size (it's a class variable) that we raise an appropriate exception.

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

No branches or pull requests

2 participants