You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
these providers will by default load all configurations with `(No Label)` from your configuration store.
37
+
these providers will by default load all configurations with `(No Label)` from your configuration store into a dictionary of key/values.
34
38
35
39
### Features
36
40
@@ -59,16 +63,23 @@ List of features we are going to add to the Python Provider in the future.
59
63
You can refine or expand the configurations loaded from your store by using `SettingSelector`s. Setting selectors provide a way to pass a key filter and label filter into the provider.
60
64
61
65
```python
66
+
from azure.appconfiguration.provider import load, SettingSelector
In this example all configuration with empty label and the dev label are loaded. Because the dev selector is listed last, any configurations from dev take priority over those with `(No Label)` when duplicates are found.
66
74
67
75
### Trimming Keys
68
76
69
77
You can trim the prefix off of keys by providing a list of trimmed key prefixes to the provider. For example, if you have the key(s) like `/application/message` in your configuration store, you could trim `/application/` from them.
@@ -83,14 +94,21 @@ Key Vault References can be resolved by providing credentials to your key vault
83
94
You can provide `AzureAppConfigurationKeyVaultOptions` with a credential and all key vault references will be resolved with it. The provider will attempt to connect to any key vault referenced with the credential provided.
84
95
85
96
```python
97
+
from azure.appconfiguration.provider import load, AzureAppConfigurationKeyVaultOptions
If no Credentials or Clients are provided a secret resolver can be used. Secret resolver provides a way to return any value you want to a key vault reference.
102
120
103
121
```python
122
+
from azure.appconfiguration.provider import load, AzureAppConfigurationKeyVaultOptions
123
+
from azure.identity import DefaultAzureCredential
124
+
104
125
defsecret_resolver(uri):
105
126
return"From Secret Resolver"
106
127
@@ -126,7 +147,7 @@ Check out our Django and Flask examples to see how to use the provider in a web
126
147
This project welcomes contributions and suggestions. Most contributions require
127
148
you to agree to a Contributor License Agreement (CLA) declaring that you have
128
149
the right to, and actually do, grant us the rights to use your contribution.
129
-
For details, visit https://cla.microsoft.com.
150
+
For details, visit <https://cla.microsoft.com>.
130
151
131
152
When you submit a pull request, a CLA-bot will automatically determine whether
132
153
you need to provide a CLA and decorate the PR appropriately (e.g., label,
@@ -135,11 +156,8 @@ need to do this once across all repos using our CLA.
135
156
136
157
This project has adopted the
137
158
[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information,
Copy file name to clipboardExpand all lines: sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/_azureappconfigurationprovider.py
Copy file name to clipboardExpand all lines: sdk/appconfiguration/azure-appconfiguration-provider/azure/appconfiguration/provider/aio/_azureappconfigurationproviderasync.py
0 commit comments