title: Writing a connection string when password contains special characters
body: <p>I'm using SQLalchemy for a Python project, and I want to have a tidy connection string to access my database. So for example:</p>
  <pre><code>engine = create_engine('postgresql://user:pass@host/database')
  </code></pre>
  <p>The problem is my password contains a sequence of special characters that get interpreted as delimiters when I try to connect.</p>
  <p>I realize that I could just use <code>engine.URL.create()</code> and then pass my credentials like this:</p>
  <pre class="lang-py prettyprint-override"><code>import sqlalchemy as sa
  
  connection_url = sa.engine.URL.create(
      drivername=&quot;postgresql&quot;,
      username=&quot;user&quot;,
      password=&quot;p@ss&quot;,
      host=&quot;host&quot;,
      database=&quot;database&quot;,
  )
  print(connection_url)
  # postgresql://user:p%40ss@host/database
  </code></pre>
  <p>But I'd much rather use a connection string if this is possible.</p>
  <p>So to be clear, is it possible to encode my connection string, or the password part of the connection string - so that it can be properly parsed?</p>