machristie commented on a change in pull request #8: Python SDK for authentication was keycloak and for other admin services URL: https://github.com/apache/airavata-custos/pull/8#discussion_r324874623
########## File path: clients/python/airavata_custos/settings.py ########## @@ -0,0 +1,33 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +KEYCLOAK_AUTHORIZE_URL = 'https://localhost:8443/auth/realms/default/protocol/openid-connect/auth' Review comment: I don't think a settings.py script is ideal for a library. This pattern works pretty well for a Django application because the developers will just edit as needed. But consumers of the Custos Python SDK won't have a good way to edit this as needed. I think instead we could either: - Have a Settings class with default values and the client can instantiate it and override those values and then pass in that instance as a parameter or maybe register it - Read settings from a settings file. You can use the [configparser](https://docs.python.org/3/library/configparser.html) to load an `.ini` style config file. There could be a default location for the file and/or the location of the file could be passed in as a parameter ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
