solax-py-library 0.1.0.11__tar.gz → 0.1.0.12__tar.gz

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 (22) hide show
  1. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/PKG-INFO +1 -1
  2. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/pyproject.toml +1 -1
  3. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/core/upload_service/ftp.py +2 -1
  4. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/types/ftp.py +5 -0
  5. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/README.md +0 -0
  6. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/__init__.py +0 -0
  7. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/__init__.py +0 -0
  8. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/api/__init__.py +0 -0
  9. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/api/service.py +0 -0
  10. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/core/__init__.py +0 -0
  11. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/core/data_adapter/__init__.py +0 -0
  12. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/core/data_adapter/base.py +0 -0
  13. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/core/data_adapter/csv.py +0 -0
  14. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/core/upload_service/__init__.py +0 -0
  15. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/core/upload_service/base.py +0 -0
  16. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/errors/__init__.py +0 -0
  17. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/errors/base.py +0 -0
  18. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/errors/upload_error.py +0 -0
  19. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/test/__init__.py +0 -0
  20. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/test/test_ftp.py +0 -0
  21. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/types/__init__.py +0 -0
  22. {solax_py_library-0.1.0.11 → solax_py_library-0.1.0.12}/solax_py_library/upload/types/client.py +0 -0
@@ -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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "solax-py-library"
3
- version = "0.1.0.11"
3
+ version = "0.1.0.12"
4
4
  description = "some common tool"
5
5
  authors = ["shenlvyu <13296718439@163.com>"]
6
6
  readme = "README.md"
@@ -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