aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.py.sample13
-rwxr-xr-xsync.py3
2 files changed, 15 insertions, 1 deletions
diff --git a/config.py.sample b/config.py.sample
index d85e4ef..42bbac4 100644
--- a/config.py.sample
+++ b/config.py.sample
@@ -1,4 +1,17 @@
from requests.auth import HTTPBasicAuth
+#
+# Config keys
+# ===========
+#
+# db_conn_str: libpq database connection string
+# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
+#
+# db_schema: database schema name
+# If not specified, it defaults to 'peeringdb'
+#
+# auth: HTTPBasicAuth('username', 'password')
+# Authenticate using username/password
+#
def get_config():
return {
diff --git a/sync.py b/sync.py
index cbc41ff..bd26211 100755
--- a/sync.py
+++ b/sync.py
@@ -17,7 +17,8 @@ from urllib.parse import urljoin
import logging
from config import get_config
-schema_name = get_config()['db_schema']
+
+schema_name = get_config().get('db_schemad', 'peeringdb')
#logging.basicConfig(level=logging.DEBUG)