1

In my config.py file, I have this and I need it in order to run my function app.

'headers' : {'Content-Type': 'application/x-www-form-urlencoded', 'Cache-Control': 'no-cache'},
    'locallogdir': r'',
    'azure_config' : {
        'driver' : '{ODBC Driver 17 for SQL Server}',
        'server' : '',
        'UID' : '',
        'PWD' : '',
        'database' : ''
        },

Where/how would I put it into my Azure FunctionApp? Does it go into the settings.json and if so, how? I tried to put it in there and it didn't work.

1 Answer 1

2

You need to keep them as AppSettings. You can add these settings under the Function App settings, Here is the complete documentation

import logging
import os
import azure.functions as func

def main(req: func.HttpRequest) -> func.HttpResponse:

    # Get the setting named 'myAppSetting'
    my_app_setting_value = os.environ["myAppSetting"]
    logging.info(f'My app setting value:{my_app_setting_value}')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.