ry-pg-utils 1.0.3__py3-none-any.whl → 1.0.4__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.
- ry_pg_utils/config.py +11 -0
- {ry_pg_utils-1.0.3.dist-info → ry_pg_utils-1.0.4.dist-info}/METADATA +6 -2
- {ry_pg_utils-1.0.3.dist-info → ry_pg_utils-1.0.4.dist-info}/RECORD +6 -6
- {ry_pg_utils-1.0.3.dist-info → ry_pg_utils-1.0.4.dist-info}/WHEEL +0 -0
- {ry_pg_utils-1.0.3.dist-info → ry_pg_utils-1.0.4.dist-info}/licenses/LICENSE +0 -0
- {ry_pg_utils-1.0.3.dist-info → ry_pg_utils-1.0.4.dist-info}/top_level.txt +0 -0
ry_pg_utils/config.py
CHANGED
@@ -18,6 +18,10 @@ class Config:
|
|
18
18
|
add_backend_to_all: bool
|
19
19
|
add_backend_to_tables: bool
|
20
20
|
raise_on_use_before_init: bool
|
21
|
+
ssh_host: str | None
|
22
|
+
ssh_port: int | None
|
23
|
+
ssh_user: str | None
|
24
|
+
ssh_key_path: str | None
|
21
25
|
|
22
26
|
|
23
27
|
dotenv.load_dotenv()
|
@@ -26,6 +30,9 @@ dotenv.load_dotenv()
|
|
26
30
|
_postgres_port_str = os.getenv("POSTGRES_PORT")
|
27
31
|
_postgres_port = int(_postgres_port_str) if _postgres_port_str is not None else None
|
28
32
|
|
33
|
+
_ssh_port_str = os.getenv("SSH_PORT")
|
34
|
+
_ssh_port = int(_ssh_port_str) if _ssh_port_str is not None else None
|
35
|
+
|
29
36
|
pg_config = Config(
|
30
37
|
postgres_host=os.getenv("POSTGRES_HOST"),
|
31
38
|
postgres_port=_postgres_port,
|
@@ -41,4 +48,8 @@ pg_config = Config(
|
|
41
48
|
add_backend_to_all=True,
|
42
49
|
add_backend_to_tables=True,
|
43
50
|
raise_on_use_before_init=True,
|
51
|
+
ssh_host=os.getenv("SSH_HOST"),
|
52
|
+
ssh_port=_ssh_port,
|
53
|
+
ssh_user=os.getenv("SSH_USER"),
|
54
|
+
ssh_key_path=os.getenv("SSH_KEY_PATH"),
|
44
55
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ry-pg-utils
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.4
|
4
4
|
Summary: Utility functions for PostgreSQL
|
5
5
|
Author: Ross Yeager
|
6
6
|
Author-email: ryeager12@email.com
|
@@ -202,6 +202,7 @@ from ry_pg_utils.connect import (
|
|
202
202
|
```
|
203
203
|
|
204
204
|
**Key Features:**
|
205
|
+
|
205
206
|
- Thread-local backend ID tracking
|
206
207
|
- Connection pooling with configurable parameters (pool_size, max_overflow, pool_recycle)
|
207
208
|
- Automatic connection recovery with retry logic (using tenacity)
|
@@ -238,6 +239,7 @@ exists = db.inst_is_in_db(
|
|
238
239
|
```
|
239
240
|
|
240
241
|
**Supported Protocol Buffer Types:**
|
242
|
+
|
241
243
|
- `int32`, `int64`, `uint32`, `uint64` → PostgreSQL `Integer`
|
242
244
|
- `float`, `double` → PostgreSQL `Float`
|
243
245
|
- `bool` → PostgreSQL `Boolean`
|
@@ -637,11 +639,12 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
637
639
|
|
638
640
|
## Author
|
639
641
|
|
640
|
-
Ross Yeager - ryeager12@email.com
|
642
|
+
Ross Yeager - `ryeager12@email.com`
|
641
643
|
|
642
644
|
## Changelog
|
643
645
|
|
644
646
|
### Version 1.0.2 (Current)
|
647
|
+
|
645
648
|
- PostgreSQL LISTEN/NOTIFY support with triggers and notifications
|
646
649
|
- NotificationListener class for background notification handling
|
647
650
|
- Automatic connection health checks with pool_pre_ping
|
@@ -650,6 +653,7 @@ Ross Yeager - ryeager12@email.com
|
|
650
653
|
- Improved error handling and connection recovery
|
651
654
|
|
652
655
|
### Version 1.0.0
|
656
|
+
|
653
657
|
- Initial release
|
654
658
|
- Database connection management with pooling
|
655
659
|
- Dynamic table creation from Protocol Buffers
|
@@ -1,5 +1,5 @@
|
|
1
1
|
ry_pg_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
ry_pg_utils/config.py,sha256=
|
2
|
+
ry_pg_utils/config.py,sha256=7W-JLNxZDoursPArtoKyOiEqUABGyO1ZEkTdlVBzdVM,1522
|
3
3
|
ry_pg_utils/connect.py,sha256=jF-Sj9oySPDfTlOh4_C6c03t4KW5Sef_MLHx_sh52a4,10108
|
4
4
|
ry_pg_utils/dynamic_table.py,sha256=VBkfbATRk_pW3EtAFHvMkGG0fLZMebw_LdWkFaDDugw,6866
|
5
5
|
ry_pg_utils/notify_trigger.py,sha256=_dsuPkoqjnSQqWrsdZK3FqI6zG5UuygVXHwtERwN99Y,12069
|
@@ -13,8 +13,8 @@ ry_pg_utils/pb_types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
13
13
|
ry_pg_utils/pb_types/database_pb2.py,sha256=yf__HycGrVoU8pzhYdnOhXhfAkgjeGl80ls_RsLemy4,2780
|
14
14
|
ry_pg_utils/pb_types/database_pb2.pyi,sha256=svpmlEY_99dA_u3CJqn7CO5D7CH2pAGTOqlhVMZLXC4,5689
|
15
15
|
ry_pg_utils/pb_types/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
ry_pg_utils-1.0.
|
17
|
-
ry_pg_utils-1.0.
|
18
|
-
ry_pg_utils-1.0.
|
19
|
-
ry_pg_utils-1.0.
|
20
|
-
ry_pg_utils-1.0.
|
16
|
+
ry_pg_utils-1.0.4.dist-info/licenses/LICENSE,sha256=PYnig94SABlde939TWrqvOqQkkfjuHttf8KpWKlPFlA,1068
|
17
|
+
ry_pg_utils-1.0.4.dist-info/METADATA,sha256=_ogikIhPdaeRF5KQRAg4Ie9Z-I7TPuwxCkm0t-GAVB0,18043
|
18
|
+
ry_pg_utils-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
19
|
+
ry_pg_utils-1.0.4.dist-info/top_level.txt,sha256=OruzbmsQHYyPnAw8RichQ5GK1Sxj-MQwWfJ93PEHXIM,12
|
20
|
+
ry_pg_utils-1.0.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|