docs(databases): correct the way of using use environment variables (#24633)

This commit is contained in:
Duyet Le
2023-07-11 23:50:01 +07:00
committed by GitHub
parent 4caf33b41d
commit 7476f7af73

View File

@@ -45,9 +45,9 @@ A common pattern is to use environment variables to make secrets available.
```python
def example_password_as_env_var(url):
# assuming the uri looks like
# mysql://localhost?superset_user:{SUPERSET_PASSWORD}
return url.password.format(os.environ)
# assuming the uri looks like
# mysql://localhost?superset_user:{SUPERSET_PASSWORD}
return url.password.format(**os.environ)
SQLALCHEMY_CUSTOM_PASSWORD_STORE = example_password_as_env_var
```