"""Constants.""" from config import DEV_ENVIRONMENT OWS_MASTERS_REGISTRY_SERVICE_NAME = 'ows-masters-registry' OWS_MASTERS_REGISTRY_HEALTH_ENDPOINT = '/hello/' def get_service_url(environment, service_name, path): """Return the service url based on environment.""" service_url = 'https://{environment}-{service_name}.theorchard.io{path}' if environment == DEV_ENVIRONMENT: service_url = 'https://{environment}-{service_name}.dev.theorchard.io{path}' # noqa return service_url.format( environment=environment, service_name=service_name, path=path )