python-databases 1.0.0__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.
- python_databases/consts.py +1 -0
- python_databases/elasticsearch_infrastructure/consts.py +3 -0
- python_databases/elasticsearch_infrastructure/elasticsearch.py +5 -3
- python_databases/postgresql_infrastructure/consts.py +3 -0
- python_databases/postgresql_infrastructure/postgresql.py +3 -1
- {python_databases-1.0.0.dist-info → python_databases-1.1.0.dist-info}/METADATA +3 -3
- python_databases-1.1.0.dist-info/RECORD +13 -0
- {python_databases-1.0.0.dist-info → python_databases-1.1.0.dist-info}/WHEEL +1 -1
- python_databases-1.0.0.dist-info/RECORD +0 -10
- {python_databases-1.0.0.dist-info → python_databases-1.1.0.dist-info}/licenses/LICENSE +0 -0
- {python_databases-1.0.0.dist-info → python_databases-1.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
LOGGER_NAME = "python_databases"
|
|
@@ -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(
|
|
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(
|
|
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(
|
|
255
|
+
self.logger = get_logger(ELK_LOGGER_NAME)
|
|
254
256
|
|
|
255
257
|
self.connect_to_elasticsearch()
|
|
256
258
|
|
|
@@ -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(
|
|
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: 1.
|
|
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.
|
|
16
|
+
Requires-Python: >=3.12
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: custom-python-logger>=
|
|
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
|
|
@@ -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,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-1.0.0.dist-info/licenses/LICENSE,sha256=cSikHY6SZFsPZSBizCDAJ0-Bjjzxt-JtX6TVbKxwimo,1067
|
|
7
|
-
python_databases-1.0.0.dist-info/METADATA,sha256=1goff23BFuCwrgy0OZ83vID1QrKdgqNwb6FH6GuXUKc,2464
|
|
8
|
-
python_databases-1.0.0.dist-info/WHEEL,sha256=YLJXdYXQ2FQ0Uqn2J-6iEIC-3iOey8lH3xCtvFLkd8Q,91
|
|
9
|
-
python_databases-1.0.0.dist-info/top_level.txt,sha256=fXcMUntaYJfKeFS7FjQ6DY4WVXYBsgdrDmhOudYs-vg,17
|
|
10
|
-
python_databases-1.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|