dycw-utilities 0.150.3__py3-none-any.whl → 0.150.5__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.150.3.dist-info → dycw_utilities-0.150.5.dist-info}/METADATA +2 -2
- {dycw_utilities-0.150.3.dist-info → dycw_utilities-0.150.5.dist-info}/RECORD +7 -7
- utilities/__init__.py +1 -1
- utilities/postgres.py +12 -2
- {dycw_utilities-0.150.3.dist-info → dycw_utilities-0.150.5.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.150.3.dist-info → dycw_utilities-0.150.5.dist-info}/entry_points.txt +0 -0
- {dycw_utilities-0.150.3.dist-info → dycw_utilities-0.150.5.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: dycw-utilities
|
3
|
-
Version: 0.150.
|
3
|
+
Version: 0.150.5
|
4
4
|
Author-email: Derek Wan <d.wan@icloud.com>
|
5
5
|
License-File: LICENSE
|
6
6
|
Requires-Python: >=3.12
|
@@ -12,7 +12,7 @@ Provides-Extra: logging
|
|
12
12
|
Requires-Dist: coloredlogs<15.1,>=15.0.1; extra == 'logging'
|
13
13
|
Provides-Extra: test
|
14
14
|
Requires-Dist: dycw-pytest-only<2.2,>=2.1.1; extra == 'test'
|
15
|
-
Requires-Dist: hypothesis<6.
|
15
|
+
Requires-Dist: hypothesis<6.137,>=6.136.0; extra == 'test'
|
16
16
|
Requires-Dist: pudb<2025.2,>=2025.1; extra == 'test'
|
17
17
|
Requires-Dist: pytest-asyncio<1.2,>=1.1.0; extra == 'test'
|
18
18
|
Requires-Dist: pytest-cov<6.3,>=6.2.1; extra == 'test'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
utilities/__init__.py,sha256=
|
1
|
+
utilities/__init__.py,sha256=bUqYM1l4xvK1gjZAVbO7pxaxuOGBb72bbQ2UpQ64GGA,60
|
2
2
|
utilities/altair.py,sha256=92E2lCdyHY4Zb-vCw6rEJIsWdKipuu-Tu2ab1ufUfAk,9079
|
3
3
|
utilities/asyncio.py,sha256=2m2a2C-Qgc6OHTTHL332-t66A7xDITt_SORT7a1DJWo,16792
|
4
4
|
utilities/atomicwrites.py,sha256=xcOWenTBRS0oat3kg7Sqe51AohNThMQ2ixPL7QCG8hw,5795
|
@@ -49,7 +49,7 @@ utilities/pickle.py,sha256=MBT2xZCsv0pH868IXLGKnlcqNx2IRVKYNpRcqiQQqxw,653
|
|
49
49
|
utilities/platform.py,sha256=Ue9LSxYvg9yUXGKuz5aZoy_qkUEXde-v6B09exgSctU,2813
|
50
50
|
utilities/polars.py,sha256=BgiDryAVOapi41ddfJqN0wYh_sDj8BNEYtPB36LaHdo,71824
|
51
51
|
utilities/polars_ols.py,sha256=Uc9V5kvlWZ5cU93lKZ-cfAKdVFFw81tqwLW9PxtUvMs,5618
|
52
|
-
utilities/postgres.py,sha256=
|
52
|
+
utilities/postgres.py,sha256=5xjcVlSFWerauTPTjbcFZPNihg-NfuHVh-XmGi4A3bg,13339
|
53
53
|
utilities/pottery.py,sha256=u0uvyGgYyujxftEMlsv6ppYTKQoVVjHt5jnVxxYz9s4,6596
|
54
54
|
utilities/pqdm.py,sha256=BTsYPtbKQWwX-iXF4qCkfPG7DPxIB54J989n83bXrIo,3092
|
55
55
|
utilities/psutil.py,sha256=KUlu4lrUw9Zg1V7ZGetpWpGb9DB8l_SSDWGbANFNCPU,2104
|
@@ -89,8 +89,8 @@ utilities/zoneinfo.py,sha256=oEH-nL3t4h9uawyZqWDtNtDAl6M-CLpLYGI_nI6DulM,1971
|
|
89
89
|
utilities/pytest_plugins/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
|
90
90
|
utilities/pytest_plugins/pytest_randomly.py,sha256=NXzCcGKbpgYouz5yehKb4jmxmi2SexKKpgF4M65bi10,414
|
91
91
|
utilities/pytest_plugins/pytest_regressions.py,sha256=Iwhfv_OJH7UCPZCfoh7ugZ2Xjqjil-BBBsOb8sDwiGI,1471
|
92
|
-
dycw_utilities-0.150.
|
93
|
-
dycw_utilities-0.150.
|
94
|
-
dycw_utilities-0.150.
|
95
|
-
dycw_utilities-0.150.
|
96
|
-
dycw_utilities-0.150.
|
92
|
+
dycw_utilities-0.150.5.dist-info/METADATA,sha256=qsGQOhEvj8sF7aWy2kL7CIfYue24Pr_HvOCmld2MbP0,1696
|
93
|
+
dycw_utilities-0.150.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
94
|
+
dycw_utilities-0.150.5.dist-info/entry_points.txt,sha256=BOD_SoDxwsfJYOLxhrSXhHP_T7iw-HXI9f2WVkzYxvQ,135
|
95
|
+
dycw_utilities-0.150.5.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
|
96
|
+
dycw_utilities-0.150.5.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/postgres.py
CHANGED
@@ -36,6 +36,7 @@ async def pg_dump(
|
|
36
36
|
jobs: int | None = None,
|
37
37
|
data_only: bool = False,
|
38
38
|
clean: bool = False,
|
39
|
+
create: bool = False,
|
39
40
|
schema: MaybeListStr | None = None,
|
40
41
|
schema_exc: MaybeListStr | None = None,
|
41
42
|
table: MaybeSequence[TableOrORMInstOrClass | str] | None = None,
|
@@ -57,6 +58,7 @@ async def pg_dump(
|
|
57
58
|
jobs=jobs,
|
58
59
|
data_only=data_only,
|
59
60
|
clean=clean,
|
61
|
+
create=create,
|
60
62
|
schema=schema,
|
61
63
|
schema_exc=schema_exc,
|
62
64
|
table=table,
|
@@ -106,6 +108,7 @@ def _build_pg_dump(
|
|
106
108
|
jobs: int | None = None,
|
107
109
|
data_only: bool = False,
|
108
110
|
clean: bool = False,
|
111
|
+
create: bool = False,
|
109
112
|
schema: MaybeListStr | None = None,
|
110
113
|
schema_exc: MaybeListStr | None = None,
|
111
114
|
table: MaybeSequence[TableOrORMInstOrClass | str] | None = None,
|
@@ -127,7 +130,6 @@ def _build_pg_dump(
|
|
127
130
|
# output options
|
128
131
|
*_resolve_data_only_and_clean(data_only=data_only, clean=clean),
|
129
132
|
"--large-objects",
|
130
|
-
"--create",
|
131
133
|
"--no-owner",
|
132
134
|
"--no-privileges",
|
133
135
|
# connection options
|
@@ -137,6 +139,8 @@ def _build_pg_dump(
|
|
137
139
|
]
|
138
140
|
if (format_ == "directory") and (jobs is not None):
|
139
141
|
parts.append(f"--jobs={jobs}")
|
142
|
+
if create:
|
143
|
+
parts.append("--create")
|
140
144
|
if schema is not None:
|
141
145
|
parts.extend([f"--schema={s}" for s in always_iterable(schema)])
|
142
146
|
if schema_exc is not None:
|
@@ -190,6 +194,7 @@ async def restore(
|
|
190
194
|
database: str | None = None,
|
191
195
|
data_only: bool = False,
|
192
196
|
clean: bool = False,
|
197
|
+
create: bool = False,
|
193
198
|
jobs: int | None = None,
|
194
199
|
schema: MaybeListStr | None = None,
|
195
200
|
schema_exc: MaybeListStr | None = None,
|
@@ -207,6 +212,7 @@ async def restore(
|
|
207
212
|
database=database,
|
208
213
|
data_only=data_only,
|
209
214
|
clean=clean,
|
215
|
+
create=create,
|
210
216
|
jobs=jobs,
|
211
217
|
schema=schema,
|
212
218
|
schema_exc=schema_exc,
|
@@ -255,6 +261,7 @@ def _build_pg_restore_or_psql(
|
|
255
261
|
database: str | None = None,
|
256
262
|
data_only: bool = False,
|
257
263
|
clean: bool = False,
|
264
|
+
create: bool = False,
|
258
265
|
jobs: int | None = None,
|
259
266
|
schema: MaybeListStr | None = None,
|
260
267
|
schema_exc: MaybeListStr | None = None,
|
@@ -271,6 +278,7 @@ def _build_pg_restore_or_psql(
|
|
271
278
|
database=database,
|
272
279
|
data_only=data_only,
|
273
280
|
clean=clean,
|
281
|
+
create=create,
|
274
282
|
jobs=jobs,
|
275
283
|
schemas=schema,
|
276
284
|
schemas_exc=schema_exc,
|
@@ -288,6 +296,7 @@ def _build_pg_restore(
|
|
288
296
|
database: str | None = None,
|
289
297
|
data_only: bool = False,
|
290
298
|
clean: bool = False,
|
299
|
+
create: bool = False,
|
291
300
|
jobs: int | None = None,
|
292
301
|
schemas: MaybeListStr | None = None,
|
293
302
|
schemas_exc: MaybeListStr | None = None,
|
@@ -305,7 +314,6 @@ def _build_pg_restore(
|
|
305
314
|
"--verbose",
|
306
315
|
# restore options
|
307
316
|
*_resolve_data_only_and_clean(data_only=data_only, clean=clean),
|
308
|
-
"--create",
|
309
317
|
"--exit-on-error",
|
310
318
|
"--no-owner",
|
311
319
|
"--no-privileges",
|
@@ -314,6 +322,8 @@ def _build_pg_restore(
|
|
314
322
|
f"--port={port}",
|
315
323
|
"--no-password",
|
316
324
|
]
|
325
|
+
if create:
|
326
|
+
parts.append("--create")
|
317
327
|
if jobs is not None:
|
318
328
|
parts.append(f"--jobs={jobs}")
|
319
329
|
if schemas is not None:
|
File without changes
|
File without changes
|
File without changes
|