Skip to main content

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("/", 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

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)

Uploaded Source

Built Distribution

quart_injector-0.0.0b1-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page