lazysdk 0.1.70__tar.gz → 0.1.72__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 (38) hide show
  1. lazysdk-0.1.72/LICENSE +21 -0
  2. {lazysdk-0.1.70 → lazysdk-0.1.72}/PKG-INFO +14 -1
  3. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazydict.py +12 -0
  4. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyfile.py +15 -1
  5. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk.egg-info/PKG-INFO +14 -1
  6. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk.egg-info/SOURCES.txt +1 -0
  7. {lazysdk-0.1.70 → lazysdk-0.1.72}/setup.py +1 -1
  8. {lazysdk-0.1.70 → lazysdk-0.1.72}/README.md +0 -0
  9. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/__init__.py +0 -0
  10. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyCrypto.py +0 -0
  11. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazy_id_card.py +0 -0
  12. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazybase64.py +0 -0
  13. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyenv.py +0 -0
  14. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyexcel.py +0 -0
  15. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyflask.py +0 -0
  16. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyhtml.py +0 -0
  17. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyid.py +0 -0
  18. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyinfo.py +0 -0
  19. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyip.py +0 -0
  20. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazym3u8.py +0 -0
  21. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazymd5.py +0 -0
  22. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazypath.py +0 -0
  23. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyprocess.py +0 -0
  24. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyproxies.py +0 -0
  25. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyrandom.py +0 -0
  26. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyredis.py +0 -0
  27. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyrequests.py +0 -0
  28. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazytext.py +0 -0
  29. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazytime.py +0 -0
  30. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyua.py +0 -0
  31. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazyurl.py +0 -0
  32. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazywebhook.py +0 -0
  33. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/lazywifi.py +0 -0
  34. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk/showdata.py +0 -0
  35. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk.egg-info/dependency_links.txt +0 -0
  36. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk.egg-info/requires.txt +0 -0
  37. {lazysdk-0.1.70 → lazysdk-0.1.72}/lazysdk.egg-info/top_level.txt +0 -0
  38. {lazysdk-0.1.70 → lazysdk-0.1.72}/setup.cfg +0 -0
lazysdk-0.1.72/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 ZeroSeeker
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazysdk
3
- Version: 0.1.70
3
+ Version: 0.1.72
4
4
  Summary: 基于Python的懒人包
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazysdk
6
6
  Author: ZeroSeeker
@@ -9,6 +9,19 @@ Classifier: Programming Language :: Python :: 3
9
9
  Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: showlog>=0.0.6
14
+ Requires-Dist: requests>=2.31.0
15
+ Requires-Dist: envx>=1.0.1
16
+ Requires-Dist: pytz==2022.1
17
+ Requires-Dist: ua_parser==0.10.0
18
+ Requires-Dist: openpyxl==3.0.9
19
+ Requires-Dist: xlrd==2.0.1
20
+ Requires-Dist: m3u8==3.5.0
21
+ Requires-Dist: pycryptodome==3.10.1
22
+ Requires-Dist: filetype==1.2.0
23
+ Requires-Dist: netifaces==0.11.0
24
+ Requires-Dist: user_agents==2.2.0
12
25
 
13
26
  # lazysdk
14
27
  ![](https://img.shields.io/badge/Python-3.8.6-green.svg)
@@ -231,3 +231,15 @@ def list_same_order_dict(
231
231
  each_dict_order[each_key] = each_dict.get(each_key, na_value)
232
232
  list_data_f.append(each_dict_order)
233
233
  return list_data_f
234
+
235
+
236
+ def list_dict_filter(
237
+ list_in: list,
238
+ filter_key,
239
+ filter_value
240
+ ):
241
+ """
242
+ 从[{},{}]中按照某个key-value条件筛选出符合条件的记录
243
+ """
244
+ list_out = list(filter(lambda x: x[filter_key] == filter_value, list_in))
245
+ return list_out
@@ -98,7 +98,7 @@ def download(
98
98
  range_start: int = None,
99
99
  range_end: int = None,
100
100
  overwrite: bool = False,
101
- verify: bool = False
101
+ verify: bool = True
102
102
  ):
103
103
  """
104
104
  实现文件下载功能,可指定url、文件名、后缀名、请求头、文件保存路径
@@ -112,6 +112,7 @@ def download(
112
112
  :param range_start:开始位置
113
113
  :param range_end:结束位置
114
114
  :param overwrite: 覆盖
115
+ :param verify: 验证证书
115
116
  :return:
116
117
  """
117
118
  if not headers:
@@ -198,6 +199,19 @@ def download(
198
199
 
199
200
  if overwrite and os.path.exists(path_local):
200
201
  delete(file=path_local)
202
+ elif not overwrite and os.path.exists(path_local):
203
+ # 这里将对已存在的文件名重新命名
204
+ rename_count = 1
205
+ while True:
206
+ path_local_rename = os.path.join(path, download_file_name, "(", str(rename_count), ")")
207
+ if os.path.exists(path_local):
208
+ rename_count += 1
209
+ continue
210
+ else:
211
+ break
212
+ path_local = copy.deepcopy(path_local_rename)
213
+ else:
214
+ pass
201
215
 
202
216
  with open(path_local, "ab") as f: # wb新建文件,a追加
203
217
  for chunk in response.iter_content(chunk_size=chunk_size):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazysdk
3
- Version: 0.1.70
3
+ Version: 0.1.72
4
4
  Summary: 基于Python的懒人包
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazysdk
6
6
  Author: ZeroSeeker
@@ -9,6 +9,19 @@ Classifier: Programming Language :: Python :: 3
9
9
  Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: showlog>=0.0.6
14
+ Requires-Dist: requests>=2.31.0
15
+ Requires-Dist: envx>=1.0.1
16
+ Requires-Dist: pytz==2022.1
17
+ Requires-Dist: ua_parser==0.10.0
18
+ Requires-Dist: openpyxl==3.0.9
19
+ Requires-Dist: xlrd==2.0.1
20
+ Requires-Dist: m3u8==3.5.0
21
+ Requires-Dist: pycryptodome==3.10.1
22
+ Requires-Dist: filetype==1.2.0
23
+ Requires-Dist: netifaces==0.11.0
24
+ Requires-Dist: user_agents==2.2.0
12
25
 
13
26
  # lazysdk
14
27
  ![](https://img.shields.io/badge/Python-3.8.6-green.svg)
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  README.md
2
3
  setup.py
3
4
  lazysdk/__init__.py
@@ -13,7 +13,7 @@ with open("README.md", "r", encoding='utf-8') as fh:
13
13
 
14
14
  setuptools.setup(
15
15
  name="lazysdk",
16
- version="0.1.70",
16
+ version="0.1.72",
17
17
  description="基于Python的懒人包",
18
18
  long_description=long_description,
19
19
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes