Skip to content

Commit 80535c0

Browse files
authored
feat(litestar): add session to namespace signature (#412)
The new filter providers expect that the sessions are in the signature namespace. This ensures there are no issues when configuring the plugin.
1 parent ad144f2 commit 80535c0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • advanced_alchemy/extensions/litestar/plugins/init

advanced_alchemy/extensions/litestar/plugins/init/plugin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
from litestar.dto import DTOData
77
from litestar.params import Dependency, Parameter
88
from litestar.plugins import CLIPlugin, InitPluginProtocol
9+
from sqlalchemy.ext.asyncio import AsyncSession, async_scoped_session
10+
from sqlalchemy.orm import Session, scoped_session
911

1012
from advanced_alchemy.exceptions import ImproperConfigurationError, RepositoryError
1113
from advanced_alchemy.extensions.litestar.exception_handler import exception_to_http_response
@@ -52,6 +54,10 @@
5254
"ModelDTOT": ModelDTOT,
5355
"ModelDictListT": ModelDictListT,
5456
"ModelOrRowMappingT": ModelOrRowMappingT,
57+
"Session": Session,
58+
"scoped_session": scoped_session,
59+
"AsyncSession": AsyncSession,
60+
"async_scoped_session": async_scoped_session,
5561
}
5662

5763

0 commit comments

Comments
 (0)