solax-py-library 1.0.0.14__py3-none-any.whl → 1.0.0.16__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.
Files changed (29) hide show
  1. solax_py_library/__init__.py +1 -1
  2. solax_py_library/snap_shot/__init__.py +4 -4
  3. solax_py_library/snap_shot/address.py +299 -67
  4. solax_py_library/snap_shot/base_modbus.py +14 -14
  5. solax_py_library/snap_shot/core.py +249 -219
  6. solax_py_library/snap_shot/exceptions.py +6 -4
  7. solax_py_library/snap_shot/parser.py +226 -224
  8. solax_py_library/snap_shot/untils.py +20 -17
  9. solax_py_library/upload/__init__.py +3 -3
  10. solax_py_library/upload/api/__init__.py +3 -3
  11. solax_py_library/upload/api/service.py +24 -24
  12. solax_py_library/upload/core/__init__.py +3 -3
  13. solax_py_library/upload/core/data_adapter/__init__.py +5 -5
  14. solax_py_library/upload/core/data_adapter/base.py +9 -9
  15. solax_py_library/upload/core/data_adapter/csv.py +26 -26
  16. solax_py_library/upload/core/upload_service/__init__.py +15 -15
  17. solax_py_library/upload/core/upload_service/base.py +43 -43
  18. solax_py_library/upload/core/upload_service/ftp.py +97 -86
  19. solax_py_library/upload/errors/__init__.py +10 -10
  20. solax_py_library/upload/errors/base.py +10 -10
  21. solax_py_library/upload/errors/upload_error.py +21 -21
  22. solax_py_library/upload/test/test_ftp.py +81 -40
  23. solax_py_library/upload/types/__init__.py +11 -11
  24. solax_py_library/upload/types/client.py +19 -19
  25. solax_py_library/upload/types/ftp.py +37 -37
  26. {solax_py_library-1.0.0.14.dist-info → solax_py_library-1.0.0.16.dist-info}/METADATA +4 -4
  27. solax_py_library-1.0.0.16.dist-info/RECORD +29 -0
  28. {solax_py_library-1.0.0.14.dist-info → solax_py_library-1.0.0.16.dist-info}/WHEEL +1 -1
  29. solax_py_library-1.0.0.14.dist-info/RECORD +0 -29
@@ -1,37 +1,37 @@
1
- import os
2
- from enum import IntEnum
3
- from typing import Any, Optional
4
-
5
- from pydantic import BaseModel
6
-
7
-
8
- class FTPFileType(IntEnum):
9
- CSV = 1
10
-
11
- @classmethod
12
- def get_file_suffix(cls, value):
13
- return {
14
- FTPFileType.CSV: ".csv",
15
- }.get(value)
16
-
17
-
18
- class FTPData(BaseModel):
19
- file_type: FTPFileType
20
- file_name: str
21
- data: Any
22
-
23
- def build_full_path(self, remote_path) -> str:
24
- return os.path.join(remote_path, self.file_name)
25
-
26
-
27
- class FTPServiceConfig(BaseModel):
28
- host: str
29
- port: int
30
- user: Optional[str]
31
- password: Optional[str]
32
- remote_path: str
33
-
34
-
35
- class FTPParsedData(BaseModel):
36
- file_name: str
37
- file_path: str
1
+ import os
2
+ from enum import IntEnum
3
+ from typing import Any, Optional
4
+
5
+ from pydantic import BaseModel
6
+
7
+
8
+ class FTPFileType(IntEnum):
9
+ CSV = 1
10
+
11
+ @classmethod
12
+ def get_file_suffix(cls, value):
13
+ return {
14
+ FTPFileType.CSV: ".csv",
15
+ }.get(value)
16
+
17
+
18
+ class FTPData(BaseModel):
19
+ file_type: FTPFileType
20
+ file_name: str
21
+ data: Any
22
+
23
+ def build_full_path(self, remote_path) -> str:
24
+ return os.path.join(remote_path, self.file_name)
25
+
26
+
27
+ class FTPServiceConfig(BaseModel):
28
+ host: str
29
+ port: int
30
+ user: Optional[str]
31
+ password: Optional[str]
32
+ remote_path: str
33
+
34
+
35
+ class FTPParsedData(BaseModel):
36
+ file_name: str
37
+ file_path: str
@@ -1,9 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.1
2
2
  Name: solax-py-library
3
- Version: 1.0.0.14
3
+ Version: 1.0.0.16
4
4
  Summary: some common tool
