From 1b6c4ba7e1fc1548a5b9692c923a6523a11ef4af Mon Sep 17 00:00:00 2001 From: Mehdy Khoshnoody Date: Thu, 7 Oct 2021 17:12:49 +0330 Subject: [PATCH] Add docs for escape proxy feature Signed-off-by: Mehdy Khoshnoody --- docs/tips.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/tips.rst b/docs/tips.rst index cff0d862..dbb762fb 100644 --- a/docs/tips.rst +++ b/docs/tips.rst @@ -195,6 +195,23 @@ Values that being with a ``$`` may be interpolated. Pass ``interpolate=True`` to FOO +Escape Proxy +============ + +If you're having trouble with values starting with dollar sign ($) without the intention of proxying the value to +another, You should enbale the ``escape_proxy`` and prepend a backslash to it. + +.. code-block:: python + + import environ + + env = environ.Env() + env.escape_proxy = True + + # ESCAPED_VAR=\$baz + env.str('ESCAPED_VAR') # $baz + + Reading env files =================