python-databases 0.1.7__py3-none-any.whl → 1.1.0__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.
@@ -0,0 +1 @@
1
+ LOGGER_NAME = "python_databases"
@@ -0,0 +1,3 @@
1
+ from python_databases.consts import LOGGER_NAME
2
+
3
+ ELK_LOGGER_NAME = f'{LOGGER_NAME}.elasticsearch'
@@ -11,6 +11,8 @@ from custom_python_logger import get_logger
11
11
  from elasticsearch import Elasticsearch, helpers
12
12
  from retrying import retry
13
13
 
14
+ from python_databases.elasticsearch_infrastructure.consts import ELK_LOGGER_NAME
15
+
14
16
 
15
17
  class UrlProtocol(Enum):
16
18
  HTTP = "http"
@@ -27,7 +29,7 @@ class ElasticSearch(ABC):
27
29
  username: str | None,
28
30
  password: str | None,
29
31
  ) -> None:
30
- self.logger = get_logger(self.__class__.__name__)
32
+ self.logger = get_logger(ELK_LOGGER_NAME)
31
33
  self._change_elasticsearch_logger()
32
34
 
33
35
  self.protocol = protocol
@@ -208,7 +210,7 @@ class ElasticSearchOnPrem(ElasticSearch):
208
210
  password=password,
209
211
  )
210
212
 
211
- self.logger = get_logger(self.__class__.__name__)
213
+ self.logger = get_logger(ELK_LOGGER_NAME)
212
214
 
213
215
  self.connect_to_elasticsearch()
214
216
 
@@ -250,7 +252,7 @@ class ElasticSearchCloud(ElasticSearch):
250
252
  password=password,
251
253
  )
252
254
 
253
- self.logger = get_logger(self.__class__.__name__)
255
+ self.logger = get_logger(ELK_LOGGER_NAME)
254
256
 
255
257
  self.connect_to_elasticsearch()
256
258
 
@@ -0,0 +1,3 @@
1
+ from python_databases.consts import LOGGER_NAME
2
+
3
+ POSTGRESQL_LOGGER_NAME = f'{LOGGER_NAME}.postgresql'
@@ -6,6 +6,8 @@ import psycopg2
6
6
  from custom_python_logger import get_logger
7
7
  from psycopg2 import extras
8
8
 
9
+ from python_databases.postgresql_infrastructure.consts import POSTGRESQL_LOGGER_NAME
10
+
9
11
 
10
12
  class PostgreSQL:
11
13
  def __init__(
@@ -16,7 +18,7 @@ class PostgreSQL:
16
18
  username: str | None = None,
17
19
  password: str | None = None,
18
20
  ) -> None:
19
- self.logger = get_logger(self.__class__.__name__)
21
+ self.logger = get_logger(POSTGRESQL_LOGGER_NAME)
20
22
 
21
23
  self.name = name or os.getenv("POSTGRESQL_NAME")
22
24
  self.host = host or os.getenv("POSTGRESQL_HOST")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-databases
3
- Version: 0.1.7
3
+ Version: 1.1.0
4
4
  Summary: A Python library for managing and interacting with multiple databases seamlessly.
5
5
  Author: Avi Zaguri
6
6
  License: MIT
@@ -13,10 +13,10 @@ Classifier: Intended Audience :: Developers
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Operating System :: OS Independent
15
15
  Classifier: Topic :: System :: Logging
16
- Requires-Python: >=3.11
16
+ Requires-Python: >=3.12
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
- Requires-Dist: custom-python-logger>=2.0.10
19
+ Requires-Dist: custom-python-logger>=4.0.0
20
20
  Requires-Dist: elasticsearch<9
21
21
  Requires-Dist: pandas>=2.3.3
22
22
  Requires-Dist: pre-commit>=4.5.0
@@ -28,6 +28,15 @@ Requires-Dist: setuptools>=80.9.0
28
28
  Requires-Dist: wheel>=0.45.1
29
29
  Dynamic: license-file
30
30
 
31
+ ![PyPI version](https://img.shields.io/pypi/v/python-databases)
32
+ ![Python](https://img.shields.io/badge/python->=3.12-blue)
33
+ ![Development Status](https://img.shields.io/badge/status-stable-green)
34
+ ![Maintenance](https://img.shields.io/maintenance/yes/2026)
35
+ ![PyPI](https://img.shields.io/pypi/dm/python-databases)
36
+ ![License](https://img.shields.io/pypi/l/python-databases)
37
+
38
+ ---
39
+
31
40
  # Python Databases
32
41
  A flexible and extensible Python library that provides a unified interface for interacting with multiple types of databases.
33
42
 
@@ -0,0 +1,13 @@
1
+ python_databases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ python_databases/consts.py,sha256=ADn3PmhTXKBobtiVgDR4Tqq2Ncn_FTK0WjgREOLdBPs,33
3
+ python_databases/elasticsearch_infrastructure/__init__.py,sha256=U1orkPi0Pg-1rtY1CPSF4-eVRfrMr36qpT9VNKjBUw4,297
4
+ python_databases/elasticsearch_infrastructure/consts.py,sha256=tW4jgeUsf3FhqEpNHZQr3SjqPbuJjcWQDsSqxAvUYPg,98
5
+ python_databases/elasticsearch_infrastructure/elasticsearch.py,sha256=SJkwV1kM2IrGpTbNtUJWp2K5dbAApMCCAnQ_jD13lPg,10047
6
+ python_databases/postgresql_infrastructure/__init__.py,sha256=yBjq7SLnNgnxW0DCQHEwCi_FrCNtjsJGJXIq7XtkUZg,150
7
+ python_databases/postgresql_infrastructure/consts.py,sha256=Fz19Qj-B9mPCTGInNygm2CPmY0nWiamWeEMrJsv-XB4,102
8
+ python_databases/postgresql_infrastructure/postgresql.py,sha256=tFdQr5IOPYbuqKE3r9oqSoNoGMbED5NSEy1anrUNEyY,3105
9
+ python_databases-1.1.0.dist-info/licenses/LICENSE,sha256=cSikHY6SZFsPZSBizCDAJ0-Bjjzxt-JtX6TVbKxwimo,1067
10
+ python_databases-1.1.0.dist-info/METADATA,sha256=CrCiF3Xm9os9Ize1JFmgsNk91QbZO9el7VlGrScmZ3E,2463
11
+ python_databases-1.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
12
+ python_databases-1.1.0.dist-info/top_level.txt,sha256=fXcMUntaYJfKeFS7FjQ6DY4WVXYBsgdrDmhOudYs-vg,17
13
+ python_databases-1.1.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (82.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- python_databases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- python_databases/elasticsearch_infrastructure/__init__.py,sha256=U1orkPi0Pg-1rtY1CPSF4-eVRfrMr36qpT9VNKjBUw4,297
3
- python_databases/elasticsearch_infrastructure/elasticsearch.py,sha256=qIimoK4ykU38-pDlfqxgEpzsyXwZBP3ld5qXZE5ewb4,9989
4
- python_databases/postgresql_infrastructure/__init__.py,sha256=yBjq7SLnNgnxW0DCQHEwCi_FrCNtjsJGJXIq7XtkUZg,150
5
- python_databases/postgresql_infrastructure/postgresql.py,sha256=z1yBG-80Hj67mjDVlPvdIxfT5vl4IlbQE0rk2UEE4wY,3020
6
- python_databases-0.1.7.dist-info/licenses/LICENSE,sha256=cSikHY6SZFsPZSBizCDAJ0-Bjjzxt-JtX6TVbKxwimo,1067
7
- python_databases-0.1.7.dist-info/METADATA,sha256=iRGwbOsR4lJX2A5DCpFJqGx0eWMLfTIFhWydWeIC9BM,2087
8
- python_databases-0.1.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- python_databases-0.1.7.dist-info/top_level.txt,sha256=fXcMUntaYJfKeFS7FjQ6DY4WVXYBsgdrDmhOudYs-vg,17
10
- python_databases-0.1.7.dist-info/RECORD,,