5
- Author: x5m8944pjl
6
- Author-email: 371630856@qq.com
5
+ Author: shenlvyu
6
+ Author-email: 13296718439@163.com
7
7
  Requires-Python: >=3.8,<4.0
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Programming Language :: Python :: 3.8
@@ -0,0 +1,29 @@
1
+ solax_py_library/__init__.py,sha256=qihwuOWhDJufT29zzCp1aGWTLNRvTWZzEjgqWCTgCmQ,21
2
+ solax_py_library/snap_shot/__init__.py,sha256=HCjAo6p-V8rrWm-kylqZB2XPNJn64gzOeilJGlqMZOQ,96
3
+ solax_py_library/snap_shot/address.py,sha256=3ViMOe8AcT488FjfINZm2Gx2YJ-3C4iHt0ueweA-0l4,4698
4
+ solax_py_library/snap_shot/base_modbus.py,sha256=EdDSRvRC2a4IE_LGvjxGznqi6AX5x4O0_Wn1IkHzIpA,403
5
+ solax_py_library/snap_shot/core.py,sha256=_dHhkOX-ROcb3wlzP0e4DdPAaKFXjjjrBqVnOa6i4Zg,9846
6
+ solax_py_library/snap_shot/exceptions.py,sha256=q20RzO3T2PqQElKnPXCL7eqUx95Wh0aPbFtchDKnYs4,93
7
+ solax_py_library/snap_shot/parser.py,sha256=cr-5IoE5kgB5gIZBX8jxjmPnK_mmg0_Bju0pbVsnhKU,7633
8
+ solax_py_library/snap_shot/untils.py,sha256=oMb8yF0If-e_lqCpXc9zlia9C8pclge0PFn4hiWP9ug,616
9
+ solax_py_library/upload/__init__.py,sha256=M9vBP5Q1mD-hs-voqWNXtzLDKq1FBuFHSLw6a8WhP0E,85
10
+ solax_py_library/upload/api/__init__.py,sha256=ASShe-YQxP0aA3B_I8EmpWKXIdXPWvaANifrzlYrFEk,84
11
+ solax_py_library/upload/api/service.py,sha256=ubFepgkG4pQwFAH_f1JJ-mU8ZZrNf9zUMyQ_wy9QN7s,774
12
+ solax_py_library/upload/core/__init__.py,sha256=XMcnyDzCfsLwWaTAZt9-an7TuwYFqVNSt9W1_QRUrwA,89
13
+ solax_py_library/upload/core/data_adapter/__init__.py,sha256=9CXepLZSOjZMfNjyYKAWQCWZt353kTL_0tFBlIeUIOo,116
14
+ solax_py_library/upload/core/data_adapter/base.py,sha256=Va-SEe0eL3gobhNOnzHGkYBLIwf5RVawQdYRHHXg9g0,170
15
+ solax_py_library/upload/core/data_adapter/csv.py,sha256=8nlnV_43mMAR3re50MQJymzT5HYpZOo7eSeMsEfnEVE,861
16
+ solax_py_library/upload/core/upload_service/__init__.py,sha256=uA-UeH31rDNxByeZwvPhNFHPV_-J8JyCev8geuc---k,269
17
+ solax_py_library/upload/core/upload_service/base.py,sha256=dxCBVtPxDhN7oRTjnwnjtc2XAF4hyIz9HsYCJePlggg,912
18
+ solax_py_library/upload/core/upload_service/ftp.py,sha256=6T8jKgsKXX0Bu_wrGjeYzBnrT331fWy_y38msChqrNs,2923
19
+ solax_py_library/upload/errors/__init__.py,sha256=pVAcSOXvlsPJW3PjHLBOdbl7KvntiYmz7TP0XuRwZ_A,243
20
+ solax_py_library/upload/errors/base.py,sha256=T01ZrZHF25PWgCrOv76Vhg26hds3I1Yy8Kl2LZRKOxo,258
21
+ solax_py_library/upload/errors/upload_error.py,sha256=9pCZzR_y3-VkBWSs5w7mMHYFRJjzVosIcxi-5SO8N1U,409
22
+ solax_py_library/upload/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ solax_py_library/upload/test/test_ftp.py,sha256=tqc7Ag10PqgRewpMsBBG-mfezGK8lsxz3HbKOwQSORQ,2605
24
+ solax_py_library/upload/types/__init__.py,sha256=og9KBpYbcs36_S1izURj3vyHeuNOLJQrD9GpxK_JJaw,244
25
+ solax_py_library/upload/types/client.py,sha256=fG674_QEpOw3ibO171lcxJ0cz27yGR_sd3zgiyr4yuI,492
26
+ solax_py_library/upload/types/ftp.py,sha256=9kCeLB0g5Je19v4ifz8YYEsGOhJL1lKBO2C6V2VBndc,679
27
+ solax_py_library-1.0.0.16.dist-info/METADATA,sha256=irRVZ98ibeIBAfcpROjCKiyYR5D-KvBprRzPfuYQgR4,1790
28
+ solax_py_library-1.0.0.16.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
29
+ solax_py_library-1.0.0.16.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.1
2
+ Generator: poetry-core 1.9.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,29 +0,0 @@
1
- solax_py_library/__init__.py,sha256=zLUfOeLUGy1sFFu4tZI8cDlfuEATRZ3VcYywVhPLObE,35
2
- solax_py_library/snap_shot/__init__.py,sha256=kcu0XnVuMAHv2YBCJ5W8XAphUTrR3aeIqoJLVrMxiGM,100
3
- solax_py_library/snap_shot/address.py,sha256=T4za0U5My5K-0u42unze7g4Ue0qDsxgu-hy-4jZbXuU,4071
4
- solax_py_library/snap_shot/base_modbus.py,sha256=zbGD5IgLxvwPx0rNV_5Thybf7dwgFgA0j20rN0n9tpU,406
5
- solax_py_library/snap_shot/core.py,sha256=D4jaSCo35AOfq5lZEtNXV0OoRFMBx3747_4QeKPC9Xg,9830
6
- solax_py_library/snap_shot/exceptions.py,sha256=ky-i7TNy7fZVAJ2Z2sdGPTIYNQmxieYqKl_2bUnnwn0,95
7
- solax_py_library/snap_shot/parser.py,sha256=OqSorkrCYI69E-m4eAU8zmbkRM1BO5pKv5I9kDpgLV8,7866
8
- solax_py_library/snap_shot/untils.py,sha256=vVFq-3vcJeO4fShbl0BFZMXpXw_xCBQ2S2_xzdY9koU,628
9
- solax_py_library/upload/__init__.py,sha256=Ilou-M__XAp9eNs68Eoc8_xtRAiNaEOmwxFzLEr-DVg,88
10
- solax_py_library/upload/api/__init__.py,sha256=VHRXkLLQKsIeUi4T-osSsURmcJS6cM5rhhvUwF6aLG8,87
11
- solax_py_library/upload/api/service.py,sha256=kEl6aa1f92frRdTfF37U1Mxd0lBRXAn5gZNulQV_Eno,798
12
- solax_py_library/upload/core/__init__.py,sha256=LxE2LrHB9vfyGwb1YbxHfbeyfdOhlSZdXvDp2L2Jtvs,92
13
- solax_py_library/upload/core/data_adapter/__init__.py,sha256=AAt7SndlSM3_0iE9q7Uevg51PraUWgoFOgYg9XBKktM,121
14
- solax_py_library/upload/core/data_adapter/base.py,sha256=HoN9WVLzOjt-0lg7x0DR0H0Fflg7V97WJmtgBZeY37g,179
15
- solax_py_library/upload/core/data_adapter/csv.py,sha256=QaTjHw_aGZyEPUkr2AfBh5ITgRDE9dWN2d8sXh1xlZc,887
16
- solax_py_library/upload/core/upload_service/__init__.py,sha256=iVlmUxDNBroqA0yBGf4DnIt-3RMdBoUr2kxuP-z1Y_8,284
17
- solax_py_library/upload/core/upload_service/base.py,sha256=U4wyynOtE1dYT11nstPgbCjnEgknqzsk6wQqxfM1MC4,955
18
- solax_py_library/upload/core/upload_service/ftp.py,sha256=3ADAJlBLo8wLYmHn6pj_gw3S6vYnCdiSu3STEh4sfRg,2844
19
- solax_py_library/upload/errors/__init__.py,sha256=xw_PXnYZ5RFaCFXCAEMY5iLxjlRYQbLXrwOZn2sU86I,253
20
- solax_py_library/upload/errors/base.py,sha256=liM48E-yaHk-FseSP1Bc8BhV2gnIuO0_wfjTGL0Zxwo,268
21
- solax_py_library/upload/errors/upload_error.py,sha256=moPtHq49engj1R9e3CFunbJLg1z6GEGPI2CenhIvtRc,430
22
- solax_py_library/upload/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
- solax_py_library/upload/test/test_ftp.py,sha256=ROM5tlWdRvyxiKUIx72FAEqMcvSlHcw_sn9ovja-Yaw,1460
24
- solax_py_library/upload/types/__init__.py,sha256=mgfwypAgvWNfhLMOK-osoF6Nf5QSn-uB02MkaH4m5pY,255
25
- solax_py_library/upload/types/client.py,sha256=KqrwTRniunJCV6HjaXkZAYzFryYxXirmIWmfh5V93qI,511
26
- solax_py_library/upload/types/ftp.py,sha256=kgjB0DyUQCGLH2iZncMuuRWKrxhh1fBD_KTu_PeEPUE,716
27
- solax_py_library-1.0.0.14.dist-info/METADATA,sha256=Vn-1XV7VfX7dLOf5UEa39sc1xDHalzOapJKou5AwEdk,1789
28
- solax_py_library-1.0.0.14.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
29
- solax_py_library-1.0.0.14.dist-info/RECORD,,