blob: 9e3ba4490f3d498a0989a5f64dea7e1e0a1ce323 (
plain) (
tree)
|
|
#
# Config keys
# ===========
#
# domain_name: PeeringDB domain name
# Defaults to "www.peeringdb.com",
# but can eg. be set to "beta.peeringdb.com" for testing
#
# object_types: array of object types to sync
# defaults to finding them through the machine-readable
# API documentaion, but if that is too slow (parsing a big YAML file),
# then you can just set it statically.
# This is also useful if you only want a subset of object types:
# Example: 'object_types': [ 'org', 'net', 'poc' ]
#
# 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: 'API-key'
# Authenticate using an API-key.
#
# https://docs.peeringdb.com/blog/api_keys/
# https://github.com/peeringdb/peeringdb/blob/master/docs/api_keys.md
#
# auth: HTTPBasicAuth('username', 'password')
# Authenticate using username/password (DEPRECATED)
# requires: from requests.auth import HTTPBasicAuth
#
def get_config():
return {
'db_conn_str': 'dbname=pdbtest',
'db_schema': 'peeringdb',
'auth': 'obtain_an_api-key_from_peeringdb_com',
}
|