No project description provided
Project description
Quart Injector
Dependency injecetion for quart apps.
🛠 Installing
poetry add quart-injector
🎓 Usage
import typing
import quart
import injector
import quart_injector
Greeting = typing.NewType("Greeting", str)
def configure(binder: injector.Binder) -> None:
binder.bind(Greeting, to="Hello")
app = quart.Quart(__name__)
@app.route("/<name>")
@app.route("/", defaults={"name": "World"})
async def greeting_view(greeting: injector.Inject[Greeting], name: str) -> str:
return f"{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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
quart-injector-0.0.0b1.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for quart_injector-0.0.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4de9a3e22ac15785809270e4d2f4f86b56a15596edb024522b06b2de33cb7fdb |
|
MD5 | d674f44c69258f1339413875538d171f |
|
BLAKE2b-256 | 0788f1a11d348e49e48009e9377ff499a31ecafe3674614d67d81337df976116 |