python-glowplug 0.3.0__py3-none-any.whl → 0.3.1__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.
- glowplug/config/__init__.py +12 -13
- {python_glowplug-0.3.0.dist-info → python_glowplug-0.3.1.dist-info}/METADATA +1 -2
- {python_glowplug-0.3.0.dist-info → python_glowplug-0.3.1.dist-info}/RECORD +5 -5
- {python_glowplug-0.3.0.dist-info → python_glowplug-0.3.1.dist-info}/LICENSE +0 -0
- {python_glowplug-0.3.0.dist-info → python_glowplug-0.3.1.dist-info}/WHEEL +0 -0
glowplug/config/__init__.py
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
from functools import cached_property
|
|
2
2
|
from typing import Literal
|
|
3
3
|
|
|
4
|
-
from pydantic import
|
|
5
|
-
from pydantic_settings import BaseSettings
|
|
4
|
+
from pydantic import BaseModel
|
|
6
5
|
|
|
7
6
|
from ..driver.mssql import MsSqlDriver
|
|
8
7
|
from ..driver.pg import PostgresDriver
|
|
9
8
|
from ..driver.sqlite import SqliteDriver
|
|
10
9
|
|
|
11
10
|
|
|
12
|
-
class SqliteSettings(
|
|
11
|
+
class SqliteSettings(BaseModel):
|
|
13
12
|
"""Settings for connecting to SQLite."""
|
|
14
13
|
|
|
15
14
|
engine: Literal["sqlite"]
|
|
16
|
-
path: str =
|
|
15
|
+
path: str = ":memory:"
|
|
17
16
|
|
|
18
17
|
@cached_property
|
|
19
18
|
def driver(self) -> SqliteDriver:
|
|
20
19
|
return SqliteDriver(self.path)
|
|
21
20
|
|
|
22
21
|
|
|
23
|
-
class PostgresSettings(
|
|
22
|
+
class PostgresSettings(BaseModel):
|
|
24
23
|
"""Settings for connecting to Postgres."""
|
|
25
24
|
|
|
26
25
|
engine: Literal["postgres"]
|
|
27
|
-
host: str =
|
|
28
|
-
port: int =
|
|
29
|
-
user: str =
|
|
26
|
+
host: str = "localhost"
|
|
27
|
+
port: int = 5432
|
|
28
|
+
user: str = "postgres"
|
|
30
29
|
password: str
|
|
31
30
|
database: str
|
|
32
|
-
maintenance_db: str | None =
|
|
31
|
+
maintenance_db: str | None = None
|
|
33
32
|
|
|
34
33
|
@cached_property
|
|
35
34
|
def driver(self) -> PostgresDriver:
|
|
@@ -37,16 +36,16 @@ class PostgresSettings(BaseSettings):
|
|
|
37
36
|
return PostgresDriver(url, maintenance_db=self.maintenance_db)
|
|
38
37
|
|
|
39
38
|
|
|
40
|
-
class MsSqlSettings(
|
|
39
|
+
class MsSqlSettings(BaseModel):
|
|
41
40
|
"""Settings for connecting to Microsoft SQL Server."""
|
|
42
41
|
|
|
43
42
|
engine: Literal["mssql"]
|
|
44
43
|
odbc_driver: Literal["ODBC Driver 17 for SQL Server"] = (
|
|
45
44
|
"ODBC Driver 17 for SQL Server"
|
|
46
45
|
)
|
|
47
|
-
host: str =
|
|
48
|
-
port: int =
|
|
49
|
-
user: str =
|
|
46
|
+
host: str = "127.0.0.1"
|
|
47
|
+
port: int = 1433
|
|
48
|
+
user: str = "sa"
|
|
50
49
|
password: str
|
|
51
50
|
database: str
|
|
52
51
|
maintenance_db: str = "master"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-glowplug
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary:
|
|
5
5
|
Home-page: https://github.com/jnu/python-glowplug
|
|
6
6
|
License: MIT
|
|
@@ -15,7 +15,6 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Requires-Dist: alembic (>=1.5,<2.0)
|
|
17
17
|
Requires-Dist: pydantic (>=2,<3)
|
|
18
|
-
Requires-Dist: pydantic-settings (>=2,<3)
|
|
19
18
|
Requires-Dist: sqlalchemy (>=2,<3)
|
|
20
19
|
Project-URL: Repository, https://github.com/jnu/python-glowplug
|
|
21
20
|
Description-Content-Type: text/markdown
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
glowplug/__init__.py,sha256=VKKI-9C6KSlXwvisxTQFhVUUtQdwiNeV_g8wB5TVjM4,378
|
|
2
|
-
glowplug/config/__init__.py,sha256=
|
|
2
|
+
glowplug/config/__init__.py,sha256=0v2Tqk8mJ3v_wRuifXP1-V4x7--xupBxxtrSt2CFqXs,1628
|
|
3
3
|
glowplug/driver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
glowplug/driver/base.py,sha256=LTBSCkYLO_xJZwDDjKA8ro9KSbMHdKNtWBAoNecJmGE,2845
|
|
5
5
|
glowplug/driver/mssql.py,sha256=gbrlh2O-LViDwNmwwpme0sNzu2EbgJtQKbp4o_mNrvs,2635
|
|
6
6
|
glowplug/driver/pg.py,sha256=4Hw2WG33UzgYyJtWLv8QWZzHhzzsM34TyDuObtxvNmI,2600
|
|
7
7
|
glowplug/driver/sqlite.py,sha256=DEJ8lYP8ZPemeGezTovs8WISGaVyUfwTIqiwMz3FPdU,1020
|
|
8
|
-
python_glowplug-0.3.
|
|
9
|
-
python_glowplug-0.3.
|
|
10
|
-
python_glowplug-0.3.
|
|
11
|
-
python_glowplug-0.3.
|
|
8
|
+
python_glowplug-0.3.1.dist-info/LICENSE,sha256=HvAzro26TfbigQ3ppmyagEGHIr_UtyQDfU8muTAqWFU,1060
|
|
9
|
+
python_glowplug-0.3.1.dist-info/METADATA,sha256=h0FUYcRim7r7DUJYmPKIJwNhr1kXzq8Ce6wqd_B4SDY,1290
|
|
10
|
+
python_glowplug-0.3.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
11
|
+
python_glowplug-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|