sqlspec 0.5.0__py3-none-any.whl → 0.6.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of sqlspec might be problematic. Click here for more details.

sqlspec/__metadata__.py CHANGED
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  from importlib.metadata import PackageNotFoundError, metadata, version
6
6
 
7
- __all__ = ["__project__", "__version__"]
7
+ __all__ = ("__project__", "__version__")
8
8
 
9
9
  try:
10
10
  __version__ = version("sqlspec")
@@ -4,7 +4,7 @@ from contextlib import contextmanager
4
4
  from dataclasses import dataclass
5
5
  from typing import TYPE_CHECKING
6
6
 
7
- from sqlspec.base import GenericDatabaseConfig, NoPoolConfig
7
+ from sqlspec.base import NoPoolSyncConfig
8
8
  from sqlspec.typing import Empty, EmptyType
9
9
 
10
10
  if TYPE_CHECKING:
@@ -17,7 +17,7 @@ __all__ = ("AdbcDatabaseConfig",)
17
17
 
18
18
 
19
19
  @dataclass
20
- class AdbcDatabaseConfig(NoPoolConfig["Connection"], GenericDatabaseConfig):
20
+ class AdbcDatabaseConfig(NoPoolSyncConfig["Connection"]):
21
21
  """Configuration for ADBC connections.
22
22
 
23
23
  This class provides configuration options for ADBC database connections using the
@@ -1,10 +1,10 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from contextlib import asynccontextmanager
4
- from dataclasses import dataclass
4
+ from dataclasses import dataclass, field
5
5
  from typing import TYPE_CHECKING, Any
6
6
 
7
- from sqlspec.base import GenericDatabaseConfig, NoPoolConfig
7
+ from sqlspec.base import NoPoolSyncConfig
8
8
  from sqlspec.exceptions import ImproperConfigurationError
9
9
  from sqlspec.typing import Empty, EmptyType, dataclass_to_dict
10
10
 
@@ -19,7 +19,7 @@ __all__ = ("AiosqliteConfig",)
19
19
 
20
20
 
21
21
  @dataclass
22
- class AiosqliteConfig(NoPoolConfig["Connection"], GenericDatabaseConfig):
22
+ class AiosqliteConfig(NoPoolSyncConfig["Connection"]):
23
23
  """Configuration for Aiosqlite database connections.
24
24
 
25
25
  This class provides configuration options for Aiosqlite database connections, wrapping all parameters
@@ -28,28 +28,21 @@ class AiosqliteConfig(NoPoolConfig["Connection"], GenericDatabaseConfig):
28
28
  For details see: https://github.com/omnilib/aiosqlite/blob/main/aiosqlite/__init__.pyi
29
29
  """
30
30
 
31
- database: str
31
+ database: str = field(default=":memory:")
32
32
  """The path to the database file to be opened. Pass ":memory:" to open a connection to a database that resides in RAM instead of on disk."""
33
-
34
- timeout: float | EmptyType = Empty
33
+ timeout: float | EmptyType = field(default=Empty)
35
34
  """How many seconds the connection should wait before raising an OperationalError when a table is locked. If another thread or process has acquired a shared lock, a wait for the specified timeout occurs."""
36
-
37
- detect_types: int | EmptyType = Empty
35
+ detect_types: int | EmptyType = field(default=Empty)
38
36
  """Control whether and how data types are detected. It can be 0 (default) or a combination of PARSE_DECLTYPES and PARSE_COLNAMES."""
39
-
40
- isolation_level: Literal["DEFERRED", "IMMEDIATE", "EXCLUSIVE"] | None | EmptyType = Empty
37
+ isolation_level: Literal["DEFERRED", "IMMEDIATE", "EXCLUSIVE"] | None | EmptyType = field(default=Empty)
41
38
  """The isolation_level of the connection. This can be None for autocommit mode or one of "DEFERRED", "IMMEDIATE" or "EXCLUSIVE"."""
42
-
43
- check_same_thread: bool | EmptyType = Empty
39
+ check_same_thread: bool | EmptyType = field(default=Empty)
44
40
  """If True (default), ProgrammingError is raised if the database connection is used by a thread other than the one that created it. If False, the connection may be shared across multiple threads."""
45
-
46
- factory: type[SQLite3Connection] | EmptyType = Empty
41
+ factory: type[SQLite3Connection] | EmptyType = field(default=Empty)
47
42
  """A custom Connection class factory. If given, must be a callable that returns a Connection instance."""
48
-
49
- cached_statements: int | EmptyType = Empty
43
+ cached_statements: int | EmptyType = field(default=Empty)
50
44
  """The number of statements that SQLite will cache for this connection. The default is 128."""
51
-
52
- uri: bool | EmptyType = Empty
45
+ uri: bool | EmptyType = field(default=Empty)
53
46
  """If set to True, database is interpreted as a URI with supported options."""
54
47
 
55
48
  @property
@@ -7,7 +7,7 @@ from typing import TYPE_CHECKING, TypeVar
7
7
  from asyncmy.connection import Connection
8
8
  from asyncmy.pool import Pool
9
9
 
10
- from sqlspec.base import DatabaseConfigProtocol, GenericDatabaseConfig, GenericPoolConfig
10
+ from sqlspec.base import AsyncDatabaseConfig, GenericPoolConfig
11
11
  from sqlspec.exceptions import ImproperConfigurationError
12
12
  from sqlspec.typing import Empty, EmptyType, dataclass_to_dict
13
13
 
@@ -106,7 +106,7 @@ class AsyncmyPoolConfig(GenericPoolConfig):
106
106
 
107
107
 
108
108
  @dataclass
109
- class AsyncMyConfig(DatabaseConfigProtocol[Connection, Pool], GenericDatabaseConfig):
109
+ class AsyncMyConfig(AsyncDatabaseConfig[Connection, Pool]):
110
110
  """Asyncmy Configuration."""
111
111
 
112
112
  __is_async__ = True
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  from contextlib import asynccontextmanager
4
4
  from dataclasses import dataclass
5
- from typing import TYPE_CHECKING, TypeVar, Union
5
+ from typing import TYPE_CHECKING, Any, TypeVar, Union
6
6
 
7
7
  from asyncpg import Record
8
8
  from asyncpg import create_pool as asyncpg_create_pool
@@ -11,14 +11,13 @@ from asyncpg.pool import Pool, PoolConnectionProxy
11
11
  from typing_extensions import TypeAlias
12
12
 
13
13
  from sqlspec._serialization import decode_json, encode_json
14
- from sqlspec.base import DatabaseConfigProtocol, GenericDatabaseConfig, GenericPoolConfig
14
+ from sqlspec.base import AsyncDatabaseConfig, GenericPoolConfig
15
15
  from sqlspec.exceptions import ImproperConfigurationError
16
16
  from sqlspec.typing import Empty, EmptyType, dataclass_to_dict
17
17
 
18
18
  if TYPE_CHECKING:
19
- from asyncio import AbstractEventLoop
19
+ from asyncio import AbstractEventLoop # pyright: ignore[reportAttributeAccessIssue]
20
20
  from collections.abc import AsyncGenerator, Awaitable, Callable, Coroutine
21
- from typing import Any
22
21
 
23
22
 
24
23
  __all__ = (
@@ -73,12 +72,9 @@ class AsyncPgPoolConfig(GenericPoolConfig):
73
72
 
74
73
 
75
74
  @dataclass
76
- class AsyncPgConfig(DatabaseConfigProtocol[PgConnection, Pool], GenericDatabaseConfig):
75
+ class AsyncPgConfig(AsyncDatabaseConfig[PgConnection, Pool]):
77
76
  """Asyncpg Configuration."""
78
77
 
79
- __is_async__ = True
80
- __supports_connection_pooling__ = True
81
-
82
78
  pool_config: AsyncPgPoolConfig | None = None
83
79
  """Asyncpg Pool configuration"""
84
80
  json_deserializer: Callable[[str], Any] = decode_json
@@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, Any, cast
6
6
 
7
7
  from duckdb import DuckDBPyConnection
8
8
 
9
- from sqlspec.base import GenericDatabaseConfig, NoPoolConfig
9
+ from sqlspec.base import NoPoolSyncConfig
10
10
  from sqlspec.exceptions import ImproperConfigurationError
11
11
  from sqlspec.typing import Empty, EmptyType, dataclass_to_dict
12
12
 
@@ -66,7 +66,7 @@ class ExtensionConfig:
66
66
 
67
67
 
68
68
  @dataclass
69
- class DuckDBConfig(NoPoolConfig[DuckDBPyConnection], GenericDatabaseConfig):
69
+ class DuckDBConfig(NoPoolSyncConfig[DuckDBPyConnection]):
70
70
  """Configuration for DuckDB database connections.
