solax-py-library 1.0.0.9__py3-none-any.whl → 1.0.0.10__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.
@@ -24,6 +24,7 @@ class FTPUploadService(BaseUploadService):
24
24
  super().__init__(**kwargs)
25
25
  config = self._init_config(**kwargs)
26
26
  self.host = config.host
27
+ self.port = config.port
27
28
  self.user = config.user
28
29
  self.password = config.password
29
30
  self.remote_path = config.remote_path
@@ -40,6 +41,7 @@ class FTPUploadService(BaseUploadService):
40
41
  self.close()
41
42
  try:
42
43
  self._client = ftplib.FTP(self.host, timeout=self.timeout)
44
+ self._client.connect(self.host, self.port, timeout=self.timeout)
43
45
  self._client.login(self.user, self.password)
44
46
  print(f"Connected to {self.host}")
45
47
  self._is_connect = True
@@ -10,8 +10,9 @@ class FTPTest(unittest.TestCase):
10
10
  def test_ftp_upload(self):
11
11
  ftp_config = {
12
12
  "host": "10.1.31.181", # 测试host
13
+ "port": 21,
13
14
  "user": "solax",
14
- "password": "sly402",
15
+ "password": "123456",
15
16
  "remote_path": "/xixi",
16
17
  }
17
18
  asyncio.run(
@@ -26,6 +26,7 @@ class FTPData(BaseModel):
26
26
 
27
27
  class FTPServiceConfig(BaseModel):
28
28
  host: str
29
+ port: int
29
30
  user: Optional[str]
30
31
  password: Optional[str]
31
32
  remote_path: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: solax-py-library
3
- Version: 1.0.0.9
3
+ Version: 1.0.0.10
4
4
  Summary: some common tool
5
5
  Author: shenlvyu
6
6
  Author-email: 13296718439@163.com
@@ -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=ZJqRpPrh0qOjmYW-7VykzevWioCqMnFyM4-Svju4nlI,2685
11
+ solax_py_library/upload/core/upload_service/ftp.py,sha256=2h7_Wwv_ozd24t5B4abCAs4VrWi7l1ByYJh8vvTiyzU,2794
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=frKyW8TydfL7WMLhnZVxTig08A-Gxv-hxPubdOsMhrM,1396
16
+ solax_py_library/upload/test/test_ftp.py,sha256=_d9JJ6KOaefTpbi9LO1YH84fUSsFlzdRdjedAlz36b8,1420
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=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,,
19
+ solax_py_library/upload/types/ftp.py,sha256=9kCeLB0g5Je19v4ifz8YYEsGOhJL1lKBO2C6V2VBndc,679
20
+ solax_py_library-1.0.0.10.dist-info/METADATA,sha256=FR6Bc8lPlFYFS0AcERkefUdOLTRBbr79Cgq9LGVsSSc,1790
21
+ solax_py_library-1.0.0.10.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
22
+ solax_py_library-1.0.0.10.dist-info/RECORD,,