You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2023/07/11 16:50:08 UTC

[superset] branch master updated: docs(databases): correct the way of using use environment variables (#24633)

This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 7476f7af73 docs(databases): correct the way of using use environment variables (#24633)
7476f7af73 is described below

commit 7476f7af73fe3b1b88e63051af11d6ea5894b534
Author: Duyet Le <50...@users.noreply.github.com>
AuthorDate: Tue Jul 11 23:50:01 2023 +0700

    docs(databases): correct the way of using use environment variables (#24633)
---
 docs/docs/databases/extra-settings.mdx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/docs/databases/extra-settings.mdx b/docs/docs/databases/extra-settings.mdx
index 9754afe7d2..88842241fa 100644
--- a/docs/docs/databases/extra-settings.mdx
+++ b/docs/docs/databases/extra-settings.mdx
@@ -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
 ```