libdev 0.89__tar.gz → 0.90__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 (40) hide show
  1. {libdev-0.89 → libdev-0.90}/PKG-INFO +1 -1
  2. {libdev-0.89 → libdev-0.90}/libdev/__init__.py +1 -1
  3. {libdev-0.89 → libdev-0.90}/libdev/req.py +9 -1
  4. {libdev-0.89 → libdev-0.90}/libdev/s3.py +1 -1
  5. {libdev-0.89 → libdev-0.90}/libdev.egg-info/PKG-INFO +1 -1
  6. {libdev-0.89 → libdev-0.90}/LICENSE +0 -0
  7. {libdev-0.89 → libdev-0.90}/README.md +0 -0
  8. {libdev-0.89 → libdev-0.90}/libdev/cfg.py +0 -0
  9. {libdev-0.89 → libdev-0.90}/libdev/check.py +0 -0
  10. {libdev-0.89 → libdev-0.90}/libdev/codes.py +0 -0
  11. {libdev-0.89 → libdev-0.90}/libdev/crypt.py +0 -0
  12. {libdev-0.89 → libdev-0.90}/libdev/dev.py +0 -0
  13. {libdev-0.89 → libdev-0.90}/libdev/doc.py +0 -0
  14. {libdev-0.89 → libdev-0.90}/libdev/fin.py +0 -0
  15. {libdev-0.89 → libdev-0.90}/libdev/gen.py +0 -0
  16. {libdev-0.89 → libdev-0.90}/libdev/img.py +0 -0
  17. {libdev-0.89 → libdev-0.90}/libdev/lang.py +0 -0
  18. {libdev-0.89 → libdev-0.90}/libdev/log.py +0 -0
  19. {libdev-0.89 → libdev-0.90}/libdev/num.py +0 -0
  20. {libdev-0.89 → libdev-0.90}/libdev/time.py +0 -0
  21. {libdev-0.89 → libdev-0.90}/libdev.egg-info/SOURCES.txt +0 -0
  22. {libdev-0.89 → libdev-0.90}/libdev.egg-info/dependency_links.txt +0 -0
  23. {libdev-0.89 → libdev-0.90}/libdev.egg-info/requires.txt +0 -0
  24. {libdev-0.89 → libdev-0.90}/libdev.egg-info/top_level.txt +0 -0
  25. {libdev-0.89 → libdev-0.90}/setup.cfg +0 -0
  26. {libdev-0.89 → libdev-0.90}/setup.py +0 -0
  27. {libdev-0.89 → libdev-0.90}/tests/test_cfg.py +0 -0
  28. {libdev-0.89 → libdev-0.90}/tests/test_check.py +0 -0
  29. {libdev-0.89 → libdev-0.90}/tests/test_codes.py +0 -0
  30. {libdev-0.89 → libdev-0.90}/tests/test_crypt.py +0 -0
  31. {libdev-0.89 → libdev-0.90}/tests/test_dev.py +0 -0
  32. {libdev-0.89 → libdev-0.90}/tests/test_doc.py +0 -0
  33. {libdev-0.89 → libdev-0.90}/tests/test_gen.py +0 -0
  34. {libdev-0.89 → libdev-0.90}/tests/test_img.py +0 -0
  35. {libdev-0.89 → libdev-0.90}/tests/test_lang.py +0 -0
  36. {libdev-0.89 → libdev-0.90}/tests/test_log.py +0 -0
  37. {libdev-0.89 → libdev-0.90}/tests/test_num.py +0 -0
  38. {libdev-0.89 → libdev-0.90}/tests/test_req.py +0 -0
  39. {libdev-0.89 → libdev-0.90}/tests/test_s3.py +0 -0
  40. {libdev-0.89 → libdev-0.90}/tests/test_time.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: libdev
3
- Version: 0.89
3
+ Version: 0.90
4
4
  Summary: Set of standard functions for development
5
5
  Home-page: https://github.com/chilleco/lib
6
6
  Author: Alex Poloz
@@ -2,6 +2,6 @@
2
2
  Initializing the Python package
3
3
  """
4
4
 
5
- __version__ = "0.89"
5
+ __version__ = "0.90"
6
6
 
7
7
  __all__ = ("__version__",)
@@ -8,6 +8,7 @@ import aiohttp
8
8
  async def fetch(
9
9
  url,
10
10
  payload=None,
11
+ files=None,
11
12
  type_req="post",
12
13
  type_data="json",
13
14
  headers=None,
@@ -35,8 +36,15 @@ async def fetch(
35
36
  if payload is None:
36
37
  payload = {}
37
38
 
39
+ if files is not None:
40
+ form = aiohttp.FormData()
41
+ for name, fdata in files.items():
42
+ form.add_field(name, fdata)
43
+ payload = form
44
+ type_data = "data"
45
+
38
46
  async with aiohttp.ClientSession(
39
- timeout=timeout and aiohttp.ClientTimeout(total=timeout),
47
+ timeout=aiohttp.ClientTimeout(total=timeout),
40
48
  ) as session:
41
49
  if type_req == "post":
42
50
  req = session.post
@@ -99,7 +99,7 @@ async def upload(
99
99
 
100
100
 
101
101
  def get(
102
- directory=cfg("mode"),
102
+ directory=cfg("mode").lower(),
103
103
  bucket=cfg("project_name"),
104
104
  ):
105
105
  """List all files in a specified directory (prefix) in S3"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: libdev
3
- Version: 0.89
3
+ Version: 0.90
4
4
  Summary: Set of standard functions for development
5
5
  Home-page: https://github.com/chilleco/lib
6
6
  Author: Alex Poloz
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
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