diff options
author | cyfraeviolae <cyfraeviolae> | 2024-04-03 03:10:44 -0400 |
---|---|---|
committer | cyfraeviolae <cyfraeviolae> | 2024-04-03 03:10:44 -0400 |
commit | 6d7ba58f880be618ade07f8ea080fe8c4bf8a896 (patch) | |
tree | b1c931051ffcebd2bd9d61d98d6233ffa289bbce /venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init | |
parent | 4f884c9abc32990b4061a1bb6997b4b37e58ea0b (diff) |
venv
Diffstat (limited to 'venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init')
16 files changed, 134 insertions, 0 deletions
diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/__init__.py b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/__init__.py new file mode 100644 index 0000000..2e507c1 --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/__init__.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from .config import ( + AsyncSessionConfig, + EngineConfig, + GenericSessionConfig, + GenericSQLAlchemyConfig, + SQLAlchemyAsyncConfig, + SQLAlchemySyncConfig, + SyncSessionConfig, +) +from .plugin import SQLAlchemyInitPlugin + +__all__ = ( + "AsyncSessionConfig", + "EngineConfig", + "GenericSQLAlchemyConfig", + "GenericSessionConfig", + "SQLAlchemyAsyncConfig", + "SQLAlchemyInitPlugin", + "SQLAlchemySyncConfig", + "SyncSessionConfig", +) diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/__pycache__/__init__.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..43da1aa --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/__pycache__/__init__.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/__pycache__/plugin.cpython-311.pyc b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/__pycache__/plugin.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..e06ec42 --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/__pycache__/plugin.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__init__.py b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__init__.py new file mode 100644 index 0000000..f2e39da --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__init__.py @@ -0,0 +1,16 @@ +from __future__ import annotations + +from .asyncio import AsyncSessionConfig, SQLAlchemyAsyncConfig +from .common import GenericSessionConfig, GenericSQLAlchemyConfig +from .engine import EngineConfig +from .sync import SQLAlchemySyncConfig, SyncSessionConfig + +__all__ = ( + "AsyncSessionConfig", + "EngineConfig", + "GenericSQLAlchemyConfig", + "GenericSessionConfig", + "SQLAlchemyAsyncConfig", + "SQLAlchemySyncConfig", + "SyncSessionConfig", +) diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/__init__.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..2a316ef --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/__init__.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/asyncio.cpython-311.pyc b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/asyncio.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..23fe455 --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/asyncio.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/common.cpython-311.pyc b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/common.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..6e83a95 --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/common.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/compat.cpython-311.pyc b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/compat.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..4ba72bb --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/compat.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/engine.cpython-311.pyc b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/engine.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..1d4553b --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/engine.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/sync.cpython-311.pyc b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/sync.cpython-311.pyc Binary files differnew file mode 100644 index 0000000..d777bb9 --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/__pycache__/sync.cpython-311.pyc diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/asyncio.py b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/asyncio.py new file mode 100644 index 0000000..434c761 --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/asyncio.py @@ -0,0 +1,24 @@ +from __future__ import annotations + +from advanced_alchemy.config.asyncio import AlembicAsyncConfig, AsyncSessionConfig +from advanced_alchemy.extensions.litestar.plugins.init.config.asyncio import ( + SQLAlchemyAsyncConfig as _SQLAlchemyAsyncConfig, +) +from advanced_alchemy.extensions.litestar.plugins.init.config.asyncio import ( + autocommit_before_send_handler, + default_before_send_handler, +) +from sqlalchemy.ext.asyncio import AsyncEngine + +from litestar.contrib.sqlalchemy.plugins.init.config.compat import _CreateEngineMixin + +__all__ = ( + "SQLAlchemyAsyncConfig", + "AlembicAsyncConfig", + "AsyncSessionConfig", + "default_before_send_handler", + "autocommit_before_send_handler", +) + + +class SQLAlchemyAsyncConfig(_SQLAlchemyAsyncConfig, _CreateEngineMixin[AsyncEngine]): ... diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/common.py b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/common.py new file mode 100644 index 0000000..9afc48c --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/common.py @@ -0,0 +1,15 @@ +from __future__ import annotations + +from advanced_alchemy.config.common import GenericAlembicConfig, GenericSessionConfig, GenericSQLAlchemyConfig +from advanced_alchemy.extensions.litestar.plugins.init.config.common import ( + SESSION_SCOPE_KEY, + SESSION_TERMINUS_ASGI_EVENTS, +) + +__all__ = ( + "SESSION_SCOPE_KEY", + "SESSION_TERMINUS_ASGI_EVENTS", + "GenericSQLAlchemyConfig", + "GenericSessionConfig", + "GenericAlembicConfig", +) diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/compat.py b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/compat.py new file mode 100644 index 0000000..d76dea7 --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/compat.py @@ -0,0 +1,22 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Generic, Protocol, TypeVar + +from litestar.utils.deprecation import deprecated + +if TYPE_CHECKING: + from sqlalchemy import Engine + from sqlalchemy.ext.asyncio import AsyncEngine + + +EngineT_co = TypeVar("EngineT_co", bound="Engine | AsyncEngine", covariant=True) + + +class HasGetEngine(Protocol[EngineT_co]): + def get_engine(self) -> EngineT_co: ... + + +class _CreateEngineMixin(Generic[EngineT_co]): + @deprecated(version="2.1.1", removal_in="3.0.0", alternative="get_engine()") + def create_engine(self: HasGetEngine[EngineT_co]) -> EngineT_co: + return self.get_engine() diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/engine.py b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/engine.py new file mode 100644 index 0000000..31c3f5e --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/engine.py @@ -0,0 +1,5 @@ +from __future__ import annotations + +from advanced_alchemy.config.engine import EngineConfig + +__all__ = ("EngineConfig",) diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/sync.py b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/sync.py new file mode 100644 index 0000000..48a029b --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/config/sync.py @@ -0,0 +1,24 @@ +from __future__ import annotations + +from advanced_alchemy.config.sync import AlembicSyncConfig, SyncSessionConfig +from advanced_alchemy.extensions.litestar.plugins.init.config.sync import ( + SQLAlchemySyncConfig as _SQLAlchemySyncConfig, +) +from advanced_alchemy.extensions.litestar.plugins.init.config.sync import ( + autocommit_before_send_handler, + default_before_send_handler, +) +from sqlalchemy import Engine + +from litestar.contrib.sqlalchemy.plugins.init.config.compat import _CreateEngineMixin + +__all__ = ( + "SQLAlchemySyncConfig", + "AlembicSyncConfig", + "SyncSessionConfig", + "default_before_send_handler", + "autocommit_before_send_handler", +) + + +class SQLAlchemySyncConfig(_SQLAlchemySyncConfig, _CreateEngineMixin[Engine]): ... diff --git a/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/plugin.py b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/plugin.py new file mode 100644 index 0000000..dbf814b --- /dev/null +++ b/venv/lib/python3.11/site-packages/litestar/contrib/sqlalchemy/plugins/init/plugin.py @@ -0,0 +1,5 @@ +from __future__ import annotations + +from advanced_alchemy.extensions.litestar.plugins import SQLAlchemyInitPlugin + +__all__ = ("SQLAlchemyInitPlugin",) |