dycw-utilities 0.147.2__py3-none-any.whl → 0.147.3__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.
- {dycw_utilities-0.147.2.dist-info → dycw_utilities-0.147.3.dist-info}/METADATA +1 -1
- {dycw_utilities-0.147.2.dist-info → dycw_utilities-0.147.3.dist-info}/RECORD +7 -7
- utilities/__init__.py +1 -1
- utilities/postgres.py +12 -4
- {dycw_utilities-0.147.2.dist-info → dycw_utilities-0.147.3.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.147.2.dist-info → dycw_utilities-0.147.3.dist-info}/entry_points.txt +0 -0
- {dycw_utilities-0.147.2.dist-info → dycw_utilities-0.147.3.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
utilities/__init__.py,sha256=
|
1
|
+
utilities/__init__.py,sha256=CYx_3txVREoGWejJRJBItmHBOZ94QymP1DKxtNU8fIo,60
|
2
2
|
utilities/altair.py,sha256=92E2lCdyHY4Zb-vCw6rEJIsWdKipuu-Tu2ab1ufUfAk,9079
|
3
3
|
utilities/asyncio.py,sha256=aB0EtUbUJ5ZKQ5ET-Xfyx6wfUJG2G4vihEX0blK4TGE,14964
|
4
4
|
utilities/atomicwrites.py,sha256=xcOWenTBRS0oat3kg7Sqe51AohNThMQ2ixPL7QCG8hw,5795
|
@@ -48,7 +48,7 @@ utilities/pickle.py,sha256=MBT2xZCsv0pH868IXLGKnlcqNx2IRVKYNpRcqiQQqxw,653
|
|
48
48
|
utilities/platform.py,sha256=Ue9LSxYvg9yUXGKuz5aZoy_qkUEXde-v6B09exgSctU,2813
|
49
49
|
utilities/polars.py,sha256=BgiDryAVOapi41ddfJqN0wYh_sDj8BNEYtPB36LaHdo,71824
|
50
50
|
utilities/polars_ols.py,sha256=Uc9V5kvlWZ5cU93lKZ-cfAKdVFFw81tqwLW9PxtUvMs,5618
|
51
|
-
utilities/postgres.py,sha256=
|
51
|
+
utilities/postgres.py,sha256=dbQrUFOoV6huNeuYTnSpNhSNq-QhXkBfrJPMtoAGJtY,7877
|
52
52
|
utilities/pottery.py,sha256=JluZG7SUSw-JnN73_7QV-vJyPrTsct3q86p8eqVUasc,7019
|
53
53
|
utilities/pqdm.py,sha256=BTsYPtbKQWwX-iXF4qCkfPG7DPxIB54J989n83bXrIo,3092
|
54
54
|
utilities/psutil.py,sha256=KUlu4lrUw9Zg1V7ZGetpWpGb9DB8l_SSDWGbANFNCPU,2104
|
@@ -88,8 +88,8 @@ utilities/zoneinfo.py,sha256=oEH-nL3t4h9uawyZqWDtNtDAl6M-CLpLYGI_nI6DulM,1971
|
|
88
88
|
utilities/pytest_plugins/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
|
89
89
|
utilities/pytest_plugins/pytest_randomly.py,sha256=NXzCcGKbpgYouz5yehKb4jmxmi2SexKKpgF4M65bi10,414
|
90
90
|
utilities/pytest_plugins/pytest_regressions.py,sha256=Iwhfv_OJH7UCPZCfoh7ugZ2Xjqjil-BBBsOb8sDwiGI,1471
|
91
|
-
dycw_utilities-0.147.
|
92
|
-
dycw_utilities-0.147.
|
93
|
-
dycw_utilities-0.147.
|
94
|
-
dycw_utilities-0.147.
|
95
|
-
dycw_utilities-0.147.
|
91
|
+
dycw_utilities-0.147.3.dist-info/METADATA,sha256=0s33DB1w4KCYCicIAaLfq_aP_xxUUqvwFV9rpelm0R0,1697
|
92
|
+
dycw_utilities-0.147.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
93
|
+
dycw_utilities-0.147.3.dist-info/entry_points.txt,sha256=BOD_SoDxwsfJYOLxhrSXhHP_T7iw-HXI9f2WVkzYxvQ,135
|
94
|
+
dycw_utilities-0.147.3.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
|
95
|
+
dycw_utilities-0.147.3.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/postgres.py
CHANGED
@@ -27,6 +27,7 @@ async def pg_dump(
|
|
27
27
|
path: PathLike,
|
28
28
|
/,
|
29
29
|
*,
|
30
|
+
docker: str | None = None,
|
30
31
|
format_: _PGDumpFormat = "plain",
|
31
32
|
jobs: int | None = None,
|
32
33
|
schemas: MaybeListStr | None = None,
|
@@ -43,7 +44,10 @@ async def pg_dump(
|
|
43
44
|
raise _PGDumpHostError(url=url)
|
44
45
|
if url.port is None:
|
45
46
|
raise _PGDumpPortError(url=url)
|
46
|
-
parts: list[str] = [
|
47
|
+
parts: list[str] = []
|
48
|
+
if docker is not None:
|
49
|
+
parts.extend(["docker", "exec", "-it", docker])
|
50
|
+
parts.extend([
|
47
51
|
"pg_dump",
|
48
52
|
# general options
|
49
53
|
f"--dbname={url.database}",
|
@@ -60,7 +64,7 @@ async def pg_dump(
|
|
60
64
|
f"--host={url.host}",
|
61
65
|
f"--port={url.port}",
|
62
66
|
"--no-password",
|
63
|
-
]
|
67
|
+
])
|
64
68
|
if (format_ == "directory") and (jobs is not None):
|
65
69
|
parts.append(f"--jobs={jobs}")
|
66
70
|
if schemas is not None:
|
@@ -136,6 +140,7 @@ async def pg_restore(
|
|
136
140
|
/,
|
137
141
|
*,
|
138
142
|
database: str | None = None,
|
143
|
+
docker: str | None = None,
|
139
144
|
data_only: bool = False,
|
140
145
|
jobs: int | None = None,
|
141
146
|
schemas: MaybeListStr | None = None,
|
@@ -157,7 +162,10 @@ async def pg_restore(
|
|
157
162
|
raise _PGRestoreHostError(url=url)
|
158
163
|
if url.port is None:
|
159
164
|
raise _PGRestorePortError(url=url)
|
160
|
-
parts: list[str] = [
|
165
|
+
parts: list[str] = []
|
166
|
+
if docker is not None:
|
167
|
+
parts.extend(["docker", "exec", "-it", docker])
|
168
|
+
parts.extend([
|
161
169
|
"pg_restore",
|
162
170
|
# general options
|
163
171
|
f"--dbname={database_use}",
|
@@ -171,7 +179,7 @@ async def pg_restore(
|
|
171
179
|
f"--host={url.host}",
|
172
180
|
f"--port={url.port}",
|
173
181
|
"--no-password",
|
174
|
-
]
|
182
|
+
])
|
175
183
|
if data_only:
|
176
184
|
parts.append("--data-only")
|
177
185
|
else:
|
File without changes
|
File without changes
|
File without changes
|