wcp-library 1.4.1__tar.gz → 1.4.3__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 (23) hide show
  1. {wcp_library-1.4.1 → wcp_library-1.4.3}/PKG-INFO +2 -3
  2. {wcp_library-1.4.1 → wcp_library-1.4.3}/pyproject.toml +1 -1
  3. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/credentials/__init__.py +1 -1
  4. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/sql/__init__.py +3 -0
  5. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/sql/oracle.py +2 -2
  6. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/sql/postgres.py +2 -3
  7. {wcp_library-1.4.1 → wcp_library-1.4.3}/README.md +0 -0
  8. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/__init__.py +0 -0
  9. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/credentials/_credential_manager_asynchronous.py +0 -0
  10. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/credentials/_credential_manager_synchronous.py +0 -0
  11. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/credentials/api.py +0 -0
  12. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/credentials/ftp.py +0 -0
  13. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/credentials/internet.py +0 -0
  14. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/credentials/oracle.py +0 -0
  15. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/credentials/postgres.py +0 -0
  16. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/emailing.py +0 -0
  17. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/ftp/__init__.py +0 -0
  18. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/ftp/ftp.py +0 -0
  19. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/ftp/sftp.py +0 -0
  20. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/informatica.py +0 -0
  21. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/logging.py +0 -0
  22. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/selenium_helper.py +0 -0
  23. {wcp_library-1.4.1 → wcp_library-1.4.3}/wcp_library/time.py +0 -0
@@ -1,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: wcp-library
3
- Version: 1.4.1
3
+ Version: 1.4.3
4
4
  Summary: Common utilites for internal development at WCP
5
- Home-page: https://github.com/Whitecap-DNA/WCP-Library
6
5
  Author: Mitch-Petersen
7
6
  Author-email: mitch.petersen@wcap.ca
8
7
  Requires-Python: >=3.12,<4.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "wcp-library"
3
- version = "1.4.1"
3
+ version = "1.4.3"
4
4
  description = "Common utilites for internal development at WCP"
5
5
  authors = ["Mitch-Petersen <mitch.petersen@wcap.ca>"]
6
6
  readme = "README.md"
@@ -6,7 +6,7 @@ class MissingCredentialsError(KeyError):
6
6
  pass
7
7
 
8
8
 
9
- def generate_password(length: int=12, use_nums: bool=True, use_special: bool=True, special_chars_override: list=None, force_num: bool=True, force_spec: bool=True) -> str:
9
+ def generate_password(length: int=12, use_nums: bool=True, use_special: bool=True, special_chars_override: str=None, force_num: bool=True, force_spec: bool=True) -> str:
10
10
  """
11
11
  Function to generate a random password
12
12
 
@@ -1,3 +1,4 @@
1
+ import asyncio
1
2
  import logging
2
3
  from functools import wraps
3
4
  from time import sleep
@@ -59,4 +60,6 @@ def async_retry(f: callable) -> callable:
59
60
  await asyncio.sleep(300)
60
61
  else:
61
62
  raise e
63
+ except Exception as e:
64
+ print()
62
65
  return wrapper
@@ -202,7 +202,7 @@ class OracleConnection(object):
202
202
  self._session_pool.release(connection)
203
203
 
204
204
  @retry
205
- def fetch_data(self, query: str, packed_data=None):
205
+ def fetch_data(self, query: str, packed_data=None) -> list:
206
206
  """
207
207
  Fetch the data from the query
208
208
 
@@ -435,7 +435,7 @@ class AsyncOracleConnection(object):
435
435
  await connection.commit()
436
436
 
437
437
  @async_retry
438
- async def fetch_data(self, query: str, packed_data=None):
438
+ async def fetch_data(self, query: str, packed_data=None) -> list:
439
439
  """
440
440
  Fetch the data from the query
441
441
 
@@ -184,7 +184,7 @@ class PostgresConnection(object):
184
184
  cursor.executemany(query, dictionary)
185
185
 
186
186
  @retry
187
- def fetch_data(self, query: SQL | str, packed_data=None):
187
+ def fetch_data(self, query: SQL | str, packed_data=None) -> list[tuple]:
188
188
  """
189
189
  Fetch the data from the query
190
190
 
@@ -406,7 +406,7 @@ class AsyncPostgresConnection(object):
406
406
  await cursor.executemany(query, dictionary)
407
407
 
408
408
  @async_retry
409
- async def fetch_data(self, query: SQL | str, packed_data=None):
409
+ async def fetch_data(self, query: SQL | str, packed_data=None) -> list[tuple]:
410
410
  """
411
411
  Fetch the data from the query
412
412
 
@@ -417,7 +417,6 @@ class AsyncPostgresConnection(object):
417
417
 
418
418
  async with self._session_pool.connection() as connection:
419
419
  cursor = connection.cursor()
420
- # await cursor.execute("set datestyle = 'SQL, DMY'")
421
420
  if packed_data:
422
421
  await cursor.execute(query, packed_data)
423
422
  else:
File without changes