A simple example - accessing Key Vault from a python http triggered function. Originally wanted to do this with MSI, but sadly, no MSI support just yet. When MSI is available it should look something like this. I don't do much python so if looking at this makes your insides hurt, please let me know Twitter GitHub.
because certain dependencies are binary, you have to build in a docker container - --build-native-deps does this for you during publish
to create a service principal for rbac assignment to KV secrets, use az ad sp create-for-rbac --name 'a-recognizable-name' --skip-assignment
to publish from local, login to azure cli az login and set your subscription to the one containing your function, then
func azure functionapp publish <your function app> --build-native-deps