python-databases 1.0.0__tar.gz → 1.1.0__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 (20) hide show
  1. {python_databases-1.0.0/python_databases.egg-info → python_databases-1.1.0}/PKG-INFO +3 -3
  2. {python_databases-1.0.0 → python_databases-1.1.0}/pyproject.toml +3 -3
  3. python_databases-1.1.0/python_databases/consts.py +1 -0
  4. python_databases-1.1.0/python_databases/elasticsearch_infrastructure/consts.py +3 -0
  5. {python_databases-1.0.0 → python_databases-1.1.0}/python_databases/elasticsearch_infrastructure/elasticsearch.py +5 -3
  6. python_databases-1.1.0/python_databases/postgresql_infrastructure/consts.py +3 -0
  7. {python_databases-1.0.0 → python_databases-1.1.0}/python_databases/postgresql_infrastructure/postgresql.py +3 -1
  8. {python_databases-1.0.0 → python_databases-1.1.0/python_databases.egg-info}/PKG-INFO +3 -3
  9. {python_databases-1.0.0 → python_databases-1.1.0}/python_databases.egg-info/SOURCES.txt +3 -0
  10. {python_databases-1.0.0 → python_databases-1.1.0}/python_databases.egg-info/requires.txt +1 -1
  11. {python_databases-1.0.0 → python_databases-1.1.0}/LICENSE +0 -0
  12. {python_databases-1.0.0 → python_databases-1.1.0}/MANIFEST.in +0 -0
  13. {python_databases-1.0.0 → python_databases-1.1.0}/README.md +0 -0
  14. {python_databases-1.0.0 → python_databases-1.1.0}/python_databases/__init__.py +0 -0
  15. {python_databases-1.0.0 → python_databases-1.1.0}/python_databases/elasticsearch_infrastructure/__init__.py +0 -0
  16. {python_databases-1.0.0 → python_databases-1.1.0}/python_databases/postgresql_infrastructure/__init__.py +0 -0
  17. {python_databases-1.0.0 → python_databases-1.1.0}/python_databases.egg-info/dependency_links.txt +0 -0
  18. {python_databases-1.0.0 → python_databases-1.1.0}/python_databases.egg-info/top_level.txt +0 -0
  19. {python_databases-1.0.0 → python_databases-1.1.0}/setup.cfg +0 -0
  20. {python_databases-1.0.0 → python_databases-1.1.0}/tests/test_postgres.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-databases
3
- Version: 1.0.0
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
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-databases"
7
- version = "1.0.0"
7
+ version = "1.1.0"
8
8
  description = "A Python library for managing and interacting with multiple databases seamlessly."
9
9
  readme = "README.md"
10
- requires-python = ">=3.11"
10
+ requires-python = ">=3.12"
11
11
  license = { text = "MIT" }
12
12
  authors = [{ name = "Avi Zaguri" },]
13
13
  keywords = ["development", "databases", "ORM", "SQL", "NoSQL", "database management"]
@@ -21,7 +21,7 @@ classifiers = [
21
21
  ]
22
22
 
23
23
  dependencies = [
24
- "custom-python-logger>=2.0.10",
24
+ "custom-python-logger>=4.0.0",
25
25
  "elasticsearch<9",
26
26
  "pandas>=2.3.3",
27
27
  "pre-commit>=4.5.0",
@@ -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: 1.0.0
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
@@ -3,13 +3,16 @@ MANIFEST.in
3
3
  README.md
4
4
  pyproject.toml
5
5
  python_databases/__init__.py
6
+ python_databases/consts.py
6
7
  python_databases.egg-info/PKG-INFO
7
8
  python_databases.egg-info/SOURCES.txt
8
9
  python_databases.egg-info/dependency_links.txt
9
10
  python_databases.egg-info/requires.txt
10
11
  python_databases.egg-info/top_level.txt
11
12
  python_databases/elasticsearch_infrastructure/__init__.py
13
+ python_databases/elasticsearch_infrastructure/consts.py
12
14
  python_databases/elasticsearch_infrastructure/elasticsearch.py
13
15
  python_databases/postgresql_infrastructure/__init__.py
16
+ python_databases/postgresql_infrastructure/consts.py
14
17
  python_databases/postgresql_infrastructure/postgresql.py
15
18
  tests/test_postgres.py
@@ -1,4 +1,4 @@
1
- custom-python-logger>=2.0.10
1
+ custom-python-logger>=4.0.0
2
2
  elasticsearch<9
3
3
  pandas>=2.3.3
4
4
  pre-commit>=4.5.0