Doctor
Doctor
It's should be ok to keep `uv.lock` there, it pins your regular and dev dependencies when developing the package, and when distributing users would install dependencies specified under `pyproject.toml/dependencies`, e.g....
So you want to be able to hook up new providers at runtime essentially, and because of that using `OnInitExtension` or `LifespanExtension` won't work? 🤔 If you expect all of...
For example like this: ```py import importlib import pkgutil from types import ModuleType from aioinject import SyncContainer, Singleton # app/nested/somewhere.py _global_providers = [] def singleton[T](cls: type[T]) -> type[T]: _global_providers.append(Singleton(cls)) return...
> > So you want to be able to hook up new providers at runtime essentially, and because of that using `OnInitExtension` or `LifespanExtension` won't work? 🤔 > > Why...
When it comes to loading/importing all of your modules it should be fine to do that in my opinion, personally I tried two approaches when it comes to registering providers:...
@ignacevau I would avoid adding any methods to your database models (Maybe if they only operate on that specific model it should be ok, but they shouldn't change database state)...
Currently you can add any type to an existing context: ```py context.register(Object(background_tasks)) ``` ```py import contextlib from collections.abc import AsyncIterator import uvicorn from fastapi import BackgroundTasks, Depends, FastAPI import aioinject...
I forgot to mention that, but yes, app/router dependencies should work too.
You can, but right now you have to make a dependency that would provide `Context` (from the `context_var`), but in the future that wouldn't be required in integrations.
It should be possible now to inject dependencies from context, they're automatically added by the middleware: ```py import uvicorn from fastapi import FastAPI from fastapi.background import BackgroundTasks from fastapi.requests import...