remote-run-everything 2.0.9__py3-none-any.whl → 2.1.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.
- remote_run_everything/db/crude_duck.py +1 -1
- remote_run_everything/tools/common.py +4 -12
- remote_run_everything/tools/common1.py +5 -3
- remote_run_everything/tools/crc16.py +64 -0
- {remote_run_everything-2.0.9.dist-info → remote_run_everything-2.1.1.dist-info}/METADATA +17 -2
- {remote_run_everything-2.0.9.dist-info → remote_run_everything-2.1.1.dist-info}/RECORD +9 -8
- {remote_run_everything-2.0.9.dist-info → remote_run_everything-2.1.1.dist-info}/WHEEL +1 -1
- {remote_run_everything-2.0.9.dist-info → remote_run_everything-2.1.1.dist-info}/licenses/LICENSE +0 -0
- {remote_run_everything-2.0.9.dist-info → remote_run_everything-2.1.1.dist-info}/top_level.txt +0 -0
|
@@ -100,20 +100,12 @@ class Common(Common1):
|
|
|
100
100
|
zeros = "".join(l)
|
|
101
101
|
return f"{zeros}{d}"
|
|
102
102
|
|
|
103
|
-
def
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return "".join(tu)
|
|
107
|
-
|
|
108
|
-
def ascii2int(self,l,big):
|
|
109
|
-
s=self.ascii2hex(l)
|
|
110
|
-
b = bytes.fromhex(s)
|
|
111
|
-
if big:
|
|
112
|
-
return int.from_bytes(b, byteorder='big')
|
|
113
|
-
return int.from_bytes(b, byteorder='little')
|
|
103
|
+
def ascii2int(self,l,big_little,signed):
|
|
104
|
+
b = bytearray(l)
|
|
105
|
+
return int.from_bytes(b, byteorder=big_little,signed=signed)
|
|
114
106
|
|
|
115
107
|
def ascii2float(self,l,big):
|
|
116
|
-
s=
|
|
108
|
+
s=bytearray(l).hex()
|
|
117
109
|
if big:
|
|
118
110
|
return struct.unpack('>f', bytes.fromhex(s))[0]
|
|
119
111
|
return struct.unpack('<f', bytes.fromhex(s))[0]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import jinja2, os,base64,struct, glob, arrow, uuid, hashlib
|
|
2
|
-
|
|
2
|
+
from remote_run_everything.tools.crc16 import *
|
|
3
3
|
|
|
4
4
|
class Common1:
|
|
5
5
|
|
|
@@ -16,9 +16,11 @@ class Common1:
|
|
|
16
16
|
hex_string = hashlib.md5(s.encode("UTF-8")).hexdigest()
|
|
17
17
|
return str(uuid.UUID(hex=hex_string))
|
|
18
18
|
|
|
19
|
+
def add_crc16(self,package: bytes) -> bytes:
|
|
20
|
+
return add_crc16(package)
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
def check_crc16(self,package: bytes) -> bool:
|
|
23
|
+
return check_crc16(package)
|
|
22
24
|
|
|
23
25
|
|
|
24
26
|
if __name__ == '__main__':
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# coding=utf8
|
|
2
|
+
|
|
3
|
+
LOW_BYTES = b'\
|
|
4
|
+
\x00\xC0\xC1\x01\xC3\x03\x02\xC2\xC6\x06\x07\xC7\x05\xC5\xC4\x04\
|
|
5
|
+
\xCC\x0C\x0D\xCD\x0F\xCF\xCE\x0E\x0A\xCA\xCB\x0B\xC9\x09\x08\xC8\
|
|
6
|
+
\xD8\x18\x19\xD9\x1B\xDB\xDA\x1A\x1E\xDE\xDF\x1F\xDD\x1D\x1C\xDC\
|
|
7
|
+
\x14\xD4\xD5\x15\xD7\x17\x16\xD6\xD2\x12\x13\xD3\x11\xD1\xD0\x10\
|
|
8
|
+
\xF0\x30\x31\xF1\x33\xF3\xF2\x32\x36\xF6\xF7\x37\xF5\x35\x34\xF4\
|
|
9
|
+
\x3C\xFC\xFD\x3D\xFF\x3F\x3E\xFE\xFA\x3A\x3B\xFB\x39\xF9\xF8\x38\
|
|
10
|
+
\x28\xE8\xE9\x29\xEB\x2B\x2A\xEA\xEE\x2E\x2F\xEF\x2D\xED\xEC\x2C\
|
|
11
|
+
\xE4\x24\x25\xE5\x27\xE7\xE6\x26\x22\xE2\xE3\x23\xE1\x21\x20\xE0\
|
|
12
|
+
\xA0\x60\x61\xA1\x63\xA3\xA2\x62\x66\xA6\xA7\x67\xA5\x65\x64\xA4\
|
|
13
|
+
\x6C\xAC\xAD\x6D\xAF\x6F\x6E\xAE\xAA\x6A\x6B\xAB\x69\xA9\xA8\x68\
|
|
14
|
+
\x78\xB8\xB9\x79\xBB\x7B\x7A\xBA\xBE\x7E\x7F\xBF\x7D\xBD\xBC\x7C\
|
|
15
|
+
\xB4\x74\x75\xB5\x77\xB7\xB6\x76\x72\xB2\xB3\x73\xB1\x71\x70\xB0\
|
|
16
|
+
\x50\x90\x91\x51\x93\x53\x52\x92\x96\x56\x57\x97\x55\x95\x94\x54\
|
|
17
|
+
\x9C\x5C\x5D\x9D\x5F\x9F\x9E\x5E\x5A\x9A\x9B\x5B\x99\x59\x58\x98\
|
|
18
|
+
\x88\x48\x49\x89\x4B\x8B\x8A\x4A\x4E\x8E\x8F\x4F\x8D\x4D\x4C\x8C\
|
|
19
|
+
\x44\x84\x85\x45\x87\x47\x46\x86\x82\x42\x43\x83\x41\x81\x80\x40'
|
|
20
|
+
|
|
21
|
+
HIGH_BYTES = b'\
|
|
22
|
+
\x00\xC1\x81\x40\x01\xC0\x80\x41\x01\xC0\x80\x41\x00\xC1\x81\x40\
|
|
23
|
+
\x01\xC0\x80\x41\x00\xC1\x81\x40\x00\xC1\x81\x40\x01\xC0\x80\x41\
|
|
24
|
+
\x01\xC0\x80\x41\x00\xC1\x81\x40\x00\xC1\x81\x40\x01\xC0\x80\x41\
|
|
25
|
+
\x00\xC1\x81\x40\x01\xC0\x80\x41\x01\xC0\x80\x41\x00\xC1\x81\x40\
|
|
26
|
+
\x01\xC0\x80\x41\x00\xC1\x81\x40\x00\xC1\x81\x40\x01\xC0\x80\x41\
|
|
27
|
+
\x00\xC1\x81\x40\x01\xC0\x80\x41\x01\xC0\x80\x41\x00\xC1\x81\x40\
|
|
28
|
+
\x00\xC1\x81\x40\x01\xC0\x80\x41\x01\xC0\x80\x41\x00\xC1\x81\x40\
|
|
29
|
+
\x01\xC0\x80\x41\x00\xC1\x81\x40\x00\xC1\x81\x40\x01\xC0\x80\x41\
|
|
30
|
+
\x01\xC0\x80\x41\x00\xC1\x81\x40\x00\xC1\x81\x40\x01\xC0\x80\x41\
|
|
31
|
+
\x00\xC1\x81\x40\x01\xC0\x80\x41\x01\xC0\x80\x41\x00\xC1\x81\x40\
|
|
32
|
+
\x00\xC1\x81\x40\x01\xC0\x80\x41\x01\xC0\x80\x41\x00\xC1\x81\x40\
|
|
33
|
+
\x01\xC0\x80\x41\x00\xC1\x81\x40\x00\xC1\x81\x40\x01\xC0\x80\x41\
|
|
34
|
+
\x00\xC1\x81\x40\x01\xC0\x80\x41\x01\xC0\x80\x41\x00\xC1\x81\x40\
|
|
35
|
+
\x01\xC0\x80\x41\x00\xC1\x81\x40\x00\xC1\x81\x40\x01\xC0\x80\x41\
|
|
36
|
+
\x01\xC0\x80\x41\x00\xC1\x81\x40\x00\xC1\x81\x40\x01\xC0\x80\x41\
|
|
37
|
+
\x00\xC1\x81\x40\x01\xC0\x80\x41\x01\xC0\x80\x41\x00\xC1\x81\x40'
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def crc16(data: bytes) -> bytes:
|
|
41
|
+
"""Calculate CRC-16 for Modbus."""
|
|
42
|
+
crc_high = 0xFF
|
|
43
|
+
crc_low = 0xFF
|
|
44
|
+
|
|
45
|
+
for byte in data:
|
|
46
|
+
index = crc_high ^ int(byte)
|
|
47
|
+
crc_high = crc_low ^ HIGH_BYTES[index]
|
|
48
|
+
crc_low = LOW_BYTES[index]
|
|
49
|
+
|
|
50
|
+
return bytes([crc_high, crc_low])
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def add_crc16(package: bytes) -> bytes:
|
|
54
|
+
"""Add CRC-16 to bytes package."""
|
|
55
|
+
return package + crc16(package)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def check_crc16(package: bytes) -> bool:
|
|
59
|
+
"""Validate signed bytes package."""
|
|
60
|
+
return crc16(package) == b'\x00\x00'
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
if __name__ == "__main__":
|
|
64
|
+
pass
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: remote_run_everything
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Deploy Tools
|
|
5
5
|
Author-email: Wang Qi <wangmarkqi@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -8,9 +8,24 @@ Project-URL: Homepage, https://github.com/wangmarkqi/remote_run_everything
|
|
|
8
8
|
Project-URL: Issues, https://github.com/wangmarkqi/remote_run_everything/issues
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
+
Requires-Dist: setuptools>=40.8.0
|
|
15
|
+
Requires-Dist: wheel
|
|
16
|
+
Requires-Dist: numpy
|
|
17
|
+
Requires-Dist: sqlalchemy
|
|
18
|
+
Requires-Dist: arrow
|
|
19
|
+
Requires-Dist: duckdb
|
|
20
|
+
Requires-Dist: requests
|
|
21
|
+
Requires-Dist: paramiko
|
|
22
|
+
Requires-Dist: pymysql
|
|
23
|
+
Requires-Dist: psycopg2-binary
|
|
24
|
+
Requires-Dist: pandas
|
|
25
|
+
Requires-Dist: jinja2
|
|
26
|
+
Requires-Dist: pymongo
|
|
27
|
+
Requires-Dist: twine
|
|
28
|
+
Requires-Dist: build
|
|
14
29
|
Dynamic: license-file
|
|
15
30
|
|
|
16
31
|
# remote_run_everthing 各类实用代码集合封装
|
|
@@ -7,7 +7,7 @@ remote_run_everything/binocular/relative_pos.py,sha256=FX6pwXgK_JViPa1cjbHOYEYG3
|
|
|
7
7
|
remote_run_everything/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
remote_run_everything/db/backup.py,sha256=_mDUNQo1q6Gc75-diwadrooZsdV89KGG9mIcS4rmcBQ,1152
|
|
9
9
|
remote_run_everything/db/crud_sqlalchemy.py,sha256=cDyDGHwE-1TUBZrXMVDTjIa4Z0ZUQvM9m9sk-eIwaSM,5192
|
|
10
|
-
remote_run_everything/db/crude_duck.py,sha256=
|
|
10
|
+
remote_run_everything/db/crude_duck.py,sha256=qO4Giwmgbgmu7VClL5gueItumFG8pPMA0ZbjWGmd_CI,4369
|
|
11
11
|
remote_run_everything/db/kv_store.py,sha256=Df2Lp2l5ip0YQuTdVnlQbkZT_Sz01j9D5bJ8PYaSFRY,3357
|
|
12
12
|
remote_run_everything/deploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
remote_run_everything/deploy/by_http.py,sha256=QWL3XqLTbp9O2WadPX59uR1fGJdgd9xzg1Pv8CuxfbQ,2661
|
|
@@ -21,14 +21,15 @@ remote_run_everything/nosql/no_sql_mysql.py,sha256=agpXc5UcevN_uojexD9pNG6xAR099
|
|
|
21
21
|
remote_run_everything/nosql/no_sql_pg.py,sha256=XCrEnHKp5RVHPOyPOMICY2PnvNMkkIIDijTVKjk-ENc,2209
|
|
22
22
|
remote_run_everything/nosql/no_sql_tool.py,sha256=xRu7vsDgr3JQNSo6CLNTtNNxlg4fl-Q7_vw4y9lklWI,2590
|
|
23
23
|
remote_run_everything/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
|
-
remote_run_everything/tools/common.py,sha256=
|
|
25
|
-
remote_run_everything/tools/common1.py,sha256=
|
|
24
|
+
remote_run_everything/tools/common.py,sha256=HQD1m8_jbA_RLRmnjPvWYeVUbDl_KtkfkQwpia8jlbA,4166
|
|
25
|
+
remote_run_everything/tools/common1.py,sha256=zK7hVufrVfSkgtUgBDrBfEmIFtA5VefwYVLyxCt0u08,792
|
|
26
|
+
remote_run_everything/tools/crc16.py,sha256=PG24zWESN3MdtBbEfdiwDvhuvN3a-sZjOB8yU69zQPg,2797
|
|
26
27
|
remote_run_everything/tools/decorators.py,sha256=SIacNAs7afgkU0D09J-s-YscCVnxSG8Qj9vSL4VzCHw,1988
|
|
27
28
|
remote_run_everything/tools/sqlacodegen_go_struct.py,sha256=0xWJVCjFyEF2VjC1aGo6DmIqEQQ0Q46CfBAb9FSCUuE,3237
|
|
28
29
|
remote_run_everything/vsconf/conf_txt.py,sha256=nhFuKLlts-sCIBmfr0IKv1pP-qPUvQQrsRRg21q5Gd4,2418
|
|
29
30
|
remote_run_everything/vsconf/core.py,sha256=HmSEzXjGPY7R64rwfAV024YxMHwmBkLin6lGace4U0M,833
|
|
30
|
-
remote_run_everything-2.
|
|
31
|
-
remote_run_everything-2.
|
|
32
|
-
remote_run_everything-2.
|
|
33
|
-
remote_run_everything-2.
|
|
34
|
-
remote_run_everything-2.
|
|
31
|
+
remote_run_everything-2.1.1.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
|
|
32
|
+
remote_run_everything-2.1.1.dist-info/METADATA,sha256=TQinRk_es5s7JwmrY4UlzU7nUaAy2b8d439j6RxRYCk,4471
|
|
33
|
+
remote_run_everything-2.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
34
|
+
remote_run_everything-2.1.1.dist-info/top_level.txt,sha256=1TUcAqPgSwiVBqUHz-1pZFXvRpr9cudEYlmfw_mztRY,22
|
|
35
|
+
remote_run_everything-2.1.1.dist-info/RECORD,,
|
{remote_run_everything-2.0.9.dist-info → remote_run_everything-2.1.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{remote_run_everything-2.0.9.dist-info → remote_run_everything-2.1.1.dist-info}/top_level.txt
RENAMED
|
File without changes
|