phlo-postgres 0.2.3__tar.gz → 0.2.4__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.
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/PKG-INFO +1 -1
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/pyproject.toml +1 -1
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/__init__.py +1 -1
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/settings.py +9 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/PKG-INFO +1 -1
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/README.md +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/setup.cfg +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/cli.py +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/cli_plugin.py +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/exporter_service.yaml +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/plugin.py +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/publish_target.py +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/resource.py +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/service.yaml +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/volume_setup.yaml +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/SOURCES.txt +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/dependency_links.txt +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/entry_points.txt +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/requires.txt +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/top_level.txt +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/tests/test_integration_postgres.py +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/tests/test_postgres_cli.py +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/tests/test_postgres_plugin.py +0 -0
- {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/tests/test_resource.py +0 -0
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from functools import lru_cache
|
|
6
|
+
from typing import Any
|
|
6
7
|
from urllib.parse import quote_plus
|
|
7
8
|
|
|
8
9
|
from pydantic import Field
|
|
9
10
|
|
|
10
11
|
from phlo.config.base import BaseConfig
|
|
12
|
+
from phlo.config.network import resolve_host
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
class PostgresSettings(BaseConfig):
|
|
@@ -22,6 +24,13 @@ class PostgresSettings(BaseConfig):
|
|
|
22
24
|
default="marts", description="Schema for published mart tables"
|
|
23
25
|
)
|
|
24
26
|
|
|
27
|
+
def model_post_init(self, __context: Any) -> None:
|
|
28
|
+
host, port = resolve_host(
|
|
29
|
+
self.postgres_host, self.postgres_port, port_env_var="POSTGRES_PORT"
|
|
30
|
+
)
|
|
31
|
+
object.__setattr__(self, "postgres_host", host)
|
|
32
|
+
object.__setattr__(self, "postgres_port", port)
|
|
33
|
+
|
|
25
34
|
def get_postgres_connection_string(self, include_db: bool = True) -> str:
|
|
26
35
|
"""Build a PostgreSQL connection URI from current settings.
|
|
27
36
|
|
|
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
|