gomyck-tools 1.1.0__py3-none-any.whl → 1.1.2__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.
ctools/download_tools.py CHANGED
@@ -34,18 +34,18 @@ def download(file_path: str, download_name:str=None):
34
34
  return response
35
35
 
36
36
 
37
- def download_bytes(file_name: str, file_bytes: bytes):
37
+ def download_bytes(file_bytes: bytes, download_name: str):
38
38
  """
39
39
  文件下载
40
- :param file_name:
41
- :param file_bytes:
40
+ :param file_bytes: file_bytes
41
+ :param download_name: download_name
42
42
  :return:
43
43
  """
44
- encoded_filename = urlencode({'filename': file_name}).split("=")[-1] # 对文件名进行URL编码
44
+ download_filename = urlencode({'filename': download_name}).split("=")[-1] # 对文件名进行URL编码
45
45
  # 设置响应头,告诉浏览器这是一个文件下载
46
46
  headers = {"Accept-Ranges": "bytes", "Content-Length": len(file_bytes),
47
47
  'Content-Type': 'application/octet-stream;charset=utf-8',
48
- 'Content-Disposition': f'attachment; filename={encoded_filename}'}
48
+ 'Content-Disposition': f'attachment; filename={download_filename}'}
49
49
  return HTTPResponse(file_bytes, **headers)
50
50
 
51
51
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gomyck-tools
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
  Summary: A ctools for python development by hao474798383
5
5
  Home-page: https://blog.gomyck.com
6
6
  Author: gomyck
@@ -10,7 +10,7 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.8
12
12
  Description-Content-Type: text/markdown
13
- Requires-Dist: jsonpickle >=3.2.2
13
+ Requires-Dist: jsonpickle ==3.3.0
14
14
  Requires-Dist: SQLAlchemy >=2.0.32
15
15
  Requires-Dist: chardet >=5.2.0
16
16
  Requires-Dist: psycopg2-binary >=2.9.9
@@ -18,6 +18,9 @@ Requires-Dist: croniter >=3.0.3
18
18
  Requires-Dist: gmssl >=3.2.2
19
19
  Requires-Dist: psutil >=6.0.0
20
20
  Requires-Dist: jsonpath-ng >=1.6.1
21
- Requires-Dist: bottle >=0.12.25
21
+ Requires-Dist: bottle ==0.13.1
22
+ Requires-Dist: requests ==2.32.3
23
+ Requires-Dist: kafka-python ==2.0.2
24
+ Requires-Dist: bottle-websocket ==0.2.9
22
25
 
23
26
  this package is for python development
@@ -17,7 +17,7 @@ ctools/cron_lite.py,sha256=f9g7-64GsCxcAW-HUAvT6S-kooScl8zaJyqwHY-X_rE,8308
17
17
  ctools/database.py,sha256=5LPmchtyekLeP1idrexgjPNLrywWc4IMp-ztDff95vQ,5362
18
18
  ctools/date_utils.py,sha256=-xI2anEzAonOvYwVmM1hCnkuLKodZ8pb33dS3dRxEIc,865
19
19
  ctools/douglas_rarefy.py,sha256=oSdc_uGfiBWqSKLpdg_npYeGxhZqXUTPB3pou6SM2_Y,4823
20
- ctools/download_tools.py,sha256=Woa2-eYeQL14bLCzhavPNfabZxHmC0T6N5_UONU1Ts8,1891
20
+ ctools/download_tools.py,sha256=oJbG12Hojd0J17sAlvMU480P3abi4_AB9oZkEBGFPuo,1930
21
21
  ctools/enums.py,sha256=QbHa3j7j4-BDdwaga5Y0nYfA2uNSVJDHumYdIZdKVkM,118
22
22
  ctools/ex.py,sha256=_UtbmDLrC7uZsoBtTdecuCZAlf2DA7fvojUf5fGZDVo,795
23
23
  ctools/excelOpt.py,sha256=q3HLAb1JScTrMCvx_x-4WWnqKhyTEzQ-m5vtqFy8NZU,1138
@@ -51,7 +51,7 @@ ctools/wordFill.py,sha256=dB1OLt6GLmWdkDV8H20VWbJmY4ggNNI8iHD1ocae2iM,875
51
51
  ctools/word_fill.py,sha256=aIkzjAF2soSW6w2dO2CRZlveDcuIdr6v9DtyyyB8uxM,18216
52
52
  ctools/word_fill_entity.py,sha256=eX3G0Gy16hfGpavQSEkCIoKDdTnNgRRJrFvKliETZK8,985
53
53
  ctools/work_path.py,sha256=i4MTUobqNW2WMrT3mwEC_XYQ0_IhFmKoNpTX2W6A8Tc,1680
54
- gomyck_tools-1.1.0.dist-info/METADATA,sha256=4iOu6cIFu6mTT9_O1Zc9vuYGcRp5vmmixYao0fLKHig,744
55
- gomyck_tools-1.1.0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
56
- gomyck_tools-1.1.0.dist-info/top_level.txt,sha256=-MiIH9FYRVKp1i5_SVRkaI-71WmF1sZSRrNWFU9ls3s,7
57
- gomyck_tools-1.1.0.dist-info/RECORD,,
54
+ gomyck_tools-1.1.2.dist-info/METADATA,sha256=3_a43ilGlG_hn6YQ40T0FaAJ_u5xdFkzZOTNXjFWz3k,852
55
+ gomyck_tools-1.1.2.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
56
+ gomyck_tools-1.1.2.dist-info/top_level.txt,sha256=-MiIH9FYRVKp1i5_SVRkaI-71WmF1sZSRrNWFU9ls3s,7
57
+ gomyck_tools-1.1.2.dist-info/RECORD,,