Skip to content

Repository files navigation

Quart Injector

Dependency injecetion for quart apps.

🛠 Installing

poetry add quart-injector

🎓 Usage

importtypingimportquartimportinjectorimportquart_injectorGreeting=typing.NewType("Greeting", str)
defconfigure(binder: injector.Binder) ->None:
binder.bind(Greeting, to="Hello")
app=quart.Quart(__name__)
@app.route("/<name>")@app.route("/", defaults={"name": "World"})asyncdefgreeting_view(greeting: injector.Inject[Greeting], name: str) ->str:
returnf"{greeting}{name}!"quart_injector.wire(app, configure)

📚 Help

See the Documentation or ask questions on the Discussion board.

⚖️ Licence

This project is licensed under the MIT licence.

All documentation and images are licenced under the Creative Commons Attribution-ShareAlike 4.0 International License.

📝 Meta

This project uses Semantic Versioning.

About

Dependency injecetion for quart apps

Topics

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages