We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 988247c commit 1f348eeCopy full SHA for 1f348ee
example/example/example.py
@@ -2,6 +2,7 @@
2
3
import asyncio
4
import json
5
+import logging
6
import os
7
from uuid import uuid4, UUID
8
from typing import Any, List
@@ -10,6 +11,8 @@
10
11
12
from models import AModel, ExtendedModel, ExtendedModelData
13
14
+logging.basicConfig(level=logging.INFO)
15
+
16
17
class UUIDJsonEncoder(json.JSONEncoder):
18
"""Extended Json Encoder to allow encoding of objects containing UUID."""
@@ -23,6 +26,7 @@ def default(self, obj: Any) -> Any:
23
26
24
27
conn_params = ConnectionParameters(
25
28
host=os.getenv('DB_HOST', 'localhost'),
29
+ port=int(os.getenv('DB_PORT', '5432')),
30
# user=os.getenv('DB_USER', 'postgres'),
31
# password=os.getenv('DB_PASS', 'postgres'),
32
# database=os.getenv('DB_NAME', 'postgres'))
0 commit comments