solax-py-library 1.0.0.8__py3-none-any.whl → 1.0.0.9__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.
- solax_py_library/upload/core/upload_service/ftp.py +1 -1
- solax_py_library/upload/test/test_ftp.py +21 -19
- solax_py_library/upload/types/ftp.py +1 -1
- {solax_py_library-1.0.0.8.dist-info → solax_py_library-1.0.0.9.dist-info}/METADATA +2 -3
- {solax_py_library-1.0.0.8.dist-info → solax_py_library-1.0.0.9.dist-info}/RECORD +6 -6
- {solax_py_library-1.0.0.8.dist-info → solax_py_library-1.0.0.9.dist-info}/WHEEL +0 -0
@@ -55,7 +55,7 @@ class FTPUploadService(BaseUploadService):
|
|
55
55
|
print("Connection closed.")
|
56
56
|
|
57
57
|
def _parse(self, upload_data: FTPData) -> FTPParsedData:
|
58
|
-
if upload_data.file_type == FTPFileType.CSV
|
58
|
+
if upload_data.file_type == FTPFileType.CSV:
|
59
59
|
parsed_data = CSVDataAdapter.parse_data(upload_data.data)
|
60
60
|
else:
|
61
61
|
raise NotImplementedError
|
@@ -14,24 +14,26 @@ class FTPTest(unittest.TestCase):
|
|
14
14
|
"password": "sly402",
|
15
15
|
"remote_path": "/xixi",
|
16
16
|
}
|
17
|
-
asyncio.run(
|
18
|
-
|
19
|
-
configuration=ftp_config,
|
20
|
-
upload_data=UploadData(
|
17
|
+
asyncio.run(
|
18
|
+
upload(
|
21
19
|
upload_type=UploadType.FTP,
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
data=
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
20
|
+
configuration=ftp_config,
|
21
|
+
upload_data=UploadData(
|
22
|
+
upload_type=UploadType.FTP,
|
23
|
+
data=dict(
|
24
|
+
file_type=FTPFileType.CSV,
|
25
|
+
file_name="new_file",
|
26
|
+
data=[
|
27
|
+
{
|
28
|
+
"EMS1000序列号": "XMG11A011L",
|
29
|
+
"EMS1000本地时间": "2025-02-11 15:39:10",
|
30
|
+
"EMS1000版本号": "V007.11.1",
|
31
|
+
"电站所在国家和地区": None,
|
32
|
+
"电站所在当前时区": None,
|
33
|
+
"电站系统类型": None,
|
34
|
+
}
|
35
|
+
],
|
36
|
+
),
|
35
37
|
),
|
36
|
-
)
|
37
|
-
)
|
38
|
+
)
|
39
|
+
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: solax-py-library
|
3
|
-
Version: 1.0.0.
|
3
|
+
Version: 1.0.0.9
|
4
4
|
Summary: some common tool
|
5
5
|
Author: shenlvyu
|
6
6
|
Author-email: 13296718439@163.com
|
@@ -40,7 +40,7 @@ This package provide some general modules to help us can focus on the real proje
|
|
40
40
|
- upload: The module define the upload tool.It support the way by Ftp.
|
41
41
|
|
42
42
|
|
43
|
-
#### quick start
|
43
|
+
#### quick start
|
44
44
|
|
45
45
|
```python
|
46
46
|
await upload(
|
@@ -66,4 +66,3 @@ await upload(
|
|
66
66
|
)
|
67
67
|
```
|
68
68
|
|
69
|
-
|
@@ -8,15 +8,15 @@ solax_py_library/upload/core/data_adapter/base.py,sha256=Va-SEe0eL3gobhNOnzHGkYB
|
|
8
8
|
solax_py_library/upload/core/data_adapter/csv.py,sha256=8nlnV_43mMAR3re50MQJymzT5HYpZOo7eSeMsEfnEVE,861
|
9
9
|
solax_py_library/upload/core/upload_service/__init__.py,sha256=uA-UeH31rDNxByeZwvPhNFHPV_-J8JyCev8geuc---k,269
|
10
10
|
solax_py_library/upload/core/upload_service/base.py,sha256=dxCBVtPxDhN7oRTjnwnjtc2XAF4hyIz9HsYCJePlggg,912
|
11
|
-
solax_py_library/upload/core/upload_service/ftp.py,sha256=
|
11
|
+
solax_py_library/upload/core/upload_service/ftp.py,sha256=ZJqRpPrh0qOjmYW-7VykzevWioCqMnFyM4-Svju4nlI,2685
|
12
12
|
solax_py_library/upload/errors/__init__.py,sha256=pVAcSOXvlsPJW3PjHLBOdbl7KvntiYmz7TP0XuRwZ_A,243
|
13
13
|
solax_py_library/upload/errors/base.py,sha256=T01ZrZHF25PWgCrOv76Vhg26hds3I1Yy8Kl2LZRKOxo,258
|
14
14
|
solax_py_library/upload/errors/upload_error.py,sha256=9pCZzR_y3-VkBWSs5w7mMHYFRJjzVosIcxi-5SO8N1U,409
|
15
15
|
solax_py_library/upload/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
solax_py_library/upload/test/test_ftp.py,sha256=
|
16
|
+
solax_py_library/upload/test/test_ftp.py,sha256=frKyW8TydfL7WMLhnZVxTig08A-Gxv-hxPubdOsMhrM,1396
|
17
17
|
solax_py_library/upload/types/__init__.py,sha256=og9KBpYbcs36_S1izURj3vyHeuNOLJQrD9GpxK_JJaw,244
|
18
18
|
solax_py_library/upload/types/client.py,sha256=fG674_QEpOw3ibO171lcxJ0cz27yGR_sd3zgiyr4yuI,492
|
19
|
-
solax_py_library/upload/types/ftp.py,sha256=
|
20
|
-
solax_py_library-1.0.0.
|
21
|
-
solax_py_library-1.0.0.
|
22
|
-
solax_py_library-1.0.0.
|
19
|
+
solax_py_library/upload/types/ftp.py,sha256=OLaNGJHsDNmdGu-e3W-bFI3O7-jcTP4auH83_3IpaUQ,665
|
20
|
+
solax_py_library-1.0.0.9.dist-info/METADATA,sha256=DDYjCShCa47iwub8T-Rb9TGPC8uEuDoT1_6esn817Ck,1789
|
21
|
+
solax_py_library-1.0.0.9.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
22
|
+
solax_py_library-1.0.0.9.dist-info/RECORD,,
|
File without changes
|