solax-py-library 0.1.0.11__py3-none-any.whl → 0.1.0.12__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.
@@ -60,7 +60,8 @@ class FTPUploadService(BaseUploadService):
60
60
  else:
61
61
  raise NotImplementedError
62
62
  return FTPParsedData(
63
- file_name=upload_data.build_full_path(self.remote_path), data=parsed_data
63
+ file_name=upload_data.build_full_path(self.remote_path) + upload_data.file_type.get_file_suffix(),
64
+ data=parsed_data
64
65
  )
65
66
 
66
67
  def _upload(self, data: FTPParsedData):
@@ -8,6 +8,11 @@ from pydantic import BaseModel
8
8
  class FTPFileType(str, Enum):
9
9
  CSV = "CSV"
10
10
 
11
+ def get_file_suffix(self):
12
+ return {
13
+ FTPFileType.CSV: ".csv",
14
+ }.get(self)
15
+
11
16
 
12
17
  class FTPData(BaseModel):
13
18
  file_type: FTPFileType
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: solax-py-library
3
- Version: 0.1.0.11
3
+ Version: 0.1.0.12
4
4
  Summary: some common tool
5
5
  Author: shenlvyu
6
6
  Author-email: 13296718439@163.com
@@ -8,7 +8,7 @@ solax_py_library/upload/core/data_adapter/base.py,sha256=Va-SEe0eL3gobhNOnzHGkYB
8
8
  solax_py_library/upload/core/data_adapter/csv.py,sha256=2hAtDdU2ibzg6hRcZgZiRVI9JAOEhzGzXlDcWmDYvqI,868
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=vl6QTxcx-QVFv0J1VN7HSgh4opouKfTpmJDkwQYzLVU,881
11
- solax_py_library/upload/core/upload_service/ftp.py,sha256=EyqaCn6b24rOKDbf-DqZQirq5JuDaVuApsb48RADsfk,2432
11
+ solax_py_library/upload/core/upload_service/ftp.py,sha256=O566dyVKTLrXVJq6KLXAnxn2Tk3YB6IxLqzm3nV45QU,2486
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
@@ -16,7 +16,7 @@ solax_py_library/upload/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
16
16
  solax_py_library/upload/test/test_ftp.py,sha256=geXAU1LM4IIkQHEJ5w2yBVNOo5YN-h6dipIWgv5ukdE,1038
17
17
  solax_py_library/upload/types/__init__.py,sha256=og9KBpYbcs36_S1izURj3vyHeuNOLJQrD9GpxK_JJaw,244
18
18
  solax_py_library/upload/types/client.py,sha256=IE4tw2KFRmZABptmujB7SXG2-61cW7X7qN9b2IrBF3Y,505
19
- solax_py_library/upload/types/ftp.py,sha256=Ds5mF_JfY0Uj9TvliW-ZS4gBjr1CrjmUSgxHIPH1n_k,533
20
- solax_py_library-0.1.0.11.dist-info/METADATA,sha256=RgHblHP5DWdbcF6lhly-vWAZbPcwCZ97A3YVnX-Jjx0,671
21
- solax_py_library-0.1.0.11.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
22
- solax_py_library-0.1.0.11.dist-info/RECORD,,
19
+ solax_py_library/upload/types/ftp.py,sha256=vHStILTntRAKrpRofnuEaNIvoDcmWnObU-5PSJaZQ58,639
20
+ solax_py_library-0.1.0.12.dist-info/METADATA,sha256=mGD6Hco4KelZXJsN5Fu2G9_goAtAiBhpxXAvfmy7bY4,671
21
+ solax_py_library-0.1.0.12.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
22
+ solax_py_library-0.1.0.12.dist-info/RECORD,,