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.
Files changed (24) hide show
  1. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/PKG-INFO +1 -1
  2. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/pyproject.toml +1 -1
  3. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/__init__.py +1 -1
  4. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/settings.py +9 -0
  5. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/PKG-INFO +1 -1
  6. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/README.md +0 -0
  7. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/setup.cfg +0 -0
  8. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/cli.py +0 -0
  9. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/cli_plugin.py +0 -0
  10. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/exporter_service.yaml +0 -0
  11. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/plugin.py +0 -0
  12. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/publish_target.py +0 -0
  13. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/resource.py +0 -0
  14. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/service.yaml +0 -0
  15. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres/volume_setup.yaml +0 -0
  16. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/SOURCES.txt +0 -0
  17. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/dependency_links.txt +0 -0
  18. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/entry_points.txt +0 -0
  19. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/requires.txt +0 -0
  20. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/src/phlo_postgres.egg-info/top_level.txt +0 -0
  21. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/tests/test_integration_postgres.py +0 -0
  22. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/tests/test_postgres_cli.py +0 -0
  23. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/tests/test_postgres_plugin.py +0 -0
  24. {phlo_postgres-0.2.3 → phlo_postgres-0.2.4}/tests/test_resource.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: phlo-postgres
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: Postgres service plugin for Phlo
5
5
  Author-email: Phlo Team <team@phlo.dev>
6
6
  License: MIT
@@ -14,7 +14,7 @@ dependencies = [
14
14
  description = "Postgres service plugin for Phlo"
15
15
  name = "phlo-postgres"
16
16
  requires-python = ">=3.11"
17
- version = "0.2.3"
17
+ version = "0.2.4"
18
18
 
19
19
  [[project.authors]]
20
20
  email = "team@phlo.dev"
@@ -12,4 +12,4 @@ __all__ = [
12
12
  "PostgresSettings",
13
13
  "get_settings",
14
14
  ]
15
- __version__ = "0.2.3"
15
+ __version__ = "0.2.4"
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: phlo-postgres
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: Postgres service plugin for Phlo
5
5
  Author-email: Phlo Team <team@phlo.dev>
6
6
  License: MIT
File without changes
File without changes