mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
docs(databases): correct the way of using use environment variables (#24633)
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user