71
71
 
72
72
  This class provides configuration options for DuckDB database connections, wrapping all parameters
@@ -4,14 +4,14 @@ from contextlib import asynccontextmanager
4
4
  from dataclasses import dataclass
5
5
  from typing import TYPE_CHECKING
6
6
 
7
- from oracledb import create_pool_async as oracledb_create_pool
7
+ from oracledb import create_pool_async as oracledb_create_pool # pyright: ignore[reportUnknownVariableType]
8
8
  from oracledb.connection import AsyncConnection
9
9
  from oracledb.pool import AsyncConnectionPool
10
10
 
11
11
  from sqlspec.adapters.oracledb.config._common import (
12
- OracleGenericDatabaseConfig,
13
12
  OracleGenericPoolConfig,
14
13
  )
14
+ from sqlspec.base import AsyncDatabaseConfig
15
15
  from sqlspec.exceptions import ImproperConfigurationError
16
16
  from sqlspec.typing import dataclass_to_dict
17
17
 
@@ -31,11 +31,18 @@ class OracleAsyncPoolConfig(OracleGenericPoolConfig[AsyncConnection, AsyncConnec
31
31
 
32
32
 
33
33
  @dataclass
34
- class OracleAsyncDatabaseConfig(OracleGenericDatabaseConfig[AsyncConnection, AsyncConnectionPool]):
35
- """Async Oracle database Configuration."""
34
+ class OracleAsyncDatabaseConfig(AsyncDatabaseConfig[AsyncConnection, AsyncConnectionPool]):
35
+ """Oracle Async database Configuration.
36
36
 
37
- __is_async__ = True
38
- __supports_connection_pooling__ = True
37
+ This class provides the base configuration for Oracle database connections, extending
38
+ the generic database configuration with Oracle-specific settings. It supports both
39
+ thin and thick modes of the python-oracledb driver.([1](https://python-oracledb.readthedocs.io/en/latest/index.html))
40
+
41
+ The configuration supports all standard Oracle connection parameters and can be used
42
+ with both synchronous and asynchronous connections. It includes support for features
43
+ like Oracle Wallet, external authentication, connection pooling, and advanced security
44
+ options.([2](https://python-oracledb.readthedocs.io/en/latest/user_guide/tuning.html))
45
+ """
39
46
 
40
47
  pool_config: OracleAsyncPoolConfig | None = None
41
48
  """Oracle Pool configuration"""
@@ -94,5 +101,5 @@ class OracleAsyncDatabaseConfig(OracleGenericDatabaseConfig[AsyncConnection, Asy
94
101
  A connection instance.
95
102
  """
96
103
  db_pool = await self.provide_pool(*args, **kwargs)
97
- async with db_pool.acquire() as connection:
104
+ async with db_pool.acquire() as connection: # pyright: ignore[reportUnknownMemberType]
98
105
  yield connection
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING, Generic, TypeVar
5
5
 
6
6
  from oracledb import ConnectionPool
7
7
 
8
- from sqlspec.base import DatabaseConfigProtocol, GenericDatabaseConfig, GenericPoolConfig
8
+ from sqlspec.base import GenericPoolConfig
9
9
  from sqlspec.typing import Empty
10
10
 
11
11
  if TYPE_CHECKING:
@@ -19,10 +19,7 @@ if TYPE_CHECKING:
19
19
 
20
20
  from sqlspec.typing import EmptyType
21
21
 
22
- __all__ = (
23
- "OracleGenericDatabaseConfig",
24
- "OracleGenericPoolConfig",
25
- )
22
+ __all__ = ("OracleGenericPoolConfig",)
26
23
 
27
24
 
28
25
  T = TypeVar("T")
@@ -134,18 +131,3 @@ class OracleGenericPoolConfig(Generic[ConnectionT, PoolT], GenericPoolConfig):
134
131
  """SSL/TLS protocol version"""
135
132
  handle: int | EmptyType = Empty
136
133
  """Oracle service context handle"""
137
-
138
-
139
- @dataclass
140
- class OracleGenericDatabaseConfig(DatabaseConfigProtocol[ConnectionT, PoolT], GenericDatabaseConfig):
141
- """Oracle database Configuration.
142
-
143
- This class provides the base configuration for Oracle database connections, extending
144
- the generic database configuration with Oracle-specific settings. It supports both
145
- thin and thick modes of the python-oracledb driver.([1](https://python-oracledb.readthedocs.io/en/latest/index.html))
146
-
147
- The configuration supports all standard Oracle connection parameters and can be used
148
- with both synchronous and asynchronous connections. It includes support for features
149
- like Oracle Wallet, external authentication, connection pooling, and advanced security
150
- options.([2](https://python-oracledb.readthedocs.io/en/latest/user_guide/tuning.html))
151
- """
@@ -4,14 +4,14 @@ from contextlib import contextmanager
4
4
  from dataclasses import dataclass
5
5
  from typing import TYPE_CHECKING
6
6
 
7
- from oracledb import create_pool as oracledb_create_pool
7
+ from oracledb import create_pool as oracledb_create_pool # pyright: ignore[reportUnknownVariableType]
8
8
  from oracledb.connection import Connection
9
9
  from oracledb.pool import ConnectionPool
10
10
 
11
11
  from sqlspec.adapters.oracledb.config._common import (
12
- OracleGenericDatabaseConfig,
13
12
  OracleGenericPoolConfig,
14
13
  )
14
+ from sqlspec.base import SyncDatabaseConfig
15
15
  from sqlspec.exceptions import ImproperConfigurationError
16
16
  from sqlspec.typing import dataclass_to_dict
17
17
 
@@ -31,11 +31,18 @@ class OracleSyncPoolConfig(OracleGenericPoolConfig[Connection, ConnectionPool]):
31
31
 
32
32
 
33
33
  @dataclass
34
- class OracleSyncDatabaseConfig(OracleGenericDatabaseConfig[Connection, ConnectionPool]):
35
- """Oracle database Configuration."""
34
+ class OracleSyncDatabaseConfig(SyncDatabaseConfig[Connection, ConnectionPool]):
35
+ """Oracle Sync database Configuration.
36
36
 
37
- __is_async__ = False
38
- __supports_connection_pooling__ = True
37
+ This class provides the base configuration for Oracle database connections, extending
38
+ the generic database configuration with Oracle-specific settings. It supports both
39
+ thin and thick modes of the python-oracledb driver.([1](https://python-oracledb.readthedocs.io/en/latest/index.html))
40
+
41
+ The configuration supports all standard Oracle connection parameters and can be used
42
+ with both synchronous and asynchronous connections. It includes support for features
43
+ like Oracle Wallet, external authentication, connection pooling, and advanced security
44
+ options.([2](https://python-oracledb.readthedocs.io/en/latest/user_guide/tuning.html))
45
+ """
39
46
 
40
47
  pool_config: OracleSyncPoolConfig | None = None
41
48
  """Oracle Pool configuration"""
@@ -7,10 +7,8 @@ from typing import TYPE_CHECKING
7
7
  from psycopg import AsyncConnection
8
8
  from psycopg_pool import AsyncConnectionPool
9
9
 
10
- from sqlspec.adapters.psycopg.config._common import (
11
- PsycoPgGenericDatabaseConfig,
12
- PsycoPgGenericPoolConfig,
13
- )
10
+ from sqlspec.adapters.psycopg.config._common import PsycoPgGenericPoolConfig
11
+ from sqlspec.base import AsyncDatabaseConfig
14
12
  from sqlspec.exceptions import ImproperConfigurationError
15
13
  from sqlspec.typing import dataclass_to_dict
16
14
 
@@ -31,11 +29,15 @@ class PsycoPgAsyncPoolConfig(PsycoPgGenericPoolConfig[AsyncConnection, AsyncConn
31
29
 
32
30
 
33
31
  @dataclass
34
- class PsycoPgAsyncDatabaseConfig(PsycoPgGenericDatabaseConfig[AsyncConnection, AsyncConnectionPool]):
35
- """Async Psycopg database Configuration."""
32
+ class PsycoPgAsyncDatabaseConfig(AsyncDatabaseConfig[AsyncConnection, AsyncConnectionPool]):
33
+ """Async Psycopg database Configuration.
34
+
35
+ This class provides the base configuration for Psycopg database connections, extending
36
+ the generic database configuration with Psycopg-specific settings.([1](https://www.psycopg.org/psycopg3/docs/api/connections.html))
36
37
 
37
- __is_async__ = True
38
- __supports_connection_pooling__ = True
38
+ The configuration supports all standard Psycopg connection parameters and can be used
39
+ with both synchronous and asynchronous connections.([2](https://www.psycopg.org/psycopg3/docs/api/connections.html))
40
+ """
39
41
 
40
42
  pool_config: PsycoPgAsyncPoolConfig | None = None
41
43
  """Psycopg Pool configuration"""
@@ -3,7 +3,7 @@ from __future__ import annotations
3
3
  from dataclasses import dataclass
4
4
  from typing import TYPE_CHECKING, Generic, TypeVar
5
5
 
6
- from sqlspec.base import DatabaseConfigProtocol, GenericDatabaseConfig, GenericPoolConfig
6
+ from sqlspec.base import GenericPoolConfig
7
7
  from sqlspec.typing import Empty
8
8
 
9
9
  if TYPE_CHECKING:
@@ -16,10 +16,7 @@ if TYPE_CHECKING:
16
16
  from sqlspec.typing import EmptyType
17
17
 
18
18
 
19
- __all__ = (
20
- "PsycoPgGenericDatabaseConfig",
21
- "PsycoPgGenericPoolConfig",
22
- )
19
+ __all__ = ("PsycoPgGenericPoolConfig",)
23
20
 
24
21
 
25
22
  ConnectionT = TypeVar("ConnectionT", bound="Connection | AsyncConnection")
@@ -59,15 +56,3 @@ class PsycoPgGenericPoolConfig(Generic[ConnectionT, PoolT], GenericPoolConfig):
59
56
  """Number of background workers"""
60
57
  configure: Callable[[ConnectionT], None] | EmptyType = Empty
61
58
  """Callback to configure new connections"""
62
-
63
-
64
- @dataclass
65
- class PsycoPgGenericDatabaseConfig(DatabaseConfigProtocol[ConnectionT, PoolT], GenericDatabaseConfig):
66
- """Psycopg database Configuration.
67
-
68
- This class provides the base configuration for Psycopg database connections, extending
69
- the generic database configuration with Psycopg-specific settings.([1](https://www.psycopg.org/psycopg3/docs/api/connections.html))
70
-
71
- The configuration supports all standard Psycopg connection parameters and can be used
72
- with both synchronous and asynchronous connections.([2](https://www.psycopg.org/psycopg3/docs/api/connections.html))
73
- """
@@ -7,10 +7,8 @@ from typing import TYPE_CHECKING
7
7
  from psycopg import Connection
8
8
  from psycopg_pool import ConnectionPool
9
9
 
10
- from sqlspec.adapters.psycopg.config._common import (
11
- PsycoPgGenericDatabaseConfig,
12
- PsycoPgGenericPoolConfig,
13
- )
10
+ from sqlspec.adapters.psycopg.config._common import PsycoPgGenericPoolConfig
11
+ from sqlspec.base import SyncDatabaseConfig
14
12
  from sqlspec.exceptions import ImproperConfigurationError
15
13
  from sqlspec.typing import dataclass_to_dict
16
14
 
@@ -31,11 +29,14 @@ class PsycoPgSyncPoolConfig(PsycoPgGenericPoolConfig[Connection, ConnectionPool]
31
29
 
32
30
 
33
31
  @dataclass
34
- class PsycoPgSyncDatabaseConfig(PsycoPgGenericDatabaseConfig[Connection, ConnectionPool]):
35
- """Sync Psycopg database Configuration."""
36
-
37
- __is_async__ = False
38
- __supports_connection_pooling__ = True
32
+ class PsycoPgSyncDatabaseConfig(SyncDatabaseConfig[Connection, ConnectionPool]):
33
+ """Sync Psycopg database Configuration.
34
+ This class provides the base configuration for Psycopg database connections, extending
35
+ the generic database configuration with Psycopg-specific settings.([1](https://www.psycopg.org/psycopg3/docs/api/connections.html))
36
+
37
+ The configuration supports all standard Psycopg connection parameters and can be used
38
+ with both synchronous and asynchronous connections.([2](https://www.psycopg.org/psycopg3/docs/api/connections.html))
39
+ """
39
40
 
40
41
  pool_config: PsycoPgSyncPoolConfig | None = None
41
42
  """Psycopg Pool configuration"""
@@ -4,7 +4,7 @@ from contextlib import contextmanager
4
4
  from dataclasses import dataclass
5
5
  from typing import TYPE_CHECKING, Any, Literal
6
6
 
7
- from sqlspec.base import GenericDatabaseConfig, NoPoolConfig
7
+ from sqlspec.base import NoPoolSyncConfig
8
8
  from sqlspec.exceptions import ImproperConfigurationError
9
9
  from sqlspec.typing import Empty, EmptyType, dataclass_to_dict
10
10
 
@@ -16,7 +16,7 @@ __all__ = ("SqliteConfig",)
16
16
 
17
17
 
18
18
  @dataclass
19
- class SqliteConfig(NoPoolConfig["Connection"], GenericDatabaseConfig):
19
+ class SqliteConfig(NoPoolSyncConfig["Connection"]):
20
20
  """Configuration for SQLite database connections.
21
21
 
22
22
  This class provides configuration options for SQLite database connections, wrapping all parameters
sqlspec/base.py CHANGED
@@ -2,16 +2,21 @@ from abc import ABC, abstractmethod
2
2
  from collections.abc import AsyncGenerator, Awaitable, Generator
3
3
  from contextlib import AbstractAsyncContextManager, AbstractContextManager
4
4
  from dataclasses import dataclass
5
- from typing import Any, ClassVar, Generic, TypeVar, Union
5
+ from typing import Annotated, Any, ClassVar, Generic, TypeVar, Union, cast, overload
6
6
 
7
7
  __all__ = (
8
+ "AsyncDatabaseConfig",
8
9
  "DatabaseConfigProtocol",
9
10
  "GenericPoolConfig",
10
- "NoPoolConfig",
11
+ "NoPoolAsyncConfig",
12
+ "NoPoolSyncConfig",
13
+ "SyncDatabaseConfig",
11
14
  )
12
15
 
13
16
  ConnectionT = TypeVar("ConnectionT")
14
17
  PoolT = TypeVar("PoolT")
18
+ AsyncConfigT = TypeVar("AsyncConfigT", bound="Union[AsyncDatabaseConfig[Any, Any], NoPoolAsyncConfig[Any]]")
19
+ SyncConfigT = TypeVar("SyncConfigT", bound="Union[SyncDatabaseConfig[Any, Any], NoPoolSyncConfig[Any]]")
15
20
 
16
21
 
17
22
  @dataclass
@@ -21,6 +26,9 @@ class DatabaseConfigProtocol(Generic[ConnectionT, PoolT], ABC):
21
26
  __is_async__: ClassVar[bool] = False
22
27
  __supports_connection_pooling__: ClassVar[bool] = False
23
28
 
29
+ def __hash__(self) -> int:
30
+ return id(self)
31
+
24
32
  @abstractmethod
25
33
  def create_connection(self) -> Union[ConnectionT, Awaitable[ConnectionT]]:
26
34
  """Create and return a new database connection."""
@@ -67,14 +75,34 @@ class DatabaseConfigProtocol(Generic[ConnectionT, PoolT], ABC):
67
75
  return self.__supports_connection_pooling__
68
76
 
69
77
 
70
- class NoPoolConfig(DatabaseConfigProtocol[ConnectionT, None]):
71
- """Base class for database configurations that do not implement a pool."""
78
+ class NoPoolSyncConfig(DatabaseConfigProtocol[ConnectionT, None]):
79
+ """Base class for a sync database configurations that do not implement a pool."""
80
+
81
+ __is_async__ = False
82
+ __supports_connection_pooling__ = False
72
83
 
73
84
  def create_pool(self) -> None:
74
85
  """This database backend has not implemented the pooling configurations."""
86
+ return
87
+
88
+ def provide_pool(self, *args: Any, **kwargs: Any) -> None:
89
+ """This database backend has not implemented the pooling configurations."""
90
+ return
91
+
92
+
93
+ class NoPoolAsyncConfig(DatabaseConfigProtocol[ConnectionT, None]):
94
+ """Base class for an async database configurations that do not implement a pool."""
95
+
96
+ __is_async__ = True
97
+ __supports_connection_pooling__ = False
98
+
99
+ async def create_pool(self) -> None:
100
+ """This database backend has not implemented the pooling configurations."""
101
+ return
75
102
 
76
103
  def provide_pool(self, *args: Any, **kwargs: Any) -> None:
77
104
  """This database backend has not implemented the pooling configurations."""
105
+ return
78
106
 
79
107
 
80
108
  @dataclass
@@ -83,5 +111,111 @@ class GenericPoolConfig:
83
111
 
84
112
 
85
113
  @dataclass
86
- class GenericDatabaseConfig:
87
- """Generic Database Configuration."""
114
+ class SyncDatabaseConfig(DatabaseConfigProtocol[ConnectionT, PoolT]):
115
+ """Generic Sync Database Configuration."""
116
+
117
+ __is_async__ = False
118
+ __supports_connection_pooling__ = True
119
+
120
+
121
+ @dataclass
122
+ class AsyncDatabaseConfig(DatabaseConfigProtocol[ConnectionT, PoolT]):
123
+ """Generic Async Database Configuration."""
124
+
125
+ __is_async__ = True
126
+ __supports_connection_pooling__ = True
127
+
128
+
129
+ class ConfigManager:
130
+ """Type-safe configuration manager with literal inference."""
131
+
132
+ def __init__(self) -> None:
133
+ self._configs: dict[Any, DatabaseConfigProtocol[Any, Any]] = {}
134
+
135
+ @overload
136
+ def add_config(self, config: SyncConfigT) -> type[SyncConfigT]: ...
137
+
138
+ @overload
139
+ def add_config(self, config: AsyncConfigT) -> type[AsyncConfigT]: ...
140
+
141
+ def add_config(
142
+ self,
143
+ config: Union[
144
+ SyncConfigT,
145
+ AsyncConfigT,
146
+ ],
147
+ ) -> Union[Annotated[type[SyncConfigT], int], Annotated[type[AsyncConfigT], int]]: # pyright: ignore[reportInvalidTypeVarUse]
148
+ """Add a new configuration to the manager."""
149
+ key = Annotated[type(config), id(config)] # type: ignore[valid-type]
150
+ self._configs[key] = config
151
+ return key # type: ignore[return-value] # pyright: ignore[reportReturnType]
152
+
153
+ @overload
154
+ def get_config(self, name: type[SyncConfigT]) -> SyncConfigT: ...
155
+
156
+ @overload
157
+ def get_config(self, name: type[AsyncConfigT]) -> AsyncConfigT: ...
158
+
159
+ def get_config(
160
+ self, name: Union[type[DatabaseConfigProtocol[ConnectionT, PoolT]], Any]
161
+ ) -> DatabaseConfigProtocol[ConnectionT, PoolT]:
162
+ """Retrieve a configuration by its type."""
163
+ config = self._configs.get(name)
164
+ if not config:
165
+ raise KeyError(f"No configuration found for {name}")
166
+ return config
167
+
168
+ @overload
169
+ def get_connection(
170
+ self,
171
+ name: Union[
172
+ type[NoPoolSyncConfig[ConnectionT]],
173
+ type[SyncDatabaseConfig[ConnectionT, PoolT]],
174
+ ],
175
+ ) -> ConnectionT: ... # pyright: ignore[reportInvalidTypeVarUse]
176
+
177
+ @overload
178
+ def get_connection(
179
+ self,
180
+ name: Union[
181
+ type[NoPoolAsyncConfig[ConnectionT]],
182
+ type[AsyncDatabaseConfig[ConnectionT, PoolT]],
183
+ ],
184
+ ) -> Awaitable[ConnectionT]: ... # pyright: ignore[reportInvalidTypeVarUse]
185
+
186
+ def get_connection(
187
+ self,
188
+ name: Union[
189
+ type[NoPoolSyncConfig[ConnectionT]],
190
+ type[NoPoolAsyncConfig[ConnectionT]],
191
+ type[SyncDatabaseConfig[ConnectionT, PoolT]],
192
+ type[AsyncDatabaseConfig[ConnectionT, PoolT]],
193
+ ],
194
+ ) -> Union[ConnectionT, Awaitable[ConnectionT]]:
195
+ """Create and return a connection from the specified configuration."""
196
+ config = self.get_config(name)
197
+ return config.create_connection()
198
+
199
+ @overload
200
+ def get_pool(self, name: type[Union[NoPoolSyncConfig[ConnectionT], NoPoolAsyncConfig[ConnectionT]]]) -> None: ... # pyright: ignore[reportInvalidTypeVarUse]
201
+
202
+ @overload
203
+ def get_pool(self, name: type[SyncDatabaseConfig[ConnectionT, PoolT]]) -> type[PoolT]: ... # pyright: ignore[reportInvalidTypeVarUse]
204
+
205
+ @overload
206
+ def get_pool(self, name: type[AsyncDatabaseConfig[ConnectionT, PoolT]]) -> Awaitable[type[PoolT]]: ... # pyright: ignore[reportInvalidTypeVarUse]
207
+
208
+ def get_pool(
209
+ self,
210
+ name: Union[
211
+ type[NoPoolSyncConfig[ConnectionT]],
212
+ type[NoPoolAsyncConfig[ConnectionT]],
213
+ type[SyncDatabaseConfig[ConnectionT, PoolT]],
214
+ type[AsyncDatabaseConfig[ConnectionT, PoolT]],
215
+ ],
216
+ ) -> Union[type[PoolT], Awaitable[type[PoolT]], None]:
217
+ """Create and return a connection pool from the specified configuration."""
218
+ config = self.get_config(name)
219
+ if isinstance(config, (NoPoolSyncConfig, NoPoolAsyncConfig)):
220
+ return None
221
+ return cast("Union[type[PoolT], Awaitable[type[PoolT]]]", config.create_pool())
File without changes
@@ -1,34 +1,42 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import TYPE_CHECKING, Any, TypeVar
3
+ from typing import TYPE_CHECKING
4
4
 
5
5
  from litestar.plugins import InitPluginProtocol
6
6
 
7
+ from sqlspec.base import ConfigManager
8
+
7
9
  if TYPE_CHECKING:
8
10
  from litestar.config.app import AppConfig
9
11
 
10
12
 
11
- T = TypeVar("T")
12
-
13
-
14
13
  class SQLSpecPlugin(InitPluginProtocol):
15
- """Aiosql plugin."""
14
+ """SQLSpec plugin."""
16
15
 
17
16
  __slots__ = ("_config",)
18
17
 
19
- def __init__(self, config: Any) -> None:
20
- """Initialize ``AiosqlPlugin``.
18
+ def __init__(self, config: ConfigManager) -> None:
19
+ """Initialize ``SQLSpecPlugin``.
21
20
 
22
21
  Args:
23
- config: configure and start Aiosql.
22
+ config: configure SQLSpec plugin for use with Litestar.
24
23
  """
25
24
  self._config = config
26
25
 
26
+ @property
27
+ def config(self) -> ConfigManager:
28
+ """Return the plugin config.
29
+
30
+ Returns:
31
+ ConfigManager.
32
+ """
33
+ return self._config
34
+
27
35
  def on_app_init(self, app_config: AppConfig) -> AppConfig:
28
- """Configure application for use with Aiosql.
36
+ """Configure application for use with SQLSpec.
29
37
 
30
38
  Args:
31
39
  app_config: The :class:`AppConfig <.config.app.AppConfig>` instance.
32
40
  """
33
- app_config.signature_namespace.update(self._config.signature_namespace)
41
+ app_config.signature_types.append(ConfigManager)
34
42
  return app_config
@@ -1,9 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlspec
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: SQL Experiments in Python
5
5
  Author-email: Cody Fincher <cody@litestar.dev>
6
6
  Maintainer-email: Litestar Developers <hello@litestar.dev>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
7
9
  License-File: NOTICE
8
10
  Requires-Python: <4.0,>=3.9
9
11
  Requires-Dist: eval-type-backport; python_version < '3.10'
@@ -35,7 +37,6 @@ Requires-Dist: msgspec; extra == 'msgspec'
35
37
  Provides-Extra: oracledb
36
38
  Requires-Dist: oracledb; extra == 'oracledb'
37
39
  Provides-Extra: performance
38
- Requires-Dist: google-re2; (sys_platform == 'linux') and extra == 'performance'
39
40
  Requires-Dist: sqlglot[rs]; extra == 'performance'
40
41
  Provides-Extra: psycopg
41
42
  Requires-Dist: psycopg[binary,pool]; extra == 'psycopg'
@@ -57,30 +58,31 @@ SQLSpec is an experimental Python library designed to streamline and modernize y
57
58
 
58
59
  **Note**: SQLSpec is currently under active development and the API is subject to change. It is not yet ready for production use. Contributions are welcome!
59
60
 
60
- ### Core Features (Planned but subject to change, removal or redesign)
61
+ ## Core Features (Planned but subject to change, removal or redesign)
61
62
 
62
63
  - **Consistent Database Session Interface**: Provides a consistent connectivity interface for interacting with one or more database systems, including SQLite, Postgres, DuckDB, MySQL, Oracle, SQL Server, Spanner, BigQuery, and more.
63
64
  - **Emphasis on RAW SQL and Minimal Abstractions and Performance**: SQLSpec is a library for working with SQL in Python. It's goals are to offer minimal abstractions between the user and the database. It does not aim to be an ORM library.
64
- - **Type-Safe Queries**: Quickly map SQL queries to typed objects using libraries such as Pydantic, Msqgspec, Attrs, etc.
65
+ - **Type-Safe Queries**: Quickly map SQL queries to typed objects using libraries such as Pydantic, Msgspec, Attrs, etc.
65
66
  - **Extensible Design**: Easily add support for new database dialects or extend existing functionality to meet your specific needs. Easily add support for async and sync database drivers.
66
67
  - **Minimal Dependencies**: SQLSpec is designed to be lightweight and can run on it's own or with other libraries such as `litestar`, `fastapi`, `flask` and more. (Contributions welcome!)
67
68
  - **Dynamic Query Manipulation**: Easily apply filters to pre-defined queries with a fluent, Pythonic API. Safely manipulate queries without the risk of SQL injection.
68
69
  - **Dialect Validation and Conversion**: Use `sqlglot` to validate your SQL against specific dialects and seamlessly convert between them.
69
70
  - **Support for Async and Sync Database Drivers**: SQLSpec supports both async and sync database drivers, allowing you to choose the style that best fits your application.
71
+ - **Basic Migration Management**: A mechanism to generate empty migration files where you can add your own SQL and intelligently track which migrations have been applied.
70
72
 
71
- ### What SQLSpec Is Not (Yet)
73
+ ## What SQLSpec Is Not (Yet)
72
74
 
73
75
  SQLSpec is a work in progress. While it offers a solid foundation for modern SQL interactions, it does not yet include every feature you might find in a mature ORM or database toolkit. The focus is on building a robust, flexible core that can be extended over time.
74
76
 
75
- ### Inspiration and Future Direction
77
+ ## Inspiration and Future Direction
76
78
 
77
79
  SQLSpec originally drew inspiration from features found in the `aiosql` library. This is a great library for working with and executed SQL stored in files. It's unclear how much of an overlap there will be between the two libraries, but it's possible that some features will be contributed back to `aiosql` where appropriate.
78
80
 
79
- ### Current Focus: Universal Connectivity
81
+ ## Current Focus: Universal Connectivity
80
82
 
81
83
  The primary goal at this stage is to establish a **native connectivity interface** that works seamlessly across all supported database environments. This means you can connect to any of the supported databases using a consistent API, regardless of the underlying driver or dialect.
82
84
 
83
- ### Adapters: Completed, In Progress, and Planned
85
+ ## Adapters: Completed, In Progress, and Planned
84
86
 
85
87
  This list is not final. If you have a driver you'd like to see added, please open an issue or submit a PR!
86
88
 
@@ -98,13 +100,13 @@ This list is not final. If you have a driver you'd like to see added, please ope
98
100
  | [`oracledb`](https://oracle.github.io/python-oracledb/) | Oracle | Async | ✅ |
99
101
  | [`oracledb`](https://oracle.github.io/python-oracledb/) | Oracle | Sync | ✅ |
100
102
  | [`duckdb`](https://duckdb.org/) | DuckDB | Sync | ✅ |
101
- | [`bigquery`](https://googleapis.dev/python/bigquery/latest/index.html) | BigQuery | Sync | 🗓️ Planned |
102
- | [`spanner`](https://googleapis.dev/python/spanner/latest/index.html) | Spanner | Sync | 🗓️ Planned |
103
- | [`sqlserver`](https://docs.microsoft.com/en-us/sql/connect/python/pyodbc/python-sql-driver-for-pyodbc?view=sql-server-ver16) | SQL Server | Sync | 🗓️ Planned |
104
- | [`mysql`](https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysql-connector-python.html) | MySQL | Sync | 🗓️ Planned |
105
- | [`snowflake`](https://docs.snowflake.com)
103
+ | [`bigquery`](https://googleapis.dev/python/bigquery/latest/index.html) | BigQuery | Sync | 🗓️ |
104
+ | [`spanner`](https://googleapis.dev/python/spanner/latest/index.html) | Spanner | Sync | 🗓️ |
105
+ | [`sqlserver`](https://docs.microsoft.com/en-us/sql/connect/python/pyodbc/python-sql-driver-for-pyodbc?view=sql-server-ver16) | SQL Server | Sync | 🗓️ |
106
+ | [`mysql`](https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysql-connector-python.html) | MySQL | Sync | 🗓️ |
107
+ | [`snowflake`](https://docs.snowflake.com) | Snowflake | Sync | 🗓️ |
106
108
 
107
- ### Proposed Project Structure
109
+ ## Proposed Project Structure
108
110
 
109
111
  - `sqlspec/`:
110
112
  - `adapters/`: Contains all database drivers and associated configuration.
@@ -119,7 +121,7 @@ This list is not final. If you have a driver you'd like to see added, please ope
119
121
  - `exceptions.py`: Contains custom exceptions for SQLSpec.
120
122
  - `typing.py`: Contains type hints, type guards and several facades for optional libraries that are not required for the core functionality of SQLSpec.
121
123
 
122
- ### Get Involved
124
+ ## Get Involved
123
125
 
124
126
  SQLSpec is an open-source project, and contributions are welcome! Whether you're interested in adding support for new databases, improving the query interface, or simply providing feedback, your input is valuable.
125
127
 
@@ -1,44 +1,46 @@
1
1
  sqlspec/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
2
- sqlspec/__metadata__.py,sha256=Vw99abV_UQNVH2jB0IBa9-8emyZQcXm1J9eMtLxFX2Y,496
2
+ sqlspec/__metadata__.py,sha256=KWtGqYzOJaPcKEiZAsQwwnwz3cHls7wkgmdx61W01vw,496
3
3
  sqlspec/_serialization.py,sha256=NnJajyQU2I1QCwE0eOBcUbG1E25aiNLOPqMk6S-52Sg,850
4
4
  sqlspec/_typing.py,sha256=pJkUkgy3zra1SFV96F4PTWStWyRNV44rrZEyrtQfgbw,4235
5
- sqlspec/base.py,sha256=rvdylQ2YyTx8iyqgpk04FmkFwNpd_qZytUs4mvJ6MBw,2793
5
+ sqlspec/base.py,sha256=b3i6biSBLovRW8ts2L1gtVQgxXHCw6S1sKjFfmj2gfQ,7713
6
6
  sqlspec/exceptions.py,sha256=fhCOILBj0J7HJP67BNSC0d9YUbW8QpZPXM55xJJzE8A,3039
7
7
  sqlspec/filters.py,sha256=K6AVBo1OTLVXZZiLuM7n_44MQKUT0DzZe9roiAsTX-4,3614
8
8
  sqlspec/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  sqlspec/typing.py,sha256=6g8lkdYRAFWW_4Vct9D2QNOaw0AYyHHMXT7jbdT6aeI,13665
10
10
  sqlspec/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  sqlspec/adapters/adbc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- sqlspec/adapters/adbc/config.py,sha256=DRlcJGo2haN_UKTnp4zplC_UV6yf5XwyHu0Z2L5lrSM,1690
12
+ sqlspec/adapters/adbc/config.py,sha256=AF5rWTqc7GHmajcCeDXyWci8ForWpQzogQbMphaHEEs,1652
13
13
  sqlspec/adapters/aiosqlite/__init__.py,sha256=PLqWg24l3TooJvqA0Xf1WErrxtqwo8DEoL_Zp2iSCzs,68
14
- sqlspec/adapters/aiosqlite/config.py,sha256=ou3aAB2JzTkkFplTCwdXKTVHMPfoGsTR1CGdI9BeSM4,3861
14
+ sqlspec/adapters/aiosqlite/config.py,sha256=S_NU925KisY8AQAEpdTvdQI0nEOiY8Xi-CCPzsdUb7g,3956
15
15
  sqlspec/adapters/asyncmy/__init__.py,sha256=o0R_Azae3FHiSZ1TQ5ZjyCneDOuvnEeMjmSkhuiKoWo,103
16
- sqlspec/adapters/asyncmy/config.py,sha256=YWsw8PBDMae-oVle-szKBzZYFq9ayIhDL7UdLLM7ybk,5696
16
+ sqlspec/adapters/asyncmy/config.py,sha256=PUVUmi62MELljUwpZh9TYRGbmBujXkvNVgxEnvWHecA,5644
17
17
  sqlspec/adapters/asyncpg/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- sqlspec/adapters/asyncpg/config.py,sha256=3kDG4nAtdRU8gC-AJvifwwIokDtrI63G6aYcMKwNHZQ,6226
18
+ sqlspec/adapters/asyncpg/config.py,sha256=77RIUNxGQSEED6Fg_kdP1OlpLLIkzNw9Y_pMp2eJbGg,6131
19
19
  sqlspec/adapters/duckdb/__init__.py,sha256=-IC44IEsRPbz16HpQFAGkV7Bfbow8CGMruBsdMEIEf4,85
20
- sqlspec/adapters/duckdb/config.py,sha256=sqKD_FUdPMQKZad15qX9VIMQ2CdTd5x6Jors43YxQbE,8206
20
+ sqlspec/adapters/duckdb/config.py,sha256=rJ3nC514LVk5cUVvAP8aS0oQXot76DqwEAtGLlPm0so,8168
21
21
  sqlspec/adapters/oracledb/__init__.py,sha256=f7P24wnDhDoEwgO0pJbutqqN2L0WUZWqVJIAcvphb4M,300
22
22
  sqlspec/adapters/oracledb/config/__init__.py,sha256=XoHgInT4IbXjDg5ax3ncuUoVvnYB5qQjI-Ib7gwSycU,338
23
- sqlspec/adapters/oracledb/config/_asyncio.py,sha256=Hr28ogOUED1kRIPYQE73hA6fpthDTJ3rxFg4-PO2ZtU,3327
24
- sqlspec/adapters/oracledb/config/_common.py,sha256=5y8G_aYjJAGAVSQufMQlGHnlSW5cqeiBmz4W5lCceOQ,6244
25
- sqlspec/adapters/oracledb/config/_sync.py,sha256=QsPNqiO4GKD1oouAL6ulApKJx6_r5_Sjcy2udrOK1JU,3232
23
+ sqlspec/adapters/oracledb/config/_asyncio.py,sha256=yq05yLzJyMTc-9DqpRJoHu8V9T0U6MYMnt0x23ndJHY,4019
24
+ sqlspec/adapters/oracledb/config/_common.py,sha256=9FQAynMkh8ATBoVhloPqf6AMc-XSKg29N-RtzFokyhs,5334
25
+ sqlspec/adapters/oracledb/config/_sync.py,sha256=9WRAgFUOycFCtqqO8HuB8ADfv4ou1u_h01gou9dOEhI,3882
26
26
  sqlspec/adapters/psycopg/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  sqlspec/adapters/psycopg/config/__init__.py,sha256=y4s9ezhFu764yQIqm_qlE_HYJiumTRN_dDfewwRGSkI,342
28
- sqlspec/adapters/psycopg/config/_async.py,sha256=d3nZCn6pjxUCWqEdHKrdWsu7wkR5b4dkEygm3zR_gTk,2828
29
- sqlspec/adapters/psycopg/config/_common.py,sha256=p4oh2nqwvN1IAM8M9OqPWjBdPRw2-Qow3RIx-houjYc,2794
30
- sqlspec/adapters/psycopg/config/_sync.py,sha256=8HhvhDufeFtuKROkKAW96Pl2lVB_5WPBBrXK9AJz3uE,2707
28
+ sqlspec/adapters/psycopg/config/_async.py,sha256=r-RQeVUgIqWPNxoTegXNfS3hnFoUt2eB8JCvm5A_hEQ,3198
29
+ sqlspec/adapters/psycopg/config/_common.py,sha256=UP0BXPSEsbY-CLxLktx4vhmEO-jdSQI1eXqSeo0vjAE,2102
30
+ sqlspec/adapters/psycopg/config/_sync.py,sha256=btaJkyPj8SX_ZN5_9bu7flcqWv1_YNk4p_JauiYDriQ,3073
31
31
  sqlspec/adapters/sqlite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
- sqlspec/adapters/sqlite/config.py,sha256=tNF3a3wQDzZaa1UEVKrhtVmIjF-8mqTGhQKUhJi5tMM,3750
32
+ sqlspec/adapters/sqlite/config.py,sha256=dvxXMsUc6AgnjZyAcQ2clZM4y3iNViMUJLH2DxL-AOs,3712
33
33
  sqlspec/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  sqlspec/extensions/litestar/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- sqlspec/extensions/litestar/plugin.py,sha256=oiBFfRffNvy_vnGptREd6JYZGB6Yd98KbtVct_VcW0A,837
35
+ sqlspec/extensions/litestar/config.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
+ sqlspec/extensions/litestar/plugin.py,sha256=phX5x9JTIHxfC-U7-Gowq6HQilD-j13WnK2n7-93MWw,1030
36
37
  sqlspec/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
38
  sqlspec/utils/deprecation.py,sha256=MbmIs1Qz1ZIITW7TrCE-wa1nmO0x4nGqtM1AShmKYT8,3900
38
39
  sqlspec/utils/fixtures.py,sha256=FbySeVuU0E_B885ulQh_J5CO_5eL51beH9X0y9zjsYU,2196
39
40
  sqlspec/utils/module_loader.py,sha256=Qe52uUgAwHSMJC2aKQwMs0F1XSbwJARF-8QdASItH_M,2720
40
41
  sqlspec/utils/text.py,sha256=FnlNj7drS6JwcFc3dd7BPUBP6JDSmxTZmxnZPAB-Yq0,1479
41
- sqlspec-0.5.0.dist-info/METADATA,sha256=0ROm7C3bz5eykaLTrEG4Yed9AR82cN0VVL5D-GJ26zQ,8932
42
- sqlspec-0.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
43
- sqlspec-0.5.0.dist-info/licenses/NOTICE,sha256=Lyir8ozXWov7CyYS4huVaOCNrtgL17P-bNV-5daLntQ,1634
44
- sqlspec-0.5.0.dist-info/RECORD,,
42
+ sqlspec-0.6.0.dist-info/METADATA,sha256=Tk8P_oOaDt2ujjEx0UTB_vH0v5optk4m4inl36wh5oA,9135
43
+ sqlspec-0.6.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
+ sqlspec-0.6.0.dist-info/licenses/LICENSE,sha256=MdujfZ6l5HuLz4mElxlu049itenOR3gnhN1_Nd3nVcM,1078
45
+ sqlspec-0.6.0.dist-info/licenses/NOTICE,sha256=Lyir8ozXWov7CyYS4huVaOCNrtgL17P-bNV-5daLntQ,1634
46
+ sqlspec-0.6.0.dist-info/RECORD,,
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Litestar Organization
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.