reykit 1.1.1__py3-none-any.whl → 1.1.4__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.
- reykit/__init__.py +0 -6
- reykit/rsystem.py +28 -16
- reykit/rtime.py +11 -4
- reykit-1.1.4.dist-info/METADATA +44 -0
- {reykit-1.1.1.dist-info → reykit-1.1.4.dist-info}/RECORD +7 -15
- {reykit-1.1.1.dist-info → reykit-1.1.4.dist-info}/WHEEL +1 -2
- reykit-1.1.4.dist-info/licenses/LICENSE +7 -0
- reydb/__init__.py +0 -25
- reydb/rall.py +0 -17
- reydb/rbuild.py +0 -1235
- reydb/rconnection.py +0 -2276
- reydb/rexecute.py +0 -350
- reydb/rfile.py +0 -416
- reydb/rinformation.py +0 -503
- reydb/rparameter.py +0 -243
- reykit-1.1.1.dist-info/METADATA +0 -29
- reykit-1.1.1.dist-info/top_level.txt +0 -1
reykit/__init__.py
CHANGED
reykit/rsystem.py
CHANGED
@@ -208,7 +208,13 @@ def del_modules(path: str) -> list[str]:
|
|
208
208
|
return deleted_dict
|
209
209
|
|
210
210
|
|
211
|
-
|
211
|
+
@overload
|
212
|
+
def dos_command(command: str | Iterable[str], read: False = False) -> None: ...
|
213
|
+
|
214
|
+
@overload
|
215
|
+
def dos_command(command: str | Iterable[str], read: True = False) -> str: ...
|
216
|
+
|
217
|
+
def dos_command(command: str | Iterable[str], read: bool = False) -> str | None:
|
212
218
|
"""
|
213
219
|
Execute DOS command.
|
214
220
|
|
@@ -218,26 +224,22 @@ def dos_command(command: str | Iterable[str]) -> str:
|
|
218
224
|
- `str`: Use this command.
|
219
225
|
- `Iterable[str]`: Join strings with space as command.
|
220
226
|
When space in the string, automatic add quotation mark (e.g., ['echo', 'a b'] -> 'echo 'a b'').
|
227
|
+
read : Whether read command output, will block.
|
221
228
|
|
222
229
|
Returns
|
223
230
|
-------
|
224
|
-
Command standard output.
|
231
|
+
Command standard output or None.
|
225
232
|
"""
|
226
233
|
|
227
234
|
# Execute.
|
228
235
|
popen = Popen(command, shell=True, stdout=PIPE, stderr=PIPE)
|
229
236
|
|
230
|
-
#
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
throw(value=error)
|
235
|
-
|
236
|
-
# Standard output.
|
237
|
-
output_bytes: bytes = popen.stdout.read()
|
238
|
-
output = output_bytes.decode('GBK')
|
237
|
+
# Output.
|
238
|
+
if read:
|
239
|
+
output_bytes: bytes = popen.stdout.read()
|
240
|
+
output = output_bytes.decode('GBK')
|
239
241
|
|
240
|
-
|
242
|
+
return output
|
241
243
|
|
242
244
|
|
243
245
|
def dos_command_var(*vars: Any) -> list[Any]:
|
@@ -1265,6 +1267,10 @@ def popup_ask(
|
|
1265
1267
|
- `Literal['yes_no_cancel']`: Buttons are `yes` and `no` and `cancel`.
|
1266
1268
|
message : Ask box content.
|
1267
1269
|
title : Ask box title.
|
1270
|
+
|
1271
|
+
Returns
|
1272
|
+
-------
|
1273
|
+
Ask result.
|
1268
1274
|
"""
|
1269
1275
|
|
1270
1276
|
# Pop up.
|
@@ -1296,7 +1302,7 @@ def popup_select(
|
|
1296
1302
|
init_folder : str | None = None,
|
1297
1303
|
init_file : str | None = None,
|
1298
1304
|
filter_file : list[tuple[str, str | list[str]]] | None = None
|
1299
|
-
) -> str: ...
|
1305
|
+
) -> str | None: ...
|
1300
1306
|
|
1301
1307
|
@overload
|
1302
1308
|
def popup_select(
|
@@ -1305,14 +1311,14 @@ def popup_select(
|
|
1305
1311
|
init_folder : str | None = None,
|
1306
1312
|
init_file : str | None = None,
|
1307
1313
|
filter_file : list[tuple[str, str | list[str]]] | None = None
|
1308
|
-
) -> tuple[str, ...]: ...
|
1314
|
+
) -> tuple[str, ...] | None: ...
|
1309
1315
|
|
1310
1316
|
@overload
|
1311
1317
|
def popup_select(
|
1312
1318
|
style: Literal['folder'] = 'file',
|
1313
1319
|
title : str | None = None,
|
1314
1320
|
init_folder : str | None = None
|
1315
|
-
) -> str: ...
|
1321
|
+
) -> str | None: ...
|
1316
1322
|
|
1317
1323
|
def popup_select(
|
1318
1324
|
style: Literal['file', 'files', 'folder', 'save'] = 'file',
|
@@ -1320,7 +1326,7 @@ def popup_select(
|
|
1320
1326
|
init_folder : str | None = None,
|
1321
1327
|
init_file : str | None = None,
|
1322
1328
|
filter_file : list[tuple[str, str | list[str]]] | None = None
|
1323
|
-
) -> str | tuple[str, ...]:
|
1329
|
+
) -> str | tuple[str, ...] | None:
|
1324
1330
|
"""
|
1325
1331
|
Pop up system select box.
|
1326
1332
|
|
@@ -1337,6 +1343,11 @@ def popup_select(
|
|
1337
1343
|
filter_file : Filter file.
|
1338
1344
|
- `tuple[str, str]`: Filter name and filter pattern.
|
1339
1345
|
- `tuple[str, list[str]]`: Filter name and multiple filter patterns (or).
|
1346
|
+
|
1347
|
+
Returns
|
1348
|
+
-------
|
1349
|
+
File or folder path.
|
1350
|
+
- `None`: Close select box.
|
1340
1351
|
"""
|
1341
1352
|
|
1342
1353
|
# Pop up.
|
@@ -1370,5 +1381,6 @@ def popup_select(
|
|
1370
1381
|
method = tkinter_asksaveasfilename
|
1371
1382
|
|
1372
1383
|
path = method(**kwargs)
|
1384
|
+
path = path or None
|
1373
1385
|
|
1374
1386
|
return path
|
reykit/rtime.py
CHANGED
@@ -433,10 +433,11 @@ def wait(
|
|
433
433
|
*args: Any,
|
434
434
|
_interval: float = 1,
|
435
435
|
_timeout: float | None = None,
|
436
|
+
_raising: bool = True,
|
436
437
|
**kwargs: Any
|
437
|
-
) -> float:
|
438
|
+
) -> float | None:
|
438
439
|
"""
|
439
|
-
Wait success
|
440
|
+
Wait success.
|
440
441
|
|
441
442
|
Parameters
|
442
443
|
----------
|
@@ -446,11 +447,12 @@ def wait(
|
|
446
447
|
_timeout : Timeout seconds, timeout throw exception.
|
447
448
|
- `None`: Infinite time.
|
448
449
|
- `float`: Use this time.
|
450
|
+
_raising : When timeout, whether throw exception, otherwise return None.
|
449
451
|
kwargs : Keyword arguments of decorated function.
|
450
452
|
|
451
453
|
Returns
|
452
454
|
-------
|
453
|
-
Total spend seconds.
|
455
|
+
Total spend seconds or None.
|
454
456
|
"""
|
455
457
|
|
456
458
|
# Set parameter.
|
@@ -477,7 +479,12 @@ def wait(
|
|
477
479
|
## Timeout.
|
478
480
|
rtm()
|
479
481
|
if rtm.total_spend > _timeout:
|
480
|
-
|
482
|
+
|
483
|
+
### Throw exception.
|
484
|
+
if _raising:
|
485
|
+
throw(TimeoutError, _timeout)
|
486
|
+
|
487
|
+
return
|
481
488
|
|
482
489
|
## Sleep.
|
483
490
|
sleep(_interval)
|
@@ -0,0 +1,44 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: reykit
|
3
|
+
Version: 1.1.4
|
4
|
+
Summary: Rey's kit method set.
|
5
|
+
Project-URL: homepage, https://github.com/reyxbo/reykit/
|
6
|
+
Author-email: Rey <reyxbo@163.com>
|
7
|
+
License: Copyright 2025 ReyXBo
|
8
|
+
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
14
|
+
License-File: LICENSE
|
15
|
+
Keywords: kit,rey,reyxbo,tool,tools
|
16
|
+
Requires-Python: >=3.12
|
17
|
+
Requires-Dist: aiohttp
|
18
|
+
Requires-Dist: apscheduler
|
19
|
+
Requires-Dist: captcha
|
20
|
+
Requires-Dist: concurrent-log-handler
|
21
|
+
Requires-Dist: filetype
|
22
|
+
Requires-Dist: pandas
|
23
|
+
Requires-Dist: pdfplumber
|
24
|
+
Requires-Dist: pillow
|
25
|
+
Requires-Dist: psutil
|
26
|
+
Requires-Dist: pymem
|
27
|
+
Requires-Dist: python-docx
|
28
|
+
Requires-Dist: pyzbar
|
29
|
+
Requires-Dist: qrcode
|
30
|
+
Requires-Dist: requests
|
31
|
+
Requires-Dist: tqdm
|
32
|
+
Requires-Dist: urwid
|
33
|
+
Requires-Dist: varname
|
34
|
+
Description-Content-Type: text/markdown
|
35
|
+
|
36
|
+
# reykit
|
37
|
+
|
38
|
+
> Rey's kit method set.
|
39
|
+
|
40
|
+
## Install
|
41
|
+
|
42
|
+
```
|
43
|
+
pip install reykit
|
44
|
+
```
|
@@ -1,12 +1,4 @@
|
|
1
|
-
|
2
|
-
reydb/rall.py,sha256=B1-E7TMMLOay28T-nm9rqWUvDQDPjwFNAhL-VzR_QAg,319
|
3
|
-
reydb/rbuild.py,sha256=rc-Oa2PydiK0gKueBkaIc_ffAa6PqLcXRGR75wpPL1c,34593
|
4
|
-
reydb/rconnection.py,sha256=MLRHXNCWdIs3gIPDPQHSbCqcTuEee3lusJoQlo_Azjg,66670
|
5
|
-
reydb/rexecute.py,sha256=RKl49x992c7AMF0TisMGJS3Yp6H40mIvG2DTOWGX-0Q,9435
|
6
|
-
reydb/rfile.py,sha256=mH6_14WDf-WNl0VPDnw3tKg5bIHR9g6X-rWWsZWlrGw,11481
|
7
|
-
reydb/rinformation.py,sha256=AVmilR-uRfN95h_mbEnlcVr6IpbDGYiuGG1n-I4J9gM,13044
|
8
|
-
reydb/rparameter.py,sha256=DCr-Vf8QRi4o2Bjplx7UskcDjQ3vDQN8IGTSxYMDK2M,5174
|
9
|
-
reykit/__init__.py,sha256=9D3r5CdA4Uo0dlFvLEq1db0UqfpohMNA-lDHpK4Y48U,917
|
1
|
+
reykit/__init__.py,sha256=QwnhdUDSXgjXJQ4ClaeP9oKXUXyQOPj5sApwGCDrILc,848
|
10
2
|
reykit/rall.py,sha256=mOFwHXZ4-BOkJ5Ptbm6lQc2zwNf_VqcqM6AYYnYPfoo,672
|
11
3
|
reykit/rcomm.py,sha256=LgSLrpUokOgdRMYwuZj6JNvxDyvENwsiOd6ZHo67HBg,11444
|
12
4
|
reykit/rdata.py,sha256=d5zO9dQotDGoXxNh1TvEZdIfacaW55yeb79r0bbgj0k,8470
|
@@ -22,17 +14,17 @@ reykit/rrandom.py,sha256=fMeorpkjWAAtjD2oZCux3tpYuD2RRoBSkWI0M6NPM5Q,9102
|
|
22
14
|
reykit/rregex.py,sha256=XTlnDLior8yyncFdrTr9FsVlBcqMXvsWRfpmvQS-BR8,6089
|
23
15
|
reykit/rschedule.py,sha256=7EH_6TdEhwV-T6YyBEGYEcy85I1vTSNutDci-e_veTY,5796
|
24
16
|
reykit/rstdout.py,sha256=vSvD4QjYybNiGnowWLXRU6q1u9ERPjr8YTXgq82eYDU,9648
|
25
|
-
reykit/rsystem.py,sha256=
|
17
|
+
reykit/rsystem.py,sha256=8goz-IL26EpVSDgDg47Qe3U10vhze4modHIhR2dpmYI,34651
|
26
18
|
reykit/rtable.py,sha256=gXszf_9DE_5SMdNcxMX-xd4IpHGQVjGsN3NQIm7wVGY,12055
|
27
19
|
reykit/rtext.py,sha256=whaKpVkd36yYVtCmZ1ptp_TVRL1v3f7Jab0vPXC8wXY,11089
|
28
|
-
reykit/rtime.py,sha256=
|
20
|
+
reykit/rtime.py,sha256=nye9VIpFiAVL4Dg3ILxotVxHyXOigg_YJIZUlKITsq8,17176
|
29
21
|
reykit/rtype.py,sha256=HQFllZjKHPnGYLS-zTwC948Rt0HVsGY12eObjwFfOSo,1962
|
30
22
|
reykit/rwrap.py,sha256=AJBYTDLHLGlMSiGIKoVkCsQk-Y4nDHWWFVCdnz5Bwdk,15222
|
31
23
|
reykit/rzip.py,sha256=i6KkmeSWCnq025d-O1mbuCYezNRUhyY9OGVK0CRlNAM,3522
|
32
24
|
reykit/rdll/__init__.py,sha256=vM9V7wSNno-WH9RrxgHTIgCkQm8LmBFoLFO8z7qovNo,306
|
33
25
|
reykit/rdll/rdll_inject.py,sha256=bETl8tywtN1OiQudbA21u6GwBM_bqVX7jbiisNj_JBg,645
|
34
26
|
reykit/rdll/rdll_inject_core.py,sha256=Trgh_pdJs_Lw-Y-0Kkn8kHr4BnilM9dBKnHnX25T_pM,5092
|
35
|
-
reykit-1.1.
|
36
|
-
reykit-1.1.
|
37
|
-
reykit-1.1.
|
38
|
-
reykit-1.1.
|
27
|
+
reykit-1.1.4.dist-info/METADATA,sha256=Y41lIpSdEMy8NsPp8tA4YiqYMy3MrHPAN-5qQCRXkCY,1888
|
28
|
+
reykit-1.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
29
|
+
reykit-1.1.4.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
30
|
+
reykit-1.1.4.dist-info/RECORD,,
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright 2025 ReyXBo
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
reydb/__init__.py
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# !/usr/bin/env python
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
|
4
|
-
"""
|
5
|
-
@Time : 2024-01-07 20:51:57
|
6
|
-
@Author : Rey
|
7
|
-
@Contact : reyxbo@163.com
|
8
|
-
@Explain : Rey's database method set.
|
9
|
-
|
10
|
-
Modules
|
11
|
-
-------
|
12
|
-
rall : All methods.
|
13
|
-
rbuild : Database build methods.
|
14
|
-
rdatabase : Database connection methods.
|
15
|
-
rexecute : Database execute methods.
|
16
|
-
rfile : Database file methods.
|
17
|
-
rinformation : Database information methods.
|
18
|
-
rparameter : Database parameter methods.
|
19
|
-
"""
|
20
|
-
|
21
|
-
|
22
|
-
from typing import Final
|
23
|
-
|
24
|
-
|
25
|
-
__version__: Final[str] = '1.0.1'
|
reydb/rall.py
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# !/usr/bin/env python
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
|
4
|
-
"""
|
5
|
-
@Time : 2024-01-07 20:50:02
|
6
|
-
@Author : Rey
|
7
|
-
@Contact : reyxbo@163.com
|
8
|
-
@Explain : All methods.
|
9
|
-
"""
|
10
|
-
|
11
|
-
|
12
|
-
from .rbuild import *
|
13
|
-
from .rconnection import *
|
14
|
-
from .rexecute import *
|
15
|
-
from .rfile import *
|
16
|
-
from .rinformation import *
|
17
|
-
from .rparameter import *
|