pyscriptbase 1.0.2__tar.gz → 1.0.4__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 (21) hide show
  1. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/PKG-INFO +1 -1
  2. pyscriptbase-1.0.4/pyscriptbase/app.py +19 -0
  3. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/net.py +28 -0
  4. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/PKG-INFO +1 -1
  5. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/SOURCES.txt +1 -0
  6. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/setup.py +1 -1
  7. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/README.md +0 -0
  8. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/__init__.py +0 -0
  9. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/cipher.py +0 -0
  10. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/database.py +0 -0
  11. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/env.py +0 -0
  12. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/panel.py +0 -0
  13. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/pusher.py +0 -0
  14. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/script.py +0 -0
  15. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/util.py +0 -0
  16. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase/webview.py +0 -0
  17. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/dependency_links.txt +0 -0
  18. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/requires.txt +0 -0
  19. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/pyscriptbase.egg-info/top_level.txt +0 -0
  20. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/setup.cfg +0 -0
  21. {pyscriptbase-1.0.2 → pyscriptbase-1.0.4}/test/test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyscriptbase
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: python script base library
5
5
  Home-page:
6
6
  Author: ASMan
@@ -0,0 +1,19 @@
1
+ def getAssistedList(receivers: list[tuple], senders: list[tuple], maxCount: int = 1) -> list[tuple]:
2
+ result = []
3
+ sendMap = {}
4
+
5
+ for sender in senders:
6
+ for _ in range(0, sender[1]):
7
+ for j, receiver in enumerate(receivers):
8
+ if receiver[0] == sender[0] or receiver[1] == 0:
9
+ continue
10
+ key = f"{sender[0]}-{receiver[0]}"
11
+ if key not in sendMap:
12
+ sendMap[key] = 0
13
+ if sendMap[key] >= maxCount:
14
+ continue
15
+ sendMap[key] += 1
16
+ receivers[j] = (receiver[0], receiver[1] - 1)
17
+ result.append((sender[0], receiver[0]))
18
+ break
19
+ return result
@@ -358,6 +358,34 @@ class CloudRequest:
358
358
  params=params,
359
359
  )
360
360
 
361
+ def delete(
362
+ self,
363
+ url: str,
364
+ body: str = None,
365
+ headers: dict = None,
366
+ isJson=True,
367
+ isXml=False,
368
+ isCookie=False,
369
+ allow_redirects=True,
370
+ timeout: int = 5,
371
+ maxTry=3,
372
+ params: dict = {},
373
+ ):
374
+ return self.__req__(
375
+ method="DELETE",
376
+ url=url,
377
+ body=body,
378
+ headers=headers,
379
+ isJson=isJson,
380
+ isXml=isXml,
381
+ isCookie=isCookie,
382
+ allow_redirects=allow_redirects,
383
+ timeout=timeout,
384
+ maxTry=maxTry,
385
+ params=params,
386
+ )
387
+
388
+
361
389
  def __req__(
362
390
  self,
363
391
  method: str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyscriptbase
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: python script base library
5
5
  Home-page:
6
6
  Author: ASMan
@@ -1,6 +1,7 @@
1
1
  README.md
2
2
  setup.py
3
3
  pyscriptbase/__init__.py
4
+ pyscriptbase/app.py
4
5
  pyscriptbase/cipher.py
5
6
  pyscriptbase/database.py
6
7
  pyscriptbase/env.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="pyscriptbase", # 包名
5
- version="1.0.2", # 版本号
5
+ version="1.0.4", # 版本号
6
6
  packages=find_packages(), # 自动查找包
7
7
  author="ASMan",
8
8
  author_email="",
File without changes
File without changes
File without changes